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

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: Remove newly added but flaky test 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
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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 paintBorder(m_layoutBox, paintInfo, paintRect, style, boxDecorationD ata.bleedAvoidance); 130 paintBorder(m_layoutBox, paintInfo, paintRect, style, boxDecorationD ata.bleedAvoidance);
131 131
132 paintBackground(paintInfo, paintRect, boxDecorationData.backgroundColor, boxDecorationData.bleedAvoidance); 132 paintBackground(paintInfo, paintRect, boxDecorationData.backgroundColor, boxDecorationData.bleedAvoidance);
133 133
134 if (boxDecorationData.hasAppearance) 134 if (boxDecorationData.hasAppearance)
135 themePainter.paintDecorations(&m_layoutBox, paintInfo, snappedPaintR ect); 135 themePainter.paintDecorations(&m_layoutBox, paintInfo, snappedPaintR ect);
136 } 136 }
137 paintBoxShadow(paintInfo, paintRect, style, Inset); 137 paintBoxShadow(paintInfo, paintRect, style, Inset);
138 138
139 // The theme will tell us whether or not we should also paint the CSS border . 139 // The theme will tell us whether or not we should also paint the CSS border .
140 if (boxDecorationData.hasBorder && boxDecorationData.bleedAvoidance != Backg roundBleedBackgroundOverBorder 140 if (boxDecorationData.hasBorderDecoration && boxDecorationData.bleedAvoidanc e != BackgroundBleedBackgroundOverBorder
141 && (!boxDecorationData.hasAppearance || (!themePainted && LayoutTheme::t heme().painter().paintBorderOnly(&m_layoutBox, paintInfo, snappedPaintRect))) 141 && (!boxDecorationData.hasAppearance || (!themePainted && LayoutTheme::t heme().painter().paintBorderOnly(&m_layoutBox, paintInfo, snappedPaintRect)))
142 && !(m_layoutBox.isTable() && toLayoutTable(&m_layoutBox)->collapseBorde rs())) 142 && !(m_layoutBox.isTable() && toLayoutTable(&m_layoutBox)->collapseBorde rs()))
143 paintBorder(m_layoutBox, paintInfo, paintRect, style, boxDecorationData. bleedAvoidance); 143 paintBorder(m_layoutBox, paintInfo, paintRect, style, boxDecorationData. bleedAvoidance);
144 144
145 if (boxDecorationData.bleedAvoidance == BackgroundBleedClipLayer) 145 if (boxDecorationData.bleedAvoidance == BackgroundBleedClipLayer)
146 paintInfo.context->endLayer(); 146 paintInfo.context->endLayer();
147 } 147 }
148 148
149 static bool skipBodyBackground(const LayoutBox* bodyElementLayoutObject) 149 static bool skipBodyBackground(const LayoutBox* bodyElementLayoutObject)
150 { 150 {
(...skipping 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after
2298 2298
2299 FloatPoint secondQuad[4]; 2299 FloatPoint secondQuad[4];
2300 secondQuad[0] = quad[0]; 2300 secondQuad[0] = quad[0];
2301 secondQuad[1] = FloatPoint(quad[0].x() - r1 * cx, quad[0].y() - r1 * cy); 2301 secondQuad[1] = FloatPoint(quad[0].x() - r1 * cx, quad[0].y() - r1 * cy);
2302 secondQuad[2] = quad[2]; 2302 secondQuad[2] = quad[2];
2303 secondQuad[3] = quad[3]; 2303 secondQuad[3] = quad[3];
2304 graphicsContext->clipPolygon(4, secondQuad, !secondEdgeMatches); 2304 graphicsContext->clipPolygon(4, secondQuad, !secondEdgeMatches);
2305 } 2305 }
2306 2306
2307 } // namespace blink 2307 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698