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


The following commit has been merged in the debian/unstable branch:
commit 4989a1ae0182145141af343304a9096be9021a48
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Sep 23 22:43:29 2002 +0000

    WebCore:
    
    	WebCore part of fixes for proper layering when drawing subframes.
    
            * kwq/KWQWidget.mm: (QWidget::paint): Use the parent view in the "WebCoreFrameView"
    	case so we update the scroll view too, not just the HTML part. Also use the passed in
    	rectangle instead of always using the view bounds.
    
            * kwq/KWQScrollView.mm: (QScrollView::updateContents): Call setNeedsDisplayInRect
    	instead of displayRect.
    
            * kwq/KWQPainter.mm:
            (QPainter::drawRect): Use NSRectFill and NSFrameRect instead of NSBezierPath.
            (QPainter::fillRect): Ditto.
    
    WebKit:
    
    	- fixed 3052543 -- iframes don't work with z-index
    	- fixed 3057382 -- code to prevent subviews from drawing not working
    	perfectly for subframes
    
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView isOpaque]): Change this back to always return YES. We handle
    	this issue at another level now.
            (-[WebHTMLView drawRect:]): Clip to the passed-in rect. This was the big change
    	that fixed most of the trouble.
    
            * WebView.subproj/WebHTMLViewPrivate.h: Remove _isMainFrame.
            * WebView.subproj/WebHTMLViewPrivate.m:
            (+[WebHTMLView initialize]): Add an imposter for NSView too, so we can make opaqueAncestor
    	do what we need it to do. This will only work if the application doesn't also poseAsClass
    	NSView, but it does work.
            (-[WebNSView opaqueAncestor]): Always return the topmost WebHTMLView if the object is
    	inside one, even if there is an intervening opaque object.
    
            * WebView.subproj/WebView.m:
            (-[WebView setFrame:]): Do the display call at the window level so the topmost WebHTMLView
    	always gets involved.
            * WebView.subproj/WebViewPrivate.h: Remove _controller, since we already have a public
    	controller method. Add _isMainFrame.
            * WebView.subproj/WebViewPrivate.m: (-[WebView _isMainFrame]): Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2129 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 87fb780..0224038 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,18 @@
+2002-09-23  Darin Adler  <darin at apple.com>
+
+	WebCore part of fixes for proper layering when drawing subframes.
+
+        * kwq/KWQWidget.mm: (QWidget::paint): Use the parent view in the "WebCoreFrameView"
+	case so we update the scroll view too, not just the HTML part. Also use the passed in
+	rectangle instead of always using the view bounds.
+
+        * kwq/KWQScrollView.mm: (QScrollView::updateContents): Call setNeedsDisplayInRect
+	instead of displayRect.
+
+        * kwq/KWQPainter.mm:
+        (QPainter::drawRect): Use NSRectFill and NSFrameRect instead of NSBezierPath.
+        (QPainter::fillRect): Ditto.
+
 2002-09-23  David Hyatt  <hyatt at apple.com>
 
 	Don't let alternate stylesheets delay render tree construction.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 87fb780..0224038 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,18 @@
+2002-09-23  Darin Adler  <darin at apple.com>
+
+	WebCore part of fixes for proper layering when drawing subframes.
+
+        * kwq/KWQWidget.mm: (QWidget::paint): Use the parent view in the "WebCoreFrameView"
+	case so we update the scroll view too, not just the HTML part. Also use the passed in
+	rectangle instead of always using the view bounds.
+
+        * kwq/KWQScrollView.mm: (QScrollView::updateContents): Call setNeedsDisplayInRect
+	instead of displayRect.
+
+        * kwq/KWQPainter.mm:
+        (QPainter::drawRect): Use NSRectFill and NSFrameRect instead of NSBezierPath.
+        (QPainter::fillRect): Ditto.
+
 2002-09-23  David Hyatt  <hyatt at apple.com>
 
 	Don't let alternate stylesheets delay render tree construction.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 87fb780..0224038 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,18 @@
+2002-09-23  Darin Adler  <darin at apple.com>
+
+	WebCore part of fixes for proper layering when drawing subframes.
+
+        * kwq/KWQWidget.mm: (QWidget::paint): Use the parent view in the "WebCoreFrameView"
+	case so we update the scroll view too, not just the HTML part. Also use the passed in
+	rectangle instead of always using the view bounds.
+
+        * kwq/KWQScrollView.mm: (QScrollView::updateContents): Call setNeedsDisplayInRect
+	instead of displayRect.
+
+        * kwq/KWQPainter.mm:
+        (QPainter::drawRect): Use NSRectFill and NSFrameRect instead of NSBezierPath.
+        (QPainter::fillRect): Ditto.
+
 2002-09-23  David Hyatt  <hyatt at apple.com>
 
 	Don't let alternate stylesheets delay render tree construction.
diff --git a/WebCore/kwq/KWQPainter.mm b/WebCore/kwq/KWQPainter.mm
index d4cdd78..6dae440 100644
--- a/WebCore/kwq/KWQPainter.mm
+++ b/WebCore/kwq/KWQPainter.mm
@@ -141,11 +141,11 @@ void QPainter::drawRect(int x, int y, int w, int h)
         
     if (data->state.brush.style() != NoBrush) {
         _setColorFromBrush();
-        [NSBezierPath fillRect:NSMakeRect(x, y, w, h)];
+        NSRectFill(NSMakeRect(x, y, w, h));
     }
     if (data->state.pen.style() != NoPen) {
         _setColorFromPen();
-        [NSBezierPath strokeRect:NSMakeRect(x, y, w, h)];
+        NSFrameRect(NSMakeRect(x, y, w, h));
     }
 }
 
@@ -407,10 +407,10 @@ void QPainter::fillRect(int x, int y, int w, int h, const QBrush &brush)
 {
     if (data->state.paintingDisabled)
         return;
-        
+    
     if (brush.style() == SolidPattern) {
         [brush.color().getNSColor() set];
-        [NSBezierPath fillRect:NSMakeRect(x, y, w, h)];
+        NSRectFill(NSMakeRect(x, y, w, h));
     }
 }
 
diff --git a/WebCore/kwq/KWQScrollView.mm b/WebCore/kwq/KWQScrollView.mm
index 396b95f..c85979a 100644
--- a/WebCore/kwq/KWQScrollView.mm
+++ b/WebCore/kwq/KWQScrollView.mm
@@ -241,17 +241,17 @@ void QScrollView::resizeContents(int w, int h)
 
 void QScrollView::updateContents(int x, int y, int w, int h)
 {
+    updateContents(QRect(x, y, w, h));
+}
+
+void QScrollView::updateContents(const QRect &rect)
+{
     NSView *view = getView();
 
     if ([view _KWQ_isScrollView])
         view = [view _KWQ_getDocumentView];
 
-    [view displayRect: NSMakeRect (x, y, w, h)];
-}
-
-void QScrollView::updateContents(const QRect &rect)
-{
-    return updateContents(rect.x(), rect.y(), rect.width(), rect.height());
+    [view setNeedsDisplayInRect:rect];
 }
 
 void QScrollView::repaintContents(int x, int y, int w, int h, bool erase)
diff --git a/WebCore/kwq/KWQWidget.mm b/WebCore/kwq/KWQWidget.mm
index 4dc84b5..5ab91af 100644
--- a/WebCore/kwq/KWQWidget.mm
+++ b/WebCore/kwq/KWQWidget.mm
@@ -393,10 +393,13 @@ void QWidget::paint(QPainter *p, const QRect &r)
     if (p->paintingDisabled()) {
         return;
     }
+    
+    // Need to get to superview here for the same reason as in setFrameGeometry.
     NSView *view = getView();
-#if 0
-    NSRect rect = NSIntersectionRect([view convertRect:r fromView:[view superview]], [view bounds]);
-    NSLog(@"%@, rect is %@, bounds rect is %@", view, NSStringFromRect(rect), NSStringFromRect([view bounds]));
-#endif
-    [view displayRectIgnoringOpacity:[view bounds]];
+    if ([view conformsToProtocol:@protocol(WebCoreFrameView)]) {
+        view = [view superview];
+        ASSERT(view);
+    }
+    
+    [view displayRectIgnoringOpacity:[view convertRect:r fromView:[view superview]]];
 }
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 3826a12..83b0db1 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,30 @@
+2002-09-23  Darin Adler  <darin at apple.com>
+
+	- fixed 3052543 -- iframes don't work with z-index
+	- fixed 3057382 -- code to prevent subviews from drawing not working
+	perfectly for subframes
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView isOpaque]): Change this back to always return YES. We handle
+	this issue at another level now.
+        (-[WebHTMLView drawRect:]): Clip to the passed-in rect. This was the big change
+	that fixed most of the trouble.
+
+        * WebView.subproj/WebHTMLViewPrivate.h: Remove _isMainFrame.
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        (+[WebHTMLView initialize]): Add an imposter for NSView too, so we can make opaqueAncestor
+	do what we need it to do. This will only work if the application doesn't also poseAsClass
+	NSView, but it does work.
+        (-[WebNSView opaqueAncestor]): Always return the topmost WebHTMLView if the object is
+	inside one, even if there is an intervening opaque object.
+
+        * WebView.subproj/WebView.m:
+        (-[WebView setFrame:]): Do the display call at the window level so the topmost WebHTMLView
+	always gets involved.
+        * WebView.subproj/WebViewPrivate.h: Remove _controller, since we already have a public
+	controller method. Add _isMainFrame.
+        * WebView.subproj/WebViewPrivate.m: (-[WebView _isMainFrame]): Added.
+
 2002-09-23  Maciej Stachowiak  <mjs at apple.com>
 
         * Panels.subproj/WebStandardPanels.h: Added inline header docs.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 3826a12..83b0db1 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,30 @@
+2002-09-23  Darin Adler  <darin at apple.com>
+
+	- fixed 3052543 -- iframes don't work with z-index
+	- fixed 3057382 -- code to prevent subviews from drawing not working
+	perfectly for subframes
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView isOpaque]): Change this back to always return YES. We handle
+	this issue at another level now.
+        (-[WebHTMLView drawRect:]): Clip to the passed-in rect. This was the big change
+	that fixed most of the trouble.
+
+        * WebView.subproj/WebHTMLViewPrivate.h: Remove _isMainFrame.
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        (+[WebHTMLView initialize]): Add an imposter for NSView too, so we can make opaqueAncestor
+	do what we need it to do. This will only work if the application doesn't also poseAsClass
+	NSView, but it does work.
+        (-[WebNSView opaqueAncestor]): Always return the topmost WebHTMLView if the object is
+	inside one, even if there is an intervening opaque object.
+
+        * WebView.subproj/WebView.m:
+        (-[WebView setFrame:]): Do the display call at the window level so the topmost WebHTMLView
+	always gets involved.
+        * WebView.subproj/WebViewPrivate.h: Remove _controller, since we already have a public
+	controller method. Add _isMainFrame.
+        * WebView.subproj/WebViewPrivate.m: (-[WebView _isMainFrame]): Added.
+
 2002-09-23  Maciej Stachowiak  <mjs at apple.com>
 
         * Panels.subproj/WebStandardPanels.h: Added inline header docs.
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index bc9d97b..05dde14 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -104,8 +104,8 @@ enum {
     // We have to force a display now, rather than depend on
     // setNeedsDisplay: or we will get drawing turds under the
     // scrollbar frames.
-    if ([self inLiveResize])
-        [[self frameScrollView] display];
+    if ([self inLiveResize] && [self _isMainFrame])
+        [[self window] displayIfNeeded];
 }
 
 - (void)viewDidEndLiveResize
@@ -139,7 +139,7 @@ enum {
 }
 
 
-- (BOOL) isDocumentHTML
+- (BOOL)isDocumentHTML
 {
     return [[[self documentView] className] isEqualToString:@"WebHTMLView"];
 }
diff --git a/WebKit/WebView.subproj/WebFrameViewInternal.h b/WebKit/WebView.subproj/WebFrameViewInternal.h
index a5b9b14..d4be327 100644
--- a/WebKit/WebView.subproj/WebFrameViewInternal.h
+++ b/WebKit/WebView.subproj/WebFrameViewInternal.h
@@ -31,7 +31,6 @@
 - (void)_setDocumentView:(id <WebDocumentView>)view;
 - (void)_makeDocumentViewForDataSource:(WebDataSource *)dataSource;
 - (void)_setController:(WebController *)controller;
-- (WebController *)_controller;
 - (int)_marginWidth;
 - (int)_marginHeight;
 - (void)_setMarginWidth:(int)w;
@@ -53,4 +52,5 @@
 - (void)_goForward;
 + (NSMutableDictionary *)_viewTypes;
 + (BOOL)_canShowMIMEType:(NSString *)MIMEType;
+- (BOOL)_isMainFrame;
 @end
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.h b/WebKit/WebView.subproj/WebFrameViewPrivate.h
index a5b9b14..d4be327 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.h
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.h
@@ -31,7 +31,6 @@
 - (void)_setDocumentView:(id <WebDocumentView>)view;
 - (void)_makeDocumentViewForDataSource:(WebDataSource *)dataSource;
 - (void)_setController:(WebController *)controller;
-- (WebController *)_controller;
 - (int)_marginWidth;
 - (int)_marginHeight;
 - (void)_setMarginWidth:(int)w;
@@ -53,4 +52,5 @@
 - (void)_goForward;
 + (NSMutableDictionary *)_viewTypes;
 + (BOOL)_canShowMIMEType:(NSString *)MIMEType;
+- (BOOL)_isMainFrame;
 @end
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index 22c307d..8aa690a 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -82,11 +82,6 @@
     _private->controller = controller;    
 }
 
-- (WebController *)_controller
-{
-    return _private->controller;
-}
-
 - (NSClipView *)_contentView
 {
     return [[self frameScrollView] contentView];
@@ -239,12 +234,17 @@
 
 - (void)_goBack
 {
-    [[self _controller] goBack];
+    [_private->controller goBack];
 }
 
 - (void)_goForward
 {
-    [[self _controller] goForward];
+    [_private->controller goForward];
+}
+
+- (BOOL)_isMainFrame
+{
+    return [_private->controller mainFrame] == [_private->controller frameForView:self];
 }
 
 @end
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 1f0151c..9897a85 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -309,7 +309,7 @@
 
 - (BOOL)isOpaque
 {
-    return [self _isMainFrame];
+    return YES;
 }
 
 
@@ -359,6 +359,9 @@
     double start = CFAbsoluteTimeGetCurrent();
 #endif
     
+    [NSGraphicsContext saveGraphicsState];
+    NSRectClip(rect);
+
     NSView *focusView = [NSView focusView];
     if ([WebTextRenderer shouldBufferTextDrawing] && focusView)
         [[WebTextRendererFactory sharedFactory] startCoalesceTextDrawing];
@@ -370,6 +373,8 @@
     if ([WebTextRenderer shouldBufferTextDrawing] && focusView)
         [[WebTextRendererFactory sharedFactory] endCoalesceTextDrawing];
 
+    [NSGraphicsContext restoreGraphicsState];
+
 #ifdef DEBUG_LAYOUT
     NSRect vframe = [self frame];
     [[NSColor blackColor] set];
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.h b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
index 5dfdd5f..f7b3839 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.h
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
@@ -34,7 +34,6 @@
 - (void)_reset;
 - (WebController *)_controller;
 - (WebFrame *)_frame;
-- (BOOL)_isMainFrame;
 - (WebBridge *)_bridge;
 - (void)_adjustFrames;
 
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index 0177f13..6364d6e 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -34,6 +34,7 @@
 @interface NSView (WebNSViewDisplayExtras)
 - (void)_web_stopIfPluginView;
 - (void)_web_propagateDirtyRectToAncestor;
+- (void)_web_dumpDirtyRects;
 @end
 
 @interface WebNSTextView : NSTextView
@@ -41,6 +42,11 @@
 }
 @end
 
+ at interface WebNSView : NSView
+{
+}
+ at end
+
 @implementation WebHTMLViewPrivate
 
 - (void)dealloc
@@ -56,6 +62,7 @@
 + (void)initialize
 {
     [[WebNSTextView class] poseAsClass:[NSTextView class]];
+    [[WebNSView class] poseAsClass:[NSView class]];
 }
 
 - (void)_adjustFrames
@@ -78,19 +85,13 @@
 
 - (WebController *)_controller
 {
-    return [[self _web_parentWebView] _controller];
+    return [[self _web_parentWebView] controller];
 }
 
 - (WebFrame *)_frame
 {
     WebView *webView = [self _web_parentWebView];
-    return [[webView _controller] frameForView:webView];
-}
-
-- (BOOL)_isMainFrame
-{
-    WebFrame *frame = [self _frame];
-    return frame == [[frame controller] mainFrame];
+    return [[webView controller] frameForView:webView];
 }
 
 // Required so view can access the part's selection.
@@ -127,7 +128,7 @@ BOOL _modifierTrackingEnabled = FALSE;
     [elementInfo addEntriesFromDictionary: elementInfoWC];
 
     WebView *webView = [self _web_parentWebView];
-    WebFrame *webFrame = [[webView _controller] frameForView:webView];
+    WebFrame *webFrame = [[webView controller] frameForView:webView];
     [elementInfo setObject:webFrame forKey:WebContextMenuElementFrameKey];
        
     return elementInfo;
@@ -165,7 +166,6 @@ BOOL _modifierTrackingEnabled = FALSE;
     return NO;
 }
 
-
 // Don't let AppKit even draw subviews. We take care of that.
 - (void)_recursiveDisplayRectIfNeededIgnoringOpacity:(NSRect)rect isVisibleRect:(BOOL)isVisibleRect rectIsVisibleRectForView:(NSView *)visibleView topView:(BOOL)topView
 {
@@ -298,3 +298,22 @@ static BOOL inDrawRect;
 }
 
 @end
+
+ at implementation WebNSView
+
+- (NSView *)opaqueAncestor
+{
+    if (![self isOpaque]) {
+        return [super opaqueAncestor];
+    }
+    NSView *opaqueAncestor = self;
+    NSView *superview = self;
+    while ((superview = [superview superview])) {
+        if ([superview isKindOfClass:[WebHTMLView class]]) {
+            opaqueAncestor = superview;
+        }
+    }
+    return opaqueAncestor;
+}
+
+ at end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list