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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 const ComputedStyle& style = rootBox->styleRef(); | 42 const ComputedStyle& style = rootBox->styleRef(); |
43 if (style.visibility() != VISIBLE | 43 if (style.visibility() != VISIBLE |
44 || style.opacity() != 1 | 44 || style.opacity() != 1 |
45 || style.hasFilter() | 45 || style.hasFilter() |
46 || style.hasTransform()) | 46 || style.hasTransform()) |
47 return false; | 47 return false; |
48 | 48 |
49 if (rootBox->compositingState() == PaintsIntoOwnBacking) | 49 if (rootBox->compositingState() == PaintsIntoOwnBacking) |
50 return false; | 50 return false; |
51 | 51 |
52 const LayoutObject* rootRenderer = rootBox->rendererForRootBackground(); | 52 const LayoutObject* rootLayoutObject = rootBox->layoutObjectForRootBackgroun
d(); |
53 if (rootRenderer->style()->backgroundClip() == TextFillBox) | 53 if (rootLayoutObject->style()->backgroundClip() == TextFillBox) |
54 return false; | 54 return false; |
55 | 55 |
56 return true; | 56 return true; |
57 } | 57 } |
58 | 58 |
59 void ViewPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo) | 59 void ViewPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo) |
60 { | 60 { |
61 if (m_layoutView.document().ownerElement() || !m_layoutView.view()) | 61 if (m_layoutView.document().ownerElement() || !m_layoutView.view()) |
62 return; | 62 return; |
63 | 63 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 { | 95 { |
96 ASSERT(rootBox); | 96 ASSERT(rootBox); |
97 // CSS Boxes always fill the viewport background (see paintRootBoxFillLayers
) | 97 // CSS Boxes always fill the viewport background (see paintRootBoxFillLayers
) |
98 if (!rootBox->isSVG()) | 98 if (!rootBox->isSVG()) |
99 return true; | 99 return true; |
100 | 100 |
101 return rootBox->frameRect().contains(m_layoutView.frameRect()); | 101 return rootBox->frameRect().contains(m_layoutView.frameRect()); |
102 } | 102 } |
103 | 103 |
104 } // namespace blink | 104 } // namespace blink |
OLD | NEW |