[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

sullivan sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:27:35 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 1e1f9883e9299b059e970515983b8b88378588c6
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Feb 25 16:51:58 2004 +0000

    WebCore:
    
            WebCore part of fix for <rdar://problem/3546370>: add a way to tab to menus,
            checkmarks, and buttons without turning on Full Keyboard Acceess
    
            Reviewed by Ken.
    
            * kwq/KWQKHTMLPart.h:
            * kwq/KWQKHTMLPart.mm:
            (KWQKHTMLPart::tabsToAllControls):
            now checks for option-tab like tabsToLinks
            (KWQKHTMLPart::partForWidget):
            new method, extracted from bridgeForWidget
            (KWQKHTMLPart::bridgeForWidget):
            now calls extracted method
    
            * kwq/KWQButton.mm:
            (-[KWQButton canBecomeKeyView]):
            overridden to handle our rules about full keyboard access, different
            than NSView's rules
            * kwq/KWQComboBox.mm:
            (-[KWQPopUpButton canBecomeKeyView]):
            ditto
            * kwq/KWQListBox.mm:
            (-[KWQTableView canBecomeKeyView]):
            ditto
    
    WebKit:
    
            WebKit part of fix for <rdar://problem/3546370>: add a way to tab to menus,
            checkmarks, and buttons without turning on Full Keyboard Acceess
    
            Reviewed by Ken.
    
            * WebCoreSupport.subproj/WebBridge.m:
            (-[WebBridge _retrieveKeyboardUIModeFromPreferences:]):
            turn on WebCoreKeyboardAccessFull bit whenever we turn on
            WebCoreKeyboardAccessTabsToLinks bit
    
    WebBrowser:
    
            - WebBrowser part of fix for <rdar://problem/3546370>: add a way to tab to menus,
              checkmarks, and buttons without turning on Full Keyboard Acceess
            - fixed <rdar://problem/3566996>: "Highlight each item" choice in Preferences
              should use a checkbox and have different wording
    
            Reviewed by Ken.
    
            * Preferences.subproj/AdvancedPreferences.h:
            * Preferences.subproj/AdvancedPreferences.m:
            (systemIsInFullKeyboardAccessMode):
            new function, reads the state of the Full Keyboard Access setting
            (-[AdvancedPreferences updateTabToAllViews]):
            set checkbox instead of matrix; new wording for fine print; renamed method
            (-[AdvancedPreferences keyboardUIModeDidChange:]):
            notification callback; call updateTabToAllViews
            (-[AdvancedPreferences toggleTabToAll:]):
            new method, replaces takeTabToLinksSettingFrom:
            (-[AdvancedPreferences initializeFromDefaults]):
            call renamed method
            (-[AdvancedPreferences moduleWillBeRemoved]):
            stop observing notification for Full Keyboard Access mode change
            (-[AdvancedPreferences moduleWasInstalled]):
            start observing notification for Full Keyboard Access mode change
    
            * Preferences.subproj/English.lproj/AdvancedPreferences.nib:
            replace radio buttons with checkbox; rejigger positions
    
            * English.lproj/Localizable.strings:
            * English.lproj/StringsNotToBeLocalized.txt:
            Updated for these changes
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6116 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index c523bf1..172a503 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,30 @@
+2004-02-25  John Sullivan  <sullivan at apple.com>
+
+        WebCore part of fix for <rdar://problem/3546370>: add a way to tab to menus, 
+        checkmarks, and buttons without turning on Full Keyboard Acceess
+
+        Reviewed by Ken.
+
+        * kwq/KWQKHTMLPart.h:
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::tabsToAllControls):
+        now checks for option-tab like tabsToLinks
+        (KWQKHTMLPart::partForWidget):
+        new method, extracted from bridgeForWidget
+        (KWQKHTMLPart::bridgeForWidget):
+        now calls extracted method
+
+        * kwq/KWQButton.mm:
+        (-[KWQButton canBecomeKeyView]):
+        overridden to handle our rules about full keyboard access, different
+        than NSView's rules
+        * kwq/KWQComboBox.mm:
+        (-[KWQPopUpButton canBecomeKeyView]):
+        ditto
+        * kwq/KWQListBox.mm:
+        (-[KWQTableView canBecomeKeyView]):
+        ditto
+        
 2004-02-24  Darin Adler  <darin at apple.com>
 
         Reviewed by Ken.
diff --git a/WebCore/kwq/KWQButton.mm b/WebCore/kwq/KWQButton.mm
index 407e8d6..837ba31 100644
--- a/WebCore/kwq/KWQButton.mm
+++ b/WebCore/kwq/KWQButton.mm
@@ -152,6 +152,16 @@
     return view;
 }
 
+- (BOOL)canBecomeKeyView {
+    // Simplified method from NSView; overridden to replace NSView's way of checking
+    // for full keyboard access with ours.
+    if (!KWQKHTMLPart::partForWidget(button)->tabsToAllControls()) {
+        return NO;
+    }
+    
+    return ([self window] != nil) && ![self isHiddenOrHasHiddenAncestor] && [self acceptsFirstResponder];
+}
+
 -(NSView *)nextValidKeyView
 {
     inNextValidKeyView = YES;
diff --git a/WebCore/kwq/KWQComboBox.mm b/WebCore/kwq/KWQComboBox.mm
index ab0bbf2..757d271 100644
--- a/WebCore/kwq/KWQComboBox.mm
+++ b/WebCore/kwq/KWQComboBox.mm
@@ -418,6 +418,16 @@ void QComboBox::populateMenu()
     return resign;
 }
 
+- (BOOL)canBecomeKeyView {
+    // Simplified method from NSView; overridden to replace NSView's way of checking
+    // for full keyboard access with ours.
+    if (!KWQKHTMLPart::partForWidget([self widget])->tabsToAllControls()) {
+        return NO;
+    }
+    
+    return ([self window] != nil) && ![self isHiddenOrHasHiddenAncestor] && [self acceptsFirstResponder];
+}
+
 - (NSView *)nextKeyView
 {
     QWidget *widget = [self widget];
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index 97633ad..4a8d0c7 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -180,6 +180,7 @@ public:
     void createEmptyDocument();
 
     static WebCoreBridge *bridgeForWidget(const QWidget *);
+    static KWQKHTMLPart *partForWidget(const QWidget *);
     
     QString requestedURLString() const;
     QString incomingReferrer() const;
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index f9c3e6d..74cb9e8 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -1093,7 +1093,10 @@ bool KWQKHTMLPart::tabsToLinks() const
 
 bool KWQKHTMLPart::tabsToAllControls() const
 {
-    return ([_bridge keyboardUIMode] & WebCoreKeyboardAccessFull);
+    if ([_bridge keyboardUIMode] & WebCoreKeyboardAccessFull)
+        return !KWQKHTMLPart::currentEventIsKeyboardOptionTab();
+    else
+        return KWQKHTMLPart::currentEventIsKeyboardOptionTab();
 }
 
 QMap<int, ScheduledAction*> *KWQKHTMLPart::pauseActions(const void *key)
@@ -1271,19 +1274,28 @@ void KWQKHTMLPart::openURLFromPageCache(KWQPageState *state)
     checkCompleted();
 }
 
-WebCoreBridge *KWQKHTMLPart::bridgeForWidget(const QWidget *widget)
+KWQKHTMLPart *KWQKHTMLPart::partForWidget(const QWidget *widget)
 {
     ASSERT_ARG(widget, widget);
-
+    
     NodeImpl *node = nodeForWidget(widget);
     if (node) {
-	return partForNode(node)->bridge() ;
+	return partForNode(node);
     }
     
     // Assume all widgets are either form controls, or KHTMLViews.
     const KHTMLView *view = dynamic_cast<const KHTMLView *>(widget);
     ASSERT(view);
-    return KWQ(view->part())->bridge();
+    return KWQ(view->part());
+}
+
+WebCoreBridge *KWQKHTMLPart::bridgeForWidget(const QWidget *widget)
+{
+    ASSERT_ARG(widget, widget);
+    
+    KWQKHTMLPart *part = partForWidget(widget);
+    ASSERT(part);
+    return part->bridge();
 }
 
 KWQKHTMLPart *KWQKHTMLPart::partForNode(NodeImpl *node)
diff --git a/WebCore/kwq/KWQListBox.mm b/WebCore/kwq/KWQListBox.mm
index 5c9ccde..4a8bae4 100644
--- a/WebCore/kwq/KWQListBox.mm
+++ b/WebCore/kwq/KWQListBox.mm
@@ -421,6 +421,16 @@ void QListBox::setWritingDirection(QPainter::TextDirection d)
     return resign;
 }
 
+- (BOOL)canBecomeKeyView {
+    // Simplified method from NSView; overridden to replace NSView's way of checking
+    // for full keyboard access with ours.
+    if (!KWQKHTMLPart::partForWidget(_box)->tabsToAllControls()) {
+        return NO;
+    }
+    
+    return ([self window] != nil) && ![self isHiddenOrHasHiddenAncestor] && [self acceptsFirstResponder];
+}
+
 - (NSView *)nextKeyView
 {
     return _box && inNextValidKeyView
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 41c4b1f..7dae01c 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,15 @@
+2004-02-25  John Sullivan  <sullivan at apple.com>
+
+        WebKit part of fix for <rdar://problem/3546370>: add a way to tab to menus, 
+        checkmarks, and buttons without turning on Full Keyboard Acceess
+
+        Reviewed by Ken.
+
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge _retrieveKeyboardUIModeFromPreferences:]):
+        turn on WebCoreKeyboardAccessFull bit whenever we turn on
+        WebCoreKeyboardAccessTabsToLinks bit
+
 2004-02-24  Chris Blumenberg  <cblu at apple.com>
 
 	I forgot to add these files in my last check-in.
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 28545cd..7c30700 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -1099,9 +1099,11 @@ static id <WebFormDelegate> formDelegate(WebBridge *self)
     // turns on both bits.
     _keyboardUIMode = (mode & 0x2) ? WebCoreKeyboardAccessFull : WebCoreKeyboardAccessDefault;
     
-    // check for tabbing to links
+    // check for tabbing to links; also, we always do full keyboard access when this preference is set,
+    // regardless of the system preferences setting
     if ([[WebPreferences standardPreferences] tabsToLinks]) {
         _keyboardUIMode |= WebCoreKeyboardAccessTabsToLinks;
+        _keyboardUIMode |= WebCoreKeyboardAccessFull;
     }
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list