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

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

Issue 1610063002: Revert of 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
37 if (paintInfo.skipRootBackground()) 40 if (paintInfo.skipRootBackground())
38 return; 41 return;
39 42
40 // This function overrides background painting for the LayoutView. 43 // This function overrides background painting for the LayoutView.
41 // View background painting is special in the following ways: 44 // View background painting is special in the following ways:
42 // 1. The view paints background for the root element, the background positi oning respects 45 // 1. The view paints background for the root element, the background positi oning respects
43 // the positioning and transformation of the root element. 46 // the positioning and transformation of the root element.
44 // 2. CSS background-clip is ignored, the background layers always expand to cover the whole 47 // 2. CSS background-clip is ignored, the background layers always expand to cover the whole
45 // canvas. None of the stacking context effects (except transformation) o n the root element 48 // canvas. None of the stacking context effects (except transformation) o n the root element
46 // affects the background. 49 // affects the background.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 BoxPainter::paintFillLayer(m_layoutView, paintInfo, Color(), **it, L ayoutRect(paintRect), BackgroundBleedNone); 151 BoxPainter::paintFillLayer(m_layoutView, paintInfo, Color(), **it, L ayoutRect(paintRect), BackgroundBleedNone);
149 context.restore(); 152 context.restore();
150 } 153 }
151 } 154 }
152 155
153 if (shouldDrawBackgroundInSeparateBuffer) 156 if (shouldDrawBackgroundInSeparateBuffer)
154 context.endLayer(); 157 context.endLayer();
155 } 158 }
156 159
157 } // namespace blink 160 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698