[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:37:38 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit b686da949c469bf6f9fdd604d7a071ccc096fc7c
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Apr 28 21:44:51 2004 +0000

            A little bit more progress in wiring up the font panel.
    
            Reviewed by Ken.
    
            * WebView.subproj/WebViewInternal.h:
            put _updateFontPanel here. Also moved _isLoading here, since it was
            already in a category named WebInternal
    
            * WebView.subproj/WebView.m:
            (-[WebView _isLoading]):
            moved into WebInternal category implementation
            (_textAttributesFromStyle):
            changed from method to function
            (_fontFromStyle):
            added, guts not filled in yet
            (-[WebView _updateFontPanel]):
            now calls these two functions (but results are always nil)
            (-[WebView setSelectedDOMRange:affinity:]):
            remove call to _updateFontPanel here since it's now called in
            the proper bottleneck
    
            * WebCoreSupport.subproj/WebBridge.m:
            (-[WebBridge postDidChangeNotification]):
            call -[WebView _updateFontPanel] in addition to sending notification
            (-[WebBridge postDidChangeSelectionNotification]):
            ditto
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6507 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index aa7dceb..b307ccb 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,34 @@
 2004-04-28  John Sullivan  <sullivan at apple.com>
 
+        A little bit more progress in wiring up the font panel.
+
+        Reviewed by Ken.
+
+        * WebView.subproj/WebViewInternal.h:
+        put _updateFontPanel here. Also moved _isLoading here, since it was
+        already in a category named WebInternal
+
+        * WebView.subproj/WebView.m:
+        (-[WebView _isLoading]):
+        moved into WebInternal category implementation
+        (_textAttributesFromStyle):
+        changed from method to function
+        (_fontFromStyle):
+        added, guts not filled in yet
+        (-[WebView _updateFontPanel]):
+        now calls these two functions (but results are always nil)
+        (-[WebView setSelectedDOMRange:affinity:]):
+        remove call to _updateFontPanel here since it's now called in
+        the proper bottleneck
+
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge postDidChangeNotification]):
+        call -[WebView _updateFontPanel] in addition to sending notification
+        (-[WebBridge postDidChangeSelectionNotification]):
+        ditto
+
+2004-04-28  John Sullivan  <sullivan at apple.com>
+
         - fixed these bugs:
         <rdar://problem/3636570>: "API: [WebPreferences tabsToLinks] should be public API"        
         <rdar://problem/3610597>: "API: could turn "stealth browsing" preference into API"
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 7d934ab..63fea61 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -38,6 +38,7 @@
 #import <WebKit/WebPreferencesPrivate.h>
 #import <WebKit/WebResourceLoadDelegate.h>
 #import <WebKit/WebSubresourceClient.h>
+#import <WebKit/WebViewInternal.h>
 #import <WebKit/WebViewPrivate.h>
 #import <WebKit/WebUIDelegatePrivate.h>
 
@@ -1168,11 +1169,13 @@ static id <WebFormDelegate> formDelegate(WebBridge *self)
 
 - (void)postDidChangeNotification
 {
+    [[_frame webView] _updateFontPanel];
     [[NSNotificationCenter defaultCenter] postNotificationName:WebViewDidChangeNotification object:[_frame webView]];
 }
 
 - (void)postDidChangeSelectionNotification
 {
+    [[_frame webView] _updateFontPanel];
     [[NSNotificationCenter defaultCenter] postNotificationName:WebViewDidChangeSelectionNotification object:[_frame webView]];
 }
 
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 91ca04f..b30de4d 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -1150,10 +1150,6 @@ NSMutableDictionary *countInvocations;
 
 @end
 
- at interface WebView (WebInternal)
-- (BOOL)_isLoading;
- at end
-
 @implementation WebView
 
 + (BOOL)canShowMIMEType:(NSString *)MIMEType
@@ -1904,13 +1900,6 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
     [self setTextSizeMultiplier:[self textSizeMultiplier]*TextSizeMultiplierRatio];
 }
 
-- (BOOL)_isLoading
-{
-    WebFrame *mainFrame = [self mainFrame];
-    return [[mainFrame dataSource] isLoading]
-        || [[mainFrame provisionalDataSource] isLoading];
-}
-
 - (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item
 {
     SEL action = [item action];
@@ -2140,11 +2129,23 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
 
 @end
 
- at implementation WebView (WebViewEditing)
+ at implementation WebView (WebInternal)
+
+- (BOOL)_isLoading
+{
+    WebFrame *mainFrame = [self mainFrame];
+    return [[mainFrame dataSource] isLoading]
+        || [[mainFrame provisionalDataSource] isLoading];
+}
+
+static NSDictionary *_textAttributesFromStyle(DOMCSSStyleDeclaration *style)
+{
+    ERROR("unimplemented");
+    return nil;
+}
 
-- (NSDictionary *)_textAttributesFromStyle:(DOMCSSStyleDeclaration *)style
+static NSFont *_fontFromStyle(DOMCSSStyleDeclaration *style)
 {
-    // FIXME: this should probably be a method of DOMCSSStyleDeclaration
     ERROR("unimplemented");
     return nil;
 }
@@ -2182,9 +2183,12 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
         font = [NSFont menuFontOfSize:23];
     } else {
         style = [self typingStyle];
-        // FIXME: get font from style somehow. For now, return some bogus font to test the rest of the code path.
-        font = [NSFont toolTipsFontOfSize:17];
-        textAttributes = [self _textAttributesFromStyle:style];
+        font = _fontFromStyle(style);
+        if (font == nil) {
+            // For now, return some bogus font to test the rest of the code path.
+            font = [NSFont toolTipsFontOfSize:17];
+        }
+        textAttributes = _textAttributesFromStyle(style);
     }
     
     if (font != nil) {
@@ -2193,6 +2197,10 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
     [fm setSelectedAttributes:textAttributes isMultiple:!attributesIdenticalThroughoutSelection];
 }
 
+ at end
+
+ at implementation WebView (WebViewEditing)
+
 - (void)_editingKeyDown:(NSEvent *)event
 {   
     // Work around this bug:
@@ -2206,12 +2214,6 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
 - (void)setSelectedDOMRange:(DOMRange *)range affinity:(NSSelectionAffinity)selectionAffinity
 {
     [[self _bridgeForCurrentSelection] setSelectedDOMRange:range affinity:selectionAffinity];
-
-    // FIXME: this doesn't catch the cases where the selection is changed on the other side
-    // of the bridge. Eventually we need to notice all such changes and call _updateFontPanel,
-    // but this is not yet implemented. (The bottlenecks that send the notifications like
-    // webViewDidChangeSelection and friends will also need to call _updateFontPanel).
-    [self _updateFontPanel];
 }
 
 - (DOMRange *)selectedDOMRange
diff --git a/WebKit/WebView.subproj/WebViewInternal.h b/WebKit/WebView.subproj/WebViewInternal.h
index 7a7ac2f..b4abaa2 100644
--- a/WebKit/WebView.subproj/WebViewInternal.h
+++ b/WebKit/WebView.subproj/WebViewInternal.h
@@ -1,3 +1,8 @@
 // This header contains WebView declarations that can be used anywhere in the Web Kit, but are neither SPI nor API.
 
 #import <WebKit/WebViewPrivate.h>
+
+ at interface WebView (WebInternal)
+- (BOOL)_isLoading;
+- (void)_updateFontPanel;
+ at end;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list