Title: [160668] trunk/Source/WebCore
Revision
160668
Author
[email protected]
Date
2013-12-16 15:25:31 -0800 (Mon, 16 Dec 2013)

Log Message

[iOS] Upstream WebCore/svg changes
https://bugs.webkit.org/show_bug.cgi?id=125784

Reviewed by Darin Adler.

* svg/SVGAElement.cpp:
(WebCore::SVGAElement::willRespondToMouseClickEvents): Added.
* svg/SVGAElement.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::parseAttribute): Added attribute listeners for touch{cancel, end, move, start},
and gesture{change, end, start}.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (160667 => 160668)


--- trunk/Source/WebCore/ChangeLog	2013-12-16 23:23:34 UTC (rev 160667)
+++ trunk/Source/WebCore/ChangeLog	2013-12-16 23:25:31 UTC (rev 160668)
@@ -1,3 +1,17 @@
+2013-12-16  Daniel Bates  <[email protected]>
+
+        [iOS] Upstream WebCore/svg changes
+        https://bugs.webkit.org/show_bug.cgi?id=125784
+
+        Reviewed by Darin Adler.
+
+        * svg/SVGAElement.cpp:
+        (WebCore::SVGAElement::willRespondToMouseClickEvents): Added.
+        * svg/SVGAElement.h:
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::parseAttribute): Added attribute listeners for touch{cancel, end, move, start},
+        and gesture{change, end, start}.
+
 2013-12-13  Jeffrey Pfau  <[email protected]>
 
         [Mac] Cache partitioning asserts when associated NSURLRequest is nil

Modified: trunk/Source/WebCore/svg/SVGAElement.cpp (160667 => 160668)


--- trunk/Source/WebCore/svg/SVGAElement.cpp	2013-12-16 23:23:34 UTC (rev 160667)
+++ trunk/Source/WebCore/svg/SVGAElement.cpp	2013-12-16 23:25:31 UTC (rev 160668)
@@ -235,6 +235,11 @@
     return SVGElement::childShouldCreateRenderer(child);
 }
 
+bool SVGAElement::willRespondToMouseClickEvents()
+{ 
+    return isLink() || SVGGraphicsElement::willRespondToMouseClickEvents(); 
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(SVG)

Modified: trunk/Source/WebCore/svg/SVGAElement.h (160667 => 160668)


--- trunk/Source/WebCore/svg/SVGAElement.h	2013-12-16 23:23:34 UTC (rev 160667)
+++ trunk/Source/WebCore/svg/SVGAElement.h	2013-12-16 23:25:31 UTC (rev 160668)
@@ -59,6 +59,8 @@
     virtual bool isFocusable() const OVERRIDE;
     virtual bool isURLAttribute(const Attribute&) const;
 
+    virtual bool willRespondToMouseClickEvents() OVERRIDE;
+
     BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGAElement)
         // This declaration used to define a non-virtual "String& target() const" method, that clashes with "virtual String Element::target() const".
         // That's why it has been renamed to "svgTarget", the CodeGenerators take care of calling svgTargetAnimated() instead of targetAnimated(), see CodeGenerator.pm.

Modified: trunk/Source/WebCore/svg/SVGElement.cpp (160667 => 160668)


--- trunk/Source/WebCore/svg/SVGElement.cpp	2013-12-16 23:23:34 UTC (rev 160667)
+++ trunk/Source/WebCore/svg/SVGElement.cpp	2013-12-16 23:25:31 UTC (rev 160668)
@@ -491,6 +491,24 @@
         setAttributeEventListener(eventNames().DOMActivateEvent, name, value);
     else if (name == HTMLNames::classAttr)
         setClassNameBaseValue(value);
+#if ENABLE(TOUCH_EVENTS)
+    else if (name == ontouchstartAttr)
+        setAttributeEventListener(eventNames().touchstartEvent, name, value);
+    else if (name == ontouchmoveAttr)
+        setAttributeEventListener(eventNames().touchmoveEvent, name, value);
+    else if (name == ontouchendAttr)
+        setAttributeEventListener(eventNames().touchendEvent, name, value);
+    else if (name == ontouchcancelAttr)
+        setAttributeEventListener(eventNames().touchcancelEvent, name, value);
+#endif
+#if ENABLE(IOS_GESTURE_EVENTS)
+    else if (name == ongesturestartAttr)
+        setAttributeEventListener(eventNames().gesturestartEvent, name, value);
+    else if (name == ongesturechangeAttr)
+        setAttributeEventListener(eventNames().gesturechangeEvent, name, value);
+    else if (name == ongestureendAttr)
+        setAttributeEventListener(eventNames().gestureendEvent, name, value);
+#endif
     else if (SVGLangSpace::parseAttribute(name, value)) {
     } else
         StyledElement::parseAttribute(name, value);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to