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

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

Issue 2258523006: Convert Settings::rootLayerScrolls to RuntimeEnabledFeatures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add RAII-style helper to toggle REF. Rebase. Created 4 years, 4 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 | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/core/frame/FrameViewTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 303f0fd6395abe905f48ad6953833ca174e661c7..3b1b7cc80d33f2edf14595b69711e9ab47901362 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -846,7 +846,7 @@ void FrameView::performPreLayoutTasks()
bool FrameView::shouldPerformScrollAnchoring() const
{
return RuntimeEnabledFeatures::scrollAnchoringEnabled()
- && m_frame->settings() && !m_frame->settings()->rootLayerScrolls()
+ && !RuntimeEnabledFeatures::rootLayerScrollingEnabled()
&& m_scrollAnchor.hasScroller()
&& layoutBox()->style()->overflowAnchor() != AnchorNone;
}
@@ -1150,7 +1150,7 @@ void FrameView::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvali
void FrameView::invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState)
{
RELEASE_ASSERT(!layoutViewItem().isNull());
- if (!m_frame->settings() || !m_frame->settings()->rootLayerScrolls())
+ if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled())
invalidatePaintOfScrollControlsIfNeeded(paintInvalidationState);
if (m_frame->selection().isCaretBoundsDirty())
@@ -1374,7 +1374,7 @@ void FrameView::viewportSizeChanged(bool widthChanged, bool heightChanged)
{
DCHECK(widthChanged || heightChanged);
- if (m_frame->settings() && m_frame->settings()->rootLayerScrolls()) {
+ if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
// The background must be repainted when the FrameView is resized, even if the initial
// containing block does not change (so we can't rely on layout to issue the invalidation).
// This is because the background fills the main GraphicsLayer, which takes the size of the
@@ -2037,7 +2037,7 @@ void FrameView::scrollToFragmentAnchor()
LayoutRect rect;
if (anchorNode != m_frame->document()) {
rect = anchorNode->boundingBox();
- } else if (m_frame->settings() && m_frame->settings()->rootLayerScrolls()) {
+ } else if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
if (Element* documentElement = m_frame->document()->documentElement())
rect = documentElement->boundingBox();
}
@@ -3419,7 +3419,7 @@ void FrameView::setScrollOffset(const DoublePoint& offset, ScrollType scrollType
if (scrollDelta.isZero())
return;
- if (m_frame->settings() && m_frame->settings()->rootLayerScrolls()) {
+ if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
// Don't scroll the FrameView!
ASSERT_NOT_REACHED();
}
@@ -3492,7 +3492,7 @@ void FrameView::computeScrollbarExistence(bool& newHasHorizontalScrollbar, bool&
newHasHorizontalScrollbar = hasHorizontalScrollbar;
newHasVerticalScrollbar = hasVerticalScrollbar;
- if (m_frame->settings() && m_frame->settings()->rootLayerScrolls())
+ if (RuntimeEnabledFeatures::rootLayerScrollingEnabled())
return;
ScrollbarMode hScroll = m_horizontalScrollbarMode;
@@ -3655,7 +3655,7 @@ void FrameView::updateScrollbars()
{
m_needsScrollbarsUpdate = false;
- if (m_frame->settings() && m_frame->settings()->rootLayerScrolls())
+ if (RuntimeEnabledFeatures::rootLayerScrollingEnabled())
return;
// Avoid drawing two sets of scrollbars when visual viewport is enabled.
@@ -3919,7 +3919,7 @@ bool FrameView::userInputScrollable(ScrollbarOrientation orientation) const
if (fullscreenElement && fullscreenElement != document->documentElement())
return false;
- if (frame().settings() && frame().settings()->rootLayerScrolls())
+ if (RuntimeEnabledFeatures::rootLayerScrollingEnabled())
return false;
ScrollbarMode mode = (orientation == HorizontalScrollbar) ?
@@ -4133,8 +4133,7 @@ ScrollableArea* FrameView::getScrollableArea()
ScrollableArea* FrameView::layoutViewportScrollableArea()
{
- Settings* settings = frame().settings();
- if (!settings || !settings->rootLayerScrolls())
+ if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled())
return this;
LayoutViewItem layoutViewItem = this->layoutViewItem();
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/core/frame/FrameViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698