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/BoxPainter.h" | 6 #include "core/paint/BoxPainter.h" |
7 | 7 |
8 #include "core/HTMLNames.h" | 8 #include "core/HTMLNames.h" |
9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
10 #include "core/html/HTMLFrameOwnerElement.h" | 10 #include "core/html/HTMLFrameOwnerElement.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 | 67 |
68 // Use the visual overflow rect here, because it will include overflow intro duced by the theme. | 68 // Use the visual overflow rect here, because it will include overflow intro duced by the theme. |
69 LayoutRect bounds = m_layoutBox.visualOverflowRect(); | 69 LayoutRect bounds = m_layoutBox.visualOverflowRect(); |
70 bounds.moveBy(paintOffset); | 70 bounds.moveBy(paintOffset); |
71 return LayoutRect(pixelSnappedIntRect(bounds)); | 71 return LayoutRect(pixelSnappedIntRect(bounds)); |
72 } | 72 } |
73 | 73 |
74 LayoutRect BoxPainter::rootBackgroundRect() | 74 LayoutRect BoxPainter::rootBackgroundRect() |
75 { | 75 { |
76 LayoutView* layoutView = m_layoutBox.view(); | 76 LayoutView* layoutView = m_layoutBox.view(); |
77 LayoutRect result = layoutView->backgroundRect(&m_layoutBox); | 77 LayoutRect result(layoutView->unscaledDocumentRect()); |
dsinclair
2015/06/03 13:52:58
This change seems unrelated?
mstensho (USE GERRIT)
2015/06/03 13:56:21
I killed LayoutView::backgroundRect(), because it
mstensho (USE GERRIT)
2015/06/03 14:05:52
Done.
| |
78 // In root-layer-scrolls mode, root background is painted in coordinates of the | 78 // In root-layer-scrolls mode, root background is painted in coordinates of the |
79 // root scrolling contents layer, so don't need scroll offset adjustment. | 79 // root scrolling contents layer, so don't need scroll offset adjustment. |
80 if (layoutView->hasOverflowClip() && !layoutView->frame()->settings()->rootL ayerScrolls()) | 80 if (layoutView->hasOverflowClip() && !layoutView->frame()->settings()->rootL ayerScrolls()) |
81 result.move(-layoutView->scrolledContentOffset()); | 81 result.move(-layoutView->scrolledContentOffset()); |
82 return result; | 82 return result; |
83 } | 83 } |
84 | 84 |
85 namespace { | 85 namespace { |
86 | 86 |
87 bool bleedAvoidanceIsClipping(BackgroundBleedAvoidance bleedAvoidance) | 87 bool bleedAvoidanceIsClipping(BackgroundBleedAvoidance bleedAvoidance) |
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1123 else | 1123 else |
1124 clippedEdges |= GraphicsContext::BottomEdge; | 1124 clippedEdges |= GraphicsContext::BottomEdge; |
1125 } | 1125 } |
1126 // TODO: support non-integer shadows - crbug.com/334828 | 1126 // TODO: support non-integer shadows - crbug.com/334828 |
1127 context->drawInnerShadow(border, shadowColor, flooredIntSize(shadowO ffset), shadowBlur, shadowSpread, clippedEdges); | 1127 context->drawInnerShadow(border, shadowColor, flooredIntSize(shadowO ffset), shadowBlur, shadowSpread, clippedEdges); |
1128 } | 1128 } |
1129 } | 1129 } |
1130 } | 1130 } |
1131 | 1131 |
1132 } // namespace blink | 1132 } // namespace blink |
OLD | NEW |