| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the WebKit project. | 2 * This file is part of the WebKit project. |
| 3 * | 3 * |
| 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> | 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
| 5 * (C) 2006 Apple Computer Inc. | 5 * (C) 2006 Apple Computer Inc. |
| 6 * (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 6 * (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 7 * (C) 2008 Rob Buis <buis@kde.org> | 7 * (C) 2008 Rob Buis <buis@kde.org> |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 void RenderSVGInlineText::absoluteRects(Vector<IntRect>& rects, int, int, bool) | 69 void RenderSVGInlineText::absoluteRects(Vector<IntRect>& rects, int, int, bool) |
| 70 { | 70 { |
| 71 rects.append(computeRepaintRectForRange(0, 0, textLength())); | 71 rects.append(computeRepaintRectForRange(0, 0, textLength())); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void RenderSVGInlineText::absoluteQuads(Vector<FloatQuad>& quads, bool) | 74 void RenderSVGInlineText::absoluteQuads(Vector<FloatQuad>& quads, bool) |
| 75 { | 75 { |
| 76 quads.append(FloatRect(computeRepaintRectForRange(0, 0, textLength()))); | 76 quads.append(FloatRect(computeRepaintRectForRange(0, 0, textLength()))); |
| 77 } | 77 } |
| 78 | 78 |
| 79 IntRect RenderSVGInlineText::selectionRectForRepaint(RenderBox* repaintContainer
, bool /*clipToVisibleContent*/) | 79 IntRect RenderSVGInlineText::selectionRectForRepaint(RenderBoxModelObject* repai
ntContainer, bool /*clipToVisibleContent*/) |
| 80 { | 80 { |
| 81 ASSERT(!needsLayout()); | 81 ASSERT(!needsLayout()); |
| 82 | 82 |
| 83 if (selectionState() == SelectionNone) | 83 if (selectionState() == SelectionNone) |
| 84 return IntRect(); | 84 return IntRect(); |
| 85 | 85 |
| 86 // Early exit if we're ie. a <text> within a <defs> section. | 86 // Early exit if we're ie. a <text> within a <defs> section. |
| 87 if (isChildOfHiddenContainer(this)) | 87 if (isChildOfHiddenContainer(this)) |
| 88 return IntRect(); | 88 return IntRect(); |
| 89 | 89 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 101 else if (selectionState() == SelectionEnd) | 101 else if (selectionState() == SelectionEnd) |
| 102 startPos = 0; | 102 startPos = 0; |
| 103 } | 103 } |
| 104 | 104 |
| 105 if (startPos == endPos) | 105 if (startPos == endPos) |
| 106 return IntRect(); | 106 return IntRect(); |
| 107 | 107 |
| 108 return computeRepaintRectForRange(repaintContainer, startPos, endPos); | 108 return computeRepaintRectForRange(repaintContainer, startPos, endPos); |
| 109 } | 109 } |
| 110 | 110 |
| 111 IntRect RenderSVGInlineText::computeRepaintRectForRange(RenderBox* /*repaintCont
ainer*/, int startPos, int endPos) | 111 IntRect RenderSVGInlineText::computeRepaintRectForRange(RenderBoxModelObject* /*
repaintContainer*/, int startPos, int endPos) |
| 112 { | 112 { |
| 113 RenderBlock* cb = containingBlock(); | 113 RenderBlock* cb = containingBlock(); |
| 114 if (!cb || !cb->container()) | 114 if (!cb || !cb->container()) |
| 115 return IntRect(); | 115 return IntRect(); |
| 116 | 116 |
| 117 RenderSVGRoot* root = findSVGRootObject(parent()); | 117 RenderSVGRoot* root = findSVGRootObject(parent()); |
| 118 if (!root) | 118 if (!root) |
| 119 return IntRect(); | 119 return IntRect(); |
| 120 | 120 |
| 121 IntRect rect; | 121 IntRect rect; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 if (!documentBeingDestroyed()) { | 183 if (!documentBeingDestroyed()) { |
| 184 setNeedsLayoutAndPrefWidthsRecalc(); | 184 setNeedsLayoutAndPrefWidthsRecalc(); |
| 185 repaint(); | 185 repaint(); |
| 186 } | 186 } |
| 187 RenderText::destroy(); | 187 RenderText::destroy(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 } | 190 } |
| 191 | 191 |
| 192 #endif // ENABLE(SVG) | 192 #endif // ENABLE(SVG) |
| OLD | NEW |