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

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

Issue 2727093002: Account for perspective and preserve-3d in mapToVisualRectInAncestorSpace (Closed)
Patch Set: none Created 3 years, 9 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) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 geometryMap.push(this, locationOffset()); 124 geometryMap.push(this, locationOffset());
125 // Apply other mappings on local SVG coordinates. 125 // Apply other mappings on local SVG coordinates.
126 return SVGLayoutSupport::pushMappingToContainer(this, ancestorToStopAt, 126 return SVGLayoutSupport::pushMappingToContainer(this, ancestorToStopAt,
127 geometryMap); 127 geometryMap);
128 } 128 }
129 129
130 LayoutRect LayoutSVGBlock::absoluteVisualRect() const { 130 LayoutRect LayoutSVGBlock::absoluteVisualRect() const {
131 return SVGLayoutSupport::visualRectInAncestorSpace(*this, *view()); 131 return SVGLayoutSupport::visualRectInAncestorSpace(*this, *view());
132 } 132 }
133 133
134 bool LayoutSVGBlock::mapToVisualRectInAncestorSpace( 134 bool LayoutSVGBlock::mapToVisualRectInAncestorSpaceInternal(
135 const LayoutBoxModelObject* ancestor, 135 const LayoutBoxModelObject* ancestor,
136 LayoutRect& rect, 136 TransformState& transformState,
137 VisualRectFlags) const { 137 VisualRectFlags) const {
138 transformState.flatten();
139 LayoutRect rect(transformState.lastPlanarQuad().boundingBox());
138 // Convert from local HTML coordinates to local SVG coordinates. 140 // Convert from local HTML coordinates to local SVG coordinates.
139 rect.moveBy(location()); 141 rect.moveBy(location());
140 // Apply other mappings on local SVG coordinates. 142 // Apply other mappings on local SVG coordinates.
141 return SVGLayoutSupport::mapToVisualRectInAncestorSpace( 143 bool retval = SVGLayoutSupport::mapToVisualRectInAncestorSpace(
142 *this, ancestor, FloatRect(rect), rect); 144 *this, ancestor, FloatRect(rect), rect);
145 transformState.setQuad(FloatQuad(FloatRect(rect)));
146 return retval;
143 } 147 }
144 148
145 bool LayoutSVGBlock::nodeAtPoint(HitTestResult&, 149 bool LayoutSVGBlock::nodeAtPoint(HitTestResult&,
146 const HitTestLocation&, 150 const HitTestLocation&,
147 const LayoutPoint&, 151 const LayoutPoint&,
148 HitTestAction) { 152 HitTestAction) {
149 ASSERT_NOT_REACHED(); 153 ASSERT_NOT_REACHED();
150 return false; 154 return false;
151 } 155 }
152 156
153 } // namespace blink 157 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.h ('k') | third_party/WebKit/Source/core/paint/PaintInvalidator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698