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

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: define RenderObject::frameView in the header Created 7 years, 3 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
« no previous file with comments | « LayoutTests/NeverFixTests ('k') | LayoutTests/fast/dom/partial-layout-block-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <html>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <link rel="stylesheet" href="../../resources/testharness.css">
6 <head>
7 <style>
8 html, body {
9 margin: 0;
10 padding: 0;
11 }
12
13 #measure {
14 margin: 10px;
15 padding: 10px;
16 }
17
18 #fixedsize {
19 width: 100px;
20 height: 100px;
21 }
22 </style>
23 </head>
24 <body>
25 <div id="measure"><div id="fixedsize"></div></div>
26 <script>
27 if (window.testRunner)
28 testRunner.dumpAsText();
29
30 if (window.internals)
31 window.internals.setUsesOverlayScrollbars(true);
32
33 test(function() {
34 var measure = document.getElementById('measure');
35
36 // Record partial layout values for offset*.
37 var measureWidth = measure.offsetWidth;
38 var measureHeight = measure.offsetHeight;
39 var measureTop = measure.offsetTop;
40 var measureLeft = measure.offsetLeft;
41
42 // Invalidate measure and force a full layout.
43 var child = measure.firstChild;
44 measure.removeChild(child);
45 document.body.clientHeight;
46 measure.appendChild(child);
47 var forceLayout = document.body.clientHeight;
48
49 var childOffsetTop = child.offsetTop;
50
51 assert_equals(measureWidth, document.body.offsetWidth - 20);
52 assert_equals(measureHeight, measure.offsetHeight);
53 assert_equals(measureTop, childOffsetTop - 10);
54 assert_equals(measureLeft, measure.offsetLeft);
55 }, 'Test that partial layout works for offset{width, height, left, top} meth ods.');
56 </script>
57 </body>
58 </html>
OLDNEW
« no previous file with comments | « LayoutTests/NeverFixTests ('k') | LayoutTests/fast/dom/partial-layout-block-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698