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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 else if (child->isSVGInlineFlowBox()) | 43 else if (child->isSVGInlineFlowBox()) |
44 toSVGInlineFlowBox(child)->paintSelectionBackground(childPaintInfo); | 44 toSVGInlineFlowBox(child)->paintSelectionBackground(childPaintInfo); |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 void SVGInlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffse
t, LayoutUnit, LayoutUnit) | 48 void SVGInlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffse
t, LayoutUnit, LayoutUnit) |
49 { | 49 { |
50 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh
aseSelection); | 50 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh
aseSelection); |
51 ASSERT(!paintInfo.context->paintingDisabled()); | 51 ASSERT(!paintInfo.context->paintingDisabled()); |
52 | 52 |
53 RenderObject* boxRenderer = renderer(); | 53 SVGRenderingContext renderingContext(&renderer(), paintInfo, SVGRenderingCon
text::SaveGraphicsContext); |
54 ASSERT(boxRenderer); | |
55 | |
56 SVGRenderingContext renderingContext(boxRenderer, paintInfo, SVGRenderingCon
text::SaveGraphicsContext); | |
57 if (renderingContext.isRenderingPrepared()) { | 54 if (renderingContext.isRenderingPrepared()) { |
58 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()
) | 55 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()
) |
59 child->paint(paintInfo, paintOffset, 0, 0); | 56 child->paint(paintInfo, paintOffset, 0, 0); |
60 } | 57 } |
61 } | 58 } |
62 | 59 |
63 FloatRect SVGInlineFlowBox::calculateBoundaries() const | 60 FloatRect SVGInlineFlowBox::calculateBoundaries() const |
64 { | 61 { |
65 FloatRect childRect; | 62 FloatRect childRect; |
66 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) { | 63 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) { |
67 if (!child->isSVGInlineTextBox() && !child->isSVGInlineFlowBox()) | 64 if (!child->isSVGInlineTextBox() && !child->isSVGInlineFlowBox()) |
68 continue; | 65 continue; |
69 childRect.unite(child->calculateBoundaries()); | 66 childRect.unite(child->calculateBoundaries()); |
70 } | 67 } |
71 return childRect; | 68 return childRect; |
72 } | 69 } |
73 | 70 |
74 } // namespace WebCore | 71 } // namespace WebCore |
OLD | NEW |