| 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 "core/paint/ObjectPainter.h" | 5 #include "core/paint/ObjectPainter.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutBlock.h" | 7 #include "core/layout/LayoutBlock.h" |
| 8 #include "core/layout/LayoutInline.h" | 8 #include "core/layout/LayoutInline.h" |
| 9 #include "core/layout/LayoutObject.h" | 9 #include "core/layout/LayoutObject.h" |
| 10 #include "core/layout/LayoutTheme.h" | 10 #include "core/layout/LayoutTheme.h" |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 IntRect unitedOutlineRect = unionRectEvenIfEmpty(pixelSnappedOutlineRects); | 267 IntRect unitedOutlineRect = unionRectEvenIfEmpty(pixelSnappedOutlineRects); |
| 268 IntRect bounds = unitedOutlineRect; | 268 IntRect bounds = unitedOutlineRect; |
| 269 bounds.inflate(m_layoutObject.styleRef().outlineOutsetExtent()); | 269 bounds.inflate(m_layoutObject.styleRef().outlineOutsetExtent()); |
| 270 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutObject, | 270 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutObject, |
| 271 paintInfo.phase, bounds); | 271 paintInfo.phase, bounds); |
| 272 | 272 |
| 273 Color color = | 273 Color color = |
| 274 m_layoutObject.resolveColor(styleToUse, CSSPropertyOutlineColor); | 274 m_layoutObject.resolveColor(styleToUse, CSSPropertyOutlineColor); |
| 275 if (styleToUse.outlineStyleIsAuto()) { | 275 if (styleToUse.outlineStyleIsAuto()) { |
| 276 paintInfo.context.drawFocusRing(pixelSnappedOutlineRects, | 276 paintInfo.context.drawFocusRing( |
| 277 styleToUse.outlineWidth(), | 277 pixelSnappedOutlineRects, |
| 278 styleToUse.outlineOffset(), color); | 278 styleToUse.getOutlineStrokeWidthForFocusRing(), |
| 279 styleToUse.outlineOffset(), color); |
| 279 return; | 280 return; |
| 280 } | 281 } |
| 281 | 282 |
| 282 if (unitedOutlineRect == pixelSnappedOutlineRects[0]) { | 283 if (unitedOutlineRect == pixelSnappedOutlineRects[0]) { |
| 283 paintSingleRectangleOutline(paintInfo, unitedOutlineRect, styleToUse, | 284 paintSingleRectangleOutline(paintInfo, unitedOutlineRect, styleToUse, |
| 284 color); | 285 color); |
| 285 return; | 286 return; |
| 286 } | 287 } |
| 287 paintComplexOutline(paintInfo.context, pixelSnappedOutlineRects, styleToUse, | 288 paintComplexOutline(paintInfo.context, pixelSnappedOutlineRects, styleToUse, |
| 288 color); | 289 color); |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 m_layoutObject.paint(info, paintOffset); | 750 m_layoutObject.paint(info, paintOffset); |
| 750 info.phase = PaintPhaseFloat; | 751 info.phase = PaintPhaseFloat; |
| 751 m_layoutObject.paint(info, paintOffset); | 752 m_layoutObject.paint(info, paintOffset); |
| 752 info.phase = PaintPhaseForeground; | 753 info.phase = PaintPhaseForeground; |
| 753 m_layoutObject.paint(info, paintOffset); | 754 m_layoutObject.paint(info, paintOffset); |
| 754 info.phase = PaintPhaseOutline; | 755 info.phase = PaintPhaseOutline; |
| 755 m_layoutObject.paint(info, paintOffset); | 756 m_layoutObject.paint(info, paintOffset); |
| 756 } | 757 } |
| 757 | 758 |
| 758 } // namespace blink | 759 } // namespace blink |
| OLD | NEW |