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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/layout/scroll-anchoring/reading-scroll-forces-anchoring.html

Issue 2404393003: Tie scroll anchoring adjustments to frame lifecycle instead of layout. (Closed)
Patch Set: add DCHECK Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('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 <script src="../../../resources/run-after-layout-and-paint.js"></script>
3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script>
5 <style>
6 body { height: 1000px }
7 div { height: 100px }
8 </style>
9 <div id="block1">abc</div>
10 <div id="block2">def</div>
11 <script>
12 // This test verifies that reading window.scrollY forces any pending scroll
13 // anchoring adjustment to occur before computing the return value.
14 async_test((t) => {
15 scrollTo(0, 150);
16 runAfterLayoutAndPaint(() => {
17 // Queue scroll anchoring adjustment.
18 document.querySelector("#block1").style.height = "200px";
19
20 // Reading scrollY should force both the layout and the adjustment to
21 // occur synchronously.
22 var y = scrollY;
23
24 assert_equals(y, 250);
25 t.done();
26 });
27 }, 'Reading scroll position forces scroll anchoring adjustment.');
28 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698