Diff
Modified: trunk/LayoutTests/ChangeLog (195184 => 195185)
--- trunk/LayoutTests/ChangeLog 2016-01-17 22:24:59 UTC (rev 195184)
+++ trunk/LayoutTests/ChangeLog 2016-01-18 03:20:52 UTC (rev 195185)
@@ -1,3 +1,28 @@
+2016-01-17 Simon Fraser <[email protected]>
+
+ More displaylist tests, and minor cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=153198
+
+ Reviewed by Zalan Bujtas.
+
+ A couple more display list tests that check that the computed extent of an item
+ includes shadows and transforms.
+
+ WK1 results differ in that they disable should-subpixel-quantize-fonts in the state
+ (which is a bug).
+
+ Move some shared JS into a helper file.
+
+ * displaylists/extent-includes-shadow-expected.txt: Added.
+ * displaylists/extent-includes-shadow.html: Added.
+ * displaylists/extent-includes-transforms-expected.txt: Added.
+ * displaylists/extent-includes-transforms.html: Added.
+ * displaylists/layer-dispay-list.html:
+ * displaylists/resources/dump-target-display-list.js: Added.
+ (doTest):
+ * platform/mac-wk1/displaylists/extent-includes-shadow-expected.txt: Added.
+ * platform/mac-wk1/displaylists/extent-includes-transforms-expected.txt: Added.
+
2016-01-17 Brady Eidson <[email protected]>
Modern IDB: .js test files should not log database names.
Added: trunk/LayoutTests/displaylists/extent-includes-shadow-expected.txt (0 => 195185)
--- trunk/LayoutTests/displaylists/extent-includes-shadow-expected.txt (rev 0)
+++ trunk/LayoutTests/displaylists/extent-includes-shadow-expected.txt 2016-01-18 03:20:52 UTC (rev 195185)
@@ -0,0 +1,21 @@
+
+(
+ (translate
+ (x 0.00)
+ (y 0.00)))
+(
+ (save
+ (restore-index 4)))
+(
+ (set-state
+ (change-flags 1024)
+ (shadow-blur 12.00)
+ (shadow-offset width=10 height=20)
+ (shadows-use-legacy-radius 0)))
+(
+ (fill-rect-with-color
+ (extent at (43,50) size 134x137)
+ (rect at (50,50) size 100x100)
+ (color #0000FF)))
+(
+ (restore))
Added: trunk/LayoutTests/displaylists/extent-includes-shadow.html (0 => 195185)
--- trunk/LayoutTests/displaylists/extent-includes-shadow.html (rev 0)
+++ trunk/LayoutTests/displaylists/extent-includes-shadow.html 2016-01-18 03:20:52 UTC (rev 195185)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ #target {
+ height: 200px;
+ width: 200px;
+ -webkit-transform: translateZ(0);
+ }
+
+ .shadowed {
+ position: absolute;
+ top: 50px;
+ left: 50px;
+ width: 100px;
+ height: 100px;
+ background-color: blue;
+ box-shadow: 10px 20px 12px black;
+ }
+ </style>
+ <script src=""
+</head>
+<body>
+<div id="target">
+ <div class="shadowed"></div>
+</div>
+<pre id="output"></pre>
+</body>
+</html>
Added: trunk/LayoutTests/displaylists/extent-includes-transforms-expected.txt (0 => 195185)
--- trunk/LayoutTests/displaylists/extent-includes-transforms-expected.txt (rev 0)
+++ trunk/LayoutTests/displaylists/extent-includes-transforms-expected.txt 2016-01-18 03:20:52 UTC (rev 195185)
@@ -0,0 +1,24 @@
+
+(
+ (translate
+ (x 0.00)
+ (y 22.00)))
+(
+ (concatentate-ctm
+ (ctm {m=((0.87,0.50)(-0.50,0.87)) t=(81.70,-18.30)})))
+(
+ (save
+ (restore-index 5)))
+(
+ (set-state
+ (change-flags 1024)
+ (shadow-blur 12.00)
+ (shadow-offset width=10 height=20)
+ (shadows-use-legacy-radius 0)))
+(
+ (fill-rect-with-color
+ (extent at (7.14,0.20) size 184.55x185.65)
+ (rect at (0,0) size 100x100)
+ (color #0000FF)))
+(
+ (restore))
Added: trunk/LayoutTests/displaylists/extent-includes-transforms.html (0 => 195185)
--- trunk/LayoutTests/displaylists/extent-includes-transforms.html (rev 0)
+++ trunk/LayoutTests/displaylists/extent-includes-transforms.html 2016-01-18 03:20:52 UTC (rev 195185)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ #target {
+ height: 200px;
+ width: 200px;
+ -webkit-transform: translateZ(0);
+ }
+
+ .transformed {
+ transform: rotate(30deg);
+ margin: 50px;
+ }
+
+ .box {
+ width: 100px;
+ height: 100px;
+ background-color: blue;
+ box-shadow: 10px 20px 12px black;
+ }
+ </style>
+ <script src=""
+</head>
+<body>
+<div id="target">
+ <div class="transformed">
+ <div class="box"></div>
+ </div>
+</div>
+<pre id="output"></pre>
+</body>
+</html>
Modified: trunk/LayoutTests/displaylists/layer-dispay-list.html (195184 => 195185)
--- trunk/LayoutTests/displaylists/layer-dispay-list.html 2016-01-17 22:24:59 UTC (rev 195184)
+++ trunk/LayoutTests/displaylists/layer-dispay-list.html 2016-01-18 03:20:52 UTC (rev 195185)
@@ -14,31 +14,7 @@
-webkit-transform: translateZ(0);
}
</style>
- <script>
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- var targetDiv;
- function doTest()
- {
- document.body.offsetWidth;
- targetDiv = document.getElementById('target');
- if (window.internals)
- internals.setElementUsesDisplayListDrawing(targetDiv, true);
-
- window.setTimeout(function() {
- if (window.internals) {
- var displayList = internals.displayListForElement(targetDiv);
- document.getElementById('output').textContent = displayList;
- }
- if (window.testRunner)
- testRunner.notifyDone();
- }, 0);
- }
- window.addEventListener('load', doTest, false);
- </script>
+ <script src=""
</head>
<body>
<div id="target" class="composited box">
Added: trunk/LayoutTests/displaylists/resources/dump-target-display-list.js (0 => 195185)
--- trunk/LayoutTests/displaylists/resources/dump-target-display-list.js (rev 0)
+++ trunk/LayoutTests/displaylists/resources/dump-target-display-list.js 2016-01-18 03:20:52 UTC (rev 195185)
@@ -0,0 +1,23 @@
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+var targetDiv;
+function doTest()
+{
+ document.body.offsetWidth;
+ targetDiv = document.getElementById('target');
+ if (window.internals)
+ internals.setElementUsesDisplayListDrawing(targetDiv, true);
+
+ window.setTimeout(function() {
+ if (window.internals) {
+ var displayList = internals.displayListForElement(targetDiv);
+ document.getElementById('output').textContent = displayList;
+ }
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 0);
+}
+window.addEventListener('load', doTest, false);
Added: trunk/LayoutTests/platform/mac-wk1/displaylists/extent-includes-shadow-expected.txt (0 => 195185)
--- trunk/LayoutTests/platform/mac-wk1/displaylists/extent-includes-shadow-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac-wk1/displaylists/extent-includes-shadow-expected.txt 2016-01-18 03:20:52 UTC (rev 195185)
@@ -0,0 +1,22 @@
+
+(
+ (translate
+ (x 0.00)
+ (y 0.00)))
+(
+ (save
+ (restore-index 4)))
+(
+ (set-state
+ (change-flags 1049600)
+ (shadow-blur 12.00)
+ (shadow-offset width=10 height=20)
+ (shadows-use-legacy-radius 0)
+ (should-subpixel-quantize-fonts 0)))
+(
+ (fill-rect-with-color
+ (extent at (43,50) size 134x137)
+ (rect at (50,50) size 100x100)
+ (color #0000FF)))
+(
+ (restore))
Added: trunk/LayoutTests/platform/mac-wk1/displaylists/extent-includes-transforms-expected.txt (0 => 195185)
--- trunk/LayoutTests/platform/mac-wk1/displaylists/extent-includes-transforms-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac-wk1/displaylists/extent-includes-transforms-expected.txt 2016-01-18 03:20:52 UTC (rev 195185)
@@ -0,0 +1,25 @@
+
+(
+ (translate
+ (x 0.00)
+ (y 22.00)))
+(
+ (concatentate-ctm
+ (ctm {m=((0.87,0.50)(-0.50,0.87)) t=(81.70,-18.30)})))
+(
+ (save
+ (restore-index 5)))
+(
+ (set-state
+ (change-flags 1049600)
+ (shadow-blur 12.00)
+ (shadow-offset width=10 height=20)
+ (shadows-use-legacy-radius 0)
+ (should-subpixel-quantize-fonts 0)))
+(
+ (fill-rect-with-color
+ (extent at (7.14,0.20) size 184.55x185.65)
+ (rect at (0,0) size 100x100)
+ (color #0000FF)))
+(
+ (restore))
Modified: trunk/Source/WebCore/ChangeLog (195184 => 195185)
--- trunk/Source/WebCore/ChangeLog 2016-01-17 22:24:59 UTC (rev 195184)
+++ trunk/Source/WebCore/ChangeLog 2016-01-18 03:20:52 UTC (rev 195185)
@@ -1,3 +1,21 @@
+2016-01-17 Simon Fraser <[email protected]>
+
+ More displaylist tests, and minor cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=153198
+
+ Reviewed by Zalan Bujtas.
+
+ Have the DisplayListRecorder's constructor push the recorder onto the GraphicsContext,
+ and remove that code from GraphicsLayerCA.
+
+ Tests: displaylists/extent-includes-shadow.html
+ displaylists/extent-includes-transforms.html
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::recursiveCommitChanges):
+ * platform/graphics/displaylists/DisplayListRecorder.cpp:
+ (WebCore::DisplayList::Recorder::Recorder):
+
2016-01-16 Myles C. Maxfield <[email protected]>
Remove TextRun::allowsRoundingHacks()
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (195184 => 195185)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2016-01-17 22:24:59 UTC (rev 195184)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2016-01-18 03:20:52 UTC (rev 195185)
@@ -1416,8 +1416,8 @@
GraphicsContext context;
DisplayList::Recorder recorder(context, *m_displayList, initialClip, AffineTransform());
- context.setDisplayListRecorder(&recorder);
paintGraphicsLayerContents(context, FloatRect(FloatPoint(), size()));
+
#ifdef LOG_RECORDING_TIME
double duration = currentTime() - startTime;
WTFLogAlways("Recording took %.5fms", duration * 1000.0);
Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp (195184 => 195185)
--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp 2016-01-17 22:24:59 UTC (rev 195184)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp 2016-01-18 03:20:52 UTC (rev 195185)
@@ -41,9 +41,7 @@
, m_displayList(displayList)
{
LOG_WITH_STREAM(DisplayLists, stream << "\nRecording with clip " << initialClip);
-
- // FIXME: Hook up recorder in the GraphicsContext.
- // m_graphicsContext.setDisplayListRecorder(this);
+ m_graphicsContext.setDisplayListRecorder(this);
m_stateStack.append(ContextState(baseCTM, initialClip));
}