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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 paintBorder(m_layoutBox, paintInfo, paintRect, style, boxDecorationD
ata.bleedAvoidance); | 132 paintBorder(m_layoutBox, paintInfo, paintRect, style, boxDecorationD
ata.bleedAvoidance); |
133 | 133 |
134 paintBackground(paintInfo, paintRect, boxDecorationData.backgroundColor,
boxDecorationData.bleedAvoidance); | 134 paintBackground(paintInfo, paintRect, boxDecorationData.backgroundColor,
boxDecorationData.bleedAvoidance); |
135 | 135 |
136 if (boxDecorationData.hasAppearance) | 136 if (boxDecorationData.hasAppearance) |
137 themePainter.paintDecorations(&m_layoutBox, paintInfo, snappedPaintR
ect); | 137 themePainter.paintDecorations(&m_layoutBox, paintInfo, snappedPaintR
ect); |
138 } | 138 } |
139 paintBoxShadow(paintInfo, paintRect, style, Inset); | 139 paintBoxShadow(paintInfo, paintRect, style, Inset); |
140 | 140 |
141 // The theme will tell us whether or not we should also paint the CSS border
. | 141 // The theme will tell us whether or not we should also paint the CSS border
. |
142 if (boxDecorationData.hasBorder && boxDecorationData.bleedAvoidance != Backg
roundBleedBackgroundOverBorder | 142 if (boxDecorationData.hasBorderDecoration && boxDecorationData.bleedAvoidanc
e != BackgroundBleedBackgroundOverBorder |
143 && (!boxDecorationData.hasAppearance || (!themePainted && LayoutTheme::t
heme().painter().paintBorderOnly(&m_layoutBox, paintInfo, snappedPaintRect))) | 143 && (!boxDecorationData.hasAppearance || (!themePainted && LayoutTheme::t
heme().painter().paintBorderOnly(&m_layoutBox, paintInfo, snappedPaintRect))) |
144 && !(m_layoutBox.isTable() && toLayoutTable(&m_layoutBox)->collapseBorde
rs())) | 144 && !(m_layoutBox.isTable() && toLayoutTable(&m_layoutBox)->collapseBorde
rs())) |
145 paintBorder(m_layoutBox, paintInfo, paintRect, style, boxDecorationData.
bleedAvoidance); | 145 paintBorder(m_layoutBox, paintInfo, paintRect, style, boxDecorationData.
bleedAvoidance); |
146 | 146 |
147 if (boxDecorationData.bleedAvoidance == BackgroundBleedClipLayer) | 147 if (boxDecorationData.bleedAvoidance == BackgroundBleedClipLayer) |
148 paintInfo.context->endLayer(); | 148 paintInfo.context->endLayer(); |
149 } | 149 } |
150 | 150 |
151 static bool skipBodyBackground(const LayoutBox* bodyElementLayoutObject) | 151 static bool skipBodyBackground(const LayoutBox* bodyElementLayoutObject) |
152 { | 152 { |
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1294 else | 1294 else |
1295 clippedEdges |= GraphicsContext::BottomEdge; | 1295 clippedEdges |= GraphicsContext::BottomEdge; |
1296 } | 1296 } |
1297 // TODO: support non-integer shadows - crbug.com/334828 | 1297 // TODO: support non-integer shadows - crbug.com/334828 |
1298 context->drawInnerShadow(border, shadowColor, flooredIntSize(shadowO
ffset), shadowBlur, shadowSpread, clippedEdges); | 1298 context->drawInnerShadow(border, shadowColor, flooredIntSize(shadowO
ffset), shadowBlur, shadowSpread, clippedEdges); |
1299 } | 1299 } |
1300 } | 1300 } |
1301 } | 1301 } |
1302 | 1302 |
1303 } // namespace blink | 1303 } // namespace blink |
OLD | NEW |