Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Side by Side Diff: third_party/WebKit/WebCore/rendering/RenderSVGTextPath.cpp

Issue 21184: WebKit merge 40722:40785 (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698