Title: [203409] trunk
- Revision
- 203409
- Author
- [email protected]
- Date
- 2016-07-19 09:10:40 -0700 (Tue, 19 Jul 2016)
Log Message
Bubbles appear split for a brief moment in Messages
https://bugs.webkit.org/show_bug.cgi?id=159915
rdar://problem/27182267
Reviewed by David Hyatt.
Source/WebCore:
RenderView::repaintRootContents() had a long-standing bug in WebView when the
view is scrolled. repaint() uses visualOverflowRect() but, for the
RenderView, the visualOverflowRect() is the initial containing block
which is anchored at 0,0. When the view is scrolled it's clipped out and
calls to repaintRootContents() have no effect.
Change repaintRootContents() to use layoutOverflowRect(). ScrollView::repaintContentRectangle()
will clip it to the view if necessary.
Test: fast/repaint/scrolled-view-full-repaint.html
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintRootContents):
LayoutTests:
* fast/repaint/scrolled-view-full-repaint-expected.txt: Added.
* fast/repaint/scrolled-view-full-repaint.html: Added.
* platform/ios-simulator-wk1/fast/repaint/scrolled-view-full-repaint-expected.txt: Added.
* platform/mac-wk1/fast/repaint/scrolled-view-full-repaint-expected.txt: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (203408 => 203409)
--- trunk/LayoutTests/ChangeLog 2016-07-19 16:08:56 UTC (rev 203408)
+++ trunk/LayoutTests/ChangeLog 2016-07-19 16:10:40 UTC (rev 203409)
@@ -1,3 +1,16 @@
+2016-07-19 Simon Fraser <[email protected]>
+
+ Bubbles appear split for a brief moment in Messages
+ https://bugs.webkit.org/show_bug.cgi?id=159915
+ rdar://problem/27182267
+
+ Reviewed by David Hyatt.
+
+ * fast/repaint/scrolled-view-full-repaint-expected.txt: Added.
+ * fast/repaint/scrolled-view-full-repaint.html: Added.
+ * platform/ios-simulator-wk1/fast/repaint/scrolled-view-full-repaint-expected.txt: Added.
+ * platform/mac-wk1/fast/repaint/scrolled-view-full-repaint-expected.txt: Added.
+
2016-07-19 Youenn Fablet <[email protected]>
[Release WK2] LayoutTest imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-post-upload.htm failing
Added: trunk/LayoutTests/fast/repaint/scrolled-view-full-repaint-expected.txt (0 => 203409)
--- trunk/LayoutTests/fast/repaint/scrolled-view-full-repaint-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/repaint/scrolled-view-full-repaint-expected.txt 2016-07-19 16:10:40 UTC (rev 203409)
@@ -0,0 +1,3 @@
+In WebKit1 there should be a repaint at 0,-500.
+
+
Added: trunk/LayoutTests/fast/repaint/scrolled-view-full-repaint.html (0 => 203409)
--- trunk/LayoutTests/fast/repaint/scrolled-view-full-repaint.html (rev 0)
+++ trunk/LayoutTests/fast/repaint/scrolled-view-full-repaint.html 2016-07-19 16:10:40 UTC (rev 203409)
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ body {
+ height: 2000px;
+ }
+ </style>
+ <script>
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+ }
+
+ function doTest()
+ {
+ window.scrollTo(0, 500);
+
+ window.setTimeout(function() {
+ window.internals.startTrackingRepaints();
+
+ window.resizeBy(0, 10);
+ var repaintRects = window.internals.repaintRectsAsText();
+ window.internals.stopTrackingRepaints();
+
+ document.getElementById('repaints').textContent = repaintRects;
+
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 0);
+ }
+
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+ <p>In WebKit1 there should be a repaint at 0,-500.</p>
+ <div id="repaints"></div>
+</body>
+</html>
Added: trunk/LayoutTests/platform/ios-simulator-wk1/fast/repaint/scrolled-view-full-repaint-expected.txt (0 => 203409)
--- trunk/LayoutTests/platform/ios-simulator-wk1/fast/repaint/scrolled-view-full-repaint-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator-wk1/fast/repaint/scrolled-view-full-repaint-expected.txt 2016-07-19 16:10:40 UTC (rev 203409)
@@ -0,0 +1,3 @@
+In WebKit1 there should be a repaint at 0,-500.
+
+(repaint rects (rect 0 0 304 20) (rect 0 0 320 2024) )
Added: trunk/LayoutTests/platform/mac-wk1/fast/repaint/scrolled-view-full-repaint-expected.txt (0 => 203409)
--- trunk/LayoutTests/platform/mac-wk1/fast/repaint/scrolled-view-full-repaint-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac-wk1/fast/repaint/scrolled-view-full-repaint-expected.txt 2016-07-19 16:10:40 UTC (rev 203409)
@@ -0,0 +1,3 @@
+In WebKit1 there should be a repaint at 0,-500.
+
+(repaint rects (rect 0 -500 785 2024) )
Modified: trunk/Source/WebCore/ChangeLog (203408 => 203409)
--- trunk/Source/WebCore/ChangeLog 2016-07-19 16:08:56 UTC (rev 203408)
+++ trunk/Source/WebCore/ChangeLog 2016-07-19 16:10:40 UTC (rev 203409)
@@ -1,3 +1,25 @@
+2016-07-19 Simon Fraser <[email protected]>
+
+ Bubbles appear split for a brief moment in Messages
+ https://bugs.webkit.org/show_bug.cgi?id=159915
+ rdar://problem/27182267
+
+ Reviewed by David Hyatt.
+
+ RenderView::repaintRootContents() had a long-standing bug in WebView when the
+ view is scrolled. repaint() uses visualOverflowRect() but, for the
+ RenderView, the visualOverflowRect() is the initial containing block
+ which is anchored at 0,0. When the view is scrolled it's clipped out and
+ calls to repaintRootContents() have no effect.
+
+ Change repaintRootContents() to use layoutOverflowRect(). ScrollView::repaintContentRectangle()
+ will clip it to the view if necessary.
+
+ Test: fast/repaint/scrolled-view-full-repaint.html
+
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::repaintRootContents):
+
2016-07-19 Dan Bernstein <[email protected]>
<rdar://problem/27420308> WebCore-7602.1.42 fails to build: error: unused parameter 'vm'
Modified: trunk/Source/WebCore/rendering/RenderView.cpp (203408 => 203409)
--- trunk/Source/WebCore/rendering/RenderView.cpp 2016-07-19 16:08:56 UTC (rev 203408)
+++ trunk/Source/WebCore/rendering/RenderView.cpp 2016-07-19 16:10:40 UTC (rev 203409)
@@ -613,7 +613,11 @@
layer()->setBackingNeedsRepaint(GraphicsLayer::DoNotClipToLayer);
return;
}
- repaint();
+
+ // Always use layoutOverflowRect() to fix rdar://problem/27182267.
+ // This should be cleaned up via webkit.org/b/159913 and webkit.org/b/159914.
+ RenderLayerModelObject* repaintContainer = containerForRepaint();
+ repaintUsingContainer(repaintContainer, computeRectForRepaint(layoutOverflowRect(), repaintContainer));
}
void RenderView::repaintViewRectangle(const LayoutRect& repaintRect) const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes