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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 699183004: Main-thread scroll if we have fixed-pos children and overflow:hidden. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 0de05a9afddf16597794d73fd931bbfc17820627..2388cae9035883a7cea8b18f36be84729636b0b5 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -2266,8 +2266,14 @@ IntRect FrameView::scrollableAreaBoundingBox() const
return ownerRenderer->absoluteContentQuad().enclosingBoundingBox();
}
+
bool FrameView::isScrollable()
{
+ return scrollingReasons() == Scrollable;
+}
+
+FrameView::ScrollingReasons FrameView::scrollingReasons()
+{
// Check for:
// 1) If there an actual overflow.
// 2) display:none or visibility:hidden set to self or inherited.
@@ -2278,22 +2284,22 @@ bool FrameView::isScrollable()
IntSize contentsSize = this->contentsSize();
IntSize visibleContentSize = visibleContentRect().size();
if ((contentsSize.height() <= visibleContentSize.height() && contentsSize.width() <= visibleContentSize.width()))
- return false;
+ return NonScrollableFromSize;
Ian Vollick 2014/11/05 16:40:06 NotScrollableNoOverflow
awoloszyn 2014/11/05 19:25:11 Done.
// Covers #2.
// FIXME: Do we need to fix this for OOPI?
HTMLFrameOwnerElement* owner = m_frame->deprecatedLocalOwner();
if (owner && (!owner->renderer() || !owner->renderer()->visibleToHitTesting()))
- return false;
+ return NonScrollableFromVisibility;
Ian Vollick 2014/11/05 16:40:06 NotScrollableNotVisible
awoloszyn 2014/11/05 19:25:11 Done.
// Cover #3 and #4.
ScrollbarMode horizontalMode;
ScrollbarMode verticalMode;
calculateScrollbarModesForLayoutAndSetViewportRenderer(horizontalMode, verticalMode, RulesFromWebContentOnly);
if (horizontalMode == ScrollbarAlwaysOff && verticalMode == ScrollbarAlwaysOff)
- return false;
+ return NonScrollableFromLayout;
Ian Vollick 2014/11/05 16:40:06 NotScrollableExplicitlyDisabled
awoloszyn 2014/11/05 19:25:10 Done.
- return true;
+ return Scrollable;
}
void FrameView::updateScrollableAreaSet()

Powered by Google App Engine
This is Rietveld 408576698