WebCore:
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Apr 2006 00:22:40 +0000 (00:22 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Apr 2006 00:22:40 +0000 (00:22 +0000)
        Build fix:

        - move some prematurely code back

        * bridge/mac/WebCoreFrameBridge.h:
        * bridge/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge fini]):

WebKit:

        Build fix:

        - move some prematurely code back

        * WebCoreSupport/WebFrameBridge.h:
        * WebCoreSupport/WebFrameBridge.m:
        (-[WebFrameBridge fini]):
        (-[WebFrameBridge _preferences]):
        (-[WebFrameBridge _retrieveKeyboardUIModeFromPreferences:]):
        (-[WebFrameBridge keyboardUIMode]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14041 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/bridge/mac/WebCoreFrameBridge.h
WebCore/bridge/mac/WebCoreFrameBridge.mm
WebKit/ChangeLog
WebKit/WebCoreSupport/WebFrameBridge.h
WebKit/WebCoreSupport/WebFrameBridge.m

index ca329b244d35025e3d15f74a11e048119295022e..7d85a6c0ba6097a7254841d583aeb3d210fc2b2c 100644 (file)
@@ -1,3 +1,13 @@
+2006-04-24  Maciej Stachowiak  <mjs@apple.com>
+
+        Build fix:
+        
+        - move some prematurely code back
+
+        * bridge/mac/WebCoreFrameBridge.h:
+        * bridge/mac/WebCoreFrameBridge.mm:
+        (-[WebCoreFrameBridge fini]):
+
 2006-04-24  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Darin.
index 2ccf060787614e0192d8e60a48dd00269d4bf70d..c2b6e72917f67d6a6ffa07a0604e5ab159e84106 100644 (file)
@@ -179,8 +179,6 @@ typedef enum {
 {
     WebCoreMacFrame *m_frame;
     BOOL _shouldCreateRenderers;
-    WebCoreKeyboardUIMode _keyboardUIMode;
-    BOOL _keyboardUIModeAccessed;
 }
 
 + (WebCoreFrameBridge *)bridgeForDOMDocument:(DOMDocument *)document;
index 233ede7501ab5e2597461ffe3e0db3947e2552b2..bc81b2fab617f990b21497727becd2df93e2e279 100644 (file)
@@ -430,13 +430,6 @@ static inline WebCoreFrameBridge *bridge(Frame *frame)
 
 - (void)fini
 {
-    if (_keyboardUIModeAccessed) {
-        [[NSDistributedNotificationCenter defaultCenter] 
-            removeObserver:self name:KeyboardUIModeDidChangeNotification object:nil];
-        [[NSNotificationCenter defaultCenter] 
-            removeObserver:self name:WebPreferencesChangedNotification object:nil];
-    }
-
     [self removeFromFrame];
 }
 
@@ -2429,49 +2422,6 @@ static NSCharacterSet *_getPostSmartSet(void)
     return [isPreviousCharacter ? _getPreSmartSet() : _getPostSmartSet() characterIsMember:c];
 }
 
-#define KeyboardUIModeDidChangeNotification @"com.apple.KeyboardUIModeDidChange"
-#define AppleKeyboardUIMode CFSTR("AppleKeyboardUIMode")
-#define UniversalAccessDomain CFSTR("com.apple.universalaccess")
-
-- (void)_retrieveKeyboardUIModeFromPreferences:(NSNotification *)notification
-{
-    CFPreferencesAppSynchronize(UniversalAccessDomain);
-
-    Boolean keyExistsAndHasValidFormat;
-    int mode = CFPreferencesGetAppIntegerValue(AppleKeyboardUIMode, UniversalAccessDomain, &keyExistsAndHasValidFormat);
-    
-    // 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) ? WebCoreKeyboardAccessFull : WebCoreKeyboardAccessDefault;
-    
-    // check for tabbing to links
-    if ([[self _preferences] tabsToLinks]) {
-        _keyboardUIMode |= WebCoreKeyboardAccessTabsToLinks;
-    }
-}
-
-- (WebCoreKeyboardUIMode)keyboardUIMode
-{
-    if (!_keyboardUIModeAccessed) {
-        _keyboardUIModeAccessed = YES;
-        [self _retrieveKeyboardUIModeFromPreferences:nil];
-        
-        [[NSDistributedNotificationCenter defaultCenter] 
-            addObserver:self selector:@selector(_retrieveKeyboardUIModeFromPreferences:) 
-            name:KeyboardUIModeDidChangeNotification object:nil];
-
-        [[NSNotificationCenter defaultCenter] 
-            addObserver:self selector:@selector(_retrieveKeyboardUIModeFromPreferences:) 
-                   name:WebPreferencesChangedNotification object:nil];
-    }
-    return _keyboardUIMode;
-}
-
 @end
 
 @implementation WebCoreFrameBridge (WebCoreBridgeInternal)
index 5481990f4742c96fff0b0032b2f26ad1277313b9..c468cb26c216c293ae23ae4a025975bd74e33cc5 100644 (file)
@@ -1,3 +1,16 @@
+2006-04-24  Maciej Stachowiak  <mjs@apple.com>
+
+        Build fix:
+        
+        - move some prematurely code back
+
+        * WebCoreSupport/WebFrameBridge.h:
+        * WebCoreSupport/WebFrameBridge.m:
+        (-[WebFrameBridge fini]):
+        (-[WebFrameBridge _preferences]):
+        (-[WebFrameBridge _retrieveKeyboardUIModeFromPreferences:]):
+        (-[WebFrameBridge keyboardUIMode]):
+
 2006-04-24  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Darin.
index 12715118c80f6430c5e99f77ffdd0692ab31abbd..0067cf39e6a79432d6ee9c4d07d75bc7970cc69e 100644 (file)
@@ -39,6 +39,8 @@
 {
     WebFrame *_frame;
 
+    WebCoreKeyboardUIMode _keyboardUIMode;
+    BOOL _keyboardUIModeAccessed;
     BOOL _doingClientRedirect;
     BOOL _inNextKeyViewOutsideWebFrameViews;
     BOOL _haveUndoRedoOperations;
index 93a92c321454f4c0de5b200fa12fd883458cd251..4dadef853ab8db678e3a7ebe35e8ace3083309d1 100644 (file)
@@ -143,8 +143,18 @@ NSString *WebPluginContainerKey =   @"WebPluginContainer";
     return self;
 }
 
+#define KeyboardUIModeDidChangeNotification @"com.apple.KeyboardUIModeDidChange"
+#define AppleKeyboardUIMode CFSTR("AppleKeyboardUIMode")
+#define UniversalAccessDomain CFSTR("com.apple.universalaccess")
+
 - (void)fini
 {
+    if (_keyboardUIModeAccessed) {
+        [[NSDistributedNotificationCenter defaultCenter] 
+            removeObserver:self name:KeyboardUIModeDidChangeNotification object:nil];
+        [[NSNotificationCenter defaultCenter] 
+            removeObserver:self name:WebPreferencesChangedNotification object:nil];
+    }
     ASSERT(_frame == nil);
     --WebBridgeCount;
 }
@@ -164,6 +174,50 @@ NSString *WebPluginContainerKey =   @"WebPluginContainer";
     [super finalize];
 }
 
+- (WebPreferences *)_preferences
+{
+    return [[self webView] preferences];
+}
+
+- (void)_retrieveKeyboardUIModeFromPreferences:(NSNotification *)notification
+{
+    CFPreferencesAppSynchronize(UniversalAccessDomain);
+
+    Boolean keyExistsAndHasValidFormat;
+    int mode = CFPreferencesGetAppIntegerValue(AppleKeyboardUIMode, UniversalAccessDomain, &keyExistsAndHasValidFormat);
+    
+    // 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) ? WebCoreKeyboardAccessFull : WebCoreKeyboardAccessDefault;
+    
+    // check for tabbing to links
+    if ([[self _preferences] tabsToLinks]) {
+        _keyboardUIMode |= WebCoreKeyboardAccessTabsToLinks;
+    }
+}
+
+- (WebCoreKeyboardUIMode)keyboardUIMode
+{
+    if (!_keyboardUIModeAccessed) {
+        _keyboardUIModeAccessed = YES;
+        [self _retrieveKeyboardUIModeFromPreferences:nil];
+        
+        [[NSDistributedNotificationCenter defaultCenter] 
+            addObserver:self selector:@selector(_retrieveKeyboardUIModeFromPreferences:) 
+            name:KeyboardUIModeDidChangeNotification object:nil];
+
+        [[NSNotificationCenter defaultCenter] 
+            addObserver:self selector:@selector(_retrieveKeyboardUIModeFromPreferences:) 
+                   name:WebPreferencesChangedNotification object:nil];
+    }
+    return _keyboardUIMode;
+}
+
 - (WebFrame *)webFrame
 {
     return _frame;
@@ -1023,11 +1077,6 @@ NSString *WebPluginContainerKey =   @"WebPluginContainer";
 static BOOL loggedObjectCacheSize = NO;
 #endif
 
-- (WebPreferences *)_preferences
-{
-    return [[self webView] preferences];
-}
-
 -(int)getObjectCacheSize
 {
     vm_size_t memSize = WebSystemMainMemory();