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 * | 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 30 matching lines...) Expand all Loading... |
41 void RenderSVGTSpan::absoluteRects(Vector<IntRect>& rects, int, int, bool) | 41 void RenderSVGTSpan::absoluteRects(Vector<IntRect>& rects, int, int, bool) |
42 { | 42 { |
43 InlineRunBox* firstBox = firstLineBox(); | 43 InlineRunBox* firstBox = firstLineBox(); |
44 | 44 |
45 SVGRootInlineBox* rootBox = firstBox ? static_cast<SVGInlineTextBox*>(firstB
ox)->svgRootInlineBox() : 0; | 45 SVGRootInlineBox* rootBox = firstBox ? static_cast<SVGInlineTextBox*>(firstB
ox)->svgRootInlineBox() : 0; |
46 RenderBox* object = rootBox ? rootBox->block() : 0; | 46 RenderBox* object = rootBox ? rootBox->block() : 0; |
47 | 47 |
48 if (!object) | 48 if (!object) |
49 return; | 49 return; |
50 | 50 |
51 int xRef = object->x() + x(); | 51 int xRef = object->x(); |
52 int yRef = object->y() + y(); | 52 int yRef = object->y(); |
53 | 53 |
54 for (InlineRunBox* curr = firstBox; curr; curr = curr->nextLineBox()) { | 54 for (InlineRunBox* curr = firstBox; curr; curr = curr->nextLineBox()) { |
55 FloatRect rect(xRef + curr->xPos(), yRef + curr->yPos(), curr->width(),
curr->height()); | 55 FloatRect rect(xRef + curr->xPos(), yRef + curr->yPos(), curr->width(),
curr->height()); |
56 // FIXME: broken with CSS transforms | 56 // FIXME: broken with CSS transforms |
57 rects.append(enclosingIntRect(absoluteTransform().mapRect(rect))); | 57 rects.append(enclosingIntRect(absoluteTransform().mapRect(rect))); |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
61 void RenderSVGTSpan::absoluteQuads(Vector<FloatQuad>& quads, bool) | 61 void RenderSVGTSpan::absoluteQuads(Vector<FloatQuad>& quads, bool) |
62 { | 62 { |
63 InlineRunBox* firstBox = firstLineBox(); | 63 InlineRunBox* firstBox = firstLineBox(); |
64 | 64 |
65 SVGRootInlineBox* rootBox = firstBox ? static_cast<SVGInlineTextBox*>(firstB
ox)->svgRootInlineBox() : 0; | 65 SVGRootInlineBox* rootBox = firstBox ? static_cast<SVGInlineTextBox*>(firstB
ox)->svgRootInlineBox() : 0; |
66 RenderBox* object = rootBox ? rootBox->block() : 0; | 66 RenderBox* object = rootBox ? rootBox->block() : 0; |
67 | 67 |
68 if (!object) | 68 if (!object) |
69 return; | 69 return; |
70 | 70 |
71 int xRef = object->x() + x(); | 71 int xRef = object->x(); |
72 int yRef = object->y() + y(); | 72 int yRef = object->y(); |
73 | 73 |
74 for (InlineRunBox* curr = firstBox; curr; curr = curr->nextLineBox()) { | 74 for (InlineRunBox* curr = firstBox; curr; curr = curr->nextLineBox()) { |
75 FloatRect rect(xRef + curr->xPos(), yRef + curr->yPos(), curr->width(),
curr->height()); | 75 FloatRect rect(xRef + curr->xPos(), yRef + curr->yPos(), curr->width(),
curr->height()); |
76 // FIXME: broken with CSS transforms | 76 // FIXME: broken with CSS transforms |
77 quads.append(absoluteTransform().mapRect(rect)); | 77 quads.append(absoluteTransform().mapRect(rect)); |
78 } | 78 } |
79 } | 79 } |
80 | 80 |
81 } | 81 } |
82 | 82 |
83 #endif // ENABLE(SVG) | 83 #endif // ENABLE(SVG) |
OLD | NEW |