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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/compositing/layer-creation/iframe-background-attachment-fixed.html
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/iframe-background-attachment-fixed.html b/third_party/WebKit/LayoutTests/compositing/layer-creation/iframe-background-attachment-fixed.html
index 731fbd1efb48e104d36bf7918ca16107e0d7886d..c8b107e95e5863b2fc973ad0ed8418e85dbf7bf0 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/iframe-background-attachment-fixed.html
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/iframe-background-attachment-fixed.html
@@ -1,10 +1,36 @@
<!DOCTYPE html>
<pre id="mainThreadScrollingReasons"></pre>
-<iframe src="resources/background-attachment-fixed.html"></iframe>
+<style>
+.scroller {
+ overflow: scroll;
+ width: 200px;
+ height: 200px;
+ border:1px solid black;
+}
+.composited {
+ will-change: transform;
+}
+.content {
+ width: 100%;
+ height: 600px;
+}
+</style>
+
+<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
+ <div class="content"></div>
+</div>
+
+<iframe id="iframe" src="resources/background-attachment-fixed.html"></iframe>
+
+<div style="height: 2000px;">
+</div>
<script>
if (window.testRunner)
testRunner.dumpAsText(true);
window.addEventListener('load', function() {
- document.getElementById("mainThreadScrollingReasons").innerText = window.internals.mainThreadScrollingReasons(document);
+ reasons = window.internals.mainThreadScrollingReasons(document);
+ text = !reasons ? "Main frame scrolls on impl." : "Main frame scrolls on main 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.
+ text += "\nThe iFrame scrolls on main thread, reasons: " + document.getElementById("iframe").contentDocument.getElementById("mainThreadScrollingReasons").innerText;
+ document.getElementById("mainThreadScrollingReasons").innerText = text;
});
</script>

Powered by Google App Engine
This is Rietveld 408576698