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 "config.h" | 5 #include "config.h" |
6 #include "core/paint/ViewPainter.h" | 6 #include "core/paint/ViewPainter.h" |
7 | 7 |
8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
9 #include "core/paint/BlockPainter.h" | 9 #include "core/paint/BlockPainter.h" |
10 #include "core/paint/GraphicsContextAnnotator.h" | 10 #include "core/paint/GraphicsContextAnnotator.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 paintInfo.context->fillRect(paintRect, m_renderView.frameView()->baseBac
kgroundColor()); | 35 paintInfo.context->fillRect(paintRect, m_renderView.frameView()->baseBac
kgroundColor()); |
36 } | 36 } |
37 | 37 |
38 m_renderView.paintObject(paintInfo, paintOffset); | 38 m_renderView.paintObject(paintInfo, paintOffset); |
39 BlockPainter(m_renderView).paintOverflowControlsIfNeeded(paintInfo, paintOff
set); | 39 BlockPainter(m_renderView).paintOverflowControlsIfNeeded(paintInfo, paintOff
set); |
40 } | 40 } |
41 | 41 |
42 static inline bool rendererObscuresBackground(RenderBox* rootBox) | 42 static inline bool rendererObscuresBackground(RenderBox* rootBox) |
43 { | 43 { |
44 ASSERT(rootBox); | 44 ASSERT(rootBox); |
45 RenderStyle* style = rootBox->style(); | 45 const RenderStyle* style = rootBox->style(); |
46 if (style->visibility() != VISIBLE | 46 if (style->visibility() != VISIBLE |
47 || style->opacity() != 1 | 47 || style->opacity() != 1 |
48 || style->hasFilter() | 48 || style->hasFilter() |
49 || style->hasTransform()) | 49 || style->hasTransform()) |
50 return false; | 50 return false; |
51 | 51 |
52 if (rootBox->compositingState() == PaintsIntoOwnBacking) | 52 if (rootBox->compositingState() == PaintsIntoOwnBacking) |
53 return false; | 53 return false; |
54 | 54 |
55 const RenderObject* rootRenderer = rootBox->rendererForRootBackground(); | 55 const RenderObject* rootRenderer = rootBox->rendererForRootBackground(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 { | 102 { |
103 ASSERT(rootBox); | 103 ASSERT(rootBox); |
104 // CSS Boxes always fill the viewport background (see paintRootBoxFillLayers
) | 104 // CSS Boxes always fill the viewport background (see paintRootBoxFillLayers
) |
105 if (!rootBox->isSVG()) | 105 if (!rootBox->isSVG()) |
106 return true; | 106 return true; |
107 | 107 |
108 return rootBox->frameRect().contains(m_renderView.frameRect()); | 108 return rootBox->frameRect().contains(m_renderView.frameRect()); |
109 } | 109 } |
110 | 110 |
111 } // namespace blink | 111 } // namespace blink |
OLD | NEW |