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

Side by Side Diff: third_party/WebKit/LayoutTests/compositing/layer-creation/iframe-background-attachment-fixed.html

Issue 2531603003: Only scroll on main if the targeted frames need to scroll on main (Closed)
Patch Set: Bug fix Created 4 years 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <pre id="mainThreadScrollingReasons"></pre> 2 <pre id="mainThreadScrollingReasons"></pre>
3 <iframe src="resources/background-attachment-fixed.html"></iframe> 3 <style>
4 .scroller {
5 overflow: scroll;
6 width: 200px;
7 height: 200px;
8 border:1px solid black;
9 }
10 .composited {
11 will-change: transform;
12 }
13 .content {
14 width: 100%;
15 height: 600px;
16 }
17 </style>
18
19 <div class="composited scroller">
flackr 2016/12/02 19:24:02 Does this scroller affect the test?
yigu 2016/12/02 20:32:49 Not really. Just want to create a page with the fo
flackr 2016/12/06 14:50:52 Ah, this is meant to be frames though (i.e. iframe
20 <div class="content"></div>
21 </div>
22
23 <iframe id="iframe" src="resources/background-attachment-fixed.html"></iframe>
24
25 <div style="height: 2000px;">
26 </div>
4 <script> 27 <script>
5 if (window.testRunner) 28 if (window.testRunner)
6 testRunner.dumpAsText(true); 29 testRunner.dumpAsText(true);
7 window.addEventListener('load', function() { 30 window.addEventListener('load', function() {
8 document.getElementById("mainThreadScrollingReasons").innerText = window.int ernals.mainThreadScrollingReasons(document); 31 reasons = window.internals.mainThreadScrollingReasons(document);
32 text = !reasons ? "Main frame scrolls on impl." : "Main frame scrolls on mai n thread, reasons: " + reasons;
flackr 2016/12/02 19:24:01 Turn this ternary into a helper function and reuse
yigu 2016/12/02 20:32:49 Done.
33 text += "\nThe iFrame scrolls on main thread, reasons: " + document.getEleme ntById("iframe").contentDocument.getElementById("mainThreadScrollingReasons").in nerText;
34 document.getElementById("mainThreadScrollingReasons").innerText = text;
9 }); 35 });
10 </script> 36 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698