- Revision
- 140056
- Author
- commit-qu...@webkit.org
- Date
- 2013-01-17 15:08:43 -0800 (Thu, 17 Jan 2013)
Log Message
Unreviewed, rolling out r140049.
http://trac.webkit.org/changeset/140049
https://bugs.webkit.org/show_bug.cgi?id=107187
Breaks lots of stuff (Requested by schenney on #webkit).
Patch by Sheriff Bot <webkit.review....@gmail.com> on 2013-01-17
Source/WebCore:
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::setPreserveAspectRatioString):
(WebCore):
(WebCore::SVGViewSpec::viewTarget):
(WebCore::SVGViewSpec::transform):
(WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
(WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
(WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
* svg/SVGViewSpec.h:
(SVGViewSpec):
(WebCore::SVGViewSpec::viewBoxAnimated):
(WebCore::SVGViewSpec::preserveAspectRatioAnimated):
* svg/SVGViewSpec.idl:
LayoutTests:
* svg/dom/SVGViewSpec-invalid-ref-crash-expected.txt: Removed.
* svg/dom/SVGViewSpec-invalid-ref-crash.html: Removed.
Modified Paths
Removed Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (140055 => 140056)
--- trunk/LayoutTests/ChangeLog 2013-01-17 23:06:00 UTC (rev 140055)
+++ trunk/LayoutTests/ChangeLog 2013-01-17 23:08:43 UTC (rev 140056)
@@ -1,3 +1,14 @@
+2013-01-17 Sheriff Bot <webkit.review....@gmail.com>
+
+ Unreviewed, rolling out r140049.
+ http://trac.webkit.org/changeset/140049
+ https://bugs.webkit.org/show_bug.cgi?id=107187
+
+ Breaks lots of stuff (Requested by schenney on #webkit).
+
+ * svg/dom/SVGViewSpec-invalid-ref-crash-expected.txt: Removed.
+ * svg/dom/SVGViewSpec-invalid-ref-crash.html: Removed.
+
2013-01-17 Stephen Chenney <schen...@chromium.org>
SVGViewSpec fails when corresponding element has been removed
Deleted: trunk/LayoutTests/svg/dom/SVGViewSpec-invalid-ref-crash-expected.txt (140055 => 140056)
--- trunk/LayoutTests/svg/dom/SVGViewSpec-invalid-ref-crash-expected.txt 2013-01-17 23:06:00 UTC (rev 140055)
+++ trunk/LayoutTests/svg/dom/SVGViewSpec-invalid-ref-crash-expected.txt 2013-01-17 23:08:43 UTC (rev 140056)
@@ -1,13 +0,0 @@
-Confirm that exceptions are thrown, or empty string returned, when an SVGViewSpec is used after its corresponding element has been removed.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS viewPreserveAspectRatio = svgView.preserveAspectRatio; threw exception Error: InvalidStateError: DOM Exception 11.
-PASS viewTransform = svgView.transform; is null
-PASS viewViewTarget = svgView.viewTarget; threw exception Error: InvalidStateError: DOM Exception 11.
-PASS viewViewBox = svgView.viewBox; threw exception Error: InvalidStateError: DOM Exception 11.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/svg/dom/SVGViewSpec-invalid-ref-crash.html (140055 => 140056)
--- trunk/LayoutTests/svg/dom/SVGViewSpec-invalid-ref-crash.html 2013-01-17 23:06:00 UTC (rev 140055)
+++ trunk/LayoutTests/svg/dom/SVGViewSpec-invalid-ref-crash.html 2013-01-17 23:08:43 UTC (rev 140056)
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<script src=""
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<div id="container"><svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"/></div>
-<script>
- description("Confirm that exceptions are thrown, or empty string returned, when an SVGViewSpec is used after its corresponding element has been removed.");
-
- successfullyParsed = false;
-
- var svgView = document.getElementById("container").childNodes[0].currentView;
- document.getElementById("container").removeChild(document.getElementById("container").childNodes[0]);
-
- gc();
-
- shouldThrow("viewPreserveAspectRatio = svgView.preserveAspectRatio;");
- shouldBeNull("viewTransform = svgView.transform;");
- shouldThrow("viewViewTarget = svgView.viewTarget;");
- shouldThrow("viewViewBox = svgView.viewBox;");
-
- successfullyParsed = true;
-
-</script>
-<script src=""
-</body>
-</html>
Modified: trunk/Source/WebCore/ChangeLog (140055 => 140056)
--- trunk/Source/WebCore/ChangeLog 2013-01-17 23:06:00 UTC (rev 140055)
+++ trunk/Source/WebCore/ChangeLog 2013-01-17 23:08:43 UTC (rev 140056)
@@ -1,3 +1,25 @@
+2013-01-17 Sheriff Bot <webkit.review....@gmail.com>
+
+ Unreviewed, rolling out r140049.
+ http://trac.webkit.org/changeset/140049
+ https://bugs.webkit.org/show_bug.cgi?id=107187
+
+ Breaks lots of stuff (Requested by schenney on #webkit).
+
+ * svg/SVGViewSpec.cpp:
+ (WebCore::SVGViewSpec::setPreserveAspectRatioString):
+ (WebCore):
+ (WebCore::SVGViewSpec::viewTarget):
+ (WebCore::SVGViewSpec::transform):
+ (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
+ (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
+ (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
+ * svg/SVGViewSpec.h:
+ (SVGViewSpec):
+ (WebCore::SVGViewSpec::viewBoxAnimated):
+ (WebCore::SVGViewSpec::preserveAspectRatioAnimated):
+ * svg/SVGViewSpec.idl:
+
2013-01-17 Eric Seidel <e...@webkit.org>
Threaded parser hangs when encountering an unmatched </script> tag
Modified: trunk/Source/WebCore/svg/SVGViewSpec.cpp (140055 => 140056)
--- trunk/Source/WebCore/svg/SVGViewSpec.cpp 2013-01-17 23:06:00 UTC (rev 140055)
+++ trunk/Source/WebCore/svg/SVGViewSpec.cpp 2013-01-17 23:08:43 UTC (rev 140056)
@@ -133,51 +133,35 @@
return SVGPropertyTraits<FloatRect>::toString(viewBoxBaseValue());
}
+void SVGViewSpec::setPreserveAspectRatioString(const String& preserve)
+{
+ SVGPreserveAspectRatio preserveAspectRatio;
+ preserveAspectRatio.parse(preserve);
+ setPreserveAspectRatioBaseValue(preserveAspectRatio);
+}
+
String SVGViewSpec::preserveAspectRatioString() const
{
return SVGPropertyTraits<SVGPreserveAspectRatio>::toString(preserveAspectRatioBaseValue());
}
-SVGElement* SVGViewSpec::viewTarget(ExceptionCode& ec) const
+SVGElement* SVGViewSpec::viewTarget() const
{
- if (!m_contextElement) {
- ec = INVALID_STATE_ERR;
+ if (!m_contextElement)
return 0;
- }
return static_cast<SVGElement*>(m_contextElement->treeScope()->getElementById(m_viewTargetString));
}
SVGTransformListPropertyTearOff* SVGViewSpec::transform()
{
- if (!m_contextElement)
- return 0;
// Return the animVal here, as its readonly by default - which is exactly what we want here.
return static_cast<SVGTransformListPropertyTearOff*>(static_pointer_cast<SVGAnimatedTransformList>(lookupOrCreateTransformWrapper(this))->animVal());
}
-PassRefPtr<SVGAnimatedRect> SVGViewSpec::viewBoxAnimated(ExceptionCode& ec)
-{
- if (!m_contextElement) {
- ec = INVALID_STATE_ERR;
- return 0;
- }
- return static_pointer_cast<SVGAnimatedRect>(lookupOrCreateViewBoxWrapper(this));
-}
-
-PassRefPtr<SVGAnimatedPreserveAspectRatio> SVGViewSpec::preserveAspectRatioAnimated(ExceptionCode& ec)
-{
- if (!m_contextElement) {
- ec = INVALID_STATE_ERR;
- return 0;
- }
- return static_pointer_cast<SVGAnimatedPreserveAspectRatio>(lookupOrCreatePreserveAspectRatioWrapper(this));
-}
-
PassRefPtr<SVGAnimatedProperty> SVGViewSpec::lookupOrCreateViewBoxWrapper(void* maskedOwnerType)
{
ASSERT(maskedOwnerType);
SVGViewSpec* ownerType = static_cast<SVGViewSpec*>(maskedOwnerType);
- ASSERT(ownerType->contextElement());
return SVGAnimatedProperty::lookupOrCreateWrapper<SVGElement, SVGAnimatedRect, FloatRect>(ownerType->contextElement(), viewBoxPropertyInfo(), ownerType->m_viewBox);
}
@@ -185,7 +169,6 @@
{
ASSERT(maskedOwnerType);
SVGViewSpec* ownerType = static_cast<SVGViewSpec*>(maskedOwnerType);
- ASSERT(ownerType->contextElement());
return SVGAnimatedProperty::lookupOrCreateWrapper<SVGElement, SVGAnimatedPreserveAspectRatio, SVGPreserveAspectRatio>(ownerType->contextElement(), preserveAspectRatioPropertyInfo(), ownerType->m_preserveAspectRatio);
}
@@ -193,7 +176,6 @@
{
ASSERT(maskedOwnerType);
SVGViewSpec* ownerType = static_cast<SVGViewSpec*>(maskedOwnerType);
- ASSERT(ownerType->contextElement());
return SVGAnimatedProperty::lookupOrCreateWrapper<SVGElement, SVGAnimatedTransformList, SVGTransformList>(ownerType->contextElement(), transformPropertyInfo(), ownerType->m_transform);
}
Modified: trunk/Source/WebCore/svg/SVGViewSpec.h (140055 => 140056)
--- trunk/Source/WebCore/svg/SVGViewSpec.h 2013-01-17 23:06:00 UTC (rev 140055)
+++ trunk/Source/WebCore/svg/SVGViewSpec.h 2013-01-17 23:08:43 UTC (rev 140056)
@@ -49,9 +49,10 @@
bool parseViewSpec(const String&);
void reset();
- SVGElement* viewTarget(ExceptionCode&) const;
+ SVGElement* viewTarget() const;
String viewBoxString() const;
+ void setPreserveAspectRatioString(const String&);
String preserveAspectRatioString() const;
void setTransformString(const String&);
@@ -73,13 +74,21 @@
SVGTransformList transformBaseValue() const { return m_transform; }
// Custom animated 'viewBox' property.
- PassRefPtr<SVGAnimatedRect> viewBoxAnimated(ExceptionCode&);
+ PassRefPtr<SVGAnimatedRect> viewBoxAnimated()
+ {
+ return static_pointer_cast<SVGAnimatedRect>(lookupOrCreateViewBoxWrapper(this));
+ }
+
FloatRect& viewBox() { return m_viewBox; }
FloatRect viewBoxBaseValue() const { return m_viewBox; }
void setViewBoxBaseValue(const FloatRect& viewBox) { m_viewBox = viewBox; }
// Custom animated 'preserveAspectRatio' property.
- PassRefPtr<SVGAnimatedPreserveAspectRatio> preserveAspectRatioAnimated(ExceptionCode&);
+ PassRefPtr<SVGAnimatedPreserveAspectRatio> preserveAspectRatioAnimated()
+ {
+ return static_pointer_cast<SVGAnimatedPreserveAspectRatio>(lookupOrCreatePreserveAspectRatioWrapper(this));
+ }
+
SVGPreserveAspectRatio& preserveAspectRatio() { return m_preserveAspectRatio; }
SVGPreserveAspectRatio preserveAspectRatioBaseValue() const { return m_preserveAspectRatio; }
void setPreserveAspectRatioBaseValue(const SVGPreserveAspectRatio& preserveAspectRatio) { m_preserveAspectRatio = preserveAspectRatio; }
Modified: trunk/Source/WebCore/svg/SVGViewSpec.idl (140055 => 140056)
--- trunk/Source/WebCore/svg/SVGViewSpec.idl 2013-01-17 23:06:00 UTC (rev 140055)
+++ trunk/Source/WebCore/svg/SVGViewSpec.idl 2013-01-17 23:08:43 UTC (rev 140056)
@@ -30,8 +30,7 @@
JSGenerateToJSObject
] interface SVGViewSpec {
readonly attribute SVGTransformList transform;
- readonly attribute SVGElement viewTarget
- getter raises(DOMException);
+ readonly attribute SVGElement viewTarget;
readonly attribute DOMString viewBoxString;
readonly attribute DOMString preserveAspectRatioString;
readonly attribute DOMString transformString;
@@ -42,9 +41,7 @@
setter raises(DOMException);
// SVGFitToViewBox
- readonly attribute SVGAnimatedRect viewBox
- getter raises(DOMException);
- readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio
- getter raises(DOMException);
+ readonly attribute SVGAnimatedRect viewBox;
+ readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
};