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

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

Issue 2478233002: Make 'transform' a presentation attribute on SVG elements (Closed)
Patch Set: Rebase Created 4 years 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) 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 computedValues.m_position = logicalTop; 93 computedValues.m_position = logicalTop;
94 } 94 }
95 95
96 void LayoutSVGForeignObject::layout() { 96 void LayoutSVGForeignObject::layout() {
97 ASSERT(needsLayout()); 97 ASSERT(needsLayout());
98 98
99 SVGForeignObjectElement* foreign = toSVGForeignObjectElement(node()); 99 SVGForeignObjectElement* foreign = toSVGForeignObjectElement(node());
100 100
101 bool updateCachedBoundariesInParents = false; 101 bool updateCachedBoundariesInParents = false;
102 if (m_needsTransformUpdate) { 102 if (m_needsTransformUpdate) {
103 m_localTransform = foreign->calculateAnimatedLocalTransform(); 103 m_localTransform =
104 foreign->calculateTransform(SVGElement::IncludeMotionTransform);
104 m_needsTransformUpdate = false; 105 m_needsTransformUpdate = false;
105 updateCachedBoundariesInParents = true; 106 updateCachedBoundariesInParents = true;
106 } 107 }
107 108
108 LayoutRect oldViewport = frameRect(); 109 LayoutRect oldViewport = frameRect();
109 110
110 // Set box origin to the foreignObject x/y translation, so positioned objects 111 // Set box origin to the foreignObject x/y translation, so positioned objects
111 // in XHTML content get correct positions. A regular LayoutBoxModelObject 112 // in XHTML content get correct positions. A regular LayoutBoxModelObject
112 // would pull this information from ComputedStyle - in SVG those properties 113 // would pull this information from ComputedStyle - in SVG those properties
113 // are ignored for non <svg> elements, so we mimic what happens when 114 // are ignored for non <svg> elements, so we mimic what happens when
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 HitTestLocation hitTestLocation(localPoint); 153 HitTestLocation hitTestLocation(localPoint);
153 return LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(), 154 return LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(),
154 HitTestForeground) || 155 HitTestForeground) ||
155 LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(), 156 LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(),
156 HitTestFloat) || 157 HitTestFloat) ||
157 LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(), 158 LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(),
158 HitTestChildBlockBackgrounds); 159 HitTestChildBlockBackgrounds);
159 } 160 }
160 161
161 } // namespace blink 162 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698