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

Side by Side Diff: third_party/WebKit/Source/core/layout/PaintInvalidationState.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, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/layout/PaintInvalidationState.h" 5 #include "core/layout/PaintInvalidationState.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/layout/LayoutInline.h" 10 #include "core/layout/LayoutInline.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 void PaintInvalidationState::updateForNormalChildren() 289 void PaintInvalidationState::updateForNormalChildren()
290 { 290 {
291 if (!m_cachedOffsetsEnabled) 291 if (!m_cachedOffsetsEnabled)
292 return; 292 return;
293 293
294 if (!m_currentObject.isBox()) 294 if (!m_currentObject.isBox())
295 return; 295 return;
296 const LayoutBox& box = toLayoutBox(m_currentObject); 296 const LayoutBox& box = toLayoutBox(m_currentObject);
297 297
298 if (box.isLayoutView()) { 298 if (box.isLayoutView()) {
299 if (!box.document().settings() || !box.document().settings()->rootLayerS crolls()) { 299 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
300 if (box != m_paintInvalidationContainer) { 300 if (box != m_paintInvalidationContainer) {
301 m_paintOffset -= toLayoutView(box).frameView()->scrollOffset(); 301 m_paintOffset -= toLayoutView(box).frameView()->scrollOffset();
302 addClipRectRelativeToPaintOffset(toLayoutView(box).viewRect()); 302 addClipRectRelativeToPaintOffset(toLayoutView(box).viewRect());
303 } 303 }
304 return; 304 return;
305 } 305 }
306 } else if (box.isSVGRoot()) { 306 } else if (box.isSVGRoot()) {
307 const LayoutSVGRoot& svgRoot = toLayoutSVGRoot(box); 307 const LayoutSVGRoot& svgRoot = toLayoutSVGRoot(box);
308 if (svgRoot.shouldApplyViewportClip()) 308 if (svgRoot.shouldApplyViewportClip())
309 addClipRectRelativeToPaintOffset(LayoutRect(LayoutPoint(), LayoutSiz e(svgRoot.pixelSnappedSize()))); 309 addClipRectRelativeToPaintOffset(LayoutRect(LayoutPoint(), LayoutSiz e(svgRoot.pixelSnappedSize())));
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 } 539 }
540 540
541 541
542 void PaintInvalidatorContextAdapter::mapLocalRectToPaintInvalidationBacking(cons t LayoutObject& object, LayoutRect& rect) const 542 void PaintInvalidatorContextAdapter::mapLocalRectToPaintInvalidationBacking(cons t LayoutObject& object, LayoutRect& rect) const
543 { 543 {
544 DCHECK(&object == &m_paintInvalidationState.currentObject()); 544 DCHECK(&object == &m_paintInvalidationState.currentObject());
545 m_paintInvalidationState.mapLocalRectToPaintInvalidationBacking(rect); 545 m_paintInvalidationState.mapLocalRectToPaintInvalidationBacking(rect);
546 } 546 }
547 547
548 } // namespace blink 548 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698