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

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:58:01 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit de4c9ca2c08d244d076156a2b24f149ba44feca0
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Mar 21 22:59:04 2002 +0000

    Added setNeedsToApplyStyles: and reapplyStyles.  This is for dynamic preferences
    refresh support.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@795 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index e932f53..3f9f6a9 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,13 @@
+2002-03-21  Richard Williamson  <rjw at apple.com>
+
+        Added setNeedsToApplyStyles: and reapplyStyles.  This is for dynamic preferences
+        refresh support.
+        
+	* WebView.subproj/IFWebView.h:
+	* WebView.subproj/IFWebView.mm: (-[IFWebView reapplyStyles]), (-[IFWebView
+	layout]), (-[IFWebView setNeedsToApplyStyles:]), (-[IFWebView drawRect:]):
+	* WebView.subproj/IFWebViewPrivate.h:
+
 2002-03-21  John Sullivan  <sullivan at apple.com>
 
 	Cleaned up defaults registration and use. The class
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index e932f53..3f9f6a9 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,13 @@
+2002-03-21  Richard Williamson  <rjw at apple.com>
+
+        Added setNeedsToApplyStyles: and reapplyStyles.  This is for dynamic preferences
+        refresh support.
+        
+	* WebView.subproj/IFWebView.h:
+	* WebView.subproj/IFWebView.mm: (-[IFWebView reapplyStyles]), (-[IFWebView
+	layout]), (-[IFWebView setNeedsToApplyStyles:]), (-[IFWebView drawRect:]):
+	* WebView.subproj/IFWebViewPrivate.h:
+
 2002-03-21  John Sullivan  <sullivan at apple.com>
 
 	Cleaned up defaults registration and use. The class
diff --git a/WebKit/WebView.subproj/IFWebView.h b/WebKit/WebView.subproj/IFWebView.h
index a6b6107..77a8e4d 100644
--- a/WebKit/WebView.subproj/IFWebView.h
+++ b/WebKit/WebView.subproj/IFWebView.h
@@ -114,16 +114,6 @@
 - (void)stopAnimations;
 
 
-// Font API
-- (void)setFontSizes: (NSArray *)sizes;
-- (NSArray *)fontSizes;
-- (void)resetFontSizes;
-- (void)setStandardFont: (NSFont *)font;
-- (NSFont *)standardFont;
-- (void)setFixedFont: (NSFont *)font;
-- (NSFont *)fixedFont;
-
-
 // Drag and drop links and images.  Others?
 - (void)setCanDragFrom: (BOOL)flag;
 - (BOOL)canDragFrom;
diff --git a/WebKit/WebView.subproj/IFWebView.mm b/WebKit/WebView.subproj/IFWebView.mm
index d5dd040..0f90382 100644
--- a/WebKit/WebView.subproj/IFWebView.mm
+++ b/WebKit/WebView.subproj/IFWebView.mm
@@ -119,6 +119,32 @@
 */
 }
 
+- (void)reapplyStyles
+{
+    KHTMLView *widget = ((IFWebViewPrivate *)_viewPrivate)->widget;
+
+#define _KWQ_TIMING        
+#ifdef _KWQ_TIMING        
+    double start = CFAbsoluteTimeGetCurrent();
+#endif
+
+    if (widget->part()->xmlDocImpl() && 
+        widget->part()->xmlDocImpl()->renderer()){
+        if (((IFWebViewPrivate *)_viewPrivate)->needsToApplyStyles){
+            WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "doing layout\n");
+            //double start = CFAbsoluteTimeGetCurrent();
+            widget->part()->xmlDocImpl()->applyChanges(TRUE, TRUE);
+            //WebKitDebugAtLevel (WEBKIT_LOG_TIMING, "apply style time %e\n", CFAbsoluteTimeGetCurrent() - start);
+            ((IFWebViewPrivate *)_viewPrivate)->needsToApplyStyles = NO;
+        }
+    }
+
+#ifdef _KWQ_TIMING        
+    double thisTime = CFAbsoluteTimeGetCurrent() - start;
+    WEBKITDEBUGLEVEL2 (WEBKIT_LOG_TIMING, "%s apply style seconds = %f\n", widget->part()->baseURL().url().latin1(), thisTime);
+#endif
+}
+
 
 
 // This method should not be public until we have more completely
@@ -127,7 +153,6 @@
 {
     KHTMLView *widget = ((IFWebViewPrivate *)_viewPrivate)->widget;
 
-#define _KWQ_TIMING        
 #ifdef _KWQ_TIMING        
     double start = CFAbsoluteTimeGetCurrent();
 #endif
@@ -157,53 +182,6 @@
 }
 
 
-// Font API
-- (void)setFontSizes: (NSArray *)sizes
-{
-    [NSException raise:IFMethodNotYetImplemented format:@"IFWebView::setFontSizes: is not implemented"];
-}
-
-
-- (NSArray *)fontSizes
-{
-    [NSException raise:IFMethodNotYetImplemented format:@"IFWebView::fontSizes is not implemented"];
-    return nil;
-}
-
-
-
-- (void)resetFontSizes
-{
-    [NSException raise:IFMethodNotYetImplemented format:@"IFWebView::resetFontSizes is not implemented"];
-}
-
-
-- (void)setStandardFont: (NSFont *)font
-{
-    [NSException raise:IFMethodNotYetImplemented format:@"IFWebView::setStandardFont: is not implemented"];
-}
-
-
-- (NSFont *)standardFont
-{
-    [NSException raise:IFMethodNotYetImplemented format:@"IFWebView::standardFont is not implemented"];
-    return nil;
-}
-
-
-- (void)setFixedFont: (NSFont *)font
-{
-    [NSException raise:IFMethodNotYetImplemented format:@"IFWebView::setFixedFont: is not implemented"];
-}
-
-
-- (NSFont *)fixedFont
-{
-    [NSException raise:IFMethodNotYetImplemented format:@"IFWebView::fixedFont is not implemented"];
-    return nil;
-}
-
-
 // Drag and drop links and images.  Others?
 - (void)setCanDragFrom: (BOOL)flag
 {
@@ -318,6 +296,13 @@
 }
 
 
+- (void)setNeedsToApplyStyles: (bool)flag
+{
+    WEBKITDEBUGLEVEL1 (WEBKIT_LOG_VIEW, "flag = %d\n", (int)flag);
+    ((IFWebViewPrivate *)_viewPrivate)->needsToApplyStyles = flag;
+}
+
+
 // This should eventually be removed.
 - (void)drawRect:(NSRect)rect {
     KHTMLView *widget = ((IFWebViewPrivate *)_viewPrivate)->widget;
@@ -330,6 +315,9 @@
     
     if (widget != 0l){        
         WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "drawing\n");
+        
+        [self reapplyStyles];
+        
         [self layout];
 
 #ifdef _KWQ_TIMING        
diff --git a/WebKit/WebView.subproj/IFWebViewPrivate.h b/WebKit/WebView.subproj/IFWebViewPrivate.h
index 10947b3..bcdf956 100644
--- a/WebKit/WebView.subproj/IFWebViewPrivate.h
+++ b/WebKit/WebView.subproj/IFWebViewPrivate.h
@@ -23,6 +23,7 @@ class KHTMLView;
     NSScrollView *frameScrollView;
     bool isFlipped;
     bool needsLayout;
+    bool needsToApplyStyles;
 }
 
 @end
diff --git a/WebKit/WebView.subproj/WebFrameView.h b/WebKit/WebView.subproj/WebFrameView.h
index a6b6107..77a8e4d 100644
--- a/WebKit/WebView.subproj/WebFrameView.h
+++ b/WebKit/WebView.subproj/WebFrameView.h
@@ -114,16 +114,6 @@
 - (void)stopAnimations;
 
 
-// Font API
-- (void)setFontSizes: (NSArray *)sizes;
-- (NSArray *)fontSizes;
-- (void)resetFontSizes;
-- (void)setStandardFont: (NSFont *)font;
-- (NSFont *)standardFont;
-- (void)setFixedFont: (NSFont *)font;
-- (NSFont *)fixedFont;
-
-
 // Drag and drop links and images.  Others?
 - (void)setCanDragFrom: (BOOL)flag;
 - (BOOL)canDragFrom;
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index d5dd040..0f90382 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -119,6 +119,32 @@
 */
 }
 
+- (void)reapplyStyles
+{
+    KHTMLView *widget = ((IFWebViewPrivate *)_viewPrivate)->widget;
+
+#define _KWQ_TIMING        
+#ifdef _KWQ_TIMING        
+    double start = CFAbsoluteTimeGetCurrent();
+#endif
+
+    if (widget->part()->xmlDocImpl() && 
+        widget->part()->xmlDocImpl()->renderer()){
+        if (((IFWebViewPrivate *)_viewPrivate)->needsToApplyStyles){
+            WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "doing layout\n");
+            //double start = CFAbsoluteTimeGetCurrent();
+            widget->part()->xmlDocImpl()->applyChanges(TRUE, TRUE);
+            //WebKitDebugAtLevel (WEBKIT_LOG_TIMING, "apply style time %e\n", CFAbsoluteTimeGetCurrent() - start);
+            ((IFWebViewPrivate *)_viewPrivate)->needsToApplyStyles = NO;
+        }
+    }
+
+#ifdef _KWQ_TIMING        
+    double thisTime = CFAbsoluteTimeGetCurrent() - start;
+    WEBKITDEBUGLEVEL2 (WEBKIT_LOG_TIMING, "%s apply style seconds = %f\n", widget->part()->baseURL().url().latin1(), thisTime);
+#endif
+}
+
 
 
 // This method should not be public until we have more completely
@@ -127,7 +153,6 @@
 {
     KHTMLView *widget = ((IFWebViewPrivate *)_viewPrivate)->widget;
 
-#define _KWQ_TIMING        
 #ifdef _KWQ_TIMING        
     double start = CFAbsoluteTimeGetCurrent();
 #endif
@@ -157,53 +182,6 @@
 }
 
 
-// Font API
-- (void)setFontSizes: (NSArray *)sizes
-{
-    [NSException raise:IFMethodNotYetImplemented format:@"IFWebView::setFontSizes: is not implemented"];
-}
-
-
-- (NSArray *)fontSizes
-{
-    [NSException raise:IFMethodNotYetImplemented format:@"IFWebView::fontSizes is not implemented"];
-    return nil;
-}
-
-
-
-- (void)resetFontSizes
-{
-    [NSException raise:IFMethodNotYetImplemented format:@"IFWebView::resetFontSizes is not implemented"];
-}
-
-
-- (void)setStandardFont: (NSFont *)font
-{
-    [NSException raise:IFMethodNotYetImplemented format:@"IFWebView::setStandardFont: is not implemented"];
-}
-
-
-- (NSFont *)standardFont
-{
-    [NSException raise:IFMethodNotYetImplemented format:@"IFWebView::standardFont is not implemented"];
-    return nil;
-}
-
-
-- (void)setFixedFont: (NSFont *)font
-{
-    [NSException raise:IFMethodNotYetImplemented format:@"IFWebView::setFixedFont: is not implemented"];
-}
-
-
-- (NSFont *)fixedFont
-{
-    [NSException raise:IFMethodNotYetImplemented format:@"IFWebView::fixedFont is not implemented"];
-    return nil;
-}
-
-
 // Drag and drop links and images.  Others?
 - (void)setCanDragFrom: (BOOL)flag
 {
@@ -318,6 +296,13 @@
 }
 
 
+- (void)setNeedsToApplyStyles: (bool)flag
+{
+    WEBKITDEBUGLEVEL1 (WEBKIT_LOG_VIEW, "flag = %d\n", (int)flag);
+    ((IFWebViewPrivate *)_viewPrivate)->needsToApplyStyles = flag;
+}
+
+
 // This should eventually be removed.
 - (void)drawRect:(NSRect)rect {
     KHTMLView *widget = ((IFWebViewPrivate *)_viewPrivate)->widget;
@@ -330,6 +315,9 @@
     
     if (widget != 0l){        
         WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "drawing\n");
+        
+        [self reapplyStyles];
+        
         [self layout];
 
 #ifdef _KWQ_TIMING        
diff --git a/WebKit/WebView.subproj/WebFrameViewInternal.h b/WebKit/WebView.subproj/WebFrameViewInternal.h
index 10947b3..bcdf956 100644
--- a/WebKit/WebView.subproj/WebFrameViewInternal.h
+++ b/WebKit/WebView.subproj/WebFrameViewInternal.h
@@ -23,6 +23,7 @@ class KHTMLView;
     NSScrollView *frameScrollView;
     bool isFlipped;
     bool needsLayout;
+    bool needsToApplyStyles;
 }
 
 @end
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.h b/WebKit/WebView.subproj/WebFrameViewPrivate.h
index 10947b3..bcdf956 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.h
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.h
@@ -23,6 +23,7 @@ class KHTMLView;
     NSScrollView *frameScrollView;
     bool isFlipped;
     bool needsLayout;
+    bool needsToApplyStyles;
 }
 
 @end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list