[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 06:43:45 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 574a224d6ef578856e580522fdb277ad33e54ad3
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 24 17:17:16 2002 +0000

    	- fixed 3057383 -- focus rectangles are being drawn multiple times
    	- fixed 3051025 -- focus ring on password field gets darker and darker
    
    	To make focus rings clip too, we have to do more than just set the clip.
    	We also have to set the visible rectangle to make clipping happen, and we
    	need to be a subclass of NSClipView so that the focus ring drawing code will
    	consult us rather than one of our superviews.
    
            * WebView.subproj/WebHTMLView.h: Be a subclass of NSClipView.
            * WebView.subproj/WebHTMLView.m: (-[WebHTMLView drawRect:]): Set a inDrawRect
    	flag, and a drawRect rectangle. This tells us to clip to this rectangle.
    	what we need to clip to.
            * WebView.subproj/WebHTMLViewPrivate.h: Added inDrawRect and drawRect.
            * WebView.subproj/WebHTMLViewPrivate.m:
            (-[WebHTMLView visibleRect]): Clip the visible rect based on the drawRect while
    	inDrawRect is set.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2139 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index b97f106..3d35c9e 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,22 @@
+2002-09-24  Darin Adler  <darin at apple.com>
+
+	- fixed 3057383 -- focus rectangles are being drawn multiple times
+	- fixed 3051025 -- focus ring on password field gets darker and darker
+
+	To make focus rings clip too, we have to do more than just set the clip.
+	We also have to set the visible rectangle to make clipping happen, and we
+	need to be a subclass of NSClipView so that the focus ring drawing code will
+	consult us rather than one of our superviews.
+
+        * WebView.subproj/WebHTMLView.h: Be a subclass of NSClipView.
+        * WebView.subproj/WebHTMLView.m: (-[WebHTMLView drawRect:]): Set a inDrawRect
+	flag, and a drawRect rectangle. This tells us to clip to this rectangle.
+	what we need to clip to.
+        * WebView.subproj/WebHTMLViewPrivate.h: Added inDrawRect and drawRect.
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        (-[WebHTMLView visibleRect]): Clip the visible rect based on the drawRect while
+	inDrawRect is set.
+
 2002-09-23  Chris Blumenberg  <cblu at apple.com>
 
 	Factored URL pasteboard initialization to 1 place.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index b97f106..3d35c9e 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,22 @@
+2002-09-24  Darin Adler  <darin at apple.com>
+
+	- fixed 3057383 -- focus rectangles are being drawn multiple times
+	- fixed 3051025 -- focus ring on password field gets darker and darker
+
+	To make focus rings clip too, we have to do more than just set the clip.
+	We also have to set the visible rectangle to make clipping happen, and we
+	need to be a subclass of NSClipView so that the focus ring drawing code will
+	consult us rather than one of our superviews.
+
+        * WebView.subproj/WebHTMLView.h: Be a subclass of NSClipView.
+        * WebView.subproj/WebHTMLView.m: (-[WebHTMLView drawRect:]): Set a inDrawRect
+	flag, and a drawRect rectangle. This tells us to clip to this rectangle.
+	what we need to clip to.
+        * WebView.subproj/WebHTMLViewPrivate.h: Added inDrawRect and drawRect.
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        (-[WebHTMLView visibleRect]): Clip the visible rect based on the drawRect while
+	inDrawRect is set.
+
 2002-09-23  Chris Blumenberg  <cblu at apple.com>
 
 	Factored URL pasteboard initialization to 1 place.
diff --git a/WebKit/WebView.subproj/WebHTMLView.h b/WebKit/WebView.subproj/WebHTMLView.h
index efc2606..3f0ac15 100644
--- a/WebKit/WebView.subproj/WebHTMLView.h
+++ b/WebKit/WebView.subproj/WebHTMLView.h
@@ -16,7 +16,7 @@
 /*!
     @class WebHTMLView
 */
- at interface WebHTMLView : NSView <WebDocumentView, WebDocumentDragSettings, WebDocumentSearching, WebDocumentTextEncoding>
+ at interface WebHTMLView : NSClipView <WebDocumentView, WebDocumentDragSettings, WebDocumentSearching, WebDocumentTextEncoding>
 {
 @private
     WebHTMLViewPrivate *_private;
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 6751766..6bbb0e9 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -337,19 +337,23 @@
 - (void)drawRect:(NSRect)rect
 {
     LOG(View, "%@ drawing", self);
-
+    
     if (_private->savedSubviews) {
         ASSERT(_subviews == nil);
         _subviews = _private->savedSubviews;
         _private->savedSubviews = nil;
     }
     
-    if ([self inLiveResize]){
-        if (!NSEqualRects(rect, [self visibleRect])){
+    if ([self inLiveResize]) {
+        if (!NSEqualRects(rect, [self visibleRect])) {
             rect = [self visibleRect];
-            [self setNeedsLayout: YES];
+            [self setNeedsLayout:YES];
         }
     }
+    
+    ASSERT(!_private->inDrawRect);
+    _private->inDrawRect = YES;
+    _private->drawRect = rect;
 
     [self reapplyStyles];
 
@@ -398,6 +402,9 @@
     LOG(Timing, "%s draw seconds = %f", widget->part()->baseURL().URL().latin1(), thisTime);
 #endif
 
+    ASSERT(_private->inDrawRect);
+    _private->inDrawRect = NO;
+
     if (_private->subviewsSetAside) {
         ASSERT(_private->savedSubviews == nil);
         _private->savedSubviews = _subviews;
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.h b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
index f7b3839..fd2f01c 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.h
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
@@ -27,6 +27,9 @@
     
     id savedSubviews;
     BOOL subviewsSetAside;
+    
+    BOOL inDrawRect;
+    NSRect drawRect;
 }
 @end
 
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index ec4d809..82041c3 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -211,6 +211,15 @@ BOOL _modifierTrackingEnabled = FALSE;
     }
 }
 
+- (NSRect)visibleRect
+{
+    NSRect rect = [super visibleRect];
+    if (_private->inDrawRect) {
+        rect = NSIntersectionRect(rect, _private->drawRect);
+    }
+    return rect;
+}
+
 @end
 
 @implementation NSView (WebHTMLViewPrivate)
@@ -235,7 +244,7 @@ BOOL _modifierTrackingEnabled = FALSE;
 
 @implementation WebNSTextView
 
-static BOOL inDrawRect;
+static BOOL inNSTextViewDrawRect;
 
 // This code is here to make insertion point drawing work in a way that respects the
 // HTML view layering. If we can find a way to make it work without poseAsClass, we
@@ -279,7 +288,7 @@ static BOOL inDrawRect;
     }
     
     // Use the display mechanism to do all insertion point drawing in the web view.
-    if (inDrawRect) {
+    if (inNSTextViewDrawRect) {
         [super drawInsertionPointInRect:rect color:color turnedOn:turnedOn];
         return;
     }
@@ -292,9 +301,10 @@ static BOOL inDrawRect;
 
 - (void)_drawRect:(NSRect)rect clip:(BOOL)clip
 {
-    inDrawRect = YES;
+    ASSERT(!inNSTextViewDrawRect);
+    inNSTextViewDrawRect = YES;
     [super _drawRect:rect clip:clip];
-    inDrawRect = NO;
+    inNSTextViewDrawRect = NO;
 }
 
 @end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list