Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(817)

Side by Side Diff: Source/core/paint/BoxPainter.cpp

Issue 1159773005: Handle border-image with fill and zero-width borders (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address review comment Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/paint/BoxDecorationData.cpp ('k') | Source/core/paint/FieldsetPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/paint/BoxDecorationData.cpp ('k') | Source/core/paint/FieldsetPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698