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/layout/LayoutBox.h" | 9 #include "core/layout/LayoutBox.h" |
10 #include "core/layout/LayoutView.h" | 10 #include "core/layout/LayoutView.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 paintInfo.context->fillRect(paintRect, m_layoutView.frameView()->bas
eBackgroundColor()); | 35 paintInfo.context->fillRect(paintRect, m_layoutView.frameView()->bas
eBackgroundColor()); |
36 } | 36 } |
37 | 37 |
38 m_layoutView.paintObject(paintInfo, paintOffset); | 38 m_layoutView.paintObject(paintInfo, paintOffset); |
39 BlockPainter(m_layoutView).paintOverflowControlsIfNeeded(paintInfo, paintOff
set); | 39 BlockPainter(m_layoutView).paintOverflowControlsIfNeeded(paintInfo, paintOff
set); |
40 } | 40 } |
41 | 41 |
42 static inline bool rendererObscuresBackground(LayoutBox* rootBox) | 42 static inline bool rendererObscuresBackground(LayoutBox* rootBox) |
43 { | 43 { |
44 ASSERT(rootBox); | 44 ASSERT(rootBox); |
45 const LayoutStyle& style = rootBox->styleRef(); | 45 const ComputedStyle& style = rootBox->styleRef(); |
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 LayoutObject* rootRenderer = rootBox->rendererForRootBackground(); | 55 const LayoutObject* rootRenderer = rootBox->rendererForRootBackground(); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 { | 98 { |
99 ASSERT(rootBox); | 99 ASSERT(rootBox); |
100 // CSS Boxes always fill the viewport background (see paintRootBoxFillLayers
) | 100 // CSS Boxes always fill the viewport background (see paintRootBoxFillLayers
) |
101 if (!rootBox->isSVG()) | 101 if (!rootBox->isSVG()) |
102 return true; | 102 return true; |
103 | 103 |
104 return rootBox->frameRect().contains(m_layoutView.frameRect()); | 104 return rootBox->frameRect().contains(m_layoutView.frameRect()); |
105 } | 105 } |
106 | 106 |
107 } // namespace blink | 107 } // namespace blink |
OLD | NEW |