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

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:58:39 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 5e298ae7c489942ec74d055558d33401d63c8b27
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 30 22:47:03 2003 +0000

    WebCore:
    
            Reviewed by Maciej
    
            Fix for this bug:
    
            <rdar://problem/3439688>: WebKit needs to retrieve full keyboard access preference
    
            * WebCore.pbproj/project.pbxproj:
            * kwq/KWQKHTMLPart.h: Declare keyboardUIMode accessor.
            * kwq/KWQKHTMLPart.mm:
            (KWQKHTMLPart::keyboardUIMode): Implement keyboardUIMode accessor (calls through the bridge).
            * kwq/WebCoreBridge.h: Declare the bridge accessor.
            * kwq/WebCoreKeyboardAccess.h: Added. Header defines keyboard UI mode constants.
    
    WebKit:
    
            Reviewed by Maciej
    
            Fix for this bug:
    
            <rdar://problem/3439688>: WebKit needs to retrieve full keyboard access preference
    
            * WebCoreSupport.subproj/WebBridge.h: Add two ivars: one to track the keyboard
            UI mode, the other a flag we use to register for notifications.
            * WebCoreSupport.subproj/WebBridge.m:
            (-[WebBridge dealloc]): Remove the notification observer to keyboard UI mode changes.
            (-[WebBridge _retrieveKeyboardUIModeFromPreferences:]): New method. Accesses the
            preferences to get the current keyboard UI mode.
            (-[WebBridge keyboardUIMode]): Returns the current keyboard UI mode. Registers for
            notifications of keyboard UI mode changes when called the first time.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5091 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 6597648..4176a13 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,18 @@
+2003-09-30  Ken Kocienda  <kocienda at apple.com>
+
+        Reviewed by Maciej
+        
+        Fix for this bug:
+        
+        <rdar://problem/3439688>: WebKit needs to retrieve full keyboard access preference
+        
+        * WebCore.pbproj/project.pbxproj:
+        * kwq/KWQKHTMLPart.h: Declare keyboardUIMode accessor.
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::keyboardUIMode): Implement keyboardUIMode accessor (calls through the bridge).
+        * kwq/WebCoreBridge.h: Declare the bridge accessor.
+        * kwq/WebCoreKeyboardAccess.h: Added. Header defines keyboard UI mode constants.
+        
 2003-09-30  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Ken.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 6597648..4176a13 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,18 @@
+2003-09-30  Ken Kocienda  <kocienda at apple.com>
+
+        Reviewed by Maciej
+        
+        Fix for this bug:
+        
+        <rdar://problem/3439688>: WebKit needs to retrieve full keyboard access preference
+        
+        * WebCore.pbproj/project.pbxproj:
+        * kwq/KWQKHTMLPart.h: Declare keyboardUIMode accessor.
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::keyboardUIMode): Implement keyboardUIMode accessor (calls through the bridge).
+        * kwq/WebCoreBridge.h: Declare the bridge accessor.
+        * kwq/WebCoreKeyboardAccess.h: Added. Header defines keyboard UI mode constants.
+        
 2003-09-30  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Ken.
diff --git a/WebCore/WebCore.pbproj/project.pbxproj b/WebCore/WebCore.pbproj/project.pbxproj
index e1f3168..d1c7fe4 100644
--- a/WebCore/WebCore.pbproj/project.pbxproj
+++ b/WebCore/WebCore.pbproj/project.pbxproj
@@ -508,6 +508,7 @@
 				BC7B2AFA0450824100A8000F,
 				BC80A6960468B78100DBCC9C,
 				BC32C2EF048BF95C00A8000B,
+				BE983D96052A2E0A00892D85,
 			);
 			isa = PBXHeadersBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -1882,6 +1883,30 @@
 //BC2
 //BC3
 //BC4
+//BE0
+//BE1
+//BE2
+//BE3
+//BE4
+		BE983D95052A2E0A00892D85 = {
+			expectedFileType = sourcecode.c.h;
+			fileEncoding = 30;
+			isa = PBXFileReference;
+			path = WebCoreKeyboardAccess.h;
+			refType = 4;
+			sourceTree = "<group>";
+		};
+		BE983D96052A2E0A00892D85 = {
+			fileRef = BE983D95052A2E0A00892D85;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+//BE0
+//BE1
+//BE2
+//BE3
+//BE4
 //F50
 //F51
 //F52
@@ -7257,6 +7282,7 @@
 				F587854F02DE375901EA4122,
 				F5B2A52B02E22573018635CB,
 				F5B2A52C02E22573018635CB,
+				BE983D95052A2E0A00892D85,
 				F587855002DE375901EA4122,
 				9325AAB7041D0E9A00A9CAC5,
 				9325AAB8041D0E9A00A9CAC5,
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index a9ff0a6..c98d40e 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -32,6 +32,8 @@
 #include "html_formimpl.h"
 #include "html_tableimpl.h"
 
+#import "WebCoreKeyboardAccess.h"
+
 #include <CoreFoundation/CoreFoundation.h>
 
 class KHTMLPartPrivate;
@@ -223,6 +225,8 @@ public:
     QChar backslashAsCurrencySymbol() const;
 
     NSColor *bodyBackgroundColor() const;
+    
+    WebCoreKeyboardUIMode keyboardUIMode() const;
 
 private:
     virtual void khtmlMousePressEvent(khtml::MousePressEvent *);
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index b7de64e..3ef04b5 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -2399,4 +2399,7 @@ NSColor *KWQKHTMLPart::bodyBackgroundColor(void) const
     return nil;
 }
 
-
+WebCoreKeyboardUIMode KWQKHTMLPart::keyboardUIMode() const
+{
+    return [_bridge keyboardUIMode];
+}
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index bfbba22..1ff85a1 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -25,6 +25,8 @@
 
 #import <Foundation/Foundation.h>
 
+#import <WebCore/WebCoreKeyboardAccess.h>
+
 #ifdef __cplusplus
 
 class KWQKHTMLPart;
@@ -346,6 +348,8 @@ typedef enum {
 
 - (void)setHasBorder:(BOOL)hasBorder;
 
+- (WebCoreKeyboardUIMode)keyboardUIMode;
+
 @end
 
 // This interface definition allows those who hold a WebCoreBridge * to call all the methods
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index eb5dc88..418f3b9 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,20 @@
+2003-09-30  Ken Kocienda  <kocienda at apple.com>
+
+        Reviewed by Maciej
+        
+        Fix for this bug:
+        
+        <rdar://problem/3439688>: WebKit needs to retrieve full keyboard access preference
+        
+        * WebCoreSupport.subproj/WebBridge.h: Add two ivars: one to track the keyboard
+        UI mode, the other a flag we use to register for notifications.
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge dealloc]): Remove the notification observer to keyboard UI mode changes.
+        (-[WebBridge _retrieveKeyboardUIModeFromPreferences:]): New method. Accesses the
+        preferences to get the current keyboard UI mode.
+        (-[WebBridge keyboardUIMode]): Returns the current keyboard UI mode. Registers for
+        notifications of keyboard UI mode changes when called the first time.
+        
 2003-09-30  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Ken.
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.h b/WebKit/WebCoreSupport.subproj/WebBridge.h
index fdd5bc4..1fdea47 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.h
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.h
@@ -15,6 +15,8 @@
 @interface WebBridge : WebCoreBridge <WebCoreBridge>
 {
     WebFrame *_frame;
+    WebCoreKeyboardUIMode _keyboardUIMode;
+    BOOL _keyboardUIModeAccessed;
     BOOL _doingClientRedirect;
     BOOL _inNextKeyViewOutsideWebFrameViews;
 }
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index c0a4e50..5ed76f3 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -50,6 +50,9 @@
 #import <Foundation/NSURLFileTypeMappings.h>
 #import <WebKit/WebLocalizableStrings.h>
 
+#define KeyboardUIModeDidChangeNotification @"com.apple.KeyboardUIModeDidChange"
+#define AppleKeyboardUIMode CFSTR("AppleKeyboardUIMode")
+#define UniversalAccessDomain CFSTR("com.apple.universalaccess")
 
 @interface NSApplication (DeclarationStolenFromAppKit)
 - (void)_cycleWindowsReversed:(BOOL)reversed;
@@ -84,6 +87,11 @@
 - (void)dealloc
 {
     ASSERT(_frame == nil);
+
+    if (_keyboardUIModeAccessed) {
+        [[NSDistributedNotificationCenter defaultCenter] 
+            removeObserver:self name:KeyboardUIModeDidChangeNotification object:nil];
+    }
     
     --WebBridgeCount;
     
@@ -950,4 +958,35 @@ static id <WebFormDelegate> formDelegate(WebBridge *self)
     [[_frame frameView] _setHasBorder:hasBorder];
 }
 
+- (void)_retrieveKeyboardUIModeFromPreferences:(NSNotification *)notification
+{
+    CFPreferencesAppSynchronize(UniversalAccessDomain);
+
+    BOOL sanityCheck;
+    int mode = CFPreferencesGetAppIntegerValue(AppleKeyboardUIMode, UniversalAccessDomain, &sanityCheck);
+    ASSERT(sanityCheck);
+    
+    // The keyboard access mode is reported by two bits:
+    // Bit 0 is set if feature is on
+    // Bit 1 is set if full keyboard access works for any control, not just text boxes and lists
+    // We require both bits to be on.
+    // I do not know that we would ever get one bit on and the other off since
+    // checking the checkbox in system preferences which is marked as "Turn on full keyboard access"
+    // turns on both bits.
+    _keyboardUIMode = (mode & 0x2) ? WebCoreFullKeyboardAccess : WebCoreDefaultKeyboardAccess;
+}
+
+- (WebCoreKeyboardUIMode)keyboardUIMode
+{
+    if (!_keyboardUIModeAccessed) {
+        _keyboardUIModeAccessed = YES;
+        [self _retrieveKeyboardUIModeFromPreferences:nil];
+        
+        [[NSDistributedNotificationCenter defaultCenter] 
+            addObserver:self selector:@selector(_retrieveKeyboardUIModeFromPreferences:) 
+            name:KeyboardUIModeDidChangeNotification object:nil];
+    }
+    return _keyboardUIMode;
+}
+
 @end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list