| 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/ObjectPainter.h" | 6 #include "core/paint/ObjectPainter.h" |
| 7 | 7 |
| 8 #include "core/layout/LayoutObject.h" | 8 #include "core/layout/LayoutObject.h" |
| 9 #include "core/layout/LayoutTheme.h" | 9 #include "core/layout/LayoutTheme.h" |
| 10 #include "core/paint/BoxBorderPainter.h" | 10 #include "core/paint/BoxBorderPainter.h" |
| 11 #include "core/paint/LayoutObjectDrawingRecorder.h" | 11 #include "core/paint/LayoutObjectDrawingRecorder.h" |
| 12 #include "core/paint/PaintInfo.h" | 12 #include "core/paint/PaintInfo.h" |
| 13 #include "core/style/BorderEdge.h" | 13 #include "core/style/BorderEdge.h" |
| 14 #include "core/style/ComputedStyle.h" | 14 #include "core/style/ComputedStyle.h" |
| 15 #include "platform/geometry/LayoutPoint.h" | 15 #include "platform/geometry/LayoutPoint.h" |
| 16 #include "platform/graphics/GraphicsContextStateSaver.h" | |
| 17 | 16 |
| 18 namespace blink { | 17 namespace blink { |
| 19 | 18 |
| 20 LayoutRect ObjectPainter::outlineBounds(const LayoutRect& objectBounds, const Co
mputedStyle& style) | 19 LayoutRect ObjectPainter::outlineBounds(const LayoutRect& objectBounds, const Co
mputedStyle& style) |
| 21 { | 20 { |
| 22 LayoutRect outlineBounds(objectBounds); | 21 LayoutRect outlineBounds(objectBounds); |
| 23 outlineBounds.inflate(style.outlineOutset()); | 22 outlineBounds.inflate(style.outlineOutset()); |
| 24 return outlineBounds; | 23 return outlineBounds; |
| 25 } | 24 } |
| 26 | 25 |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 quad[1] = FloatPoint(x1, y2 - std::max(adjacentWidth2, 0)); | 340 quad[1] = FloatPoint(x1, y2 - std::max(adjacentWidth2, 0)); |
| 342 quad[2] = FloatPoint(x2, y2 - std::max(-adjacentWidth2, 0)); | 341 quad[2] = FloatPoint(x2, y2 - std::max(-adjacentWidth2, 0)); |
| 343 quad[3] = FloatPoint(x2, y1 + std::max(-adjacentWidth1, 0)); | 342 quad[3] = FloatPoint(x2, y1 + std::max(-adjacentWidth1, 0)); |
| 344 break; | 343 break; |
| 345 } | 344 } |
| 346 | 345 |
| 347 graphicsContext->fillPolygon(4, quad, color, antialias); | 346 graphicsContext->fillPolygon(4, quad, color, antialias); |
| 348 } | 347 } |
| 349 | 348 |
| 350 } // namespace blink | 349 } // namespace blink |
| OLD | NEW |