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

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

Issue 10670: Do another merge using nifty new merge script (CL for that coming soon). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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) 2006 Apple Computer, Inc. 4 * Copyright (C) 2006 Apple Computer, Inc.
5 * 2006 Alexander Kellett <lypanov@kde.org> 5 * 2006 Alexander Kellett <lypanov@kde.org>
6 * 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 6 * 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
7 * 2007 Nikolas Zimmermann <zimmermann@kde.org> 7 * 2007 Nikolas Zimmermann <zimmermann@kde.org>
8 * 2008 Rob Buis <buis@kde.org> 8 * 2008 Rob Buis <buis@kde.org>
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 // Don't use relativeBBox here, as it's unites the selection rects. Makes it hard 158 // Don't use relativeBBox here, as it's unites the selection rects. Makes it hard
159 // to spot errors, if there are any using WebInspector. Individually feed th em into 'rects'. 159 // to spot errors, if there are any using WebInspector. Individually feed th em into 'rects'.
160 for (InlineRunBox* runBox = firstLineBox(); runBox; runBox = runBox->nextLin eBox()) { 160 for (InlineRunBox* runBox = firstLineBox(); runBox; runBox = runBox->nextLin eBox()) {
161 ASSERT(runBox->isInlineFlowBox()); 161 ASSERT(runBox->isInlineFlowBox());
162 162
163 InlineFlowBox* flowBox = static_cast<InlineFlowBox*>(runBox); 163 InlineFlowBox* flowBox = static_cast<InlineFlowBox*>(runBox);
164 for (InlineBox* box = flowBox->firstChild(); box; box = box->nextOnLine( )) { 164 for (InlineBox* box = flowBox->firstChild(); box; box = box->nextOnLine( )) {
165 FloatRect boxRect(box->xPos(), box->yPos(), box->width(), box->heigh t()); 165 FloatRect boxRect(box->xPos(), box->yPos(), box->width(), box->heigh t());
166 boxRect.move(narrowPrecisionToFloat(absPos.x() - htmlParentCtm.e()), narrowPrecisionToFloat(absPos.y() - htmlParentCtm.f())); 166 boxRect.move(narrowPrecisionToFloat(absPos.x() - htmlParentCtm.e()), narrowPrecisionToFloat(absPos.y() - htmlParentCtm.f()));
167 // FIXME: broken with CSS transforms
167 rects.append(enclosingIntRect(absoluteTransform().mapRect(boxRect))) ; 168 rects.append(enclosingIntRect(absoluteTransform().mapRect(boxRect))) ;
168 } 169 }
169 } 170 }
170 } 171 }
171 172
173 void RenderSVGText::absoluteQuads(Vector<FloatQuad>& quads, bool topLevel)
174 {
175 RenderSVGRoot* root = findSVGRootObject(parent());
176 if (!root)
177 return;
178
179 FloatPoint absPos = localToAbsolute();
180
181 AffineTransform htmlParentCtm = root->RenderContainer::absoluteTransform();
182
183 // Don't use relativeBBox here, as it's unites the selection rects. Makes it hard
184 // to spot errors, if there are any using WebInspector. Individually feed th em into 'rects'.
185 for (InlineRunBox* runBox = firstLineBox(); runBox; runBox = runBox->nextLin eBox()) {
186 ASSERT(runBox->isInlineFlowBox());
187
188 InlineFlowBox* flowBox = static_cast<InlineFlowBox*>(runBox);
189 for (InlineBox* box = flowBox->firstChild(); box; box = box->nextOnLine( )) {
190 FloatRect boxRect(box->xPos(), box->yPos(), box->width(), box->heigh t());
191 boxRect.move(narrowPrecisionToFloat(absPos.x() - htmlParentCtm.e()), narrowPrecisionToFloat(absPos.y() - htmlParentCtm.f()));
192 // FIXME: broken with CSS transforms
193 quads.append(absoluteTransform().mapRect(boxRect));
194 }
195 }
196 }
197
172 void RenderSVGText::paint(PaintInfo& paintInfo, int, int) 198 void RenderSVGText::paint(PaintInfo& paintInfo, int, int)
173 { 199 {
174 RenderObject::PaintInfo pi(paintInfo); 200 RenderObject::PaintInfo pi(paintInfo);
175 pi.rect = absoluteTransform().inverse().mapRect(pi.rect); 201 pi.rect = absoluteTransform().inverse().mapRect(pi.rect);
176 RenderBlock::paint(pi, 0, 0); 202 RenderBlock::paint(pi, 0, 0);
177 } 203 }
178 204
179 FloatRect RenderSVGText::relativeBBox(bool includeStroke) const 205 FloatRect RenderSVGText::relativeBBox(bool includeStroke) const
180 { 206 {
181 FloatRect repaintRect; 207 FloatRect repaintRect;
(...skipping 25 matching lines...) Expand all
207 233
208 repaintRect.move(xPos(), yPos()); 234 repaintRect.move(xPos(), yPos());
209 return repaintRect; 235 return repaintRect;
210 } 236 }
211 237
212 } 238 }
213 239
214 #endif // ENABLE(SVG) 240 #endif // ENABLE(SVG)
215 241
216 // vim:ts=4:noet 242 // vim:ts=4:noet
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/rendering/RenderSVGText.h ('k') | third_party/WebKit/WebCore/rendering/RenderSVGTextPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698