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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/layout/scroll-anchoring/suppressions-are-per-frame.html

Issue 2404393003: Tie scroll anchoring adjustments to frame lifecycle instead of layout. (Closed)
Patch Set: Created 4 years, 2 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/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 SANACLAP suppressions (http://bit.ly/sanaclap)
13 // apply to all layout passes in an animation frame, not just the one that
14 // sets the SANACLAP bit on the ScrollAnchor.
15 async_test((t) => {
16 scrollTo(0, 150);
17 runAfterLayoutAndPaint(() => {
18 // By itself this would trigger a scroll anchoring adjustment.
19 document.querySelector("#block1").style.height = "200px";
20
21 // Force synchronous layout.
22 document.body.offsetHeight;
ymalik 2016/10/13 13:05:39 Can we add a test that forces a call to Document::
skobes 2016/10/13 17:21:37 Done.
23
24 // Trigger SANACLAP suppression.
25 document.body.style.paddingTop = "20px";
26
27 runAfterLayoutAndPaint(() => {
28 assert_equals(scrollY, 150);
29 t.done();
30 });
31 });
32 }, 'Suppressions apply to the entire frame.');
33 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.h » ('j') | third_party/WebKit/Source/core/layout/ScrollAnchor.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698