Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/root-client-size-iframe.html

Issue 1935043002: Avoid style recalc and layout when not necessary for client size. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Skip layout for local frame roots only Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <style>
4 iframe { width: 100px; height: 100px; }
5 iframe.wider { width: 200px; }
6 </style>
7 <iframe id="frame" src="data:text/html,<!DOCTYPE html>iframe" onload="runTests() "></iframe>
8 <script>
9 description("Style recalc/layout when reading clientWidth of documentElement in iframe.");
10
11 var jsTestIsAsync = true;
12
13 shouldBeDefined(window.internals);
14
15 var originalOverlayScrollbars = internals.runtimeFlags.overlayScrollbarsEnab led;
16 internals.settings.setOverlayScrollbarsEnabled(true);
17
18 function runTests() {
19 clientWidthBefore = frame.contentDocument.documentElement.clientWidth;
20 frame.className = "wider";
21 clientWidthAfter = frame.contentDocument.documentElement.clientWidth;
22
23 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "0");
24 shouldBe("clientWidthBefore", "100");
25 shouldBe("clientWidthAfter", "200");
26
27 internals.settings.setOverlayScrollbarsEnabled(originalOverlayScrollbars );
28 finishJSTest();
29 }
30 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698