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

Side by Side Diff: third_party/WebKit/Source/core/paint/ViewPainter.cpp

Issue 1610233002: [Reland] Remove PaintInfo's paintingRoot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/paint/ViewPainter.h" 5 #include "core/paint/ViewPainter.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "core/layout/LayoutBox.h" 9 #include "core/layout/LayoutBox.h"
10 #include "core/layout/LayoutView.h" 10 #include "core/layout/LayoutView.h"
(...skipping 16 matching lines...) Expand all
27 const FrameView* frameView = m_layoutView.frameView(); 27 const FrameView* frameView = m_layoutView.frameView();
28 if (frameView->shouldThrottleRendering()) 28 if (frameView->shouldThrottleRendering())
29 return; 29 return;
30 30
31 m_layoutView.paintObject(paintInfo, paintOffset); 31 m_layoutView.paintObject(paintInfo, paintOffset);
32 BlockPainter(m_layoutView).paintOverflowControlsIfNeeded(paintInfo, paintOff set); 32 BlockPainter(m_layoutView).paintOverflowControlsIfNeeded(paintInfo, paintOff set);
33 } 33 }
34 34
35 void ViewPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo) 35 void ViewPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo)
36 { 36 {
37 if (!paintInfo.shouldPaintWithinRoot(&m_layoutView))
38 return;
39
40 if (paintInfo.skipRootBackground()) 37 if (paintInfo.skipRootBackground())
41 return; 38 return;
42 39
43 // This function overrides background painting for the LayoutView. 40 // This function overrides background painting for the LayoutView.
44 // View background painting is special in the following ways: 41 // View background painting is special in the following ways:
45 // 1. The view paints background for the root element, the background positi oning respects 42 // 1. The view paints background for the root element, the background positi oning respects
46 // the positioning and transformation of the root element. 43 // the positioning and transformation of the root element.
47 // 2. CSS background-clip is ignored, the background layers always expand to cover the whole 44 // 2. CSS background-clip is ignored, the background layers always expand to cover the whole
48 // canvas. None of the stacking context effects (except transformation) o n the root element 45 // canvas. None of the stacking context effects (except transformation) o n the root element
49 // affects the background. 46 // affects the background.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 BoxPainter::paintFillLayer(m_layoutView, paintInfo, Color(), **it, L ayoutRect(paintRect), BackgroundBleedNone); 148 BoxPainter::paintFillLayer(m_layoutView, paintInfo, Color(), **it, L ayoutRect(paintRect), BackgroundBleedNone);
152 context.restore(); 149 context.restore();
153 } 150 }
154 } 151 }
155 152
156 if (shouldDrawBackgroundInSeparateBuffer) 153 if (shouldDrawBackgroundInSeparateBuffer)
157 context.endLayer(); 154 context.endLayer();
158 } 155 }
159 156
160 } // namespace blink 157 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698