Diff
Modified: trunk/Source/WebCore/ChangeLog (152779 => 152780)
--- trunk/Source/WebCore/ChangeLog 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/ChangeLog 2013-07-17 10:27:51 UTC (rev 152780)
@@ -1,3 +1,69 @@
+2013-07-17 Christophe Dumez <[email protected]>
+
+ Get rid of SVGPoint special case from the bindings generator
+ https://bugs.webkit.org/show_bug.cgi?id=118783
+
+ Reviewed by Kentaro Hara.
+
+ Get rid of SVGPoint special case from the bindings generator by adding a
+ new SVGPoint.h header that contains a typedef to FloatPoint.
+
+ Also use SVGPoint type in the implementation API for consistency with
+ the IDL.
+
+ No new tests, no behavior change.
+
+ * bindings/scripts/CodeGenerator.pm:
+ (SkipIncludeHeader):
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ (WebCore::jsTestObjMutablePoint):
+ (WebCore::jsTestObjImmutablePoint):
+ (WebCore::setJSTestObjMutablePoint):
+ (WebCore::setJSTestObjImmutablePoint):
+ (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
+ (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
+ * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+ (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
+ * bindings/scripts/test/ObjC/DOMTestObj.mm:
+ (-[DOMTestObj mutablePoint]):
+ (-[DOMTestObj immutablePoint]):
+ (-[DOMTestObj mutablePointFunction]):
+ (-[DOMTestObj immutablePointFunction]):
+ * bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
+ (-[DOMTestTypedefs immutablePointFunction]):
+ * rendering/svg/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):
+ * rendering/svg/SVGTextQuery.cpp:
+ (WebCore::SVGTextQuery::startPositionOfCharacter):
+ (WebCore::SVGTextQuery::endPositionOfCharacter):
+ (WebCore::SVGTextQuery::characterNumberAtPosition):
+ * rendering/svg/SVGTextQuery.h:
+ * svg/SVGPathElement.cpp:
+ (WebCore::SVGPathElement::getPointAtLength):
+ * svg/SVGPathElement.h:
+ * svg/SVGPathTraversalStateBuilder.cpp:
+ (WebCore::SVGPathTraversalStateBuilder::currentPoint):
+ * svg/SVGPathTraversalStateBuilder.h:
+ * svg/SVGPathUtilities.cpp:
+ (WebCore::getPointAtLengthOfSVGPathByteStream):
+ * svg/SVGPathUtilities.h:
+ * svg/SVGPoint.h: Added.
+ * svg/SVGPointList.cpp:
+ (WebCore::SVGPointList::valueAsString):
+ * svg/SVGPointList.h:
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::createSVGPoint):
+ * svg/SVGSVGElement.h:
+ * svg/SVGTextContentElement.cpp:
+ (WebCore::SVGTextContentElement::getStartPositionOfChar):
+ (WebCore::SVGTextContentElement::getEndPositionOfChar):
+ (WebCore::SVGTextContentElement::getCharNumAtPosition):
+ * svg/SVGTextContentElement.h:
+ * svg/SVGZoomEvent.cpp:
+ (WebCore::SVGZoomEvent::previousTranslate):
+ (WebCore::SVGZoomEvent::newTranslate):
+ * svg/SVGZoomEvent.h:
+
2013-07-17 Carlos Garcia Campos <[email protected]>
[GStreamer] webkitwebsrc: use SubResourceLoader
Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (152779 => 152780)
--- trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm 2013-07-17 10:27:51 UTC (rev 152780)
@@ -89,7 +89,7 @@
"SVGNumber" => "SVGPropertyTearOff<float>",
"SVGNumberList" => "SVGListPropertyTearOff<SVGNumberList>",
"SVGPathSegList" => "SVGPathSegListPropertyTearOff",
- "SVGPoint" => "SVGPropertyTearOff<FloatPoint>",
+ "SVGPoint" => "SVGPropertyTearOff<SVGPoint>",
"SVGPointList" => "SVGListPropertyTearOff<SVGPointList>",
"SVGPreserveAspectRatio" => "SVGPropertyTearOff<SVGPreserveAspectRatio>",
"SVGRect" => "SVGPropertyTearOff<FloatRect>",
@@ -283,8 +283,8 @@
return 1 if $object->IsPrimitiveType($type);
- # Special case: SVGPoint.h / SVGNumber.h do not exist.
- return 1 if $type eq "SVGPoint" or $type eq "SVGNumber";
+ # Special case: SVGNumber.h does not exist.
+ return 1 if $type eq "SVGNumber";
return 0;
}
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (152779 => 152780)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2013-07-17 10:27:51 UTC (rev 152780)
@@ -44,6 +44,7 @@
#include "JSbool.h"
#include "KURL.h"
#include "SVGDocument.h"
+#include "SVGPoint.h"
#include "SVGStaticPropertyTearOff.h"
#include "ScriptArguments.h"
#include "ScriptCallStackFactory.h"
@@ -942,7 +943,7 @@
JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
UNUSED_PARAM(exec);
TestObj* impl = static_cast<TestObj*>(castedThis->impl());
- JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticPropertyTearOff<TestObj, FloatPoint>::create(impl, impl->mutablePoint(), &TestObj::updateMutablePoint)));
+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticPropertyTearOff<TestObj, SVGPoint>::create(impl, impl->mutablePoint(), &TestObj::updateMutablePoint)));
return result;
}
@@ -952,7 +953,7 @@
JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
UNUSED_PARAM(exec);
TestObj* impl = static_cast<TestObj*>(castedThis->impl());
- JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(impl->immutablePoint())));
+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl->immutablePoint())));
return result;
}
@@ -1652,7 +1653,7 @@
UNUSED_PARAM(exec);
JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
TestObj* impl = static_cast<TestObj*>(castedThis->impl());
- SVGPropertyTearOff<FloatPoint>* nativeValue(toSVGPoint(value));
+ SVGPropertyTearOff<SVGPoint>* nativeValue(toSVGPoint(value));
if (exec->hadException())
return;
impl->setMutablePoint(nativeValue);
@@ -1664,7 +1665,7 @@
UNUSED_PARAM(exec);
JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
TestObj* impl = static_cast<TestObj*>(castedThis->impl());
- SVGPropertyTearOff<FloatPoint>* nativeValue(toSVGPoint(value));
+ SVGPropertyTearOff<SVGPoint>* nativeValue(toSVGPoint(value));
if (exec->hadException())
return;
impl->setImmutablePoint(nativeValue);
@@ -2989,7 +2990,7 @@
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* impl = static_cast<TestObj*>(castedThis->impl());
- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(impl->mutablePointFunction())));
+ JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl->mutablePointFunction())));
return JSValue::encode(result);
}
@@ -3002,7 +3003,7 @@
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* impl = static_cast<TestObj*>(castedThis->impl());
- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(impl->immutablePointFunction())));
+ JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl->immutablePointFunction())));
return JSValue::encode(result);
}
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (152779 => 152780)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp 2013-07-17 10:27:51 UTC (rev 152780)
@@ -30,6 +30,7 @@
#include "JSTestCallback.h"
#include "JSTestSubObj.h"
#include "KURL.h"
+#include "SVGPoint.h"
#include "SerializedScriptValue.h"
#include "TestTypedefs.h"
#include <runtime/Error.h>
@@ -500,7 +501,7 @@
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestTypedefs::s_info);
TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(impl->immutablePointFunction())));
+ JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl->immutablePointFunction())));
return JSValue::encode(result);
}
Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm (152779 => 152780)
--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm 2013-07-17 10:27:51 UTC (rev 152780)
@@ -58,6 +58,7 @@
#import "Node.h"
#import "ObjCEventListener.h"
#import "SVGDocument.h"
+#import "SVGPoint.h"
#import "SVGStaticPropertyTearOff.h"
#import "SerializedScriptValue.h"
#import "TestEnumType.h"
@@ -673,7 +674,7 @@
- (DOMSVGPoint *)mutablePoint
{
WebCore::JSMainThreadNullState state;
- return kit(WTF::getPtr(WebCore::SVGStaticPropertyTearOff<WebCore::TestObj, WebCore::FloatPoint>::create(IMPL, IMPL->mutablePoint(), &WebCore::TestObj::updateMutablePoint)));
+ return kit(WTF::getPtr(WebCore::SVGStaticPropertyTearOff<WebCore::TestObj, WebCore::SVGPoint>::create(IMPL, IMPL->mutablePoint(), &WebCore::TestObj::updateMutablePoint)));
}
- (void)setMutablePoint:(DOMSVGPoint *)newMutablePoint
@@ -687,7 +688,7 @@
- (DOMSVGPoint *)immutablePoint
{
WebCore::JSMainThreadNullState state;
- return kit(WTF::getPtr(WebCore::SVGPropertyTearOff<WebCore::FloatPoint>::create(IMPL->immutablePoint())));
+ return kit(WTF::getPtr(WebCore::SVGPropertyTearOff<WebCore::SVGPoint>::create(IMPL->immutablePoint())));
}
- (void)setImmutablePoint:(DOMSVGPoint *)newImmutablePoint
@@ -1126,13 +1127,13 @@
- (DOMSVGPoint *)mutablePointFunction
{
WebCore::JSMainThreadNullState state;
- return kit(WTF::getPtr(WebCore::SVGPropertyTearOff<WebCore::FloatPoint>::create(IMPL->mutablePointFunction())));
+ return kit(WTF::getPtr(WebCore::SVGPropertyTearOff<WebCore::SVGPoint>::create(IMPL->mutablePointFunction())));
}
- (DOMSVGPoint *)immutablePointFunction
{
WebCore::JSMainThreadNullState state;
- return kit(WTF::getPtr(WebCore::SVGPropertyTearOff<WebCore::FloatPoint>::create(IMPL->immutablePointFunction())));
+ return kit(WTF::getPtr(WebCore::SVGPropertyTearOff<WebCore::SVGPoint>::create(IMPL->immutablePointFunction())));
}
- (void)orange
Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestTypedefs.mm (152779 => 152780)
--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestTypedefs.mm 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestTypedefs.mm 2013-07-17 10:27:51 UTC (rev 152780)
@@ -40,6 +40,7 @@
#import "ExceptionHandlers.h"
#import "JSMainThreadExecState.h"
#import "KURL.h"
+#import "SVGPoint.h"
#import "SerializedScriptValue.h"
#import "TestTypedefs.h"
#import "ThreadCheck.h"
@@ -161,7 +162,7 @@
- (DOMSVGPoint *)immutablePointFunction
{
WebCore::JSMainThreadNullState state;
- return kit(WTF::getPtr(WebCore::SVGPropertyTearOff<WebCore::FloatPoint>::create(IMPL->immutablePointFunction())));
+ return kit(WTF::getPtr(WebCore::SVGPropertyTearOff<WebCore::SVGPoint>::create(IMPL->immutablePointFunction())));
}
- (void)methodWithException
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (152779 => 152780)
--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp 2013-07-17 10:27:51 UTC (rev 152780)
@@ -369,10 +369,10 @@
SVGSVGElement* svg = toSVGSVGElement(node());
ASSERT(svg);
float scale = style()->effectiveZoom();
- FloatPoint translate = svg->currentTranslate();
+ SVGPoint translate = svg->currentTranslate();
LayoutSize borderAndPadding(borderLeft() + paddingLeft(), borderTop() + paddingTop());
m_localToBorderBoxTransform = svg->viewBoxToViewTransform(contentWidth() / scale, contentHeight() / scale);
- if (borderAndPadding.isEmpty() && scale == 1 && translate == FloatPoint::zero())
+ if (borderAndPadding.isEmpty() && scale == 1 && translate == SVGPoint::zero())
return;
m_localToBorderBoxTransform = AffineTransform(scale, 0, 0, scale, borderAndPadding.width() + translate.x(), borderAndPadding.height() + translate.y()) * m_localToBorderBoxTransform;
}
Modified: trunk/Source/WebCore/rendering/svg/SVGTextQuery.cpp (152779 => 152780)
--- trunk/Source/WebCore/rendering/svg/SVGTextQuery.cpp 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/rendering/svg/SVGTextQuery.cpp 2013-07-17 10:27:51 UTC (rev 152780)
@@ -352,10 +352,10 @@
return true;
}
-FloatPoint SVGTextQuery::startPositionOfCharacter(unsigned position) const
+SVGPoint SVGTextQuery::startPositionOfCharacter(unsigned position) const
{
if (m_textBoxes.isEmpty())
- return FloatPoint();
+ return SVGPoint();
StartPositionOfCharacterData data(position);
executeQuery(&data, &SVGTextQuery::startPositionOfCharacterCallback);
@@ -399,10 +399,10 @@
return true;
}
-FloatPoint SVGTextQuery::endPositionOfCharacter(unsigned position) const
+SVGPoint SVGTextQuery::endPositionOfCharacter(unsigned position) const
{
if (m_textBoxes.isEmpty())
- return FloatPoint();
+ return SVGPoint();
EndPositionOfCharacterData data(position);
executeQuery(&data, &SVGTextQuery::endPositionOfCharacterCallback);
@@ -543,7 +543,7 @@
return false;
}
-int SVGTextQuery::characterNumberAtPosition(const FloatPoint& position) const
+int SVGTextQuery::characterNumberAtPosition(const SVGPoint& position) const
{
if (m_textBoxes.isEmpty())
return -1;
Modified: trunk/Source/WebCore/rendering/svg/SVGTextQuery.h (152779 => 152780)
--- trunk/Source/WebCore/rendering/svg/SVGTextQuery.h 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/rendering/svg/SVGTextQuery.h 2013-07-17 10:27:51 UTC (rev 152780)
@@ -22,6 +22,7 @@
#if ENABLE(SVG)
#include "FloatRect.h"
+#include "SVGPoint.h"
#include "SVGTextFragment.h"
#include <wtf/Vector.h>
@@ -38,11 +39,11 @@
unsigned numberOfCharacters() const;
float textLength() const;
float subStringLength(unsigned startPosition, unsigned length) const;
- FloatPoint startPositionOfCharacter(unsigned position) const;
- FloatPoint endPositionOfCharacter(unsigned position) const;
+ SVGPoint startPositionOfCharacter(unsigned position) const;
+ SVGPoint endPositionOfCharacter(unsigned position) const;
float rotationOfCharacter(unsigned position) const;
FloatRect extentOfCharacter(unsigned position) const;
- int characterNumberAtPosition(const FloatPoint&) const;
+ int characterNumberAtPosition(const SVGPoint&) const;
// Public helper struct. Private classes in SVGTextQuery inherit from it.
struct Data;
Modified: trunk/Source/WebCore/svg/SVGPathElement.cpp (152779 => 152780)
--- trunk/Source/WebCore/svg/SVGPathElement.cpp 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/svg/SVGPathElement.cpp 2013-07-17 10:27:51 UTC (rev 152780)
@@ -104,9 +104,9 @@
return totalLength;
}
-FloatPoint SVGPathElement::getPointAtLength(float length)
+SVGPoint SVGPathElement::getPointAtLength(float length)
{
- FloatPoint point;
+ SVGPoint point;
getPointAtLengthOfSVGPathByteStream(pathByteStream(), length, point);
return point;
}
Modified: trunk/Source/WebCore/svg/SVGPathElement.h (152779 => 152780)
--- trunk/Source/WebCore/svg/SVGPathElement.h 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/svg/SVGPathElement.h 2013-07-17 10:27:51 UTC (rev 152780)
@@ -59,7 +59,7 @@
static PassRefPtr<SVGPathElement> create(const QualifiedName&, Document*);
float getTotalLength();
- FloatPoint getPointAtLength(float distance);
+ SVGPoint getPointAtLength(float distance);
unsigned getPathSegAtLength(float distance);
PassRefPtr<SVGPathSegClosePath> createSVGPathSegClosePath(SVGPathSegRole role = PathSegUndefinedRole);
Modified: trunk/Source/WebCore/svg/SVGPathTraversalStateBuilder.cpp (152779 => 152780)
--- trunk/Source/WebCore/svg/SVGPathTraversalStateBuilder.cpp 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/svg/SVGPathTraversalStateBuilder.cpp 2013-07-17 10:27:51 UTC (rev 152780)
@@ -89,7 +89,7 @@
return m_traversalState->m_totalLength;
}
-FloatPoint SVGPathTraversalStateBuilder::currentPoint()
+SVGPoint SVGPathTraversalStateBuilder::currentPoint()
{
ASSERT(m_traversalState);
return m_traversalState->m_current;
Modified: trunk/Source/WebCore/svg/SVGPathTraversalStateBuilder.h (152779 => 152780)
--- trunk/Source/WebCore/svg/SVGPathTraversalStateBuilder.h 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/svg/SVGPathTraversalStateBuilder.h 2013-07-17 10:27:51 UTC (rev 152780)
@@ -22,8 +22,8 @@
#define SVGPathTraversalStateBuilder_h
#if ENABLE(SVG)
-#include "FloatPoint.h"
#include "SVGPathConsumer.h"
+#include "SVGPoint.h"
namespace WebCore {
@@ -35,7 +35,7 @@
unsigned pathSegmentIndex();
float totalLength();
- FloatPoint currentPoint();
+ SVGPoint currentPoint();
void setCurrentTraversalState(PathTraversalState* traversalState) { m_traversalState = traversalState; }
void setDesiredLength(float);
Modified: trunk/Source/WebCore/svg/SVGPathUtilities.cpp (152779 => 152780)
--- trunk/Source/WebCore/svg/SVGPathUtilities.cpp 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/svg/SVGPathUtilities.cpp 2013-07-17 10:27:51 UTC (rev 152780)
@@ -315,7 +315,7 @@
return ok;
}
-bool getPointAtLengthOfSVGPathByteStream(SVGPathByteStream* stream, float length, FloatPoint& point)
+bool getPointAtLengthOfSVGPathByteStream(SVGPathByteStream* stream, float length, SVGPoint& point)
{
ASSERT(stream);
if (stream->isEmpty())
Modified: trunk/Source/WebCore/svg/SVGPathUtilities.h (152779 => 152780)
--- trunk/Source/WebCore/svg/SVGPathUtilities.h 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/svg/SVGPathUtilities.h 2013-07-17 10:27:51 UTC (rev 152780)
@@ -22,6 +22,7 @@
#if ENABLE(SVG)
#include "SVGPathConsumer.h"
+#include "SVGPoint.h"
#include <wtf/OwnPtr.h>
#include <wtf/text/WTFString.h>
@@ -54,7 +55,7 @@
bool getSVGPathSegAtLengthFromSVGPathByteStream(SVGPathByteStream*, float length, unsigned& pathSeg);
bool getTotalLengthOfSVGPathByteStream(SVGPathByteStream*, float& totalLength);
-bool getPointAtLengthOfSVGPathByteStream(SVGPathByteStream*, float length, FloatPoint&);
+bool getPointAtLengthOfSVGPathByteStream(SVGPathByteStream*, float length, SVGPoint&);
} // namespace WebCore
Added: trunk/Source/WebCore/svg/SVGPoint.h (0 => 152780)
--- trunk/Source/WebCore/svg/SVGPoint.h (rev 0)
+++ trunk/Source/WebCore/svg/SVGPoint.h 2013-07-17 10:27:51 UTC (rev 152780)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SVGPoint_h
+#define SVGPoint_h
+
+#if ENABLE(SVG)
+
+#include "FloatPoint.h"
+
+namespace WebCore {
+
+typedef FloatPoint SVGPoint;
+
+} // namespace WebCore
+
+#endif // ENABLE(SVG)
+
+#endif // SVGPoint_h
Modified: trunk/Source/WebCore/svg/SVGPointList.cpp (152779 => 152780)
--- trunk/Source/WebCore/svg/SVGPointList.cpp 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/svg/SVGPointList.cpp 2013-07-17 10:27:51 UTC (rev 152780)
@@ -23,7 +23,6 @@
#if ENABLE(SVG)
#include "SVGPointList.h"
-#include "FloatPoint.h"
#include <wtf/text/StringBuilder.h>
#include <wtf/text/WTFString.h>
@@ -38,7 +37,7 @@
if (i > 0)
builder.append(' '); // FIXME: Shouldn't we use commas to seperate?
- const FloatPoint& point = at(i);
+ const SVGPoint& point = at(i);
builder.append(String::number(point.x()) + ' ' + String::number(point.y()));
}
Modified: trunk/Source/WebCore/svg/SVGPointList.h (152779 => 152780)
--- trunk/Source/WebCore/svg/SVGPointList.h 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/svg/SVGPointList.h 2013-07-17 10:27:51 UTC (rev 152780)
@@ -22,14 +22,13 @@
#define SVGPointList_h
#if ENABLE(SVG)
+#include "SVGPoint.h"
#include "SVGPropertyTraits.h"
#include <wtf/Vector.h>
namespace WebCore {
-class FloatPoint;
-
-class SVGPointList : public Vector<FloatPoint> {
+class SVGPointList : public Vector<SVGPoint> {
public:
SVGPointList() { }
@@ -39,7 +38,7 @@
template<>
struct SVGPropertyTraits<SVGPointList> {
static SVGPointList initialValue() { return SVGPointList(); }
- typedef FloatPoint ListItemType;
+ typedef SVGPoint ListItemType;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/svg/SVGSVGElement.cpp (152779 => 152780)
--- trunk/Source/WebCore/svg/SVGSVGElement.cpp 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/svg/SVGSVGElement.cpp 2013-07-17 10:27:51 UTC (rev 152780)
@@ -405,9 +405,9 @@
return SVGAngle();
}
-FloatPoint SVGSVGElement::createSVGPoint()
+SVGPoint SVGSVGElement::createSVGPoint()
{
- return FloatPoint();
+ return SVGPoint();
}
SVGMatrix SVGSVGElement::createSVGMatrix()
Modified: trunk/Source/WebCore/svg/SVGSVGElement.h (152779 => 152780)
--- trunk/Source/WebCore/svg/SVGSVGElement.h 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/svg/SVGSVGElement.h 2013-07-17 10:27:51 UTC (rev 152780)
@@ -84,7 +84,7 @@
float currentScale() const;
void setCurrentScale(float scale);
- FloatPoint& currentTranslate() { return m_translation; }
+ SVGPoint& currentTranslate() { return m_translation; }
void setCurrentTranslate(const FloatPoint&);
// Only used from the bindings.
@@ -113,7 +113,7 @@
static float createSVGNumber();
static SVGLength createSVGLength();
static SVGAngle createSVGAngle();
- static FloatPoint createSVGPoint();
+ static SVGPoint createSVGPoint();
static SVGMatrix createSVGMatrix();
static FloatRect createSVGRect();
static SVGTransform createSVGTransform();
@@ -181,7 +181,7 @@
bool m_useCurrentView;
SVGZoomAndPanType m_zoomAndPan;
RefPtr<SMILTimeContainer> m_timeContainer;
- FloatPoint m_translation;
+ SVGPoint m_translation;
RefPtr<SVGViewSpec> m_viewSpec;
};
Modified: trunk/Source/WebCore/svg/SVGTextContentElement.cpp (152779 => 152780)
--- trunk/Source/WebCore/svg/SVGTextContentElement.cpp 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/svg/SVGTextContentElement.cpp 2013-07-17 10:27:51 UTC (rev 152780)
@@ -127,25 +127,25 @@
return SVGTextQuery(renderer()).subStringLength(charnum, nchars);
}
-FloatPoint SVGTextContentElement::getStartPositionOfChar(unsigned charnum, ExceptionCode& ec)
+SVGPoint SVGTextContentElement::getStartPositionOfChar(unsigned charnum, ExceptionCode& ec)
{
document()->updateLayoutIgnorePendingStylesheets();
if (charnum > getNumberOfChars()) {
ec = INDEX_SIZE_ERR;
- return FloatPoint();
+ return SVGPoint();
}
return SVGTextQuery(renderer()).startPositionOfCharacter(charnum);
}
-FloatPoint SVGTextContentElement::getEndPositionOfChar(unsigned charnum, ExceptionCode& ec)
+SVGPoint SVGTextContentElement::getEndPositionOfChar(unsigned charnum, ExceptionCode& ec)
{
document()->updateLayoutIgnorePendingStylesheets();
if (charnum > getNumberOfChars()) {
ec = INDEX_SIZE_ERR;
- return FloatPoint();
+ return SVGPoint();
}
return SVGTextQuery(renderer()).endPositionOfCharacter(charnum);
@@ -175,7 +175,7 @@
return SVGTextQuery(renderer()).rotationOfCharacter(charnum);
}
-int SVGTextContentElement::getCharNumAtPosition(const FloatPoint& point)
+int SVGTextContentElement::getCharNumAtPosition(const SVGPoint& point)
{
document()->updateLayoutIgnorePendingStylesheets();
return SVGTextQuery(renderer()).characterNumberAtPosition(point);
Modified: trunk/Source/WebCore/svg/SVGTextContentElement.h (152779 => 152780)
--- trunk/Source/WebCore/svg/SVGTextContentElement.h 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/svg/SVGTextContentElement.h 2013-07-17 10:27:51 UTC (rev 152780)
@@ -78,11 +78,11 @@
unsigned getNumberOfChars();
float getComputedTextLength();
float getSubStringLength(unsigned charnum, unsigned nchars, ExceptionCode&);
- FloatPoint getStartPositionOfChar(unsigned charnum, ExceptionCode&);
- FloatPoint getEndPositionOfChar(unsigned charnum, ExceptionCode&);
+ SVGPoint getStartPositionOfChar(unsigned charnum, ExceptionCode&);
+ SVGPoint getEndPositionOfChar(unsigned charnum, ExceptionCode&);
FloatRect getExtentOfChar(unsigned charnum, ExceptionCode&);
float getRotationOfChar(unsigned charnum, ExceptionCode&);
- int getCharNumAtPosition(const FloatPoint&);
+ int getCharNumAtPosition(const SVGPoint&);
void selectSubString(unsigned charnum, unsigned nchars, ExceptionCode&);
static SVGTextContentElement* elementFromRenderer(RenderObject*);
Modified: trunk/Source/WebCore/svg/SVGZoomEvent.cpp (152779 => 152780)
--- trunk/Source/WebCore/svg/SVGZoomEvent.cpp 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/svg/SVGZoomEvent.cpp 2013-07-17 10:27:51 UTC (rev 152780)
@@ -49,7 +49,7 @@
m_previousScale = scale;
}
-FloatPoint SVGZoomEvent::previousTranslate() const
+SVGPoint SVGZoomEvent::previousTranslate() const
{
return m_previousTranslate;
}
@@ -64,7 +64,7 @@
m_newScale = scale;
}
-FloatPoint SVGZoomEvent::newTranslate() const
+SVGPoint SVGZoomEvent::newTranslate() const
{
return m_newTranslate;
}
Modified: trunk/Source/WebCore/svg/SVGZoomEvent.h (152779 => 152780)
--- trunk/Source/WebCore/svg/SVGZoomEvent.h 2013-07-17 10:11:20 UTC (rev 152779)
+++ trunk/Source/WebCore/svg/SVGZoomEvent.h 2013-07-17 10:27:51 UTC (rev 152780)
@@ -24,6 +24,7 @@
#if ENABLE(SVG)
#include "FloatRect.h"
+#include "SVGPoint.h"
#include "UIEvent.h"
namespace WebCore {
@@ -38,12 +39,12 @@
float previousScale() const;
void setPreviousScale(float);
- FloatPoint previousTranslate() const;
+ SVGPoint previousTranslate() const;
float newScale() const;
void setNewScale(float);
- FloatPoint newTranslate() const;
+ SVGPoint newTranslate() const;
virtual const AtomicString& interfaceName() const;
@@ -55,8 +56,8 @@
FloatRect m_zoomRectScreen;
- FloatPoint m_newTranslate;
- FloatPoint m_previousTranslate;
+ SVGPoint m_newTranslate;
+ SVGPoint m_previousTranslate;
};
} // namespace WebCore