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

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

Issue 132233010: [SVG] SVGAnimatedRect migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebsaed Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2009, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 return renderer->isSVGShape() || renderer->isSVGText() || renderer->isSVGIma ge() || renderer->node()->hasTagName(SVGNames::useTag); 168 return renderer->isSVGShape() || renderer->isSVGText() || renderer->isSVGIma ge() || renderer->node()->hasTagName(SVGNames::useTag);
169 } 169 }
170 170
171 // The SVG addFocusRingRects() method adds rects in local coordinates so the def ault absoluteFocusRingQuads 171 // The SVG addFocusRingRects() method adds rects in local coordinates so the def ault absoluteFocusRingQuads
172 // returns incorrect values for SVG objects. Overriding this method provides acc ess to the absolute bounds. 172 // returns incorrect values for SVG objects. Overriding this method provides acc ess to the absolute bounds.
173 void RenderSVGModelObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads) 173 void RenderSVGModelObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads)
174 { 174 {
175 quads.append(localToAbsoluteQuad(FloatQuad(repaintRectInLocalCoordinates())) ); 175 quads.append(localToAbsoluteQuad(FloatQuad(repaintRectInLocalCoordinates())) );
176 } 176 }
177 177
178 bool RenderSVGModelObject::checkIntersection(RenderObject* renderer, const SVGRe ct& rect) 178 bool RenderSVGModelObject::checkIntersection(RenderObject* renderer, const Float Rect& rect)
179 { 179 {
180 if (!renderer || renderer->style()->pointerEvents() == PE_NONE) 180 if (!renderer || renderer->style()->pointerEvents() == PE_NONE)
181 return false; 181 return false;
182 if (!isGraphicsElement(renderer)) 182 if (!isGraphicsElement(renderer))
183 return false; 183 return false;
184 AffineTransform ctm; 184 AffineTransform ctm;
185 SVGGraphicsElement* svgElement = toSVGGraphicsElement(renderer->node()); 185 SVGGraphicsElement* svgElement = toSVGGraphicsElement(renderer->node());
186 getElementCTM(svgElement, ctm); 186 getElementCTM(svgElement, ctm);
187 ASSERT(svgElement->renderer()); 187 ASSERT(svgElement->renderer());
188 return intersectsAllowingEmpty(rect, ctm.mapRect(svgElement->renderer()->rep aintRectInLocalCoordinates())); 188 return intersectsAllowingEmpty(rect, ctm.mapRect(svgElement->renderer()->rep aintRectInLocalCoordinates()));
189 } 189 }
190 190
191 bool RenderSVGModelObject::checkEnclosure(RenderObject* renderer, const SVGRect& rect) 191 bool RenderSVGModelObject::checkEnclosure(RenderObject* renderer, const FloatRec t& rect)
192 { 192 {
193 if (!renderer || renderer->style()->pointerEvents() == PE_NONE) 193 if (!renderer || renderer->style()->pointerEvents() == PE_NONE)
194 return false; 194 return false;
195 if (!isGraphicsElement(renderer)) 195 if (!isGraphicsElement(renderer))
196 return false; 196 return false;
197 AffineTransform ctm; 197 AffineTransform ctm;
198 SVGGraphicsElement* svgElement = toSVGGraphicsElement(renderer->node()); 198 SVGGraphicsElement* svgElement = toSVGGraphicsElement(renderer->node());
199 getElementCTM(svgElement, ctm); 199 getElementCTM(svgElement, ctm);
200 ASSERT(svgElement->renderer()); 200 ASSERT(svgElement->renderer());
201 return rect.contains(ctm.mapRect(svgElement->renderer()->repaintRectInLocalC oordinates())); 201 return rect.contains(ctm.mapRect(svgElement->renderer()->repaintRectInLocalC oordinates()));
202 } 202 }
203 203
204 } // namespace WebCore 204 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGModelObject.h ('k') | Source/core/rendering/svg/RenderSVGResourceMarker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698