| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |