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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2831313002: [RLS] Update iframe scrollbar behaviour based on scrolling attribute (Closed)
Patch Set: Modify TestExpectations Created 3 years, 8 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/TestExpectations ('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/paint/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index 4e4ff7a468afeee5f77e1ac9d841b71245719009..f968c5190534813c5c63c544cba43f45a85d8b17 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -645,6 +645,21 @@ bool PaintLayerScrollableArea::UserInputScrollable(
if (Box().IsIntrinsicallyScrollable(orientation))
return true;
+ if (Box().IsLayoutView()) {
+ if (LocalFrame* frame = Box().GetFrame()) {
+ if (FrameView* frame_view = frame->View()) {
+ ScrollbarMode h_mode;
+ ScrollbarMode v_mode;
+ frame_view->CalculateScrollbarModes(h_mode, v_mode);
+ if (orientation == kHorizontalScrollbar &&
+ h_mode == kScrollbarAlwaysOff)
+ return false;
+ if (orientation == kVerticalScrollbar && v_mode == kScrollbarAlwaysOff)
+ return false;
+ }
+ }
+ }
+
EOverflow overflow_style = (orientation == kHorizontalScrollbar)
? Box().Style()->OverflowX()
: Box().Style()->OverflowY();
@@ -1255,8 +1270,12 @@ void PaintLayerScrollableArea::ComputeScrollbarExistence(
frame_view->CalculateScrollbarModes(h_mode, v_mode);
if (h_mode == kScrollbarAlwaysOn)
needs_horizontal_scrollbar = true;
+ else if (h_mode == kScrollbarAlwaysOff)
+ needs_horizontal_scrollbar = false;
if (v_mode == kScrollbarAlwaysOn)
needs_vertical_scrollbar = true;
+ else if (v_mode == kScrollbarAlwaysOff)
+ needs_vertical_scrollbar = false;
}
}
}
@@ -1731,6 +1750,13 @@ void PaintLayerScrollableArea::UpdateScrollableAreaSet(bool has_overflow) {
bool is_visible_to_hit_test = Box().Style()->VisibleToHitTesting();
bool did_scroll_overflow = scrolls_overflow_;
+ if (Box().IsLayoutView()) {
+ ScrollbarMode h_mode;
+ ScrollbarMode v_mode;
+ frame_view->CalculateScrollbarModes(h_mode, v_mode);
+ if (h_mode == kScrollbarAlwaysOff && v_mode == kScrollbarAlwaysOff)
+ has_overflow = false;
+ }
scrolls_overflow_ = has_overflow && is_visible_to_hit_test;
if (did_scroll_overflow == ScrollsOverflow())
return;
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698