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

Unified Diff: third_party/WebKit/LayoutTests/scrollingcoordinator/donot-compute-non-fast-scrollable-region-for-hidden-frames.html

Issue 2413723002: Re-Compute slow scroll region on frameview visibility change. (Closed)
Patch Set: addressed review comments 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/scrollingcoordinator/donot-compute-non-fast-scrollable-region-for-hidden-frames.html
diff --git a/third_party/WebKit/LayoutTests/scrollingcoordinator/donot-compute-non-fast-scrollable-region-for-hidden-frames.html b/third_party/WebKit/LayoutTests/scrollingcoordinator/donot-compute-non-fast-scrollable-region-for-hidden-frames.html
new file mode 100644
index 0000000000000000000000000000000000000000..8e62385b6d4cbf6c67a994de75f696016198722a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/scrollingcoordinator/donot-compute-non-fast-scrollable-region-for-hidden-frames.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<style>
+ body {
+ margin: 0;
+ }
+ iframe {
+ height: 900px;
+ width: 900px;
+ margin-left: 51px;
+ margin-top: 52px;
+ border: none;
+ }
+</style>
+
+<iframe id='iframe' src='resources/iframe-containing-non-fast-scrollables.html'></iframe>
+
+<script src="resources/non-fast-scrollable-region-testing.js"></script>
+<script src="../resources/run-after-layout-and-paint.js"></script>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+ async_test((t) => {
+ var iframeWindow = document.querySelector("iframe").contentWindow;
+ iframeWindow.addEventListener("load", () => {
+ nonFastScrollableRects = internals.nonFastScrollableRects(document);
+ assert_equals(nonFastScrollableRects.length, 3);
+
+ var iframeElement = document.querySelector("iframe");
+ iframeElement.style.visibility = 'hidden';
+
+ runAfterLayoutAndPaint(() => {
+ nonFastScrollableRects = internals.nonFastScrollableRects(document);
+ assert_equals(nonFastScrollableRects.length, 0);
+ t.done();
+ });
+ });
+ }, "This test ensures that non-fast scrollable area is re-computed on FrameView visibility changes.");
+</script>

Powered by Google App Engine
This is Rietveld 408576698