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) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 void RenderSVGTextPath::absoluteRects(Vector<IntRect>& rects, int, int) | 81 void RenderSVGTextPath::absoluteRects(Vector<IntRect>& rects, int, int) |
82 { | 82 { |
83 InlineRunBox* firstBox = firstLineBox(); | 83 InlineRunBox* firstBox = firstLineBox(); |
84 | 84 |
85 SVGRootInlineBox* rootBox = firstBox ? static_cast<SVGInlineTextBox*>(firstB
ox)->svgRootInlineBox() : 0; | 85 SVGRootInlineBox* rootBox = firstBox ? static_cast<SVGInlineTextBox*>(firstB
ox)->svgRootInlineBox() : 0; |
86 RenderBlock* object = rootBox ? rootBox->block() : 0; | 86 RenderBlock* object = rootBox ? rootBox->block() : 0; |
87 | 87 |
88 if (!object) | 88 if (!object) |
89 return; | 89 return; |
90 | 90 |
91 int xRef = object->x() + x(); | 91 int xRef = object->x(); |
92 int yRef = object->y() + y(); | 92 int yRef = object->y(); |
93 | 93 |
94 for (InlineRunBox* curr = firstBox; curr; curr = curr->nextLineBox()) { | 94 for (InlineRunBox* curr = firstBox; curr; curr = curr->nextLineBox()) { |
95 FloatRect rect(xRef + curr->xPos(), yRef + curr->yPos(), curr->width(),
curr->height()); | 95 FloatRect rect(xRef + curr->xPos(), yRef + curr->yPos(), curr->width(),
curr->height()); |
96 // FIXME: broken with CSS transforms | 96 // FIXME: broken with CSS transforms |
97 rects.append(enclosingIntRect(absoluteTransform().mapRect(rect))); | 97 rects.append(enclosingIntRect(absoluteTransform().mapRect(rect))); |
98 } | 98 } |
99 } | 99 } |
100 | 100 |
101 void RenderSVGTextPath::absoluteQuads(Vector<FloatQuad>& quads, bool) | 101 void RenderSVGTextPath::absoluteQuads(Vector<FloatQuad>& quads, bool) |
102 { | 102 { |
103 InlineRunBox* firstBox = firstLineBox(); | 103 InlineRunBox* firstBox = firstLineBox(); |
104 | 104 |
105 SVGRootInlineBox* rootBox = firstBox ? static_cast<SVGInlineTextBox*>(firstB
ox)->svgRootInlineBox() : 0; | 105 SVGRootInlineBox* rootBox = firstBox ? static_cast<SVGInlineTextBox*>(firstB
ox)->svgRootInlineBox() : 0; |
106 RenderBlock* object = rootBox ? rootBox->block() : 0; | 106 RenderBlock* object = rootBox ? rootBox->block() : 0; |
107 | 107 |
108 if (!object) | 108 if (!object) |
109 return; | 109 return; |
110 | 110 |
111 int xRef = object->x() + x(); | 111 int xRef = object->x(); |
112 int yRef = object->y() + y(); | 112 int yRef = object->y(); |
113 | 113 |
114 for (InlineRunBox* curr = firstBox; curr; curr = curr->nextLineBox()) { | 114 for (InlineRunBox* curr = firstBox; curr; curr = curr->nextLineBox()) { |
115 FloatRect rect(xRef + curr->xPos(), yRef + curr->yPos(), curr->width(),
curr->height()); | 115 FloatRect rect(xRef + curr->xPos(), yRef + curr->yPos(), curr->width(),
curr->height()); |
116 // FIXME: broken with CSS transforms | 116 // FIXME: broken with CSS transforms |
117 quads.append(absoluteTransform().mapRect(rect)); | 117 quads.append(absoluteTransform().mapRect(rect)); |
118 } | 118 } |
119 } | 119 } |
120 | 120 |
121 } | 121 } |
122 | 122 |
123 #endif // ENABLE(SVG) | 123 #endif // ENABLE(SVG) |
OLD | NEW |