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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutView.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
Index: third_party/WebKit/Source/core/layout/LayoutView.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
index b8bd622890602aaf61762088c988a4fdd0bb4277..eac3be3905b9780c5f7d2ba1003ae7a01b4086c8 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -204,7 +204,7 @@ void LayoutView::setShouldDoFullPaintInvalidationOnResizeIfNeeded()
// on viewport resize if the background image is not composited and needs full paint
// invalidation on background positioning area resize.
if (style()->hasFixedBackgroundImage() && (!m_compositor || !m_compositor->needsFixedRootBackgroundLayer(layer()))) {
- IncludeScrollbarsInRect includeScrollbars = document().settings() && document().settings()->rootLayerScrolls() ? IncludeScrollbars : ExcludeScrollbars;
+ IncludeScrollbarsInRect includeScrollbars = RuntimeEnabledFeatures::rootLayerScrollingEnabled() ? IncludeScrollbars : ExcludeScrollbars;
if ((offsetWidth() != viewWidth(includeScrollbars) && mustInvalidateFillLayersPaintOnWidthChange(style()->backgroundLayers()))
|| (offsetHeight() != viewHeight(includeScrollbars) && mustInvalidateFillLayersPaintOnHeightChange(style()->backgroundLayers())))
setShouldDoFullPaintInvalidation(PaintInvalidationBoundsChange);
@@ -281,7 +281,7 @@ LayoutRect LayoutView::visualOverflowRect() const
{
// In root layer scrolling mode, the LayoutView performs overflow clipping
// like a regular scrollable div.
- if (document().settings() && document().settings()->rootLayerScrolls())
+ if (RuntimeEnabledFeatures::rootLayerScrollingEnabled())
return LayoutBlockFlow::visualOverflowRect();
// Ditto when not in compositing mode.
@@ -857,12 +857,12 @@ int LayoutView::viewLogicalHeight(IncludeScrollbarsInRect scrollbarInclusion) co
int LayoutView::viewLogicalWidthForBoxSizing() const
{
- return viewLogicalWidth(document().settings() && document().settings()->rootLayerScrolls() ? IncludeScrollbars : ExcludeScrollbars);
+ return viewLogicalWidth(RuntimeEnabledFeatures::rootLayerScrollingEnabled() ? IncludeScrollbars : ExcludeScrollbars);
}
int LayoutView::viewLogicalHeightForBoxSizing() const
{
- return viewLogicalHeight(document().settings() && document().settings()->rootLayerScrolls() ? IncludeScrollbars : ExcludeScrollbars);
+ return viewLogicalHeight(RuntimeEnabledFeatures::rootLayerScrollingEnabled() ? IncludeScrollbars : ExcludeScrollbars);
}
LayoutUnit LayoutView::viewLogicalHeightForPercentages() const
@@ -977,7 +977,7 @@ void LayoutView::updateFromStyle()
bool LayoutView::allowsOverflowClip() const
{
- return document().settings() && document().settings()->rootLayerScrolls();
+ return RuntimeEnabledFeatures::rootLayerScrollingEnabled();
}
ScrollResult LayoutView::scroll(ScrollGranularity granularity, const FloatSize& delta)

Powered by Google App Engine
This is Rietveld 408576698