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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:54:19 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 4f285b48840c15c6ccf77b4d7f87c1b9043fc932
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Aug 27 06:41:12 2003 +0000

    WebCore:
    
            Reviewed by Maciej.
    
            - follow-on to fix for 3310943 -- REGRESSION (Panther): textareas in forms sometimes draw blank (bugreporter)
    
            * kwq/KWQListBox.mm: (QListBox::QListBox): Remove call to releaseGState. This was here to
            work around a problem we thought was an AppKit bug, but it turns out it was caused by
            NSView hackery in WebKit. We now do the WebKit part in a way that does not create the problem.
    
    WebKit:
    
            Reviewed by Maciej.
    
            - fixed 3310943 -- REGRESSION (Panther): textareas in forms sometimes draw blank (bugreporter)
    
            There are two fixes here. The more elegant and slightly faster one that requires a new AppKit,
            and the less elegant one that works without AppKit support. By including both we don't have to
            worry about timing of submission of WebKit vs. AppKit but we get the good, elegant fix. Later,
            we can delete the less elegant fix.
    
            * WebView.subproj/WebClipView.m:
            (+[WebClipView initialize]): Set up a boolean global so we only hav to do the "does AppKit support
            _focusRingVisibleRect" check one time.
            (-[WebClipView resetAdditionalClip]): Only do the renewGState thing if we don't have the
            _focusRingVisibleRect method, but if we do the renewGState thing, do it to self and all descendants
            using _web_renewGStateDeep.
            (-[WebClipView setAdditionalClip:]): Ditto.
            (-[WebClipView visibleRect]): Only limit this based on the additional clip if we don't have the
            _focusRingVisibleRect method.
            (-[WebClipView _focusRingVisibleRect]): Override the new method. Harmless if it's an old AppKit
            that doesn't have the method yet.
            (-[NSView _web_renewGStateDeep]): Implemented this helper method. We can get rid of it once we
            are entirely on the new AppKit.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4900 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 69b713d..d25c5e3 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -2,6 +2,16 @@
 
         Reviewed by Maciej.
 
+        - follow-on to fix for 3310943 -- REGRESSION (Panther): textareas in forms sometimes draw blank (bugreporter)
+
+        * kwq/KWQListBox.mm: (QListBox::QListBox): Remove call to releaseGState. This was here to
+        work around a problem we thought was an AppKit bug, but it turns out it was caused by
+        NSView hackery in WebKit. We now do the WebKit part in a way that does not create the problem.
+
+2003-08-26  Darin Adler  <darin at apple.com>
+
+        Reviewed by Maciej.
+
         - fixed 3031562 -- most forms don't work in certain configurations because of a bug in KWQVariant
 
         * kwq/KWQVariant.mm: (QVariant::QVariant): Set the b element of the union, not the d element,
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 69b713d..d25c5e3 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -2,6 +2,16 @@
 
         Reviewed by Maciej.
 
+        - follow-on to fix for 3310943 -- REGRESSION (Panther): textareas in forms sometimes draw blank (bugreporter)
+
+        * kwq/KWQListBox.mm: (QListBox::QListBox): Remove call to releaseGState. This was here to
+        work around a problem we thought was an AppKit bug, but it turns out it was caused by
+        NSView hackery in WebKit. We now do the WebKit part in a way that does not create the problem.
+
+2003-08-26  Darin Adler  <darin at apple.com>
+
+        Reviewed by Maciej.
+
         - fixed 3031562 -- most forms don't work in certain configurations because of a bug in KWQVariant
 
         * kwq/KWQVariant.mm: (QVariant::QVariant): Set the b element of the union, not the d element,
diff --git a/WebCore/kwq/KWQListBox.mm b/WebCore/kwq/KWQListBox.mm
index 621bdcf..37109b0 100644
--- a/WebCore/kwq/KWQListBox.mm
+++ b/WebCore/kwq/KWQListBox.mm
@@ -69,14 +69,6 @@ QListBox::QListBox(QWidget *parent)
     
     [tableView release];
 
-    // Something about the way we use the scroll view tickles what seems to be a bug
-    // in NSView's graphics state caching. In Panther, this led to a regression
-    // where list boxes would not update properly. Telling the clip view inside the
-    // scroll view we create not to cache the graphics state works around the problem.
-    // Eventually the AppKit team will pinpoint the problem and find a better fix.
-    // See Radar 3226083 for more details.
-    [[scrollView contentView] releaseGState];
-
     setView(scrollView);
     
     [scrollView release];
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 1bb41b3..f827300 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -2,6 +2,31 @@
 
         Reviewed by Maciej.
 
+        - fixed 3310943 -- REGRESSION (Panther): textareas in forms sometimes draw blank (bugreporter)
+
+        There are two fixes here. The more elegant and slightly faster one that requires a new AppKit,
+        and the less elegant one that works without AppKit support. By including both we don't have to
+        worry about timing of submission of WebKit vs. AppKit but we get the good, elegant fix. Later,
+        we can delete the less elegant fix.
+
+        * WebView.subproj/WebClipView.m:
+        (+[WebClipView initialize]): Set up a boolean global so we only hav to do the "does AppKit support
+        _focusRingVisibleRect" check one time.
+        (-[WebClipView resetAdditionalClip]): Only do the renewGState thing if we don't have the
+        _focusRingVisibleRect method, but if we do the renewGState thing, do it to self and all descendants
+        using _web_renewGStateDeep.
+        (-[WebClipView setAdditionalClip:]): Ditto.
+        (-[WebClipView visibleRect]): Only limit this based on the additional clip if we don't have the
+        _focusRingVisibleRect method.
+        (-[WebClipView _focusRingVisibleRect]): Override the new method. Harmless if it's an old AppKit
+        that doesn't have the method yet.
+        (-[NSView _web_renewGStateDeep]): Implemented this helper method. We can get rid of it once we
+        are entirely on the new AppKit.
+
+2003-08-26  Darin Adler  <darin at apple.com>
+
+        Reviewed by Maciej.
+
         - fixed 3321247 -- window size box disappears from Help window (caused by WebKit NSView hackery)
 
         * WebView.subproj/WebHTMLViewPrivate.m:
diff --git a/WebKit/WebView.subproj/WebClipView.m b/WebKit/WebView.subproj/WebClipView.m
index 5cc3b41..f04163a 100644
--- a/WebKit/WebView.subproj/WebClipView.m
+++ b/WebKit/WebView.subproj/WebClipView.m
@@ -10,13 +10,34 @@
 
 #import <WebKit/WebAssertions.h>
 
+// WebClipView's entire reason for existing is to set the clip used by focus ring redrawing.
+// There's no easy way to prevent the focus ring from drawing outside the passed-in clip rectangle
+// because it expects to have to draw outside the bounds of the view it's being drawn for.
+// But it looks for the enclosing clip view, which gives us a hook we can use to control it.
+// The "additional clip" is a clip for focus ring redrawing.
+
+// FIXME: Change terminology from "additional clip" to "focus ring clip".
+
+ at interface NSView (WebClipViewAdditions)
+- (void)_web_renewGStateDeep;
+ at end
+
 @implementation WebClipView
 
+static BOOL NSViewHasFocusRingVisibleRect;
+
++ (void)initialize
+{
+    NSViewHasFocusRingVisibleRect = [NSView instancesRespondToSelector:@selector(_focusRingVisibleRect)];
+}
+
 - (void)resetAdditionalClip
 {
     ASSERT(_haveAdditionalClip);
     _haveAdditionalClip = NO;
-    [self renewGState];
+    if (!NSViewHasFocusRingVisibleRect) {
+        [self _web_renewGStateDeep];
+    }
 }
 
 - (void)setAdditionalClip:(NSRect)additionalClip
@@ -24,7 +45,9 @@
     ASSERT(!_haveAdditionalClip);
     _haveAdditionalClip = YES;
     _additionalClip = additionalClip;
-    [self renewGState];
+    if (!NSViewHasFocusRingVisibleRect) {
+        [self _web_renewGStateDeep];
+    }
 }
 
 - (BOOL)hasAdditionalClip
@@ -41,6 +64,15 @@
 - (NSRect)visibleRect
 {
     NSRect rect = [super visibleRect];
+    if (_haveAdditionalClip && !NSViewHasFocusRingVisibleRect) {
+        rect = NSIntersectionRect(rect, _additionalClip);
+    }
+    return rect;
+}
+
+- (NSRect)_focusRingVisibleRect
+{
+    NSRect rect = [self visibleRect];
     if (_haveAdditionalClip) {
         rect = NSIntersectionRect(rect, _additionalClip);
     }
@@ -48,3 +80,13 @@
 }
 
 @end
+
+ at implementation NSView (WebClipViewAdditions)
+
+- (void)_web_renewGStateDeep
+{
+    [[self subviews] makeObjectsPerformSelector:@selector(_web_renewGStateDeep)];
+    [self renewGState];
+}
+ 
+ at end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list