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

Side by Side Diff: LayoutTests/fast/dom/partial-layout-block.html

Issue 18601002: Add infrastructure for partial layouts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address reviewer comments. Add PartialLayoutState and PartialLayoutDisabler Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <html>
3 <script src="../js/resources/js-test-pre.js"></script>
4 <head>
5 <style>
6 html, body {
7 margin: 0;
8 padding: 0;
9 }
10 #measure {
11 margin: 10px;
12 padding: 10px;
13 }
14 #fixedsize {
15 width: 100px;
16 height: 100px;
17 }
18 </style>
19 <script>
20 description('Test that partial layout works for offset{width, height, left, top} methods.');
21 if (window.testRunner)
22 testRunner.dumpAsText();
23 if (window.internals)
24 window.internals.setUsesOverlayScrollbars(true);
25
26 function checkSize() {
27 var measure = document.getElementById('measure');
28
29 // Record partial layout values for offset*.
30 var measureWidth = measure.offsetWidth;
31 var measureHeight = measure.offsetHeight;
32 var measureTop = measure.offsetTop;
33 var measureLeft = measure.offsetLeft;
34
35 // Invalidate measure and force a full layout.
36 var child = measure.firstChild;
37 measure.removeChild(child);
38 document.body.clientHeight;
39 measure.appendChild(child);
40 var forceLayout = document.body.clientHeight;
41
42 var childOffsetTop = child.offsetTop;
43
44 shouldBe(measureWidth, "document.body.offsetWidth - 20");
45 shouldBe(measureHeight, "measure.offsetHeight");
46 shouldBe(measureTop, childOffsetTop - 10);
47 shouldBe(measureLeft, "measure.offsetLeft");
48 finishJSTest();
49 }
50 </script>
51 </head>
52 <body onload="checkSize()">
53 <div id="measure"><div id="fixedsize"></div></div>
54 <script src="../js/resources/js-test-post.js"></script>
55 </body>
56 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/partial-layout-block-expected.txt » ('j') | Source/core/dom/Document.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698