<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[195185] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/195185">195185</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2016-01-17 19:20:52 -0800 (Sun, 17 Jan 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>More displaylist tests, and minor cleanup
https://bugs.webkit.org/show_bug.cgi?id=153198
Reviewed by Zalan Bujtas.
Source/WebCore:
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):
LayoutTests:
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.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsdisplaylistslayerdispaylisthtml">trunk/LayoutTests/displaylists/layer-dispay-list.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp">trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListRecordercpp">trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsdisplaylistsextentincludesshadowexpectedtxt">trunk/LayoutTests/displaylists/extent-includes-shadow-expected.txt</a></li>
<li><a href="#trunkLayoutTestsdisplaylistsextentincludesshadowhtml">trunk/LayoutTests/displaylists/extent-includes-shadow.html</a></li>
<li><a href="#trunkLayoutTestsdisplaylistsextentincludestransformsexpectedtxt">trunk/LayoutTests/displaylists/extent-includes-transforms-expected.txt</a></li>
<li><a href="#trunkLayoutTestsdisplaylistsextentincludestransformshtml">trunk/LayoutTests/displaylists/extent-includes-transforms.html</a></li>
<li>trunk/LayoutTests/displaylists/resources/</li>
<li><a href="#trunkLayoutTestsdisplaylistsresourcesdumptargetdisplaylistjs">trunk/LayoutTests/displaylists/resources/dump-target-display-list.js</a></li>
<li>trunk/LayoutTests/platform/mac-wk1/displaylists/</li>
<li><a href="#trunkLayoutTestsplatformmacwk1displaylistsextentincludesshadowexpectedtxt">trunk/LayoutTests/platform/mac-wk1/displaylists/extent-includes-shadow-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1displaylistsextentincludestransformsexpectedtxt">trunk/LayoutTests/platform/mac-wk1/displaylists/extent-includes-transforms-expected.txt</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (195184 => 195185)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-01-17 22:24:59 UTC (rev 195184)
+++ trunk/LayoutTests/ChangeLog        2016-01-18 03:20:52 UTC (rev 195185)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2016-01-17 Simon Fraser <simon.fraser@apple.com>
+
+ 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.
+
</ins><span class="cx"> 2016-01-17 Brady Eidson <beidson@apple.com>
</span><span class="cx">
</span><span class="cx"> Modern IDB: .js test files should not log database names.
</span></span></pre></div>
<a id="trunkLayoutTestsdisplaylistsextentincludesshadowexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/displaylists/extent-includes-shadow-expected.txt (0 => 195185)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+
+(
+ (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))
</ins></span></pre></div>
<a id="trunkLayoutTestsdisplaylistsextentincludesshadowhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/displaylists/extent-includes-shadow.html (0 => 195185)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+<!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="resources/dump-target-display-list.js"></script>
+</head>
+<body>
+<div id="target">
+ <div class="shadowed"></div>
+</div>
+<pre id="output"></pre>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsdisplaylistsextentincludestransformsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/displaylists/extent-includes-transforms-expected.txt (0 => 195185)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+
+(
+ (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))
</ins></span></pre></div>
<a id="trunkLayoutTestsdisplaylistsextentincludestransformshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/displaylists/extent-includes-transforms.html (0 => 195185)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+<!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="resources/dump-target-display-list.js"></script>
+</head>
+<body>
+<div id="target">
+ <div class="transformed">
+ <div class="box"></div>
+ </div>
+</div>
+<pre id="output"></pre>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsdisplaylistslayerdispaylisthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/displaylists/layer-dispay-list.html (195184 => 195185)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -14,31 +14,7 @@
</span><span class="cx"> -webkit-transform: translateZ(0);
</span><span class="cx"> }
</span><span class="cx"> </style>
</span><del>- <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>
</del><ins>+ <script src="resources/dump-target-display-list.js"></script>
</ins><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="cx"> <div id="target" class="composited box">
</span></span></pre></div>
<a id="trunkLayoutTestsdisplaylistsresourcesdumptargetdisplaylistjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/displaylists/resources/dump-target-display-list.js (0 => 195185)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+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);
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1displaylistsextentincludesshadowexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk1/displaylists/extent-includes-shadow-expected.txt (0 => 195185)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+
+(
+ (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))
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1displaylistsextentincludestransformsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk1/displaylists/extent-includes-transforms-expected.txt (0 => 195185)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+
+(
+ (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))
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (195184 => 195185)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2016-01-17 Simon Fraser <simon.fraser@apple.com>
+
+ 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):
+
</ins><span class="cx"> 2016-01-16 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove TextRun::allowsRoundingHacks()
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (195184 => 195185)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1416,8 +1416,8 @@
</span><span class="cx">
</span><span class="cx"> GraphicsContext context;
</span><span class="cx"> DisplayList::Recorder recorder(context, *m_displayList, initialClip, AffineTransform());
</span><del>- context.setDisplayListRecorder(&recorder);
</del><span class="cx"> paintGraphicsLayerContents(context, FloatRect(FloatPoint(), size()));
</span><ins>+
</ins><span class="cx"> #ifdef LOG_RECORDING_TIME
</span><span class="cx"> double duration = currentTime() - startTime;
</span><span class="cx"> WTFLogAlways("Recording took %.5fms", duration * 1000.0);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListRecordercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp (195184 => 195185)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -41,9 +41,7 @@
</span><span class="cx"> , m_displayList(displayList)
</span><span class="cx"> {
</span><span class="cx"> LOG_WITH_STREAM(DisplayLists, stream << "\nRecording with clip " << initialClip);
</span><del>-
- // FIXME: Hook up recorder in the GraphicsContext.
- // m_graphicsContext.setDisplayListRecorder(this);
</del><ins>+ m_graphicsContext.setDisplayListRecorder(this);
</ins><span class="cx"> m_stateStack.append(ContextState(baseCTM, initialClip));
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>