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

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

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/SVGRectTearOff.cpp ('k') | Source/core/svg/SVGSVGElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGSVGElement.h
diff --git a/Source/core/svg/SVGSVGElement.h b/Source/core/svg/SVGSVGElement.h
index 6bd4a590ab2d321ac62eeffe0e45873a649044d4..1992e32c2888bb34741c928cd9ec333104bfc4b7 100644
--- a/Source/core/svg/SVGSVGElement.h
+++ b/Source/core/svg/SVGSVGElement.h
@@ -58,7 +58,7 @@ public:
const AtomicString& contentStyleType() const;
void setContentStyleType(const AtomicString& type);
- SVGRect viewport() const;
+ PassRefPtr<SVGRectTearOff> viewport() const;
float pixelUnitToMillimeterX() const;
float pixelUnitToMillimeterY() const;
@@ -77,7 +77,7 @@ public:
Length intrinsicWidth(ConsiderCSSMode = RespectCSSProperties) const;
Length intrinsicHeight(ConsiderCSSMode = RespectCSSProperties) const;
FloatSize currentViewportSize() const;
- SVGRect currentViewBoxRect() const;
+ FloatRect currentViewBoxRect() const;
float currentScale() const;
void setCurrentScale(float scale);
@@ -102,10 +102,10 @@ public:
void unsuspendRedrawAll();
void forceRedraw();
- PassRefPtr<NodeList> getIntersectionList(const SVGRect&, SVGElement* referenceElement) const;
- PassRefPtr<NodeList> getEnclosureList(const SVGRect&, SVGElement* referenceElement) const;
- bool checkIntersection(SVGElement*, const SVGRect&) const;
- bool checkEnclosure(SVGElement*, const SVGRect&) const;
+ PassRefPtr<NodeList> getIntersectionList(PassRefPtr<SVGRectTearOff>, SVGElement* referenceElement) const;
+ PassRefPtr<NodeList> getEnclosureList(PassRefPtr<SVGRectTearOff>, SVGElement* referenceElement) const;
+ bool checkIntersection(SVGElement*, PassRefPtr<SVGRectTearOff>) const;
+ bool checkEnclosure(SVGElement*, PassRefPtr<SVGRectTearOff>) const;
void deselectAll();
static float createSVGNumber();
@@ -113,7 +113,7 @@ public:
static SVGAngle createSVGAngle();
static SVGPoint createSVGPoint();
static SVGMatrix createSVGMatrix();
- static SVGRect createSVGRect();
+ static PassRefPtr<SVGRectTearOff> createSVGRect();
static SVGTransform createSVGTransform();
static SVGTransform createSVGTransformFromMatrix(const SVGMatrix&);
@@ -129,12 +129,13 @@ public:
SVGZoomAndPanType zoomAndPan() const { return m_zoomAndPan; }
void setZoomAndPan(unsigned short zoomAndPan) { m_zoomAndPan = SVGZoomAndPan::parseFromNumber(zoomAndPan); }
- bool hasEmptyViewBox() const { return viewBoxCurrentValue().isValid() && viewBoxCurrentValue().isEmpty(); }
+ bool hasEmptyViewBox() const { return m_viewBox->currentValue()->isValid() && m_viewBox->currentValue()->value().isEmpty(); }
SVGAnimatedLength* x() const { return m_x.get(); }
SVGAnimatedLength* y() const { return m_y.get(); }
SVGAnimatedLength* width() const { return m_width.get(); }
SVGAnimatedLength* height() const { return m_height.get(); }
+ SVGAnimatedRect* viewBox() const { return m_viewBox.get(); }
private:
explicit SVGSVGElement(Document&);
@@ -161,14 +162,14 @@ private:
CollectEnclosureList
};
- PassRefPtr<NodeList> collectIntersectionOrEnclosureList(const SVGRect&, SVGElement*, CollectIntersectionOrEnclosure) const;
+ PassRefPtr<NodeList> collectIntersectionOrEnclosureList(const FloatRect&, SVGElement*, CollectIntersectionOrEnclosure) const;
RefPtr<SVGAnimatedLength> m_x;
RefPtr<SVGAnimatedLength> m_y;
RefPtr<SVGAnimatedLength> m_width;
RefPtr<SVGAnimatedLength> m_height;
+ RefPtr<SVGAnimatedRect> m_viewBox;
BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGSVGElement)
- DECLARE_ANIMATED_RECT(ViewBox, viewBox)
DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspectRatio)
END_DECLARE_ANIMATED_PROPERTIES
« no previous file with comments | « Source/core/svg/SVGRectTearOff.cpp ('k') | Source/core/svg/SVGSVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698