Diff
Modified: branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog (179892 => 179893)
--- branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog 2015-02-10 23:45:53 UTC (rev 179892)
+++ branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog 2015-02-10 23:49:28 UTC (rev 179893)
@@ -1,5 +1,25 @@
2015-02-10 Babak Shafiei <bshaf...@apple.com>
+ Merge r178490.
+
+ 2015-01-14 Simon Fraser <simon.fra...@apple.com>
+
+ Graphics corruption after Find on some pages
+ https://bugs.webkit.org/show_bug.cgi?id=140489
+
+ Reviewed by Zalan Bujtas.
+
+ Two new tests. The first one just reports that we have an opaque compositing
+ layer. The second one tests the the user-visible symptom of the missing
+ background.
+
+ * compositing/contents-opaque/opaque-with-scrolled-expected.txt: Added.
+ * compositing/contents-opaque/opaque-with-scrolled.html: Added.
+ * fast/backgrounds/opaque-scrolled-paint-background-expected.html: Added.
+ * fast/backgrounds/opaque-scrolled-paint-background.html: Added.
+
+2015-02-10 Babak Shafiei <bshaf...@apple.com>
+
Merge r178426.
2015-01-14 Jer Noble <jer.no...@apple.com>
Copied: branches/safari-600.1.4.15-branch/LayoutTests/compositing/contents-opaque/opaque-with-scrolled-expected.txt (from rev 178490, trunk/LayoutTests/compositing/contents-opaque/opaque-with-scrolled-expected.txt) (0 => 179893)
--- branches/safari-600.1.4.15-branch/LayoutTests/compositing/contents-opaque/opaque-with-scrolled-expected.txt (rev 0)
+++ branches/safari-600.1.4.15-branch/LayoutTests/compositing/contents-opaque/opaque-with-scrolled-expected.txt 2015-02-10 23:49:28 UTC (rev 179893)
@@ -0,0 +1,19 @@
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (contentsOpaque 1)
+ (children 1
+ (GraphicsLayer
+ (position 20.00 20.00)
+ (bounds 200.00 200.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ )
+ )
+ )
+ )
+)
+
Copied: branches/safari-600.1.4.15-branch/LayoutTests/compositing/contents-opaque/opaque-with-scrolled.html (from rev 178490, trunk/LayoutTests/compositing/contents-opaque/opaque-with-scrolled.html) (0 => 179893)
--- branches/safari-600.1.4.15-branch/LayoutTests/compositing/contents-opaque/opaque-with-scrolled.html (rev 0)
+++ branches/safari-600.1.4.15-branch/LayoutTests/compositing/contents-opaque/opaque-with-scrolled.html 2015-02-10 23:49:28 UTC (rev 179893)
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ #indicator {
+ position: absolute;
+ top: 20px;
+ left: 20px;
+ width: 200px;
+ height: 200px;
+ background-color: red;
+ }
+
+ .composited {
+ -webkit-transform: translateZ(0);
+ }
+
+ .container {
+ position: absolute;
+ top: 20px;
+ left: 20px;
+ }
+
+ .solid-background {
+ position: relative;
+ float: left;
+ width: 200px;
+ height: 200px;
+ background-color: green;
+ z-index: 0;
+ }
+
+ #scrollable {
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ }
+
+ .opaque {
+ background-color: gray;
+ width: 100%;
+ height: 100%;
+ }
+
+ .non-opaque {
+ background-color: transparent;
+ width: 100%;
+ height: 100%;
+ }
+ </style>
+ <script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ window.addEventListener('load', function() {
+ document.getElementById('scrollable').scrollTop = 200;
+ if (window.testRunner && window.internals)
+ document.getElementById('layertree').innerText = window.internals.layerTreeAsText(document);
+ }, false);
+ </script>
+</head>
+<body>
+
+<div class="composited container">
+ <div class="solid-background">
+ <div id="scrollable">
+ <div class="opaque">
+ </div>
+ <div class="non-opaque">
+ </div>
+ </div>
+ </div>
+</div>
+
+<pre id="layertree"></pre>
+
+</body>
+</html>
Copied: branches/safari-600.1.4.15-branch/LayoutTests/fast/backgrounds/opaque-scrolled-paint-background-expected.html (from rev 178490, trunk/LayoutTests/fast/backgrounds/opaque-scrolled-paint-background-expected.html) (0 => 179893)
--- branches/safari-600.1.4.15-branch/LayoutTests/fast/backgrounds/opaque-scrolled-paint-background-expected.html (rev 0)
+++ branches/safari-600.1.4.15-branch/LayoutTests/fast/backgrounds/opaque-scrolled-paint-background-expected.html 2015-02-10 23:49:28 UTC (rev 179893)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ #indicator {
+ position: absolute;
+ top: 20px;
+ left: 20px;
+ width: 200px;
+ height: 200px;
+ background-color: green;
+ }
+ </style>
+</head>
+<body>
+
+<div id="indicator"></div>
+</body>
+</html>
Copied: branches/safari-600.1.4.15-branch/LayoutTests/fast/backgrounds/opaque-scrolled-paint-background.html (from rev 178490, trunk/LayoutTests/fast/backgrounds/opaque-scrolled-paint-background.html) (0 => 179893)
--- branches/safari-600.1.4.15-branch/LayoutTests/fast/backgrounds/opaque-scrolled-paint-background.html (rev 0)
+++ branches/safari-600.1.4.15-branch/LayoutTests/fast/backgrounds/opaque-scrolled-paint-background.html 2015-02-10 23:49:28 UTC (rev 179893)
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ #indicator {
+ position: absolute;
+ top: 20px;
+ left: 20px;
+ width: 200px;
+ height: 200px;
+ background-color: red;
+ }
+
+ .container {
+ position: absolute;
+ top: 20px;
+ left: 20px;
+ }
+
+ .solid-background {
+ position: relative;
+ float: left;
+ width: 200px;
+ height: 200px;
+ background-color: green;
+ z-index: 0;
+ }
+
+ #scrollable {
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ }
+
+ .opaque {
+ background-color: gray;
+ width: 100%;
+ height: 100%;
+ }
+
+ .non-opaque {
+ background-color: transparent;
+ width: 100%;
+ height: 100%;
+ }
+ </style>
+ <script>
+ window.addEventListener('load', function() {
+ document.getElementById('scrollable').scrollTop = 200;
+ }, false);
+ </script>
+</head>
+<body>
+
+<div id="indicator"></div>
+
+<div class="container">
+ <div class="solid-background">
+ <div id="scrollable">
+ <div class="opaque">
+ </div>
+ <div class="non-opaque">
+ </div>
+ </div>
+ </div>
+</div>
+
+</body>
+</html>
Modified: branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog (179892 => 179893)
--- branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog 2015-02-10 23:45:53 UTC (rev 179892)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog 2015-02-10 23:49:28 UTC (rev 179893)
@@ -1,5 +1,38 @@
2015-02-10 Babak Shafiei <bshaf...@apple.com>
+ Merge r178490.
+
+ 2015-01-14 Simon Fraser <simon.fra...@apple.com>
+
+ Graphics corruption after Find on some pages
+ https://bugs.webkit.org/show_bug.cgi?id=140489
+
+ Reviewed by Zalan Bujtas.
+
+ After doing a Find on http://shop.outlier.cc/shop/retail/chino.html,
+ garbage could appear on some parts of the page. This is caused by creating
+ a compositing layer which is marked as opaque, yet failing to paint the entire
+ layer contents.
+
+ This was caused by a bug in RenderBox::computeBackgroundIsKnownToBeObscured()
+ logic. On the page in question, doing a Find could cause overflow:hidden sections
+ to get scrolled (since Find can reveal the selection by scrolling overflow).
+ However, the render tree walking under RenderBox::foregroundIsKnownToBeOpaqueInRect()
+ fails to take overflow scrolling into account, so gives the wrong answer
+ in some content configurations. As a result, we'd think that the background
+ is obscured, and never paint it.
+
+ Conservative fix is to have isCandidateForOpaquenessTest() return false
+ when the content has any non-zero scroll offset.
+
+ Tests: compositing/contents-opaque/opaque-with-scrolled.html
+ fast/backgrounds/opaque-scrolled-paint-background.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::isCandidateForOpaquenessTest):
+
+2015-02-10 Babak Shafiei <bshaf...@apple.com>
+
Merge r178426.
2015-01-14 Jer Noble <jer.no...@apple.com>
Modified: branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderBox.cpp (179892 => 179893)
--- branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderBox.cpp 2015-02-10 23:45:53 UTC (rev 179892)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderBox.cpp 2015-02-10 23:49:28 UTC (rev 179893)
@@ -1397,6 +1397,8 @@
return false;
if (childLayer->hasTransform() || childLayer->isTransparent() || childLayer->hasFilter())
return false;
+ if (!childBox.scrolledContentOffset().isZero())
+ return false;
}
return true;
}