Title: [197287] releases/WebKitGTK/webkit-2.4
Revision
197287
Author
carlo...@webkit.org
Date
2016-02-28 06:00:00 -0800 (Sun, 28 Feb 2016)

Log Message

Merge r173046 - Scrollbar corner can be drawn outside containing frame
https://bugs.webkit.org/show_bug.cgi?id=133131
<rdar://problem/16382769>

Reviewed by Simon Fraser.

Source/WebCore:

Merged from Blink (patch by Levi Weintraub):
<https://src.chromium.org/viewvc/blink?revision=170625&view=revision>

Fixes an issue where the scroll corner may be painted outside the rectangle of
its associated frame by setting a clip rectangle before painting the scroll bar(s)
and scroll corner.

Test: scrollbars/custom-scrollbars-paint-outside-iframe.html

* platform/ScrollView.cpp:
(WebCore::ScrollView::paint):

LayoutTests:

Add DRT test that was derived from the test included in
<https://src.chromium.org/viewvc/blink?revision=170625&view=revision>.

* scrollbars/custom-scrollbars-paint-outside-iframe-expected.html: Added.
* scrollbars/custom-scrollbars-paint-outside-iframe.html: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.4/LayoutTests/ChangeLog (197286 => 197287)


--- releases/WebKitGTK/webkit-2.4/LayoutTests/ChangeLog	2016-02-28 13:50:16 UTC (rev 197286)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/ChangeLog	2016-02-28 14:00:00 UTC (rev 197287)
@@ -1,3 +1,17 @@
+2014-08-27  Daniel Bates  <daba...@apple.com>
+
+        Scrollbar corner can be drawn outside containing frame
+        https://bugs.webkit.org/show_bug.cgi?id=133131
+        <rdar://problem/16382769>
+
+        Reviewed by Simon Fraser.
+
+        Add DRT test that was derived from the test included in
+        <https://src.chromium.org/viewvc/blink?revision=170625&view=revision>.
+
+        * scrollbars/custom-scrollbars-paint-outside-iframe-expected.html: Added.
+        * scrollbars/custom-scrollbars-paint-outside-iframe.html: Added.
+
 2015-07-09  Daniel Bates  <daba...@apple.com>
 
         Fetching Content Security Policy report URL should respect same origin policy

Added: releases/WebKitGTK/webkit-2.4/LayoutTests/scrollbars/custom-scrollbars-paint-outside-iframe-expected.html (0 => 197287)


--- releases/WebKitGTK/webkit-2.4/LayoutTests/scrollbars/custom-scrollbars-paint-outside-iframe-expected.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/scrollbars/custom-scrollbars-paint-outside-iframe-expected.html	2016-02-28 14:00:00 UTC (rev 197287)
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.testRunner)
+    testRunner.waitUntilDone();
+
+function done()
+{
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+</script>
+</head>
+<body style="margin: 0px">
+<div style="background-color: green; width: 100px; height: 100px"></div>
+<p>This tests ensures that themed scrollbars are clipped to their iframe. You should see a green box above.</p>
+<iframe style="position: absolute; top: 100px; left: 100px;" width="1" height="1" srcdoc="
+<html><head><style>
+html,body {width:200px; height:100px;}
+::-webkit-scrollbar {height: 1px; width: 1px;}
+::-webkit-scrollbar-corner {background-color: red;}
+</style></head></html>" _onload_="done()"></iframe>
+</body>
+</html>

Added: releases/WebKitGTK/webkit-2.4/LayoutTests/scrollbars/custom-scrollbars-paint-outside-iframe.html (0 => 197287)


--- releases/WebKitGTK/webkit-2.4/LayoutTests/scrollbars/custom-scrollbars-paint-outside-iframe.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/scrollbars/custom-scrollbars-paint-outside-iframe.html	2016-02-28 14:00:00 UTC (rev 197287)
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.testRunner)
+    testRunner.waitUntilDone();
+
+function done()
+{
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+</script>
+</head>
+<body style="margin: 0px">
+<div style="background-color: green; width: 100px; height: 100px"></div>
+<p>This tests ensures that themed scrollbars are clipped to their iframe. You should see a green box above.</p>
+<iframe style="position: absolute; top: 100px; left: 100px;" width="1" height="1" srcdoc="
+<html><head><style>
+html,body {width:200px; height:100px;}
+::-webkit-scrollbar {height: 200px; width: 200px;}
+::-webkit-scrollbar-corner {background-color: red;}
+</style></head></html>" _onload_="done()"></iframe>
+</body>
+</html>

Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog (197286 => 197287)


--- releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog	2016-02-28 13:50:16 UTC (rev 197286)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog	2016-02-28 14:00:00 UTC (rev 197287)
@@ -1,3 +1,23 @@
+2014-08-27  Daniel Bates  <daba...@apple.com>
+
+        Scrollbar corner can be drawn outside containing frame
+        https://bugs.webkit.org/show_bug.cgi?id=133131
+        <rdar://problem/16382769>
+
+        Reviewed by Simon Fraser.
+
+        Merged from Blink (patch by Levi Weintraub):
+        <https://src.chromium.org/viewvc/blink?revision=170625&view=revision>
+
+        Fixes an issue where the scroll corner may be painted outside the rectangle of
+        its associated frame by setting a clip rectangle before painting the scroll bar(s)
+        and scroll corner.
+
+        Test: scrollbars/custom-scrollbars-paint-outside-iframe.html
+
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::paint):
+
 2015-07-09  Daniel Bates  <daba...@apple.com>
 
         Fetching Content Security Policy report URL should respect same origin policy

Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/ScrollView.cpp (197286 => 197287)


--- releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/ScrollView.cpp	2016-02-28 13:50:16 UTC (rev 197286)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/ScrollView.cpp	2016-02-28 14:00:00 UTC (rev 197287)
@@ -1177,6 +1177,7 @@
         scrollViewDirtyRect.intersect(visibleAreaWithScrollbars);
         context->translate(x(), y());
         scrollViewDirtyRect.moveBy(-location());
+        context->clip(IntRect(IntPoint(), visibleAreaWithScrollbars.size()));
 
         paintScrollbars(context, scrollViewDirtyRect);
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to