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

Side by Side Diff: Source/core/rendering/svg/RenderSVGForeignObject.cpp

Issue 693423002: Devirtualize animatedLocalTransform() and rename it for clarity (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove some codes that snuck in Created 6 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
« no previous file with comments | « no previous file | Source/core/rendering/svg/RenderSVGImage.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2009 Google, Inc. 3 * Copyright (C) 2009 Google, Inc.
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 78
79 void RenderSVGForeignObject::layout() 79 void RenderSVGForeignObject::layout()
80 { 80 {
81 ASSERT(needsLayout()); 81 ASSERT(needsLayout());
82 82
83 SVGForeignObjectElement* foreign = toSVGForeignObjectElement(node()); 83 SVGForeignObjectElement* foreign = toSVGForeignObjectElement(node());
84 84
85 bool updateCachedBoundariesInParents = false; 85 bool updateCachedBoundariesInParents = false;
86 if (m_needsTransformUpdate) { 86 if (m_needsTransformUpdate) {
87 m_localTransform = foreign->animatedLocalTransform(); 87 m_localTransform = foreign->calculateAnimatedLocalTransform();
88 m_needsTransformUpdate = false; 88 m_needsTransformUpdate = false;
89 updateCachedBoundariesInParents = true; 89 updateCachedBoundariesInParents = true;
90 } 90 }
91 91
92 FloatRect oldViewport = m_viewport; 92 FloatRect oldViewport = m_viewport;
93 93
94 // Cache viewport boundaries 94 // Cache viewport boundaries
95 SVGLengthContext lengthContext(foreign); 95 SVGLengthContext lengthContext(foreign);
96 FloatPoint viewportLocation(foreign->x()->currentValue()->value(lengthContex t), foreign->y()->currentValue()->value(lengthContext)); 96 FloatPoint viewportLocation(foreign->x()->currentValue()->value(lengthContex t), foreign->y()->currentValue()->value(lengthContext));
97 m_viewport = FloatRect(viewportLocation, FloatSize(foreign->width()->current Value()->value(lengthContext), foreign->height()->currentValue()->value(lengthCo ntext))); 97 m_viewport = FloatRect(viewportLocation, FloatSize(foreign->width()->current Value()->value(lengthContext), foreign->height()->currentValue()->value(lengthCo ntext)));
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return false; 143 return false;
144 144
145 // FOs establish a stacking context, so we need to hit-test all layers. 145 // FOs establish a stacking context, so we need to hit-test all layers.
146 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint)); 146 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint));
147 return RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestForeground) 147 return RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestForeground)
148 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestFloat) 148 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestFloat)
149 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestChildBlockBackgrounds); 149 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestChildBlockBackgrounds);
150 } 150 }
151 151
152 } 152 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/svg/RenderSVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698