<!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>[169505] 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/169505">169505</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2014-05-31 17:01:16 -0700 (Sat, 31 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Viewport percentage tests that resize the viewport are flaky
https://bugs.webkit.org/show_bug.cgi?id=133351

Reviewed by Anders Carlsson.

Source/WebCore:
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect): Removed code that explicitly sends a resize event here.
The resize event will be sent as a side effect of layout instead.
(WebCore::FrameView::sendResizeEventIfNeeded): Don't send a resize event until layout is done,
since this is what propagates the new geometry in so the JavaScript code can detect it. Also
simplified the logic and streamlined a little, and added a FIXME about the bad idea here where
the code enqueues an event for an unknown time in the future. Removed the unneeded code that
passes in the DOM window as the target to dispatchWindowEvent, since that gets filled in as the
target by default.

Tools:
* DumpRenderTree/mac/DumpRenderTree.mm:
(sizeWebViewForCurrentTest): Added a call to reset the window origin, which
happens to be stored in the UI delegate object. This is part of resetting the
window position.

* DumpRenderTree/mac/UIDelegate.h: Store the window origin rather than storing
a frame rectangle. The size is stored in the size of the web view itself.
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate resetWindowOrigin]): Added.
(-[UIDelegate webView:setFrame:]): Changed to set the size of the web view. The
old version would store the frame, but not resize the web view!
(-[UIDelegate webViewFrame:]): Get the size from the web view.

* WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
(WTR::PlatformWebView::setWindowFrame): Added code to resize the web view.

* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
(WTR::PlatformWebView::resizeTo): Added a comment about missing code to resize
the window.

* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::resizeTo): Changed this to call setWindowFrame so the
window gets resized too, not just the web view.
(WTR::PlatformWebView::setWindowFrame): Added code to set the size of the web view.

* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::resizeTo): Changed this to call setWindowFrame so the
window gets resized too, not just the web view.
(WTR::PlatformWebView::setWindowFrame): Added code to set the size of the web view.

LayoutTests:
* css3/viewport-percentage-lengths/resources/resize-test.js:
Added code to compensate for the difference between innerWidth/Height and outerWidth/Height
so this works well in a browser window. Added code to &quot;warm up&quot; so the first resize triggers
a resize event. Tweaked style of the code a bit. Use resize events to avoid flakiness due
to race conditions. One thing I did not fix is the &quot;out of order&quot; problem where all the
test results get written out after the words TEST COMPLETE.

* css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block-expected.txt:
Updated due to changes to the underlying test machinery, and also to show actual expected success.
The old results said PASS with various obviously wrong results.

* css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html:
Changed this test to use the shared resize-test.js.

* css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child-expected.txt:
Updated due to changes to the underlying test machinery, and also to show actual expected success.
The old results said PASS with various obviously wrong results.

* css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html:
Streamlined this test a little.

* css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt:
Updated due to changes to the underlying test machinery, and also to show actual expected success.
The old results said PASS with various obviously wrong results.

* css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html:
Streamlined this test a little.

* css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt:
Updated due to changes to the underlying test machinery, and also to show both expected success,
and some expected failures. These failures were going unnoticed before since the test didn't
successfully do any resizing of the web view.

* css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html:
Streamlined this test a little.

* fast/dom/Window/window-resize-contents-expected.txt: Updated to reflect the test actually
resizing. The old test results expected no resizing to occur.
* fast/dom/Window/window-resize-contents.html: Updated to use a resize event handler so the
test can successfully test asynchronous resizes like the ones done by WebKit2.

* fast/dom/rtl-scroll-to-leftmost-and-resize.html: Updated to use a resize event handler so
this can test asynchronous resizes. Also fixed code that was treating the arguments to resizeTo
as if they were inner coordinates rather than outer. However, the bug this tests for has not
been fixed, so need to expect failures.

* platform/mac/TestExpectations: Added a failure expection for the test above.

* platform/mac/fast/dynamic/window-resize-scrollbars-test-expected.png: Updated to expect a result
that successfully resized.
* platform/mac/fast/dynamic/window-resize-scrollbars-test-expected.txt: Ditto.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsresourcesresizetestjs">trunk/LayoutTests/css3/viewport-percentage-lengths/resources/resize-test.js</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsanonymousblockexpectedtxt">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsanonymousblockhtml">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthspercentsizechildexpectedtxt">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthspercentsizechildhtml">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsrelativefontsizeexpectedtxt">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsrelativefontsizehtml">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsresizeexpectedtxt">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsresizehtml">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html</a></li>
<li><a href="#trunkLayoutTestsfastdomWindowwindowresizecontentsexpectedtxt">trunk/LayoutTests/fast/dom/Window/window-resize-contents-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomWindowwindowresizecontentshtml">trunk/LayoutTests/fast/dom/Window/window-resize-contents.html</a></li>
<li><a href="#trunkLayoutTestsfastdomrtlscrolltoleftmostandresizehtml">trunk/LayoutTests/fast/dom/rtl-scroll-to-leftmost-and-resize.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastdynamicwindowresizescrollbarstestexpectedpng">trunk/LayoutTests/platform/mac/fast/dynamic/window-resize-scrollbars-test-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastdynamicwindowresizescrollbarstestexpectedtxt">trunk/LayoutTests/platform/mac/fast/dynamic/window-resize-scrollbars-test-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreemacDumpRenderTreemm">trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm</a></li>
<li><a href="#trunkToolsDumpRenderTreemacUIDelegateh">trunk/Tools/DumpRenderTree/mac/UIDelegate.h</a></li>
<li><a href="#trunkToolsDumpRenderTreemacUIDelegatemm">trunk/Tools/DumpRenderTree/mac/UIDelegate.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnereflPlatformWebViewEflcpp">trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnergtkPlatformWebViewGtkcpp">trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunneriosPlatformWebViewIOSmm">trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnermacPlatformWebViewMacmm">trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/LayoutTests/ChangeLog        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -1,3 +1,62 @@
</span><ins>+2014-05-31  Darin Adler  &lt;darin@apple.com&gt;
+
+        Viewport percentage tests that resize the viewport are flaky
+        https://bugs.webkit.org/show_bug.cgi?id=133351
+
+        Reviewed by Anders Carlsson.
+
+        * css3/viewport-percentage-lengths/resources/resize-test.js:
+        Added code to compensate for the difference between innerWidth/Height and outerWidth/Height
+        so this works well in a browser window. Added code to &quot;warm up&quot; so the first resize triggers
+        a resize event. Tweaked style of the code a bit. Use resize events to avoid flakiness due
+        to race conditions. One thing I did not fix is the &quot;out of order&quot; problem where all the
+        test results get written out after the words TEST COMPLETE.
+
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block-expected.txt:
+        Updated due to changes to the underlying test machinery, and also to show actual expected success.
+        The old results said PASS with various obviously wrong results.
+
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html:
+        Changed this test to use the shared resize-test.js.
+
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child-expected.txt:
+        Updated due to changes to the underlying test machinery, and also to show actual expected success.
+        The old results said PASS with various obviously wrong results.
+
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html:
+        Streamlined this test a little.
+
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt:
+        Updated due to changes to the underlying test machinery, and also to show actual expected success.
+        The old results said PASS with various obviously wrong results.
+
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html:
+        Streamlined this test a little.
+
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt:
+        Updated due to changes to the underlying test machinery, and also to show both expected success,
+        and some expected failures. These failures were going unnoticed before since the test didn't
+        successfully do any resizing of the web view.
+
+        * css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html:
+        Streamlined this test a little.
+
+        * fast/dom/Window/window-resize-contents-expected.txt: Updated to reflect the test actually
+        resizing. The old test results expected no resizing to occur.
+        * fast/dom/Window/window-resize-contents.html: Updated to use a resize event handler so the
+        test can successfully test asynchronous resizes like the ones done by WebKit2.
+
+        * fast/dom/rtl-scroll-to-leftmost-and-resize.html: Updated to use a resize event handler so
+        this can test asynchronous resizes. Also fixed code that was treating the arguments to resizeTo
+        as if they were inner coordinates rather than outer. However, the bug this tests for has not
+        been fixed, so need to expect failures.
+
+        * platform/mac/TestExpectations: Added a failure expection for the test above.
+
+        * platform/mac/fast/dynamic/window-resize-scrollbars-test-expected.png: Updated to expect a result
+        that successfully resized.
+        * platform/mac/fast/dynamic/window-resize-scrollbars-test-expected.txt: Ditto.
+
</ins><span class="cx"> 2014-05-30  Mario Sanchez Prada  &lt;mario.prada@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Don't use logAccessibilityEvents() in aria-slider-required-attributes.html
</span></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsresourcesresizetestjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/viewport-percentage-lengths/resources/resize-test.js (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/resources/resize-test.js        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/resources/resize-test.js        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -3,25 +3,56 @@
</span><span class="cx">     testRunner.dumpAsText();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function resizeTest(sizes, testfn) {
-    if (!sizes.length) {
</del><ins>+function resizeTest(sizes, testFunction)
+{
+    var widthDelta;
+    var heightDelta;
+
+    function performNextResize()
+    {
+        if (sizes.length) {
+            resizeTo(sizes[0][0] + widthDelta, sizes[0][1] + heightDelta);
+            return;
+        }
+        removeEventListener(&quot;resize&quot;, resizeHandler);
</ins><span class="cx">         if (window.testRunner)
</span><span class="cx">             testRunner.notifyDone();
</span><del>-        return;
</del><ins>+    };
+
+    function resizeHandler()
+    {
+        var nextSize = sizes.shift();
+
+        shouldEvaluateTo(&quot;innerWidth&quot;, nextSize[0]);
+        shouldEvaluateTo(&quot;innerHeight&quot;, nextSize[1]);
+
+        testFunction();
+
+        performNextResize();
+    };
+
+    const warmupWidth = outerWidth + 13;
+
+    function warmupDone()
+    {
+        if (outerWidth != warmupWidth)
+            return;
+        widthDelta = outerWidth - innerWidth;
+        heightDelta = outerHeight - innerHeight;
+        removeEventListener(&quot;resize&quot;, warmupDone);
+        setTimeout(function () {
+            addEventListener(&quot;resize&quot;, resizeHandler);
+            performNextResize();
+        }, 0);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    var size = sizes.shift();
-    var width = size[0];
-    var height = size[1];
-    window.resizeTo(width, height);
-    window.setTimeout(function () {
-        shouldBe(&quot;window.outerWidth&quot;, &quot;&quot; + width);
-        shouldBe(&quot;window.outerHeight&quot;, &quot;&quot; + height);
-        testfn(size);
-        resizeTest(sizes, testfn);
</del><ins>+    addEventListener(&quot;resize&quot;, warmupDone);
+    setTimeout(function () {
+        resizeTo(warmupWidth, outerHeight);
</ins><span class="cx">     }, 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function standardResizeTest(testfn) {
-    resizeTest([[800, 600], [900, 600], [900, 640], [500, 640], [800, 600]], testfn);
</del><ins>+function standardResizeTest(testFunction)
+{
+    resizeTest([[800, 600], [900, 600], [900, 640], [500, 640], [800, 600]], testFunction);
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsanonymousblockexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block-expected.txt (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block-expected.txt        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block-expected.txt        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -6,41 +6,41 @@
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span><del>-PASS window.outerWidth is 800
-PASS window.outerHeight is 600
-PASS getComputedStyle(container).width is '400px'
-PASS getComputedStyle(container).height is '300px'
-PASS getComputedStyle(random).width is '200px'
-PASS window.innerWidth/2 is &gt;= document.getElementById('firstContent').offsetWidth
-PASS window.innerWidth/2 is &gt;= document.getElementById('secondContent').offsetWidth
-PASS window.outerWidth is 900
-PASS window.outerHeight is 600
-PASS getComputedStyle(container).width is '400px'
-PASS getComputedStyle(container).height is '300px'
-PASS getComputedStyle(random).width is '200px'
-PASS window.innerWidth/2 is &gt;= document.getElementById('firstContent').offsetWidth
-PASS window.innerWidth/2 is &gt;= document.getElementById('secondContent').offsetWidth
-PASS window.outerWidth is 900
-PASS window.outerHeight is 640
-PASS getComputedStyle(container).width is '400px'
-PASS getComputedStyle(container).height is '300px'
-PASS getComputedStyle(random).width is '200px'
-PASS window.innerWidth/2 is &gt;= document.getElementById('firstContent').offsetWidth
-PASS window.innerWidth/2 is &gt;= document.getElementById('secondContent').offsetWidth
-PASS window.outerWidth is 500
-PASS window.outerHeight is 640
-PASS getComputedStyle(container).width is '400px'
-PASS getComputedStyle(container).height is '300px'
-PASS getComputedStyle(random).width is '200px'
-PASS window.innerWidth/2 is &gt;= document.getElementById('firstContent').offsetWidth
-PASS window.innerWidth/2 is &gt;= document.getElementById('secondContent').offsetWidth
-PASS window.outerWidth is 800
-PASS window.outerHeight is 600
-PASS getComputedStyle(container).width is '400px'
-PASS getComputedStyle(container).height is '300px'
-PASS getComputedStyle(random).width is '200px'
-PASS window.innerWidth/2 is &gt;= document.getElementById('firstContent').offsetWidth
-PASS window.innerWidth/2 is &gt;= document.getElementById('secondContent').offsetWidth
</del><ins>+PASS innerWidth is 800
+PASS innerHeight is 600
+PASS getComputedStyle(container).width is &quot;400px&quot;
+PASS getComputedStyle(container).height is &quot;300px&quot;
+PASS getComputedStyle(random).width is &quot;200px&quot;
+PASS innerWidth / 2 is &gt;= document.getElementById('firstContent').offsetWidth
+PASS innerWidth / 2 is &gt;= document.getElementById('secondContent').offsetWidth
+PASS innerWidth is 900
+PASS innerHeight is 600
+PASS getComputedStyle(container).width is &quot;450px&quot;
+PASS getComputedStyle(container).height is &quot;300px&quot;
+PASS getComputedStyle(random).width is &quot;225px&quot;
+PASS innerWidth / 2 is &gt;= document.getElementById('firstContent').offsetWidth
+PASS innerWidth / 2 is &gt;= document.getElementById('secondContent').offsetWidth
+PASS innerWidth is 900
+PASS innerHeight is 640
+PASS getComputedStyle(container).width is &quot;450px&quot;
+PASS getComputedStyle(container).height is &quot;320px&quot;
+PASS getComputedStyle(random).width is &quot;225px&quot;
+PASS innerWidth / 2 is &gt;= document.getElementById('firstContent').offsetWidth
+PASS innerWidth / 2 is &gt;= document.getElementById('secondContent').offsetWidth
+PASS innerWidth is 500
+PASS innerHeight is 640
+PASS getComputedStyle(container).width is &quot;250px&quot;
+PASS getComputedStyle(container).height is &quot;320px&quot;
+PASS getComputedStyle(random).width is &quot;125px&quot;
+PASS innerWidth / 2 is &gt;= document.getElementById('firstContent').offsetWidth
+PASS innerWidth / 2 is &gt;= document.getElementById('secondContent').offsetWidth
+PASS innerWidth is 800
+PASS innerHeight is 600
+PASS getComputedStyle(container).width is &quot;400px&quot;
+PASS getComputedStyle(container).height is &quot;300px&quot;
+PASS getComputedStyle(random).width is &quot;200px&quot;
+PASS innerWidth / 2 is &gt;= document.getElementById('firstContent').offsetWidth
+PASS innerWidth / 2 is &gt;= document.getElementById('secondContent').offsetWidth
</ins><span class="cx"> This is enough text content that it will wrap around in this container. We need lots of it to account for variances in font sizes.
</span><span class="cx"> This is some content in an inner div.
</span><span class="cx"> And here is some more content that will also wrap around in this container. We need lots of it to account for variances in font sizes.
</span></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsanonymousblockhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -20,39 +20,15 @@
</span><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><ins>+&lt;script src=&quot;resources/resize-test.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script&gt;
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
</del><span class="cx"> description(&quot;Test viewport unit sizes work when an anonymous block is involved.&quot;);
</span><del>-
-function resizeTest(sizes) {
-    if (!sizes.length) {
-        testRunner.notifyDone();
-        return;
-    }
-
-    var size = sizes.shift();
-    var width = size[0];
-    var height = size[1];
-    window.resizeTo(width, height);
-    window.setTimeout(function () {
-        var min = Math.min(window.innerWidth, window.innerHeight);
-        var max = Math.max(window.innerWidth, window.innerHeight);
-        shouldBe(&quot;window.outerWidth&quot;, &quot;&quot; + width);
-        shouldBe(&quot;window.outerHeight&quot;, &quot;&quot; + height);
-        shouldBe(&quot;getComputedStyle(container).width&quot;, &quot;'&quot; + window.innerWidth/2 + &quot;px'&quot;);
-        shouldBe(&quot;getComputedStyle(container).height&quot;, &quot;'&quot; + window.innerHeight/2 + &quot;px'&quot;);
-        shouldBe(&quot;getComputedStyle(random).width&quot;, &quot;'&quot; + window.innerWidth/4 + &quot;px'&quot;);
-        shouldBeGreaterThanOrEqual(&quot;window.innerWidth/2&quot;, &quot;document.getElementById('firstContent').offsetWidth&quot;);
-        shouldBeGreaterThanOrEqual(&quot;window.innerWidth/2&quot;, &quot;document.getElementById('secondContent').offsetWidth&quot;);
-        resizeTest(sizes);
-    }, 0);
-}
-
-resizeTest([[800, 600], [900, 600], [900, 640], [500, 640], [800, 600]]);
-
</del><ins>+standardResizeTest(function () {
+    shouldBeEqualToString(&quot;getComputedStyle(container).width&quot;, innerWidth / 2 + &quot;px&quot;);
+    shouldBeEqualToString(&quot;getComputedStyle(container).height&quot;, innerHeight / 2 + &quot;px&quot;);
+    shouldBeEqualToString(&quot;getComputedStyle(random).width&quot;, innerWidth / 4 + &quot;px&quot;);
+    shouldBeGreaterThanOrEqual(&quot;innerWidth / 2&quot;, &quot;document.getElementById('firstContent').offsetWidth&quot;);
+    shouldBeGreaterThanOrEqual(&quot;innerWidth / 2&quot;, &quot;document.getElementById('secondContent').offsetWidth&quot;);
+});
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthspercentsizechildexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child-expected.txt (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child-expected.txt        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child-expected.txt        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -6,34 +6,34 @@
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span><del>-PASS window.outerWidth is 800
-PASS window.outerHeight is 600
-PASS getComputedStyle(container).width is '400px'
-PASS getComputedStyle(container).height is '300px'
-PASS getComputedStyle(percent).width is '200px'
-PASS getComputedStyle(percent).height is '150px'
-PASS window.outerWidth is 900
-PASS window.outerHeight is 600
-PASS getComputedStyle(container).width is '400px'
-PASS getComputedStyle(container).height is '300px'
-PASS getComputedStyle(percent).width is '200px'
-PASS getComputedStyle(percent).height is '150px'
-PASS window.outerWidth is 900
-PASS window.outerHeight is 640
-PASS getComputedStyle(container).width is '400px'
-PASS getComputedStyle(container).height is '300px'
-PASS getComputedStyle(percent).width is '200px'
-PASS getComputedStyle(percent).height is '150px'
-PASS window.outerWidth is 500
-PASS window.outerHeight is 640
-PASS getComputedStyle(container).width is '400px'
-PASS getComputedStyle(container).height is '300px'
-PASS getComputedStyle(percent).width is '200px'
-PASS getComputedStyle(percent).height is '150px'
-PASS window.outerWidth is 800
-PASS window.outerHeight is 600
-PASS getComputedStyle(container).width is '400px'
-PASS getComputedStyle(container).height is '300px'
-PASS getComputedStyle(percent).width is '200px'
-PASS getComputedStyle(percent).height is '150px'
</del><ins>+PASS innerWidth is 800
+PASS innerHeight is 600
+PASS getComputedStyle(container).width is &quot;400px&quot;
+PASS getComputedStyle(container).height is &quot;300px&quot;
+PASS getComputedStyle(percent).width is &quot;200px&quot;
+PASS getComputedStyle(percent).height is &quot;150px&quot;
+PASS innerWidth is 900
+PASS innerHeight is 600
+PASS getComputedStyle(container).width is &quot;450px&quot;
+PASS getComputedStyle(container).height is &quot;300px&quot;
+PASS getComputedStyle(percent).width is &quot;225px&quot;
+PASS getComputedStyle(percent).height is &quot;150px&quot;
+PASS innerWidth is 900
+PASS innerHeight is 640
+PASS getComputedStyle(container).width is &quot;450px&quot;
+PASS getComputedStyle(container).height is &quot;320px&quot;
+PASS getComputedStyle(percent).width is &quot;225px&quot;
+PASS getComputedStyle(percent).height is &quot;160px&quot;
+PASS innerWidth is 500
+PASS innerHeight is 640
+PASS getComputedStyle(container).width is &quot;250px&quot;
+PASS getComputedStyle(container).height is &quot;320px&quot;
+PASS getComputedStyle(percent).width is &quot;125px&quot;
+PASS getComputedStyle(percent).height is &quot;160px&quot;
+PASS innerWidth is 800
+PASS innerHeight is 600
+PASS getComputedStyle(container).width is &quot;400px&quot;
+PASS getComputedStyle(container).height is &quot;300px&quot;
+PASS getComputedStyle(percent).width is &quot;200px&quot;
+PASS getComputedStyle(percent).height is &quot;150px&quot;
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthspercentsizechildhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -18,12 +18,11 @@
</span><span class="cx"> &lt;script src=&quot;resources/resize-test.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> description(&quot;Test that percentage dimensions work in a child with a parent with viewport unit dimensions.&quot;);
</span><del>-
-standardResizeTest(function (sizes) {
-    shouldBe(&quot;getComputedStyle(container).width&quot;, &quot;'&quot; + window.innerWidth/2 + &quot;px'&quot;);
-    shouldBe(&quot;getComputedStyle(container).height&quot;, &quot;'&quot; + window.innerHeight/2 + &quot;px'&quot;);
-    shouldBe(&quot;getComputedStyle(percent).width&quot;, &quot;'&quot; + window.innerWidth/4 + &quot;px'&quot;);
-    shouldBe(&quot;getComputedStyle(percent).height&quot;, &quot;'&quot; + window.innerHeight/4 + &quot;px'&quot;);
</del><ins>+standardResizeTest(function () {
+    shouldBeEqualToString(&quot;getComputedStyle(container).width&quot;, innerWidth / 2 + &quot;px&quot;);
+    shouldBeEqualToString(&quot;getComputedStyle(container).height&quot;, innerHeight / 2 + &quot;px&quot;);
+    shouldBeEqualToString(&quot;getComputedStyle(percent).width&quot;, innerWidth / 4 + &quot;px&quot;);
+    shouldBeEqualToString(&quot;getComputedStyle(percent).height&quot;, innerHeight / 4 + &quot;px&quot;);
</ins><span class="cx"> });
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsrelativefontsizeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -6,29 +6,29 @@
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span><del>-PASS window.outerWidth is 800
-PASS window.outerHeight is 600
-PASS getComputedStyle(container).fontSize is '40px'
-PASS getComputedStyle(ems).fontSize is '160px'
-PASS getComputedStyle(percent).fontSize is '20px'
-PASS window.outerWidth is 900
-PASS window.outerHeight is 600
-PASS getComputedStyle(container).fontSize is '40px'
-PASS getComputedStyle(ems).fontSize is '160px'
-PASS getComputedStyle(percent).fontSize is '20px'
-PASS window.outerWidth is 900
-PASS window.outerHeight is 640
-PASS getComputedStyle(container).fontSize is '40px'
-PASS getComputedStyle(ems).fontSize is '160px'
-PASS getComputedStyle(percent).fontSize is '20px'
-PASS window.outerWidth is 500
-PASS window.outerHeight is 640
-PASS getComputedStyle(container).fontSize is '40px'
-PASS getComputedStyle(ems).fontSize is '160px'
-PASS getComputedStyle(percent).fontSize is '20px'
-PASS window.outerWidth is 800
-PASS window.outerHeight is 600
-PASS getComputedStyle(container).fontSize is '40px'
-PASS getComputedStyle(ems).fontSize is '160px'
-PASS getComputedStyle(percent).fontSize is '20px'
</del><ins>+PASS innerWidth is 800
+PASS innerHeight is 600
+PASS getComputedStyle(container).fontSize is &quot;40px&quot;
+PASS getComputedStyle(ems).fontSize is &quot;160px&quot;
+PASS getComputedStyle(percent).fontSize is &quot;20px&quot;
+PASS innerWidth is 900
+PASS innerHeight is 600
+PASS getComputedStyle(container).fontSize is &quot;45px&quot;
+PASS getComputedStyle(ems).fontSize is &quot;180px&quot;
+PASS getComputedStyle(percent).fontSize is &quot;23px&quot;
+PASS innerWidth is 900
+PASS innerHeight is 640
+PASS getComputedStyle(container).fontSize is &quot;45px&quot;
+PASS getComputedStyle(ems).fontSize is &quot;180px&quot;
+PASS getComputedStyle(percent).fontSize is &quot;23px&quot;
+PASS innerWidth is 500
+PASS innerHeight is 640
+PASS getComputedStyle(container).fontSize is &quot;25px&quot;
+PASS getComputedStyle(ems).fontSize is &quot;100px&quot;
+PASS getComputedStyle(percent).fontSize is &quot;13px&quot;
+PASS innerWidth is 800
+PASS innerHeight is 600
+PASS getComputedStyle(container).fontSize is &quot;40px&quot;
+PASS getComputedStyle(ems).fontSize is &quot;160px&quot;
+PASS getComputedStyle(percent).fontSize is &quot;20px&quot;
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsrelativefontsizehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -20,12 +20,10 @@
</span><span class="cx"> &lt;script src=&quot;resources/resize-test.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> description(&quot;Test that relative font sizes work when the parent is in viewport units.&quot;);
</span><del>-
-standardResizeTest(function (size) {
-        shouldBe(&quot;getComputedStyle(container).fontSize&quot;, &quot;'&quot; + Math.round(window.innerWidth/20) + &quot;px'&quot;);
-        shouldBe(&quot;getComputedStyle(ems).fontSize&quot;, &quot;'&quot; + Math.round(window.innerWidth/5) + &quot;px'&quot;);
-        shouldBe(&quot;getComputedStyle(percent).fontSize&quot;, &quot;'&quot; + Math.round(window.innerWidth/40) + &quot;px'&quot;);
</del><ins>+standardResizeTest(function () {
+    shouldBeEqualToString(&quot;getComputedStyle(container).fontSize&quot;, Math.round(innerWidth / 20) + &quot;px&quot;);
+    shouldBeEqualToString(&quot;getComputedStyle(ems).fontSize&quot;, Math.round(innerWidth / 5) + &quot;px&quot;);
+    shouldBeEqualToString(&quot;getComputedStyle(percent).fontSize&quot;, Math.round(innerWidth / 40) + &quot;px&quot;);
</ins><span class="cx"> });
</span><del>-
</del><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsresizeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -6,34 +6,34 @@
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span><del>-PASS window.outerWidth is 800
-PASS window.outerHeight is 600
-PASS getComputedStyle(test).fontSize is '30px'
-PASS getComputedStyle(test).width is '400px'
-PASS getComputedStyle(testpseudo, ':after').marginLeft is '120px'
-PASS getComputedStyle(testpseudo, ':after').paddingRight is '200px'
-PASS window.outerWidth is 900
-PASS window.outerHeight is 600
-PASS getComputedStyle(test).fontSize is '30px'
-PASS getComputedStyle(test).width is '400px'
-PASS getComputedStyle(testpseudo, ':after').marginLeft is '120px'
-PASS getComputedStyle(testpseudo, ':after').paddingRight is '200px'
-PASS window.outerWidth is 900
-PASS window.outerHeight is 640
-PASS getComputedStyle(test).fontSize is '30px'
-PASS getComputedStyle(test).width is '400px'
-PASS getComputedStyle(testpseudo, ':after').marginLeft is '120px'
-PASS getComputedStyle(testpseudo, ':after').paddingRight is '200px'
-PASS window.outerWidth is 500
-PASS window.outerHeight is 640
-PASS getComputedStyle(test).fontSize is '30px'
-PASS getComputedStyle(test).width is '400px'
-PASS getComputedStyle(testpseudo, ':after').marginLeft is '120px'
-PASS getComputedStyle(testpseudo, ':after').paddingRight is '200px'
-PASS window.outerWidth is 800
-PASS window.outerHeight is 600
-PASS getComputedStyle(test).fontSize is '30px'
-PASS getComputedStyle(test).width is '400px'
-PASS getComputedStyle(testpseudo, ':after').marginLeft is '120px'
-PASS getComputedStyle(testpseudo, ':after').paddingRight is '200px'
</del><ins>+PASS innerWidth is 800
+PASS innerHeight is 600
+PASS getComputedStyle(test).fontSize is &quot;30px&quot;
+PASS getComputedStyle(test).width is &quot;400px&quot;
+PASS getComputedStyle(testpseudo, ':after').marginLeft is &quot;120px&quot;
+PASS getComputedStyle(testpseudo, ':after').paddingRight is &quot;200px&quot;
+PASS innerWidth is 900
+PASS innerHeight is 600
+PASS getComputedStyle(test).fontSize is &quot;30px&quot;
+PASS getComputedStyle(test).width is &quot;450px&quot;
+PASS getComputedStyle(testpseudo, ':after').marginLeft is &quot;120px&quot;
+FAIL getComputedStyle(testpseudo, ':after').paddingRight should be 225px. Was 200px.
+PASS innerWidth is 900
+PASS innerHeight is 640
+PASS getComputedStyle(test).fontSize is &quot;32px&quot;
+PASS getComputedStyle(test).width is &quot;450px&quot;
+FAIL getComputedStyle(testpseudo, ':after').marginLeft should be 128px. Was 120px.
+FAIL getComputedStyle(testpseudo, ':after').paddingRight should be 225px. Was 200px.
+PASS innerWidth is 500
+PASS innerHeight is 640
+PASS getComputedStyle(test).fontSize is &quot;32px&quot;
+PASS getComputedStyle(test).width is &quot;250px&quot;
+FAIL getComputedStyle(testpseudo, ':after').marginLeft should be 100px. Was 120px.
+FAIL getComputedStyle(testpseudo, ':after').paddingRight should be 160px. Was 200px.
+PASS innerWidth is 800
+PASS innerHeight is 600
+PASS getComputedStyle(test).fontSize is &quot;30px&quot;
+PASS getComputedStyle(test).width is &quot;400px&quot;
+PASS getComputedStyle(testpseudo, ':after').marginLeft is &quot;120px&quot;
+PASS getComputedStyle(testpseudo, ':after').paddingRight is &quot;200px&quot;
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsresizehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -18,13 +18,13 @@
</span><span class="cx"> &lt;script src=&quot;resources/resize-test.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> description(&quot;Test that viewport lengths and font sizes properly resize with the viewport.&quot;);
</span><del>-standardResizeTest(function (size) {
-        var min = Math.min(window.innerWidth, window.innerHeight);
-        var max = Math.max(window.innerWidth, window.innerHeight);
-        shouldBe(&quot;getComputedStyle(test).fontSize&quot;, &quot;'&quot; + window.innerHeight/20 + &quot;px'&quot;);
-        shouldBe(&quot;getComputedStyle(test).width&quot;, &quot;'&quot; + window.innerWidth/2 + &quot;px'&quot;);
-        shouldBe(&quot;getComputedStyle(testpseudo, ':after').marginLeft&quot;, &quot;'&quot; + min/5 + &quot;px'&quot;);
-        shouldBe(&quot;getComputedStyle(testpseudo, ':after').paddingRight&quot;, &quot;'&quot; + max/4 + &quot;px'&quot;);
</del><ins>+standardResizeTest(function () {
+    var min = Math.min(innerWidth, innerHeight);
+    var max = Math.max(innerWidth, innerHeight);
+    shouldBeEqualToString(&quot;getComputedStyle(test).fontSize&quot;, innerHeight / 20 + &quot;px&quot;);
+    shouldBeEqualToString(&quot;getComputedStyle(test).width&quot;, innerWidth / 2 + &quot;px&quot;);
+    shouldBeEqualToString(&quot;getComputedStyle(testpseudo, ':after').marginLeft&quot;, min / 5 + &quot;px&quot;);
+    shouldBeEqualToString(&quot;getComputedStyle(testpseudo, ':after').paddingRight&quot;, max / 4 + &quot;px&quot;);
</ins><span class="cx"> });
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowwindowresizecontentsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Window/window-resize-contents-expected.txt (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/window-resize-contents-expected.txt        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/LayoutTests/fast/dom/Window/window-resize-contents-expected.txt        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><del>-CONSOLE MESSAGE: line 18: Initial reference node dimensions 800 x 600
-CONSOLE MESSAGE: line 20: Increasing window size by 10 x 10
-CONSOLE MESSAGE: line 22: Post-resize reference node dimensions 800 x 600
</del><ins>+CONSOLE MESSAGE: line 20: Initial reference node dimensions 800 x 600
+CONSOLE MESSAGE: line 22: Increasing window size by 10 x 10
+CONSOLE MESSAGE: line 29: Post-resize reference node dimensions 810 x 610
</ins><span class="cx"> This test checks that the yellow reference DOM node (which should be as big as the window) gets resized when the window is resized.
</span><span class="cx"> 
</span><span class="cx"> To avoid relayouts and repaints caused by DOM-based logging, it doesn't output anything. Please check the console for confirmation that the node dimensions increase by 10x10.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowwindowresizecontentshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Window/window-resize-contents.html (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/window-resize-contents.html        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/LayoutTests/fast/dom/Window/window-resize-contents.html        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -12,15 +12,25 @@
</span><span class="cx">     dimensions increase by 10x10.&lt;/p&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner)
</del><ins>+    if (window.testRunner) {
</ins><span class="cx">         testRunner.dumpAsText();
</span><ins>+        testRunner.waitUntilDone();
+    }
</ins><span class="cx">     var referenceNode = document.getElementById('reference');
</span><span class="cx">     console.log('Initial reference node dimensions ' +
</span><span class="cx">         referenceNode.offsetWidth + ' x ' + referenceNode.offsetHeight);
</span><span class="cx">     console.log('Increasing window size by 10 x 10');
</span><del>-    window.resizeBy(10, 10);
-    console.log('Post-resize reference node dimensions ' +
-        referenceNode.offsetWidth + ' x ' + referenceNode.offsetHeight);
</del><ins>+    addEventListener('resize', finishTest);
+    var widthBefore = innerWidth;
+    resizeBy(10, 10);
+    function finishTest() {
+        if (innerWidth != widthBefore + 10)
+            return;
+        console.log('Post-resize reference node dimensions ' +
+            referenceNode.offsetWidth + ' x ' + referenceNode.offsetHeight);
+        if (window.testRunner)
+            testRunner.notifyDone();
+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;/body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomrtlscrolltoleftmostandresizehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/rtl-scroll-to-leftmost-and-resize.html (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/rtl-scroll-to-leftmost-and-resize.html        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/LayoutTests/fast/dom/rtl-scroll-to-leftmost-and-resize.html        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -4,9 +4,21 @@
</span><span class="cx"> &lt;script type=&quot;text/javascript&quot;&gt;
</span><span class="cx"> onload = function()
</span><span class="cx"> {
</span><del>-    window.resizeTo(250, window.innerHeight);
-    window.scrollTo(-100000, 0);
-    window.resizeTo(350, window.innerHeight);
</del><ins>+    if (window.testRunner)
+        testRunner.waitUntilDone();
+    // FIXME: For predictable results, we need to resize to a known value for innerWidth,
+    // rather than assuming that innerWidth and outerWidth are the same.
+    resizeTo(250, outerHeight);
+    scrollTo(-100000, 0);
+    addEventListener('resize', finishTest);
+    resizeTo(350, outerHeight);
+    function finishTest()
+    {
+        if (outerWidth != 350)
+            return;
+        if (window.testRunner)
+            testRunner.notifyDone();
+    }
</ins><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="lines">@@ -16,4 +28,3 @@
</span><span class="cx">         &lt;/div&gt;
</span><span class="cx">     &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span><del>-
</del></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/LayoutTests/platform/mac/TestExpectations        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -1372,3 +1372,7 @@
</span><span class="cx"> [ MountainLion Mavericks ] http/tests/misc/webtiming-ssl.php [ Skip ]
</span><span class="cx"> [ MountainLion Mavericks ] http/tests/misc/webtiming-two-redirects.php [ Skip ]
</span><span class="cx"> [ MountainLion Mavericks ] fast/performance [ Skip ]
</span><ins>+
+# This test, originally written for Chromium, historically was not testing anything on Mac because
+# resizing didn't work. Now the test fails. I believe this bug was never fixed for the Mac port.
+fast/dom/rtl-scroll-to-leftmost-and-resize.html [ Failure ]
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastdynamicwindowresizescrollbarstestexpectedpng"></a>
<div class="binary"><h4>Modified: trunk/LayoutTests/platform/mac/fast/dynamic/window-resize-scrollbars-test-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastdynamicwindowresizescrollbarstestexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/fast/dynamic/window-resize-scrollbars-test-expected.txt (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/dynamic/window-resize-scrollbars-test-expected.txt        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/LayoutTests/platform/mac/fast/dynamic/window-resize-scrollbars-test-expected.txt        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -1,8 +1,8 @@
</span><del>-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
</del><ins>+layer at (0,0) size 776x576
+  RenderView at (0,0) size 776x576
</ins><span class="cx"> layer at (0,0) size 768x568
</span><span class="cx">   RenderBlock {HTML} at (0,0) size 768x568
</span><del>-    RenderBody {BODY} at (8,8) size 752x584
</del><ins>+    RenderBody {BODY} at (8,8) size 752x560
</ins><span class="cx">       RenderText {#text} at (0,0) size 484x18
</span><span class="cx">         text run at (0,0) width 484: &quot;This window should not have scroll bars. If it has scroll bars, try to use them.&quot;
</span><span class="cx">       RenderText {#text} at (0,0) size 0x0
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/Source/WebCore/ChangeLog        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2014-05-31  Darin Adler  &lt;darin@apple.com&gt;
+
+        Viewport percentage tests that resize the viewport are flaky
+        https://bugs.webkit.org/show_bug.cgi?id=133351
+
+        Reviewed by Anders Carlsson.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::setFrameRect): Removed code that explicitly sends a resize event here.
+        The resize event will be sent as a side effect of layout instead.
+        (WebCore::FrameView::sendResizeEventIfNeeded): Don't send a resize event until layout is done,
+        since this is what propagates the new geometry in so the JavaScript code can detect it. Also
+        simplified the logic and streamlined a little, and added a FIXME about the bad idea here where
+        the code enqueues an event for an unknown time in the future. Removed the unneeded code that
+        passes in the DOM window as the target to dispatchWindowEvent, since that gets filled in as the
+        target by default.
+
</ins><span class="cx"> 2014-05-31  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Don't use std::mutex::try_lock to check if we own a mutex
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -433,9 +433,6 @@
</span><span class="cx">         if (renderView-&gt;usesCompositing())
</span><span class="cx">             renderView-&gt;compositor().frameViewDidChangeSize();
</span><span class="cx">     }
</span><del>-
-    if (!frameFlatteningEnabled())
-        sendResizeEventIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(REQUEST_ANIMATION_FRAME)
</span><span class="lines">@@ -2819,20 +2816,26 @@
</span><span class="cx"> 
</span><span class="cx"> void FrameView::sendResizeEventIfNeeded()
</span><span class="cx"> {
</span><ins>+    if (isInLayout() || needsLayout())
+        return;
+
</ins><span class="cx">     RenderView* renderView = this-&gt;renderView();
</span><span class="cx">     if (!renderView || renderView-&gt;printing())
</span><span class="cx">         return;
</span><ins>+
</ins><span class="cx">     if (frame().page() &amp;&amp; frame().page()-&gt;chrome().client().isSVGImageChromeClient())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     IntSize currentSize = sizeForResizeEvent();
</span><span class="cx">     float currentZoomFactor = renderView-&gt;style().zoom();
</span><del>-    bool shouldSendResizeEvent = !m_firstLayout &amp;&amp; (currentSize != m_lastViewportSize || currentZoomFactor != m_lastZoomFactor);
</del><span class="cx"> 
</span><ins>+    if (currentSize == m_lastViewportSize &amp;&amp; currentZoomFactor == m_lastZoomFactor)
+        return;
+
</ins><span class="cx">     m_lastViewportSize = currentSize;
</span><span class="cx">     m_lastZoomFactor = currentZoomFactor;
</span><span class="cx"> 
</span><del>-    if (!shouldSendResizeEvent)
</del><ins>+    if (m_firstLayout)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -2846,20 +2849,24 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     bool isMainFrame = frame().isMainFrame();
</span><del>-    bool canSendResizeEventSynchronously = !m_shouldAutoSize &amp;&amp; isMainFrame &amp;&amp; !isInLayout();
</del><ins>+    bool canSendResizeEventSynchronously = isMainFrame &amp;&amp; !m_shouldAutoSize;
</ins><span class="cx"> 
</span><del>-    // If we resized during layout, queue up a resize event for later, otherwise fire it right away.
</del><span class="cx">     RefPtr&lt;Event&gt; resizeEvent = Event::create(eventNames().resizeEvent, false, false);
</span><span class="cx">     if (canSendResizeEventSynchronously)
</span><del>-        frame().document()-&gt;dispatchWindowEvent(resizeEvent.release(), frame().document()-&gt;domWindow());
-    else
</del><ins>+        frame().document()-&gt;dispatchWindowEvent(resizeEvent.release());
+    else {
+        // FIXME: Queueing this event for an unpredictable time in the future seems
+        // intrinsically racy. By the time this resize event fires, the frame might
+        // be resized again, so we could end up with two resize events for the same size.
</ins><span class="cx">         frame().document()-&gt;enqueueWindowEvent(resizeEvent.release());
</span><ins>+    }
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><del>-    Page* page = frame().page();
</del><span class="cx">     if (InspectorInstrumentation::hasFrontends() &amp;&amp; isMainFrame) {
</span><del>-        if (InspectorClient* inspectorClient = page ? page-&gt;inspectorController().inspectorClient() : nullptr)
-            inspectorClient-&gt;didResizeMainFrame(&amp;frame());
</del><ins>+        if (Page* page = frame().page()) {
+            if (InspectorClient* inspectorClient = page-&gt;inspectorController().inspectorClient())
+                inspectorClient-&gt;didResizeMainFrame(&amp;frame());
+        }
</ins><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/Tools/ChangeLog        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2014-05-31  Darin Adler  &lt;darin@apple.com&gt;
+
+        Viewport percentage tests that resize the viewport are flaky
+        https://bugs.webkit.org/show_bug.cgi?id=133351
+
+        Reviewed by Anders Carlsson.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (sizeWebViewForCurrentTest): Added a call to reset the window origin, which
+        happens to be stored in the UI delegate object. This is part of resetting the
+        window position.
+
+        * DumpRenderTree/mac/UIDelegate.h: Store the window origin rather than storing
+        a frame rectangle. The size is stored in the size of the web view itself.
+        * DumpRenderTree/mac/UIDelegate.mm:
+        (-[UIDelegate resetWindowOrigin]): Added.
+        (-[UIDelegate webView:setFrame:]): Changed to set the size of the web view. The
+        old version would store the frame, but not resize the web view!
+        (-[UIDelegate webViewFrame:]): Get the size from the web view.
+
+        * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+        (WTR::PlatformWebView::setWindowFrame): Added code to resize the web view.
+
+        * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
+        (WTR::PlatformWebView::resizeTo): Added a comment about missing code to resize
+        the window.
+
+        * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
+        (WTR::PlatformWebView::resizeTo): Changed this to call setWindowFrame so the
+        window gets resized too, not just the web view.
+        (WTR::PlatformWebView::setWindowFrame): Added code to set the size of the web view.
+
+        * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+        (WTR::PlatformWebView::resizeTo): Changed this to call setWindowFrame so the
+        window gets resized too, not just the web view.
+        (WTR::PlatformWebView::setWindowFrame): Added code to set the size of the web view.
+
</ins><span class="cx"> 2014-05-30  Michael Saboff  &lt;msaboff@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Change run-jsc-stress-tests to not resolve jsc path locally when creating a bundle
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacDumpRenderTreemm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -1452,6 +1452,8 @@
</span><span class="cx"> 
</span><span class="cx"> static void sizeWebViewForCurrentTest()
</span><span class="cx"> {
</span><ins>+    [uiDelegate resetWindowOrigin];
+
</ins><span class="cx">     // W3C SVG tests expect to be 480x360
</span><span class="cx">     bool isSVGW3CTest = (gTestRunner-&gt;testPathOrURL().find(&quot;svg/W3C-SVG-1.1&quot;) != string::npos);
</span><span class="cx">     if (isSVGW3CTest)
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacUIDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/UIDelegate.h (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/UIDelegate.h        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/Tools/DumpRenderTree/mac/UIDelegate.h        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -33,13 +33,13 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> @interface UIDelegate : NSObject {
</span><del>-
</del><span class="cx"> @private
</span><del>-    NSRect m_frame;
</del><ins>+    NSPoint windowOrigin;
</ins><span class="cx">     NSMutableSet *m_pendingGeolocationPermissionListeners;
</span><span class="cx">     NSTimer *m_timer;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)resetWindowOrigin;
</ins><span class="cx"> - (void)didSetMockGeolocationPermission;
</span><span class="cx"> - (int)numberOfPendingGeolocationPermissionRequests;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacUIDelegatemm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/UIDelegate.mm (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/UIDelegate.mm        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/Tools/DumpRenderTree/mac/UIDelegate.mm        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -52,14 +52,22 @@
</span><span class="cx"> 
</span><span class="cx"> @implementation UIDelegate
</span><span class="cx"> 
</span><ins>+- (void)resetWindowOrigin
+{
+    windowOrigin = NSZeroPoint;
+}
+
</ins><span class="cx"> - (void)webView:(WebView *)sender setFrame:(NSRect)frame
</span><span class="cx"> {
</span><del>-    m_frame = frame;
</del><ins>+    // FIXME: Do we need to resize an NSWindow too?
+    windowOrigin = frame.origin;
+    [sender setFrameSize:frame.size];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (NSRect)webViewFrame:(WebView *)sender
</span><span class="cx"> {
</span><del>-    return m_frame;
</del><ins>+    NSSize size = [sender frame].size;
+    return NSMakeRect(windowOrigin.x, windowOrigin.y, size.width, size.height);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)webView:(WebView *)sender addMessageToConsole:(NSDictionary *)dictionary withSource:(NSString *)source
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnereflPlatformWebViewEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -83,6 +83,7 @@
</span><span class="cx"> 
</span><span class="cx"> void PlatformWebView::resizeTo(unsigned width, unsigned height)
</span><span class="cx"> {
</span><ins>+    // FIXME: Don't we need to resize the window too?
</ins><span class="cx">     evas_object_resize(m_view, width, height);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -113,6 +114,7 @@
</span><span class="cx"> void PlatformWebView::setWindowFrame(WKRect frame)
</span><span class="cx"> {
</span><span class="cx">     ecore_evas_move_resize(m_window, frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
</span><ins>+    evas_object_resize(m_view, frame.size.width, frame.size.height);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PlatformWebView::addChromeInputField()
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnergtkPlatformWebViewGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -58,6 +58,8 @@
</span><span class="cx"> 
</span><span class="cx"> void PlatformWebView::resizeTo(unsigned width, unsigned height)
</span><span class="cx"> {
</span><ins>+    // FIXME: Don't we need to resize the window too?
+
</ins><span class="cx">     GtkAllocation size = { 0, 0, static_cast&lt;int&gt;(width), static_cast&lt;int&gt;(height) };
</span><span class="cx">     gtk_widget_size_allocate(m_window, &amp;size);
</span><span class="cx">     gtk_window_resize(GTK_WINDOW(m_window), width, height);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunneriosPlatformWebViewIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -133,11 +133,10 @@
</span><span class="cx"> 
</span><span class="cx"> void PlatformWebView::resizeTo(unsigned width, unsigned height)
</span><span class="cx"> {
</span><del>-    CGRect windowFrame = [m_window frame];
-    windowFrame.size.width = width;
-    windowFrame.size.height = height;
-    [m_window setFrame:windowFrame];
-    [m_view setFrame:CGRectMake(0, 0, width, height)];
</del><ins>+    WKRect frame = windowFrame();
+    frame.size.width = width;
+    frame.size.height = height;
+    setWindowFrame(frame);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PlatformWebView::~PlatformWebView()
</span><span class="lines">@@ -174,6 +173,7 @@
</span><span class="cx"> void PlatformWebView::setWindowFrame(WKRect frame)
</span><span class="cx"> {
</span><span class="cx">     [m_window setFrame:CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height)];
</span><ins>+    [m_view setFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PlatformWebView::didInitializeClients()
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnermacPlatformWebViewMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm (169504 => 169505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm        2014-05-31 20:29:46 UTC (rev 169504)
+++ trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm        2014-06-01 00:01:16 UTC (rev 169505)
</span><span class="lines">@@ -153,16 +153,15 @@
</span><span class="cx"> 
</span><span class="cx"> void PlatformWebView::resizeTo(unsigned width, unsigned height)
</span><span class="cx"> {
</span><del>-    NSRect windowFrame = [m_window frame];
-    windowFrame.size.width = width;
-    windowFrame.size.height = height;
-    [m_window setFrame:windowFrame display:YES];
-    [m_view setFrame:NSMakeRect(0, 0, width, height)];
</del><ins>+    WKRect frame = windowFrame();
+    frame.size.width = width;
+    frame.size.height = height;
+    setWindowFrame(frame);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PlatformWebView::~PlatformWebView()
</span><span class="cx"> {
</span><del>-    m_window.platformWebView = 0;
</del><ins>+    m_window.platformWebView = nullptr;
</ins><span class="cx">     [m_window close];
</span><span class="cx">     [m_window release];
</span><span class="cx">     [m_view release];
</span><span class="lines">@@ -194,6 +193,7 @@
</span><span class="cx"> void PlatformWebView::setWindowFrame(WKRect frame)
</span><span class="cx"> {
</span><span class="cx">     [m_window setFrame:NSMakeRect(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height) display:YES];
</span><ins>+    [m_view setFrame:NSMakeRect(0, 0, frame.size.width, frame.size.height)];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PlatformWebView::didInitializeClients()
</span></span></pre>
</div>
</div>

</body>
</html>