| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // GraphicsLayer. | 62 // GraphicsLayer. |
| 63 IntRect backgroundRect = | 63 IntRect backgroundRect = |
| 64 pixelSnappedIntRect(m_layoutView.layer()->boundingBoxForCompositing()); | 64 pixelSnappedIntRect(m_layoutView.layer()->boundingBoxForCompositing()); |
| 65 const Document& document = m_layoutView.document(); | 65 const Document& document = m_layoutView.document(); |
| 66 const FrameView& frameView = *m_layoutView.frameView(); | 66 const FrameView& frameView = *m_layoutView.frameView(); |
| 67 bool isMainFrame = document.isInMainFrame(); | 67 bool isMainFrame = document.isInMainFrame(); |
| 68 bool paintsBaseBackground = isMainFrame && !frameView.isTransparent(); | 68 bool paintsBaseBackground = isMainFrame && !frameView.isTransparent(); |
| 69 bool shouldClearCanvas = | 69 bool shouldClearCanvas = |
| 70 paintsBaseBackground && | 70 paintsBaseBackground && |
| 71 (document.settings() && | 71 (document.settings() && |
| 72 document.settings()->shouldClearDocumentBackground()); | 72 document.settings()->getShouldClearDocumentBackground()); |
| 73 Color baseBackgroundColor = | 73 Color baseBackgroundColor = |
| 74 paintsBaseBackground ? frameView.baseBackgroundColor() : Color(); | 74 paintsBaseBackground ? frameView.baseBackgroundColor() : Color(); |
| 75 Color rootBackgroundColor = | 75 Color rootBackgroundColor = |
| 76 m_layoutView.style()->visitedDependentColor(CSSPropertyBackgroundColor); | 76 m_layoutView.style()->visitedDependentColor(CSSPropertyBackgroundColor); |
| 77 const LayoutObject* rootObject = | 77 const LayoutObject* rootObject = |
| 78 document.documentElement() ? document.documentElement()->layoutObject() | 78 document.documentElement() ? document.documentElement()->layoutObject() |
| 79 : nullptr; | 79 : nullptr; |
| 80 | 80 |
| 81 LayoutObjectDrawingRecorder recorder( | 81 LayoutObjectDrawingRecorder recorder( |
| 82 context, m_layoutView, DisplayItem::kDocumentBackground, backgroundRect); | 82 context, m_layoutView, DisplayItem::kDocumentBackground, backgroundRect); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 LayoutRect(paintRect), BackgroundBleedNone); | 204 LayoutRect(paintRect), BackgroundBleedNone); |
| 205 context.restore(); | 205 context.restore(); |
| 206 } | 206 } |
| 207 } | 207 } |
| 208 | 208 |
| 209 if (shouldDrawBackgroundInSeparateBuffer) | 209 if (shouldDrawBackgroundInSeparateBuffer) |
| 210 context.endLayer(); | 210 context.endLayer(); |
| 211 } | 211 } |
| 212 | 212 |
| 213 } // namespace blink | 213 } // namespace blink |
| OLD | NEW |