Diff
Modified: trunk/Source/WebCore/ChangeLog (145829 => 145830)
--- trunk/Source/WebCore/ChangeLog 2013-03-14 18:20:44 UTC (rev 145829)
+++ trunk/Source/WebCore/ChangeLog 2013-03-14 18:32:21 UTC (rev 145830)
@@ -1,3 +1,84 @@
+2013-03-12 Florin Malita <fmal...@chromium.org>
+
+ Tighten up the type bounds for SVGPropertyInfo callback parameters
+ https://bugs.webkit.org/show_bug.cgi?id=111786
+
+ Reviewed by Philip Rogers.
+
+ Update SVGPropertyInfo's callbacks to pass SVGElement* parameters instead of void*. This
+ allows us to perform some ASSERT-based type checking before downcasting in implementors.
+
+ To avoid adding virtual methods unused in release builds to the base class (and overrides
+ in descendants), for subtypes lacking polymorphic type markers (isXXX()) the check is
+ performed using hasTagName() instead.
+
+ The patch is also removing the lookupOrCreateWrapperForAnimatedProperty() SVGPropertyInfo
+ callback for SVGViewSpec properties, because
+
+ a) it doesn't appear to be reachable (SVGViewSpec doesn't have a backing element and
+ thus cannot have an associated animator)
+
+ b) it interferes with the parameter specialization described above (SVGViewSpec does not
+ inherit from SVGElement)
+
+ No new tests, refactoring only.
+
+ * svg/SVGElement.cpp:
+ (WebCore::SVGElement::synchronizeRequiredFeatures):
+ (WebCore::SVGElement::synchronizeRequiredExtensions):
+ (WebCore::SVGElement::synchronizeSystemLanguage):
+ * svg/SVGElement.h:
+ (SVGElement):
+ * svg/SVGMarkerElement.cpp:
+ (WebCore::SVGMarkerElement::synchronizeOrientType):
+ (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
+ * svg/SVGMarkerElement.h:
+ (SVGMarkerElement):
+ (WebCore::toSVGMarkerElement):
+ (WebCore):
+ * svg/SVGPathElement.cpp:
+ (WebCore::SVGPathElement::lookupOrCreateDWrapper):
+ (WebCore::SVGPathElement::synchronizeD):
+ * svg/SVGPathElement.h:
+ (SVGPathElement):
+ (WebCore::toSVGPathElement):
+ (WebCore):
+ * svg/SVGPolyElement.cpp:
+ (WebCore::SVGPolyElement::synchronizePoints):
+ (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
+ * svg/SVGPolyElement.h:
+ (SVGPolyElement):
+ (WebCore::toSVGPolyElement):
+ (WebCore):
+ * svg/SVGTextContentElement.cpp:
+ (WebCore::SVGTextContentElement::synchronizeTextLength):
+ (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
+ * svg/SVGTextContentElement.h:
+ (SVGTextContentElement):
+ (WebCore::toSVGTextContentElement):
+ (WebCore):
+ Change SVGPropertyInfo callback params to SVGElement* and replace static casts with
+ conversion wrappers. Implement conversion wrappers where needed.
+
+ * svg/SVGViewSpec.cpp:
+ (WebCore::SVGViewSpec::viewBoxPropertyInfo):
+ (WebCore::SVGViewSpec::preserveAspectRatioPropertyInfo):
+ (WebCore::SVGViewSpec::transformPropertyInfo):
+ (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
+ (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
+ (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
+ * svg/SVGViewSpec.h:
+ (SVGViewSpec):
+ Remove SVGPropertyInfo-based lookupOrCreate* callbacks and updated the methods' parameters
+ to SVGViewSpec*. Remove now-unneeded casts.
+
+ * svg/properties/SVGAnimatedPropertyMacros.h:
+ (WebCore):
+ * svg/properties/SVGPropertyInfo.h:
+ (WebCore):
+ (SVGPropertyInfo):
+ Update callback declarations.
+
2013-03-14 Jesus Sanchez-Palencia <jesus.palen...@openbossa.org>
Move platform-specific typedefs to PlatformMenuDescription.h
Modified: trunk/Source/WebCore/svg/SVGElement.cpp (145829 => 145830)
--- trunk/Source/WebCore/svg/SVGElement.cpp 2013-03-14 18:20:44 UTC (rev 145829)
+++ trunk/Source/WebCore/svg/SVGElement.cpp 2013-03-14 18:32:21 UTC (rev 145830)
@@ -562,22 +562,22 @@
return emptyMap;
}
-void SVGElement::synchronizeRequiredFeatures(void* contextElement)
+void SVGElement::synchronizeRequiredFeatures(SVGElement* contextElement)
{
ASSERT(contextElement);
- static_cast<SVGElement*>(contextElement)->synchronizeRequiredFeatures();
+ contextElement->synchronizeRequiredFeatures();
}
-void SVGElement::synchronizeRequiredExtensions(void* contextElement)
+void SVGElement::synchronizeRequiredExtensions(SVGElement* contextElement)
{
ASSERT(contextElement);
- static_cast<SVGElement*>(contextElement)->synchronizeRequiredExtensions();
+ contextElement->synchronizeRequiredExtensions();
}
-void SVGElement::synchronizeSystemLanguage(void* contextElement)
+void SVGElement::synchronizeSystemLanguage(SVGElement* contextElement)
{
ASSERT(contextElement);
- static_cast<SVGElement*>(contextElement)->synchronizeSystemLanguage();
+ contextElement->synchronizeSystemLanguage();
}
PassRefPtr<RenderStyle> SVGElement::customStyleForRenderer()
Modified: trunk/Source/WebCore/svg/SVGElement.h (145829 => 145830)
--- trunk/Source/WebCore/svg/SVGElement.h 2013-03-14 18:20:44 UTC (rev 145829)
+++ trunk/Source/WebCore/svg/SVGElement.h 2013-03-14 18:32:21 UTC (rev 145830)
@@ -97,9 +97,9 @@
virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE;
- static void synchronizeRequiredFeatures(void* contextElement);
- static void synchronizeRequiredExtensions(void* contextElement);
- static void synchronizeSystemLanguage(void* contextElement);
+ static void synchronizeRequiredFeatures(SVGElement* contextElement);
+ static void synchronizeRequiredExtensions(SVGElement* contextElement);
+ static void synchronizeSystemLanguage(SVGElement* contextElement);
virtual void synchronizeRequiredFeatures() { }
virtual void synchronizeRequiredExtensions() { }
Modified: trunk/Source/WebCore/svg/SVGMarkerElement.cpp (145829 => 145830)
--- trunk/Source/WebCore/svg/SVGMarkerElement.cpp 2013-03-14 18:20:44 UTC (rev 145829)
+++ trunk/Source/WebCore/svg/SVGMarkerElement.cpp 2013-03-14 18:32:21 UTC (rev 145830)
@@ -227,10 +227,10 @@
|| markerHeight().isRelative();
}
-void SVGMarkerElement::synchronizeOrientType(void* contextElement)
+void SVGMarkerElement::synchronizeOrientType(SVGElement* contextElement)
{
ASSERT(contextElement);
- SVGMarkerElement* ownerType = static_cast<SVGMarkerElement*>(contextElement);
+ SVGMarkerElement* ownerType = toSVGMarkerElement(contextElement);
if (!ownerType->m_orientType.shouldSynchronize)
return;
@@ -242,10 +242,10 @@
ownerType->m_orientType.synchronize(ownerType, orientTypePropertyInfo()->attributeName, autoString);
}
-PassRefPtr<SVGAnimatedProperty> SVGMarkerElement::lookupOrCreateOrientTypeWrapper(void* contextElement)
+PassRefPtr<SVGAnimatedProperty> SVGMarkerElement::lookupOrCreateOrientTypeWrapper(SVGElement* contextElement)
{
ASSERT(contextElement);
- SVGMarkerElement* ownerType = static_cast<SVGMarkerElement*>(contextElement);
+ SVGMarkerElement* ownerType = toSVGMarkerElement(contextElement);
return SVGAnimatedProperty::lookupOrCreateWrapper<SVGMarkerElement, SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType>, SVGMarkerOrientType>
(ownerType, orientTypePropertyInfo(), ownerType->m_orientType.value);
}
Modified: trunk/Source/WebCore/svg/SVGMarkerElement.h (145829 => 145830)
--- trunk/Source/WebCore/svg/SVGMarkerElement.h 2013-03-14 18:20:44 UTC (rev 145829)
+++ trunk/Source/WebCore/svg/SVGMarkerElement.h 2013-03-14 18:32:21 UTC (rev 145830)
@@ -156,8 +156,8 @@
public:
// Custom 'orientType' property.
- static void synchronizeOrientType(void* contextElement);
- static PassRefPtr<SVGAnimatedProperty> lookupOrCreateOrientTypeWrapper(void* contextElement);
+ static void synchronizeOrientType(SVGElement* contextElement);
+ static PassRefPtr<SVGAnimatedProperty> lookupOrCreateOrientTypeWrapper(SVGElement* contextElement);
SVGMarkerOrientType& orientType() const { return m_orientType.value; }
SVGMarkerOrientType& orientTypeBaseValue() const { return m_orientType.value; }
void setOrientTypeBaseValue(const SVGMarkerOrientType& type) { m_orientType.value = type; }
@@ -167,7 +167,13 @@
mutable SVGSynchronizableAnimatedProperty<SVGMarkerOrientType> m_orientType;
};
+inline SVGMarkerElement* toSVGMarkerElement(SVGElement* element)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!element || element->hasTagName(SVGNames::markerTag));
+ return static_cast<SVGMarkerElement*>(element);
}
+}
+
#endif
#endif
Modified: trunk/Source/WebCore/svg/SVGPathElement.cpp (145829 => 145830)
--- trunk/Source/WebCore/svg/SVGPathElement.cpp 2013-03-14 18:20:44 UTC (rev 145829)
+++ trunk/Source/WebCore/svg/SVGPathElement.cpp 2013-03-14 18:32:21 UTC (rev 145830)
@@ -314,10 +314,10 @@
return static_cast<SVGAnimatedPathSegListPropertyTearOff*>(property)->animatedPathByteStream();
}
-PassRefPtr<SVGAnimatedProperty> SVGPathElement::lookupOrCreateDWrapper(void* contextElement)
+PassRefPtr<SVGAnimatedProperty> SVGPathElement::lookupOrCreateDWrapper(SVGElement* contextElement)
{
ASSERT(contextElement);
- SVGPathElement* ownerType = static_cast<SVGPathElement*>(contextElement);
+ SVGPathElement* ownerType = toSVGPathElement(contextElement);
if (SVGAnimatedProperty* property = SVGAnimatedProperty::lookupWrapper<SVGPathElement, SVGAnimatedPathSegListPropertyTearOff>(ownerType, dPropertyInfo()))
return property;
@@ -329,10 +329,10 @@
(ownerType, dPropertyInfo(), ownerType->m_pathSegList.value);
}
-void SVGPathElement::synchronizeD(void* contextElement)
+void SVGPathElement::synchronizeD(SVGElement* contextElement)
{
ASSERT(contextElement);
- SVGPathElement* ownerType = static_cast<SVGPathElement*>(contextElement);
+ SVGPathElement* ownerType = toSVGPathElement(contextElement);
if (!ownerType->m_pathSegList.shouldSynchronize)
return;
ownerType->m_pathSegList.synchronize(ownerType, dPropertyInfo()->attributeName, ownerType->m_pathSegList.value.valueAsString());
Modified: trunk/Source/WebCore/svg/SVGPathElement.h (145829 => 145830)
--- trunk/Source/WebCore/svg/SVGPathElement.h 2013-03-14 18:20:44 UTC (rev 145829)
+++ trunk/Source/WebCore/svg/SVGPathElement.h 2013-03-14 18:32:21 UTC (rev 145830)
@@ -26,6 +26,7 @@
#include "SVGAnimatedNumber.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
+#include "SVGNames.h"
#include "SVGPathByteStream.h"
#include "SVGPathSegList.h"
#include "SVGStyledTransformableElement.h"
@@ -113,8 +114,8 @@
virtual bool supportsMarkers() const { return true; }
// Custom 'd' property
- static void synchronizeD(void* contextElement);
- static PassRefPtr<SVGAnimatedProperty> lookupOrCreateDWrapper(void* contextElement);
+ static void synchronizeD(SVGElement* contextElement);
+ static PassRefPtr<SVGAnimatedProperty> lookupOrCreateDWrapper(SVGElement* contextElement);
BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGPathElement)
DECLARE_ANIMATED_NUMBER(PathLength, pathLength)
@@ -139,6 +140,12 @@
bool m_isAnimValObserved;
};
+inline SVGPathElement* toSVGPathElement(SVGElement* element)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!element || element->hasTagName(SVGNames::pathTag));
+ return static_cast<SVGPathElement*>(element);
+}
+
} // namespace WebCore
#endif // ENABLE(SVG)
Modified: trunk/Source/WebCore/svg/SVGPolyElement.cpp (145829 => 145830)
--- trunk/Source/WebCore/svg/SVGPolyElement.cpp 2013-03-14 18:20:44 UTC (rev 145829)
+++ trunk/Source/WebCore/svg/SVGPolyElement.cpp 2013-03-14 18:32:21 UTC (rev 145830)
@@ -137,19 +137,19 @@
ASSERT_NOT_REACHED();
}
-void SVGPolyElement::synchronizePoints(void* contextElement)
+void SVGPolyElement::synchronizePoints(SVGElement* contextElement)
{
ASSERT(contextElement);
- SVGPolyElement* ownerType = static_cast<SVGPolyElement*>(contextElement);
+ SVGPolyElement* ownerType = toSVGPolyElement(contextElement);
if (!ownerType->m_points.shouldSynchronize)
return;
ownerType->m_points.synchronize(ownerType, pointsPropertyInfo()->attributeName, ownerType->m_points.value.valueAsString());
}
-PassRefPtr<SVGAnimatedProperty> SVGPolyElement::lookupOrCreatePointsWrapper(void* contextElement)
+PassRefPtr<SVGAnimatedProperty> SVGPolyElement::lookupOrCreatePointsWrapper(SVGElement* contextElement)
{
ASSERT(contextElement);
- SVGPolyElement* ownerType = static_cast<SVGPolyElement*>(contextElement);
+ SVGPolyElement* ownerType = toSVGPolyElement(contextElement);
return SVGAnimatedProperty::lookupOrCreateWrapper<SVGPolyElement, SVGAnimatedPointList, SVGPointList>
(ownerType, pointsPropertyInfo(), ownerType->m_points.value);
}
Modified: trunk/Source/WebCore/svg/SVGPolyElement.h (145829 => 145830)
--- trunk/Source/WebCore/svg/SVGPolyElement.h 2013-03-14 18:20:44 UTC (rev 145829)
+++ trunk/Source/WebCore/svg/SVGPolyElement.h 2013-03-14 18:32:21 UTC (rev 145830)
@@ -25,6 +25,7 @@
#include "SVGAnimatedBoolean.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
+#include "SVGNames.h"
#include "SVGPointList.h"
#include "SVGStyledTransformableElement.h"
#include "SVGTests.h"
@@ -57,8 +58,8 @@
virtual bool supportsMarkers() const { return true; }
// Custom 'points' property
- static void synchronizePoints(void* contextElement);
- static PassRefPtr<SVGAnimatedProperty> lookupOrCreatePointsWrapper(void* contextElement);
+ static void synchronizePoints(SVGElement* contextElement);
+ static PassRefPtr<SVGAnimatedProperty> lookupOrCreatePointsWrapper(SVGElement* contextElement);
BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGPolyElement)
DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired)
@@ -73,6 +74,12 @@
mutable SVGSynchronizableAnimatedProperty<SVGPointList> m_points;
};
+inline SVGPolyElement* toSVGPolyElement(SVGElement* element)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!element || element->hasTagName(SVGNames::polygonTag) || element->hasTagName(SVGNames::polylineTag));
+ return static_cast<SVGPolyElement*>(element);
+}
+
} // namespace WebCore
#endif // ENABLE(SVG)
Modified: trunk/Source/WebCore/svg/SVGTextContentElement.cpp (145829 => 145830)
--- trunk/Source/WebCore/svg/SVGTextContentElement.cpp 2013-03-14 18:20:44 UTC (rev 145829)
+++ trunk/Source/WebCore/svg/SVGTextContentElement.cpp 2013-03-14 18:32:21 UTC (rev 145830)
@@ -74,20 +74,20 @@
registerAnimatedPropertiesForSVGTextContentElement();
}
-void SVGTextContentElement::synchronizeTextLength(void* contextElement)
+void SVGTextContentElement::synchronizeTextLength(SVGElement* contextElement)
{
ASSERT(contextElement);
- SVGTextContentElement* ownerType = static_cast<SVGTextContentElement*>(contextElement);
+ SVGTextContentElement* ownerType = toSVGTextContentElement(contextElement);
if (!ownerType->m_textLength.shouldSynchronize)
return;
AtomicString value(SVGPropertyTraits<SVGLength>::toString(ownerType->m_specifiedTextLength));
ownerType->m_textLength.synchronize(ownerType, textLengthPropertyInfo()->attributeName, value);
}
-PassRefPtr<SVGAnimatedProperty> SVGTextContentElement::lookupOrCreateTextLengthWrapper(void* contextElement)
+PassRefPtr<SVGAnimatedProperty> SVGTextContentElement::lookupOrCreateTextLengthWrapper(SVGElement* contextElement)
{
ASSERT(contextElement);
- SVGTextContentElement* ownerType = static_cast<SVGTextContentElement*>(contextElement);
+ SVGTextContentElement* ownerType = toSVGTextContentElement(contextElement);
return SVGAnimatedProperty::lookupOrCreateWrapper<SVGTextContentElement, SVGAnimatedLength, SVGLength>
(ownerType, textLengthPropertyInfo(), ownerType->m_textLength.value);
}
Modified: trunk/Source/WebCore/svg/SVGTextContentElement.h (145829 => 145830)
--- trunk/Source/WebCore/svg/SVGTextContentElement.h 2013-03-14 18:20:44 UTC (rev 145829)
+++ trunk/Source/WebCore/svg/SVGTextContentElement.h 2013-03-14 18:32:21 UTC (rev 145830)
@@ -114,8 +114,8 @@
virtual bool isTextContent() const { return true; }
// Custom 'textLength' property
- static void synchronizeTextLength(void* contextElement);
- static PassRefPtr<SVGAnimatedProperty> lookupOrCreateTextLengthWrapper(void* contextElement);
+ static void synchronizeTextLength(SVGElement* contextElement);
+ static PassRefPtr<SVGAnimatedProperty> lookupOrCreateTextLengthWrapper(SVGElement* contextElement);
mutable SVGSynchronizableAnimatedProperty<SVGLength> m_textLength;
SVGLength m_specifiedTextLength;
@@ -130,6 +130,12 @@
virtual void synchronizeSystemLanguage() { SVGTests::synchronizeSystemLanguage(this); }
};
+inline SVGTextContentElement* toSVGTextContentElement(SVGElement* element)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!element || element->isTextContent());
+ return static_cast<SVGTextContentElement*>(element);
+}
+
} // namespace WebCore
#endif // ENABLE(SVG)
Modified: trunk/Source/WebCore/svg/SVGViewSpec.cpp (145829 => 145830)
--- trunk/Source/WebCore/svg/SVGViewSpec.cpp 2013-03-14 18:20:44 UTC (rev 145829)
+++ trunk/Source/WebCore/svg/SVGViewSpec.cpp 2013-03-14 18:32:21 UTC (rev 145830)
@@ -42,7 +42,7 @@
SVGNames::viewBoxAttr,
viewBoxIdentifier(),
0,
- &SVGViewSpec::lookupOrCreateViewBoxWrapper);
+ 0);
}
return s_propertyInfo;
}
@@ -57,7 +57,7 @@
SVGNames::preserveAspectRatioAttr,
preserveAspectRatioIdentifier(),
0,
- &SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper);
+ 0);
}
return s_propertyInfo;
}
@@ -73,7 +73,7 @@
SVGNames::transformAttr,
transformIdentifier(),
0,
- &SVGViewSpec::lookupOrCreateTransformWrapper);
+ 0);
}
return s_propertyInfo;
}
@@ -170,26 +170,23 @@
return static_pointer_cast<SVGAnimatedPreserveAspectRatio>(lookupOrCreatePreserveAspectRatioWrapper(this));
}
-PassRefPtr<SVGAnimatedProperty> SVGViewSpec::lookupOrCreateViewBoxWrapper(void* maskedOwnerType)
+PassRefPtr<SVGAnimatedProperty> SVGViewSpec::lookupOrCreateViewBoxWrapper(SVGViewSpec* ownerType)
{
- ASSERT(maskedOwnerType);
- SVGViewSpec* ownerType = static_cast<SVGViewSpec*>(maskedOwnerType);
+ ASSERT(ownerType);
ASSERT(ownerType->contextElement());
return SVGAnimatedProperty::lookupOrCreateWrapper<SVGElement, SVGAnimatedRect, FloatRect>(ownerType->contextElement(), viewBoxPropertyInfo(), ownerType->m_viewBox);
}
-PassRefPtr<SVGAnimatedProperty> SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper(void* maskedOwnerType)
+PassRefPtr<SVGAnimatedProperty> SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper(SVGViewSpec* ownerType)
{
- ASSERT(maskedOwnerType);
- SVGViewSpec* ownerType = static_cast<SVGViewSpec*>(maskedOwnerType);
+ ASSERT(ownerType);
ASSERT(ownerType->contextElement());
return SVGAnimatedProperty::lookupOrCreateWrapper<SVGElement, SVGAnimatedPreserveAspectRatio, SVGPreserveAspectRatio>(ownerType->contextElement(), preserveAspectRatioPropertyInfo(), ownerType->m_preserveAspectRatio);
}
-PassRefPtr<SVGAnimatedProperty> SVGViewSpec::lookupOrCreateTransformWrapper(void* maskedOwnerType)
+PassRefPtr<SVGAnimatedProperty> SVGViewSpec::lookupOrCreateTransformWrapper(SVGViewSpec* ownerType)
{
- ASSERT(maskedOwnerType);
- SVGViewSpec* ownerType = static_cast<SVGViewSpec*>(maskedOwnerType);
+ ASSERT(ownerType);
ASSERT(ownerType->contextElement());
return SVGAnimatedProperty::lookupOrCreateWrapper<SVGElement, SVGAnimatedTransformList, SVGTransformList>(ownerType->contextElement(), transformPropertyInfo(), ownerType->m_transform);
}
Modified: trunk/Source/WebCore/svg/SVGViewSpec.h (145829 => 145830)
--- trunk/Source/WebCore/svg/SVGViewSpec.h 2013-03-14 18:20:44 UTC (rev 145829)
+++ trunk/Source/WebCore/svg/SVGViewSpec.h 2013-03-14 18:32:21 UTC (rev 145830)
@@ -95,9 +95,9 @@
static const AtomicString& viewBoxIdentifier();
static const AtomicString& preserveAspectRatioIdentifier();
- static PassRefPtr<SVGAnimatedProperty> lookupOrCreateTransformWrapper(void* contextElement);
- static PassRefPtr<SVGAnimatedProperty> lookupOrCreateViewBoxWrapper(void* contextElement);
- static PassRefPtr<SVGAnimatedProperty> lookupOrCreatePreserveAspectRatioWrapper(void* contextElement);
+ static PassRefPtr<SVGAnimatedProperty> lookupOrCreateTransformWrapper(SVGViewSpec* contextElement);
+ static PassRefPtr<SVGAnimatedProperty> lookupOrCreateViewBoxWrapper(SVGViewSpec* contextElement);
+ static PassRefPtr<SVGAnimatedProperty> lookupOrCreatePreserveAspectRatioWrapper(SVGViewSpec* contextElement);
SVGElement* m_contextElement;
SVGZoomAndPanType m_zoomAndPan;
Modified: trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyMacros.h (145829 => 145830)
--- trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyMacros.h 2013-03-14 18:20:44 UTC (rev 145829)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyMacros.h 2013-03-14 18:32:21 UTC (rev 145830)
@@ -145,14 +145,14 @@
m_##LowerProperty.synchronize(this, LowerProperty##PropertyInfo()->attributeName, value); \
} \
\
- static PassRefPtr<SVGAnimatedProperty> lookupOrCreate##UpperProperty##Wrapper(void* maskedOwnerType) \
+ static PassRefPtr<SVGAnimatedProperty> lookupOrCreate##UpperProperty##Wrapper(SVGElement* maskedOwnerType) \
{ \
ASSERT(maskedOwnerType); \
UseOwnerType* ownerType = static_cast<UseOwnerType*>(maskedOwnerType); \
return SVGAnimatedProperty::lookupOrCreateWrapper<UseOwnerType, TearOffType, PropertyType>(ownerType, LowerProperty##PropertyInfo(), ownerType->m_##LowerProperty.value); \
} \
\
- static void synchronize##UpperProperty(void* maskedOwnerType) \
+ static void synchronize##UpperProperty(SVGElement* maskedOwnerType) \
{ \
ASSERT(maskedOwnerType); \
UseOwnerType* ownerType = static_cast<UseOwnerType*>(maskedOwnerType); \
Modified: trunk/Source/WebCore/svg/properties/SVGPropertyInfo.h (145829 => 145830)
--- trunk/Source/WebCore/svg/properties/SVGPropertyInfo.h 2013-03-14 18:20:44 UTC (rev 145829)
+++ trunk/Source/WebCore/svg/properties/SVGPropertyInfo.h 2013-03-14 18:32:21 UTC (rev 145830)
@@ -27,6 +27,7 @@
namespace WebCore {
class SVGAnimatedProperty;
+class SVGElement;
enum AnimatedPropertyState {
PropertyIsReadWrite,
@@ -57,8 +58,8 @@
struct SVGPropertyInfo {
WTF_MAKE_FAST_ALLOCATED;
public:
- typedef void (*SynchronizeProperty)(void*);
- typedef PassRefPtr<SVGAnimatedProperty> (*LookupOrCreateWrapperForAnimatedProperty)(void*);
+ typedef void (*SynchronizeProperty)(SVGElement*);
+ typedef PassRefPtr<SVGAnimatedProperty> (*LookupOrCreateWrapperForAnimatedProperty)(SVGElement*);
SVGPropertyInfo(AnimatedPropertyType newType, AnimatedPropertyState newState, const QualifiedName& newAttributeName,
const AtomicString& newPropertyIdentifier, SynchronizeProperty newSynchronizeProperty,