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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp

Issue 1843723002: Spurious scrollbars should not be drawn when overflow is applied to a frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: early-return Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/scrollbars/iframe-overflow-scroll-ignored-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
index cabca2c1c9c6e0f596ff47b762509922b00891f9..b62cac2a37481214d864a3459dbc508389f860fe 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
@@ -349,6 +349,14 @@ void StyleAdjuster::adjustStyleForHTMLElement(ComputedStyle& style, const Comput
return;
}
+ if (isHTMLFrameElementBase(element)) {
+ // Frames cannot overflow (they are always the size we ask them to be).
+ // Some compositing code paths may try to draw scrollbars anyhow.
+ style.setOverflowX(OverflowVisible);
+ style.setOverflowY(OverflowVisible);
+ return;
+ }
+
if (isHTMLRTElement(element)) {
// Ruby text does not support float or position. This might change with evolution of the specification.
style.setPosition(StaticPosition);
« no previous file with comments | « third_party/WebKit/LayoutTests/scrollbars/iframe-overflow-scroll-ignored-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698