[webkit-changes] [145681] trunk/LayoutTests

2013-03-12 Thread vsevik
Title: [145681] trunk/LayoutTests








Revision 145681
Author vse...@chromium.org
Date 2013-03-12 22:44:03 -0700 (Tue, 12 Mar 2013)


Log Message
Unreviewed inspector test fix.

* http/tests/inspector/resource-tree/resource-request-content-after-loading-and-clearing-cache.html:
* inspector/datagrid-autosize.html:
* inspector/debugger/breakpoint-manager-listeners-count.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/tests/inspector/resource-tree/resource-request-content-after-loading-and-clearing-cache.html
trunk/LayoutTests/inspector/datagrid-autosize.html
trunk/LayoutTests/inspector/debugger/breakpoint-manager-listeners-count.html




Diff

Modified: trunk/LayoutTests/ChangeLog (145680 => 145681)

--- trunk/LayoutTests/ChangeLog	2013-03-13 04:55:11 UTC (rev 145680)
+++ trunk/LayoutTests/ChangeLog	2013-03-13 05:44:03 UTC (rev 145681)
@@ -1,3 +1,11 @@
+2013-03-12  Vsevolod Vlasov  
+
+Unreviewed inspector test fix.
+
+* http/tests/inspector/resource-tree/resource-request-content-after-loading-and-clearing-cache.html:
+* inspector/datagrid-autosize.html:
+* inspector/debugger/breakpoint-manager-listeners-count.html:
+
 2013-03-12  Antti Koivisto  
 
 Basic child obscuration test for backgrounds


Modified: trunk/LayoutTests/http/tests/inspector/resource-tree/resource-request-content-after-loading-and-clearing-cache.html (145680 => 145681)

--- trunk/LayoutTests/http/tests/inspector/resource-tree/resource-request-content-after-loading-and-clearing-cache.html	2013-03-13 04:55:11 UTC (rev 145680)
+++ trunk/LayoutTests/http/tests/inspector/resource-tree/resource-request-content-after-loading-and-clearing-cache.html	2013-03-13 05:44:03 UTC (rev 145681)
@@ -14,7 +14,6 @@
 
 function test()
 {
-  setTimeout(InspectorTest.completeTest.bind(InspectorTest), 1000);
 InspectorTest.addResult("Adding dynamic script: ");
 InspectorTest.evaluateInPage("createScriptTag()", step2);
 


Modified: trunk/LayoutTests/inspector/datagrid-autosize.html (145680 => 145681)

--- trunk/LayoutTests/inspector/datagrid-autosize.html	2013-03-13 04:55:11 UTC (rev 145680)
+++ trunk/LayoutTests/inspector/datagrid-autosize.html	2013-03-13 05:44:03 UTC (rev 145681)
@@ -4,7 +4,6 @@
 

[webkit-changes] [145680] trunk

2013-03-12 Thread antti
Title: [145680] trunk








Revision 145680
Author an...@apple.com
Date 2013-03-12 21:55:11 -0700 (Tue, 12 Mar 2013)


Log Message
Basic child obscuration test for backgrounds
https://bugs.webkit.org/show_bug.cgi?id=111701

Source/WebCore:

Reviewed by Simon Fraser.

Test: fast/repaint/obscured-background-no-repaint.html

We can easily detect some simple cases where a background image is fully obscured by an opaque child.

This avoids unncessary painting and image decoding. It is especially helpful for cases like about.com home
page where a fully obscured 'loading' spinner keeps triggering frequent complex repaints (gif animations
progress by getting painted and stop if they are not).

This could be made way more sophisticated. The checking could also be done per-layout rather per-paint.
Even this simple approach gets hit surprisingly often in real world sites.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::backgroundIsObscured):

Before painting background test if any single child renderer fully obscures it.

(WebCore::RenderBox::backgroundIsOpaqueInRect):
* rendering/RenderBox.h:

LayoutTests:

Reviewed by Simon Fraser.

* fast/repaint/obscured-background-no-repaint-expected.txt: Added.
* fast/repaint/obscured-background-no-repaint.html: Added.
* fast/repaint/resources/animated.gif: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderBox.cpp
trunk/Source/WebCore/rendering/RenderBox.h
trunk/Source/WebCore/rendering/RenderImage.h


Added Paths

trunk/LayoutTests/fast/repaint/obscured-background-no-repaint-expected.txt
trunk/LayoutTests/fast/repaint/obscured-background-no-repaint.html
trunk/LayoutTests/fast/repaint/resources/animated.gif




Diff

Modified: trunk/LayoutTests/ChangeLog (145679 => 145680)

--- trunk/LayoutTests/ChangeLog	2013-03-13 04:14:17 UTC (rev 145679)
+++ trunk/LayoutTests/ChangeLog	2013-03-13 04:55:11 UTC (rev 145680)
@@ -1,3 +1,14 @@
+2013-03-12  Antti Koivisto  
+
+Basic child obscuration test for backgrounds
+https://bugs.webkit.org/show_bug.cgi?id=111701
+
+Reviewed by Simon Fraser.
+
+* fast/repaint/obscured-background-no-repaint-expected.txt: Added.
+* fast/repaint/obscured-background-no-repaint.html: Added.
+* fast/repaint/resources/animated.gif: Added.
+
 2013-03-12  Ryosuke Niwa  
 
 Update test expectation for the bug 111521.


Added: trunk/LayoutTests/fast/repaint/obscured-background-no-repaint-expected.txt (0 => 145680)

--- trunk/LayoutTests/fast/repaint/obscured-background-no-repaint-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/repaint/obscured-background-no-repaint-expected.txt	2013-03-13 04:55:11 UTC (rev 145680)
@@ -0,0 +1,10 @@
+Test that obscured animated gif does not trigger repaints. This test requires DRT.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS repaintRects is ""
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/fast/repaint/obscured-background-no-repaint.html (0 => 145680)

--- trunk/LayoutTests/fast/repaint/obscured-background-no-repaint.html	(rev 0)
+++ trunk/LayoutTests/fast/repaint/obscured-background-no-repaint.html	2013-03-13 04:55:11 UTC (rev 145680)
@@ -0,0 +1,56 @@
+
+
+jsTestIsAsync = true;
+
+div {
+height: 100px;
+width: 100px;
+}
+
+.parent {
+background-image: url(resources/animated.gif)
+}
+
+.child {
+background-color: green;
+}
+
+