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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp

Issue 1896793002: Rename (updateLayout/updateStyle).*.() to updateStyleAndLayout.*.() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) 2014 Google, Inc. 4 * Copyright (C) 2014 Google, Inc.
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 return (isSVGSVGElement(element) 53 return (isSVGSVGElement(element)
54 || isSVGSymbolElement(element) 54 || isSVGSymbolElement(element)
55 || isSVGForeignObjectElement(element) 55 || isSVGForeignObjectElement(element)
56 || isSVGImageElement(element)); 56 || isSVGImageElement(element));
57 } 57 }
58 58
59 AffineTransform SVGGraphicsElement::computeCTM(SVGElement::CTMScope mode, 59 AffineTransform SVGGraphicsElement::computeCTM(SVGElement::CTMScope mode,
60 SVGGraphicsElement::StyleUpdateStrategy styleUpdateStrategy, const SVGGraphi csElement* ancestor) const 60 SVGGraphicsElement::StyleUpdateStrategy styleUpdateStrategy, const SVGGraphi csElement* ancestor) const
61 { 61 {
62 if (styleUpdateStrategy == AllowStyleUpdate) 62 if (styleUpdateStrategy == AllowStyleUpdate)
63 document().updateLayoutIgnorePendingStylesheets(); 63 document().updateStyleAndLayoutIgnorePendingStylesheets();
64 64
65 AffineTransform ctm; 65 AffineTransform ctm;
66 bool done = false; 66 bool done = false;
67 67
68 for (const Element* currentElement = this; currentElement && !done; 68 for (const Element* currentElement = this; currentElement && !done;
69 currentElement = currentElement->parentOrShadowHostElement()) { 69 currentElement = currentElement->parentOrShadowHostElement()) {
70 if (!currentElement->isSVGElement()) 70 if (!currentElement->isSVGElement())
71 break; 71 break;
72 72
73 ctm = toSVGElement(currentElement)->localCoordinateSpaceTransform(mode). multiply(ctm); 73 ctm = toSVGElement(currentElement)->localCoordinateSpaceTransform(mode). multiply(ctm);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 SVGElement* farthest = 0; 206 SVGElement* farthest = 0;
207 for (Element* current = parentOrShadowHostElement(); current; current = curr ent->parentOrShadowHostElement()) { 207 for (Element* current = parentOrShadowHostElement(); current; current = curr ent->parentOrShadowHostElement()) {
208 if (isViewportElement(*current)) 208 if (isViewportElement(*current))
209 farthest = toSVGElement(current); 209 farthest = toSVGElement(current);
210 } 210 }
211 return farthest; 211 return farthest;
212 } 212 }
213 213
214 FloatRect SVGGraphicsElement::getBBox() 214 FloatRect SVGGraphicsElement::getBBox()
215 { 215 {
216 document().updateLayoutIgnorePendingStylesheets(); 216 document().updateStyleAndLayoutIgnorePendingStylesheets();
217 217
218 // FIXME: Eventually we should support getBBox for detached elements. 218 // FIXME: Eventually we should support getBBox for detached elements.
219 if (!layoutObject()) 219 if (!layoutObject())
220 return FloatRect(); 220 return FloatRect();
221 221
222 return layoutObject()->objectBoundingBox(); 222 return layoutObject()->objectBoundingBox();
223 } 223 }
224 224
225 SVGRectTearOff* SVGGraphicsElement::getBBoxFromJavascript() 225 SVGRectTearOff* SVGGraphicsElement::getBBoxFromJavascript()
226 { 226 {
227 return SVGRectTearOff::create(SVGRect::create(getBBox()), 0, PropertyIsNotAn imVal); 227 return SVGRectTearOff::create(SVGRect::create(getBBox()), 0, PropertyIsNotAn imVal);
228 } 228 }
229 229
230 } // namespace blink 230 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGGeometryElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGPathElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698