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

Unified Diff: third_party/WebKit/LayoutTests/fast/scrolling/abspos-relayout-overflow-style-change.html

Issue 2523533002: Call scrollbarsChanged in PLSA::updateAfterStyleChange. (Closed)
Patch Set: fix test 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/scrolling/abspos-relayout-overflow-style-change.html
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/abspos-relayout-overflow-style-change.html b/third_party/WebKit/LayoutTests/fast/scrolling/abspos-relayout-overflow-style-change.html
new file mode 100644
index 0000000000000000000000000000000000000000..d167b75dd3dda13c6c5d673df213fc245c0d24a7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/abspos-relayout-overflow-style-change.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+
+.scroller {
+ position: absolute;
+ height: 200px;
+ width: 300px;
+ top: 100px;
+ border: 5px solid #ccc;
+}
+.scroller.vert {
+ left: 20px;
+ overflow-y: scroll;
+}
+.scroller.horz {
+ left: 350px;
+ overflow-x: scroll;
+}
+.scroller::-webkit-scrollbar {
+ width: 20px;
+ height: 20px;
+ background-color: #ccc;
+}
+.scroller::-webkit-scrollbar-thumb {
+ background-color: #68c;
+}
+.abs {
+ position: absolute;
+ background-color: #ACF7AA;
+}
+.vert > .abs {
+ top: 20px;
+ right: 20px;
+ width: 200px;
+ height: 400px;
+}
+.horz > .abs {
+ left: 20px;
+ bottom: 20px;
+ width: 400px;
+ height: 100px;
+}
+
+</style>
+<div class="scroller vert"><div class="abs"></div></div>
+<div class="scroller horz"><div class="abs"></div></div>
+<script>
+
+var vScroll = document.querySelector(".scroller.vert");
+var hScroll = document.querySelector(".scroller.horz");
+
+test((t) => {
+ assert_equals(vScroll.firstChild.offsetLeft, 60);
+ assert_equals(hScroll.firstChild.offsetTop, 60);
+
+ vScroll.style.overflowY = "hidden";
+ hScroll.style.overflowX = "hidden";
+
+ assert_equals(vScroll.firstChild.offsetLeft, 80);
+ assert_equals(hScroll.firstChild.offsetTop, 80);
+
+ vScroll.style.overflowY = "";
+ hScroll.style.overflowX = "";
+
+ assert_equals(vScroll.firstChild.offsetLeft, 60);
+ assert_equals(hScroll.firstChild.offsetTop, 60);
+}, "Relayout abspos child when overflow style changes.");
+
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698