| 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" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 int outlineWidth = styleToUse.outlineWidth(); | 63 int outlineWidth = styleToUse.outlineWidth(); |
| 64 outer.inflate(outlineWidth); | 64 outer.inflate(outlineWidth); |
| 65 | 65 |
| 66 const BorderEdge commonEdgeInfo(outlineWidth, | 66 const BorderEdge commonEdgeInfo(outlineWidth, |
| 67 m_layoutObject.resolveColor(styleToUse, CSSPropertyOutlineColor), styleT
oUse.outlineStyle()); | 67 m_layoutObject.resolveColor(styleToUse, CSSPropertyOutlineColor), styleT
oUse.outlineStyle()); |
| 68 BoxBorderPainter(styleToUse, outer, inner, commonEdgeInfo).paintBorder(paint
Info, outer); | 68 BoxBorderPainter(styleToUse, outer, inner, commonEdgeInfo).paintBorder(paint
Info, outer); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void ObjectPainter::addPDFURLRectIfNeeded(const PaintInfo& paintInfo, const Layo
utPoint& paintOffset) | 71 void ObjectPainter::addPDFURLRectIfNeeded(const PaintInfo& paintInfo, const Layo
utPoint& paintOffset) |
| 72 { | 72 { |
| 73 ASSERT(paintInfo.context->printing()); | 73 ASSERT(paintInfo.isPrinting()); |
| 74 if (m_layoutObject.isElementContinuation() || !m_layoutObject.node() || !m_l
ayoutObject.node()->isLink() || m_layoutObject.styleRef().visibility() != VISIBL
E) | 74 if (m_layoutObject.isElementContinuation() || !m_layoutObject.node() || !m_l
ayoutObject.node()->isLink() || m_layoutObject.styleRef().visibility() != VISIBL
E) |
| 75 return; | 75 return; |
| 76 | 76 |
| 77 KURL url = toElement(m_layoutObject.node())->hrefURL(); | 77 KURL url = toElement(m_layoutObject.node())->hrefURL(); |
| 78 if (!url.isValid()) | 78 if (!url.isValid()) |
| 79 return; | 79 return; |
| 80 | 80 |
| 81 Vector<LayoutRect> focusRingRects; | 81 Vector<LayoutRect> focusRingRects; |
| 82 m_layoutObject.addFocusRingRects(focusRingRects, paintOffset); | 82 m_layoutObject.addFocusRingRects(focusRingRects, paintOffset); |
| 83 IntRect rect = pixelSnappedIntRect(unionRect(focusRingRects)); | 83 IntRect rect = pixelSnappedIntRect(unionRect(focusRingRects)); |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 quad[1] = FloatPoint(x1, y2 - std::max(adjacentWidth2, 0)); | 340 quad[1] = FloatPoint(x1, y2 - std::max(adjacentWidth2, 0)); |
| 341 quad[2] = FloatPoint(x2, y2 - std::max(-adjacentWidth2, 0)); | 341 quad[2] = FloatPoint(x2, y2 - std::max(-adjacentWidth2, 0)); |
| 342 quad[3] = FloatPoint(x2, y1 + std::max(-adjacentWidth1, 0)); | 342 quad[3] = FloatPoint(x2, y1 + std::max(-adjacentWidth1, 0)); |
| 343 break; | 343 break; |
| 344 } | 344 } |
| 345 | 345 |
| 346 graphicsContext->fillPolygon(4, quad, color, antialias); | 346 graphicsContext->fillPolygon(4, quad, color, antialias); |
| 347 } | 347 } |
| 348 | 348 |
| 349 } // namespace blink | 349 } // namespace blink |
| OLD | NEW |