Source/WebCore:
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Jan 2016 19:07:34 +0000 (19:07 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Jan 2016 19:07:34 +0000 (19:07 +0000)
Fix flakiness of displaylists/layer-dispay-list.html

When toggling "uses display list drawing" on a GraphicsLayerCA, do
a repaint.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setUsesDisplayListDrawing):

LayoutTests:
This test needs to force layout before calling setElementUsesDisplayListDrawing(),
so that the layer already has its "drawsContents" property updated.

* displaylists/layer-dispay-list.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195172 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/displaylists/layer-dispay-list.html
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

index 03122bb..7d49cfc 100644 (file)
@@ -1,3 +1,10 @@
+2016-01-16  Simon Fraser  <simon.fraser@apple.com>
+
+        This test needs to force layout before calling setElementUsesDisplayListDrawing(),
+        so that the layer already has its "drawsContents" property updated.
+
+        * displaylists/layer-dispay-list.html:
+
 2016-01-15  Jiewen Tan  <jiewen_tan@apple.com>
 
         FrameLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame() is never called when loading a main resource from the memory cache
index c791aa2..b1a7a9e 100644 (file)
@@ -23,7 +23,7 @@
         var targetDiv;
         function doTest()
         {
-            // document.body.offsetWidth;
+            document.body.offsetWidth;
             targetDiv = document.getElementById('target');
             if (window.internals)
                 internals.setElementUsesDisplayListDrawing(targetDiv, true);
index 8d29fb1..7e3f03d 100644 (file)
@@ -1,3 +1,13 @@
+2016-01-16  Simon Fraser  <simon.fraser@apple.com>
+
+        Fix flakiness of displaylists/layer-dispay-list.html
+        
+        When toggling "uses display list drawing" on a GraphicsLayerCA, do
+        a repaint.
+
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::setUsesDisplayListDrawing):
+
 2016-01-15  Simon Fraser  <simon.fraser@apple.com>
 
         Remove GraphicsContext::drawConvexPolygon() and GraphicsContext::clipConvexPolygon()
index 0ff644b..843d4cb 100644 (file)
@@ -675,6 +675,7 @@ void GraphicsLayerCA::setUsesDisplayListDrawing(bool usesDisplayListDrawing)
     if (usesDisplayListDrawing == m_usesDisplayListDrawing)
         return;
 
+    setNeedsDisplay();
     GraphicsLayer::setUsesDisplayListDrawing(usesDisplayListDrawing);
 }