Title: [149207] trunk/Source
Revision
149207
Author
simon.fra...@apple.com
Date
2013-04-26 14:13:19 -0700 (Fri, 26 Apr 2013)

Log Message

Layer-backed WebViews don't repaint content outside the visible area
https://bugs.webkit.org/show_bug.cgi?id=115275

Reviewed by Beth Dakin.

Source/WebCore:

Export ScrollView::setPaintsEntireContents(bool).

* WebCore.exp.in:

Source/WebKit/mac:

When a client of WebView makes the WebView be layer-backed, then
AppKit propagaes the layer-backing down to the WebHTMLView (but
no further).

In this situation, we had a bug where content that was not
in the visible content rect would not get repainted, because
WebCore clips repaints to the visible rect.

Fix by calling ScrollView::setPaintsEntireContents(bool) from
-[WebHTMLView setLayer:], saying that we need
to paint the entire contents if we have a layer.

* WebView/WebHTMLView.mm:
(-[WebHTMLView setLayer:]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (149206 => 149207)


--- trunk/Source/WebCore/ChangeLog	2013-04-26 20:34:12 UTC (rev 149206)
+++ trunk/Source/WebCore/ChangeLog	2013-04-26 21:13:19 UTC (rev 149207)
@@ -1,3 +1,14 @@
+2013-04-26  Simon Fraser  <simon.fra...@apple.com>
+
+        Layer-backed WebViews don't repaint content outside the visible area
+        https://bugs.webkit.org/show_bug.cgi?id=115275
+
+        Reviewed by Beth Dakin.
+
+        Export ScrollView::setPaintsEntireContents(bool).
+
+        * WebCore.exp.in:
+
 2013-04-26  Daker Fernandes Pinheiro  <daker.pinhe...@openbossa.org>
 
         Change RenderMeter::valueRatio() visibility to public

Modified: trunk/Source/WebCore/WebCore.exp.in (149206 => 149207)


--- trunk/Source/WebCore/WebCore.exp.in	2013-04-26 20:34:12 UTC (rev 149206)
+++ trunk/Source/WebCore/WebCore.exp.in	2013-04-26 21:13:19 UTC (rev 149207)
@@ -80,6 +80,7 @@
 __ZN7WebCore10RenderView7hitTestERKNS_14HitTestRequestERNS_13HitTestResultE
 __ZN7WebCore10ScrollView17setUseFixedLayoutEb
 __ZN7WebCore10ScrollView18setFixedLayoutSizeERKNS_7IntSizeE
+__ZN7WebCore10ScrollView23setPaintsEntireContentsEb
 __ZN7WebCore10ScrollView20setCanHaveScrollbarsEb
 __ZN7WebCore10ScrollView21setDelegatesScrollingEb
 __ZN7WebCore10ScrollView23setScrollbarsSuppressedEbb

Modified: trunk/Source/WebKit/mac/ChangeLog (149206 => 149207)


--- trunk/Source/WebKit/mac/ChangeLog	2013-04-26 20:34:12 UTC (rev 149206)
+++ trunk/Source/WebKit/mac/ChangeLog	2013-04-26 21:13:19 UTC (rev 149207)
@@ -1,3 +1,25 @@
+2013-04-26  Simon Fraser  <simon.fra...@apple.com>
+
+        Layer-backed WebViews don't repaint content outside the visible area
+        https://bugs.webkit.org/show_bug.cgi?id=115275
+
+        Reviewed by Beth Dakin.
+
+        When a client of WebView makes the WebView be layer-backed, then
+        AppKit propagaes the layer-backing down to the WebHTMLView (but
+        no further).
+        
+        In this situation, we had a bug where content that was not
+        in the visible content rect would not get repainted, because
+        WebCore clips repaints to the visible rect.
+        
+        Fix by calling ScrollView::setPaintsEntireContents(bool) from
+        -[WebHTMLView setLayer:], saying that we need
+        to paint the entire contents if we have a layer.
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView setLayer:]):
+
 2013-04-25  Chris Fleizach  <cfleiz...@apple.com>
 
         WEB SPEECH: language support does not work as expected

Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (149206 => 149207)


--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2013-04-26 20:34:12 UTC (rev 149206)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2013-04-26 21:13:19 UTC (rev 149207)
@@ -3153,6 +3153,16 @@
     return [[self _webView] drawsBackground];
 }
 
+- (void)setLayer:(CALayer *)layer
+{
+    if (Frame* frame = core([self _frame])) {
+        if (FrameView* view = frame->view())
+            view->setPaintsEntireContents(layer);
+    }
+
+    [super setLayer:layer];
+}
+
 #if !LOG_DISABLED
 - (void)setNeedsDisplay:(BOOL)flag
 {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to