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

Unified Diff: Source/core/svg/SVGSVGElement.cpp

Issue 19096011: Get rid of SVGRect special case from the bindings generator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/SVGSVGElement.h ('k') | Source/core/svg/SVGTextContentElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGSVGElement.cpp
diff --git a/Source/core/svg/SVGSVGElement.cpp b/Source/core/svg/SVGSVGElement.cpp
index a2f7aba03353c57ff1f8cb4906832059dd5dda78..4b8be973add28fe067a88e0afdbe2146684549fd 100644
--- a/Source/core/svg/SVGSVGElement.cpp
+++ b/Source/core/svg/SVGSVGElement.cpp
@@ -131,11 +131,11 @@ void SVGSVGElement::setContentStyleType(const AtomicString& type)
setAttribute(SVGNames::contentStyleTypeAttr, type);
}
-FloatRect SVGSVGElement::viewport() const
+SVGRect SVGSVGElement::viewport() const
{
// FIXME: This method doesn't follow the spec and is basically untested. Parent documents are not considered here.
// As we have no test coverage for this, we're going to disable it completly for now.
- return FloatRect();
+ return SVGRect();
}
float SVGSVGElement::pixelUnitToMillimeterX() const
@@ -327,7 +327,7 @@ void SVGSVGElement::forceRedraw()
// FIXME: Implement me (see bug 11275)
}
-PassRefPtr<NodeList> SVGSVGElement::collectIntersectionOrEnclosureList(const FloatRect& rect, SVGElement* referenceElement, CollectIntersectionOrEnclosure collect) const
+PassRefPtr<NodeList> SVGSVGElement::collectIntersectionOrEnclosureList(const SVGRect& rect, SVGElement* referenceElement, CollectIntersectionOrEnclosure collect) const
{
Vector<RefPtr<Node> > nodes;
Element* element = ElementTraversal::next(referenceElement ? referenceElement : this);
@@ -348,24 +348,24 @@ PassRefPtr<NodeList> SVGSVGElement::collectIntersectionOrEnclosureList(const Flo
return StaticNodeList::adopt(nodes);
}
-PassRefPtr<NodeList> SVGSVGElement::getIntersectionList(const FloatRect& rect, SVGElement* referenceElement) const
+PassRefPtr<NodeList> SVGSVGElement::getIntersectionList(const SVGRect& rect, SVGElement* referenceElement) const
{
return collectIntersectionOrEnclosureList(rect, referenceElement, CollectIntersectionList);
}
-PassRefPtr<NodeList> SVGSVGElement::getEnclosureList(const FloatRect& rect, SVGElement* referenceElement) const
+PassRefPtr<NodeList> SVGSVGElement::getEnclosureList(const SVGRect& rect, SVGElement* referenceElement) const
{
return collectIntersectionOrEnclosureList(rect, referenceElement, CollectEnclosureList);
}
-bool SVGSVGElement::checkIntersection(SVGElement* element, const FloatRect& rect) const
+bool SVGSVGElement::checkIntersection(SVGElement* element, const SVGRect& rect) const
{
if (!element)
return false;
return RenderSVGModelObject::checkIntersection(element->renderer(), rect);
}
-bool SVGSVGElement::checkEnclosure(SVGElement* element, const FloatRect& rect) const
+bool SVGSVGElement::checkEnclosure(SVGElement* element, const SVGRect& rect) const
{
if (!element)
return false;
@@ -403,9 +403,9 @@ SVGMatrix SVGSVGElement::createSVGMatrix()
return SVGMatrix();
}
-FloatRect SVGSVGElement::createSVGRect()
+SVGRect SVGSVGElement::createSVGRect()
{
- return FloatRect();
+ return SVGRect();
}
SVGTransform SVGSVGElement::createSVGTransform()
@@ -544,27 +544,27 @@ bool SVGSVGElement::selfHasRelativeLengths() const
|| hasAttribute(SVGNames::viewBoxAttr);
}
-FloatRect SVGSVGElement::currentViewBoxRect() const
+SVGRect SVGSVGElement::currentViewBoxRect() const
{
if (m_useCurrentView)
- return m_viewSpec ? m_viewSpec->viewBoxCurrentValue() : FloatRect();
+ return m_viewSpec ? m_viewSpec->viewBoxCurrentValue() : SVGRect();
FloatRect useViewBox = viewBoxCurrentValue();
if (!useViewBox.isEmpty())
return useViewBox;
if (!renderer() || !renderer()->isSVGRoot())
- return FloatRect();
+ return SVGRect();
if (!toRenderSVGRoot(renderer())->isEmbeddedThroughSVGImage())
- return FloatRect();
+ return SVGRect();
Length intrinsicWidth = this->intrinsicWidth();
Length intrinsicHeight = this->intrinsicHeight();
if (!intrinsicWidth.isFixed() || !intrinsicHeight.isFixed())
- return FloatRect();
+ return SVGRect();
// If no viewBox is specified but non-relative width/height values, then we
// should always synthesize a viewBox if we're embedded through a SVGImage.
- return FloatRect(FloatPoint(), FloatSize(floatValueForLength(intrinsicWidth, 0), floatValueForLength(intrinsicHeight, 0)));
+ return SVGRect(FloatPoint(), FloatSize(floatValueForLength(intrinsicWidth, 0), floatValueForLength(intrinsicHeight, 0)));
}
FloatSize SVGSVGElement::currentViewportSize() const
« no previous file with comments | « Source/core/svg/SVGSVGElement.h ('k') | Source/core/svg/SVGTextContentElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698