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

Side by Side Diff: Source/core/svg/SVGSVGElement.h

Issue 26390004: Rework SVG sizing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix mishap during rebase in svg.css Created 6 years, 8 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) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Rob Buis <buis@kde.org>
4 * Copyright (C) 2014 Google, Inc. 4 * Copyright (C) 2014 Google, Inc.
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 PassRefPtr<SVGRectTearOff> viewport() const; 55 PassRefPtr<SVGRectTearOff> viewport() const;
56 56
57 float pixelUnitToMillimeterX() const; 57 float pixelUnitToMillimeterX() const;
58 float pixelUnitToMillimeterY() const; 58 float pixelUnitToMillimeterY() const;
59 float screenPixelToMillimeterX() const; 59 float screenPixelToMillimeterX() const;
60 float screenPixelToMillimeterY() const; 60 float screenPixelToMillimeterY() const;
61 61
62 bool useCurrentView() const { return m_useCurrentView; } 62 bool useCurrentView() const { return m_useCurrentView; }
63 SVGViewSpec* currentView(); 63 SVGViewSpec* currentView();
64 64
65 enum ConsiderCSSMode { 65 Length intrinsicWidth() const;
66 RespectCSSProperties, 66 Length intrinsicHeight() const;
67 IgnoreCSSProperties
68 };
69
70 // RenderSVGRoot wants to query the intrinsic size, by only examining the wi dth/height attributes.
71 Length intrinsicWidth(ConsiderCSSMode = RespectCSSProperties) const;
72 Length intrinsicHeight(ConsiderCSSMode = RespectCSSProperties) const;
73 FloatSize currentViewportSize() const; 67 FloatSize currentViewportSize() const;
74 FloatRect currentViewBoxRect() const; 68 FloatRect currentViewBoxRect() const;
75 69
76 float currentScale() const; 70 float currentScale() const;
77 void setCurrentScale(float scale); 71 void setCurrentScale(float scale);
78 72
79 FloatPoint currentTranslate() { return m_translation->value(); } 73 FloatPoint currentTranslate() { return m_translation->value(); }
80 void setCurrentTranslate(const FloatPoint&); 74 void setCurrentTranslate(const FloatPoint&);
81 PassRefPtr<SVGPointTearOff> currentTranslateFromJavascript(); 75 PassRefPtr<SVGPointTearOff> currentTranslateFromJavascript();
82 76
(...skipping 26 matching lines...) Expand all
109 static PassRefPtr<SVGRectTearOff> createSVGRect(); 103 static PassRefPtr<SVGRectTearOff> createSVGRect();
110 static PassRefPtr<SVGTransformTearOff> createSVGTransform(); 104 static PassRefPtr<SVGTransformTearOff> createSVGTransform();
111 static PassRefPtr<SVGTransformTearOff> createSVGTransformFromMatrix(PassRefP tr<SVGMatrixTearOff>); 105 static PassRefPtr<SVGTransformTearOff> createSVGTransformFromMatrix(PassRefP tr<SVGMatrixTearOff>);
112 106
113 AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) co nst; 107 AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) co nst;
114 108
115 void setupInitialView(const String& fragmentIdentifier, Element* anchorNode) ; 109 void setupInitialView(const String& fragmentIdentifier, Element* anchorNode) ;
116 110
117 Element* getElementById(const AtomicString&) const; 111 Element* getElementById(const AtomicString&) const;
118 112
119 bool widthAttributeEstablishesViewport() const; 113 bool hasIntrinsicWidth() const;
120 bool heightAttributeEstablishesViewport() const; 114 bool hasIntrinsicHeight() const;
121 115
122 SVGAnimatedLength* x() const { return m_x.get(); } 116 SVGAnimatedLength* x() const { return m_x.get(); }
123 SVGAnimatedLength* y() const { return m_y.get(); } 117 SVGAnimatedLength* y() const { return m_y.get(); }
124 SVGAnimatedLength* width() const { return m_width.get(); } 118 SVGAnimatedLength* width() const { return m_width.get(); }
125 SVGAnimatedLength* height() const { return m_height.get(); } 119 SVGAnimatedLength* height() const { return m_height.get(); }
126 120
127 private: 121 private:
128 explicit SVGSVGElement(Document&); 122 explicit SVGSVGElement(Document&);
129 virtual ~SVGSVGElement(); 123 virtual ~SVGSVGElement();
130 124
131 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 125 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
126 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
127 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE;
132 128
133 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; 129 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
134 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; 130 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE;
135 131
136 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 132 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
137 virtual void removedFrom(ContainerNode*) OVERRIDE; 133 virtual void removedFrom(ContainerNode*) OVERRIDE;
138 134
139 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; 135 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
140 136
141 virtual bool selfHasRelativeLengths() const OVERRIDE; 137 virtual bool selfHasRelativeLengths() const OVERRIDE;
(...skipping 21 matching lines...) Expand all
163 RefPtr<SMILTimeContainer> m_timeContainer; 159 RefPtr<SMILTimeContainer> m_timeContainer;
164 RefPtr<SVGPoint> m_translation; 160 RefPtr<SVGPoint> m_translation;
165 RefPtr<SVGViewSpec> m_viewSpec; 161 RefPtr<SVGViewSpec> m_viewSpec;
166 162
167 friend class SVGCurrentTranslateTearOff; 163 friend class SVGCurrentTranslateTearOff;
168 }; 164 };
169 165
170 } // namespace WebCore 166 } // namespace WebCore
171 167
172 #endif 168 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698