| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> | 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
| 3 * Copyright (C) 2006 Apple Computer Inc. | 3 * Copyright (C) 2006 Apple Computer Inc. |
| 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "core/rendering/svg/RenderSVGInlineText.h" | 28 #include "core/rendering/svg/RenderSVGInlineText.h" |
| 29 #include "core/rendering/svg/SVGInlineTextBox.h" | 29 #include "core/rendering/svg/SVGInlineTextBox.h" |
| 30 #include "core/rendering/svg/SVGRenderingContext.h" | 30 #include "core/rendering/svg/SVGRenderingContext.h" |
| 31 | 31 |
| 32 using namespace std; | 32 using namespace std; |
| 33 | 33 |
| 34 namespace WebCore { | 34 namespace WebCore { |
| 35 | 35 |
| 36 void SVGInlineFlowBox::paintSelectionBackground(PaintInfo& paintInfo) | 36 void SVGInlineFlowBox::paintSelectionBackground(PaintInfo& paintInfo) |
| 37 { | 37 { |
| 38 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh
aseSelection); | 38 ASSERT(paintInfo.getPhase() == PaintPhaseForeground || paintInfo.getPhase()
== PaintPhaseSelection); |
| 39 ASSERT(!paintInfo.context->paintingDisabled()); | 39 ASSERT(!paintInfo.getContext()->paintingDisabled()); |
| 40 | 40 |
| 41 PaintInfo childPaintInfo(paintInfo); | 41 PaintInfo childPaintInfo(paintInfo); |
| 42 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) { | 42 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) { |
| 43 if (child->isSVGInlineTextBox()) | 43 if (child->isSVGInlineTextBox()) |
| 44 toSVGInlineTextBox(child)->paintSelectionBackground(childPaintInfo); | 44 toSVGInlineTextBox(child)->paintSelectionBackground(childPaintInfo); |
| 45 else if (child->isSVGInlineFlowBox()) | 45 else if (child->isSVGInlineFlowBox()) |
| 46 toSVGInlineFlowBox(child)->paintSelectionBackground(childPaintInfo); | 46 toSVGInlineFlowBox(child)->paintSelectionBackground(childPaintInfo); |
| 47 } | 47 } |
| 48 } | 48 } |
| 49 | 49 |
| 50 void SVGInlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint&, LayoutUni
t, LayoutUnit) | 50 void SVGInlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint&, LayoutUni
t, LayoutUnit) |
| 51 { | 51 { |
| 52 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh
aseSelection); | 52 ASSERT(paintInfo.getPhase() == PaintPhaseForeground || paintInfo.getPhase()
== PaintPhaseSelection); |
| 53 ASSERT(!paintInfo.context->paintingDisabled()); | 53 ASSERT(!paintInfo.getContext()->paintingDisabled()); |
| 54 | 54 |
| 55 RenderObject* boxRenderer = renderer(); | 55 RenderObject* boxRenderer = renderer(); |
| 56 ASSERT(boxRenderer); | 56 ASSERT(boxRenderer); |
| 57 | 57 |
| 58 SVGRenderingContext renderingContext(boxRenderer, paintInfo, SVGRenderingCon
text::SaveGraphicsContext); | 58 SVGRenderingContext renderingContext(boxRenderer, paintInfo, SVGRenderingCon
text::SaveGraphicsContext); |
| 59 if (renderingContext.isRenderingPrepared()) { | 59 if (renderingContext.isRenderingPrepared()) { |
| 60 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()
) { | 60 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()
) { |
| 61 if (child->isSVGInlineTextBox()) | 61 if (child->isSVGInlineTextBox()) |
| 62 computeTextMatchMarkerRectForRenderer(toRenderSVGInlineText(toSV
GInlineTextBox(child)->textRenderer())); | 62 computeTextMatchMarkerRectForRenderer(toRenderSVGInlineText(toSV
GInlineTextBox(child)->textRenderer())); |
| 63 | 63 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 markerRect.unite(fragmentRect); | 134 markerRect.unite(fragmentRect); |
| 135 } | 135 } |
| 136 } | 136 } |
| 137 | 137 |
| 138 toRenderedDocumentMarker(marker)->setRenderedRect(textRenderer->localToA
bsoluteQuad(markerRect).enclosingBoundingBox()); | 138 toRenderedDocumentMarker(marker)->setRenderedRect(textRenderer->localToA
bsoluteQuad(markerRect).enclosingBoundingBox()); |
| 139 } | 139 } |
| 140 } | 140 } |
| 141 | 141 |
| 142 } // namespace WebCore | 142 } // namespace WebCore |
| OLD | NEW |