Chromium Code Reviews| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 | 80 |
| 81 Vector<LayoutRect> outlineRects; | 81 Vector<LayoutRect> outlineRects; |
| 82 m_layoutObject.addOutlineRects(outlineRects, paintOffset); | 82 m_layoutObject.addOutlineRects(outlineRects, paintOffset); |
| 83 IntRect rect = pixelSnappedIntRect(unionRect(outlineRects)); | 83 IntRect rect = pixelSnappedIntRect(unionRect(outlineRects)); |
| 84 if (rect.isEmpty()) | 84 if (rect.isEmpty()) |
| 85 return; | 85 return; |
| 86 | 86 |
| 87 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.conte xt, m_layoutObject, DisplayItem::PrintedContentPDFURLRect)) | 87 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.conte xt, m_layoutObject, DisplayItem::PrintedContentPDFURLRect)) |
| 88 return; | 88 return; |
| 89 | 89 |
| 90 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutObject, Dis playItem::PrintedContentPDFURLRect, rect); | 90 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutObject, Dis playItem::PrintedContentPDFURLRect, LayoutRect(rect)); |
|
jbroman
2015/08/26 21:45:08
ditto
chrishtr
2015/08/26 22:32:21
Done
| |
| 91 if (url.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier(url, m_la youtObject.document().baseURL())) { | 91 if (url.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier(url, m_la youtObject.document().baseURL())) { |
| 92 String fragmentName = url.fragmentIdentifier(); | 92 String fragmentName = url.fragmentIdentifier(); |
| 93 if (m_layoutObject.document().findAnchor(fragmentName)) | 93 if (m_layoutObject.document().findAnchor(fragmentName)) |
| 94 paintInfo.context->setURLFragmentForRect(fragmentName, rect); | 94 paintInfo.context->setURLFragmentForRect(fragmentName, rect); |
| 95 return; | 95 return; |
| 96 } | 96 } |
| 97 paintInfo.context->setURLForRect(url, rect); | 97 paintInfo.context->setURLForRect(url, rect); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void ObjectPainter::drawLineForBoxSide(GraphicsContext* graphicsContext, int x1, int y1, int x2, int y2, | 100 void ObjectPainter::drawLineForBoxSide(GraphicsContext* graphicsContext, int x1, int y1, int x2, int y2, |
| (...skipping 239 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 |