OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/paint/BoxBorderPainter.h" | 5 #include "core/paint/BoxBorderPainter.h" |
6 | 6 |
7 #include "core/paint/BoxPainter.h" | 7 #include "core/paint/BoxPainter.h" |
8 #include "core/paint/PaintInfo.h" | 8 #include "core/paint/PaintInfo.h" |
9 #include "core/style/BorderEdge.h" | 9 #include "core/style/BorderEdge.h" |
10 #include "platform/RuntimeEnabledFeatures.h" | 10 #include "platform/RuntimeEnabledFeatures.h" |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 s1 = OUTSET; | 964 s1 = OUTSET; |
965 s2 = INSET; | 965 s2 = INSET; |
966 } | 966 } |
967 | 967 |
968 // Paint full border | 968 // Paint full border |
969 drawBoxSideFromPath(graphicsContext, borderRect, borderPath, thickness,
drawThickness, | 969 drawBoxSideFromPath(graphicsContext, borderRect, borderPath, thickness,
drawThickness, |
970 side, color, s1); | 970 side, color, s1); |
971 | 971 |
972 // Paint inner only | 972 // Paint inner only |
973 GraphicsContextStateSaver stateSaver(graphicsContext); | 973 GraphicsContextStateSaver stateSaver(graphicsContext); |
974 LayoutUnit topWidth = m_edges[BSTop].usedWidth() / 2; | 974 LayoutUnit topWidth(m_edges[BSTop].usedWidth() / 2); |
975 LayoutUnit bottomWidth = m_edges[BSBottom].usedWidth() / 2; | 975 LayoutUnit bottomWidth(m_edges[BSBottom].usedWidth() / 2); |
976 LayoutUnit leftWidth = m_edges[BSLeft].usedWidth() / 2; | 976 LayoutUnit leftWidth(m_edges[BSLeft].usedWidth() / 2); |
977 LayoutUnit rightWidth = m_edges[BSRight].usedWidth() / 2; | 977 LayoutUnit rightWidth(m_edges[BSRight].usedWidth() / 2); |
978 | 978 |
979 FloatRoundedRect clipRect = m_style.getRoundedInnerBorderFor(borderRect, | 979 FloatRoundedRect clipRect = m_style.getRoundedInnerBorderFor(borderRect, |
980 LayoutRectOutsets(-topWidth, -rightWidth, -bottomWidth, -leftWidth), | 980 LayoutRectOutsets(-topWidth, -rightWidth, -bottomWidth, -leftWidth), |
981 m_includeLogicalLeftEdge, m_includeLogicalRightEdge); | 981 m_includeLogicalLeftEdge, m_includeLogicalRightEdge); |
982 | 982 |
983 graphicsContext.clipRoundedRect(clipRect); | 983 graphicsContext.clipRoundedRect(clipRect); |
984 drawBoxSideFromPath(graphicsContext, borderRect, borderPath, thickness,
drawThickness, | 984 drawBoxSideFromPath(graphicsContext, borderRect, borderPath, thickness,
drawThickness, |
985 side, color, s2); | 985 side, color, s2); |
986 return; | 986 return; |
987 } | 987 } |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 FloatPoint secondQuad[4]; | 1194 FloatPoint secondQuad[4]; |
1195 secondQuad[0] = quad[0]; | 1195 secondQuad[0] = quad[0]; |
1196 secondQuad[1] = FloatPoint(quad[0].x() - r1 * cx, quad[0].y() - r1 * cy)
; | 1196 secondQuad[1] = FloatPoint(quad[0].x() - r1 * cx, quad[0].y() - r1 * cy)
; |
1197 secondQuad[2] = quad[2]; | 1197 secondQuad[2] = quad[2]; |
1198 secondQuad[3] = quad[3]; | 1198 secondQuad[3] = quad[3]; |
1199 graphicsContext.clipPolygon(4, secondQuad, secondMiter == SoftMiter); | 1199 graphicsContext.clipPolygon(4, secondQuad, secondMiter == SoftMiter); |
1200 } | 1200 } |
1201 } | 1201 } |
1202 | 1202 |
1203 } // namespace blink | 1203 } // namespace blink |
OLD | NEW |