<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[201305] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/201305">201305</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-05-23 17:17:04 -0700 (Mon, 23 May 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Generate bindings code for EventTarget.addEventListener() / removeEventListener()
https://bugs.webkit.org/show_bug.cgi?id=157882

Reviewed by Darin Adler.

Generate bindings code for EventTarget.addEventListener() / removeEventListener()
instead of hardcoding them in the bindings generator.

Source/WebCore:

No new tests, rebaselined existing test, no web-exposed behavior change.

* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::addEventListener):
(WebCore::AudioScheduledSourceNode::removeEventListener):
* Modules/webaudio/AudioScheduledSourceNode.h:
* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::addEventListener):
(WebCore::ScriptProcessorNode::removeEventListener):
* Modules/webaudio/ScriptProcessorNode.h:
* bindings/gobject/GObjectEventListener.cpp:
(WebCore::GObjectEventListener::operator==):
* bindings/gobject/GObjectEventListener.h:
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::operator==):
(WebCore::eventHandlerAttribute): Deleted.
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::create):
(WebCore::JSEventListener::cast): Deleted.
(WebCore::JSEventListener::jsFunction): Deleted.
* bindings/objc/ObjCEventListener.h:
* bindings/objc/ObjCEventListener.mm:
(WebCore::ObjCEventListener::operator==):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(JSValueToNative):
(GetParentClassName): Deleted.
(GetCallbackClassName): Deleted.
(GetJSCallbackDataType): Deleted.
* dom/EventListener.h:
* dom/EventListenerMap.cpp:
(WebCore::addListenerToVector):
(WebCore::EventListenerMap::add):
(WebCore::removeListenerFromVector):
(WebCore::EventListenerMap::remove):
(WebCore::copyListenersNotCreatedFromMarkupToTarget):
* dom/EventListenerMap.h:
* dom/EventTarget.cpp:
(WebCore::EventTarget::addEventListener):
(WebCore::EventTarget::addEventListenerForBindings):
(WebCore::EventTarget::removeEventListenerForBindings):
(WebCore::EventTarget::removeEventListener):
(WebCore::EventTarget::setAttributeEventListener):
(WebCore::EventTarget::clearAttributeEventListener):
* dom/EventTarget.h:
* dom/EventTarget.idl:
* dom/MessagePort.cpp:
(WebCore::MessagePort::addEventListener):
* dom/MessagePort.h:
* dom/Node.cpp:
(WebCore::tryAddEventListener):
(WebCore::Node::addEventListener):
(WebCore::tryRemoveEventListener):
(WebCore::Node::removeEventListener):
* dom/Node.h:
* dom/RegisteredEventListener.h:
(WebCore::RegisteredEventListener::RegisteredEventListener):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::addEventListener):
(WebCore::HTMLMediaElement::removeEventListener):
* html/HTMLMediaElement.h:
* html/ImageDocument.cpp:
(WebCore::ImageDocument::createDocumentStructure):
(WebCore::ImageEventListener::operator==):
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::showClosedCaptionTrackList):
(WebCore::MediaControlsApple::hideClosedCaptionTrackList):
(WebCore::MediaControlsAppleEventListener::operator==):
* html/shadow/MediaControlsApple.h:
* inspector/InspectorIndexedDBAgent.cpp:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::addEventListener):
(WebCore::DOMWindow::removeEventListener):
* page/DOMWindow.h:
* platform/cocoa/WebPlaybackSessionModelMediaElement.h:
* platform/cocoa/WebVideoFullscreenModelVideoElement.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::addEventListener):
(WebCore::SVGElement::removeEventListener):
* svg/SVGElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefTargetEventListener::attach):
(WebCore::SVGTRefTargetEventListener::detach):
(WebCore::SVGTRefTargetEventListener::operator==):
* svg/animation/SVGSMILElement.cpp:
(WebCore::ConditionEventListener::operator==):
(WebCore::SVGSMILElement::connectConditions):
(WebCore::SVGSMILElement::disconnectConditions):

Source/WebKit/win:

* DOMEventsClasses.cpp:
(WebEventListener::operator==):
* DOMEventsClasses.h:

Source/WebKit2:

* WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
* WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
(WebKit::PDFPluginAnnotation::attach):
(WebKit::PDFPluginAnnotation::~PDFPluginAnnotation):
* WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
(WebKit::PDFPluginPasswordField::~PDFPluginPasswordField):
(WebKit::PDFPluginPasswordField::createAnnotationElement):
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
(WebKit::PDFPluginTextAnnotation::~PDFPluginTextAnnotation):
(WebKit::PDFPluginTextAnnotation::createAnnotationElement):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioAudioScheduledSourceNodecpp">trunk/Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioAudioScheduledSourceNodeh">trunk/Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.h</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioScriptProcessorNodecpp">trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioScriptProcessorNodeh">trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.h</a></li>
<li><a href="#trunkSourceWebCorebindingsgobjectGObjectEventListenercpp">trunk/Source/WebCore/bindings/gobject/GObjectEventListener.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsgobjectGObjectEventListenerh">trunk/Source/WebCore/bindings/gobject/GObjectEventListener.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSEventListenercpp">trunk/Source/WebCore/bindings/js/JSEventListener.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSEventListenerh">trunk/Source/WebCore/bindings/js/JSEventListener.h</a></li>
<li><a href="#trunkSourceWebCorebindingsobjcObjCEventListenerh">trunk/Source/WebCore/bindings/objc/ObjCEventListener.h</a></li>
<li><a href="#trunkSourceWebCorebindingsobjcObjCEventListenermm">trunk/Source/WebCore/bindings/objc/ObjCEventListener.mm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCoredomEventListenerh">trunk/Source/WebCore/dom/EventListener.h</a></li>
<li><a href="#trunkSourceWebCoredomEventListenerMapcpp">trunk/Source/WebCore/dom/EventListenerMap.cpp</a></li>
<li><a href="#trunkSourceWebCoredomEventListenerMaph">trunk/Source/WebCore/dom/EventListenerMap.h</a></li>
<li><a href="#trunkSourceWebCoredomEventTargetcpp">trunk/Source/WebCore/dom/EventTarget.cpp</a></li>
<li><a href="#trunkSourceWebCoredomEventTargeth">trunk/Source/WebCore/dom/EventTarget.h</a></li>
<li><a href="#trunkSourceWebCoredomEventTargetidl">trunk/Source/WebCore/dom/EventTarget.idl</a></li>
<li><a href="#trunkSourceWebCoredomMessagePortcpp">trunk/Source/WebCore/dom/MessagePort.cpp</a></li>
<li><a href="#trunkSourceWebCoredomMessagePorth">trunk/Source/WebCore/dom/MessagePort.h</a></li>
<li><a href="#trunkSourceWebCoredomNodecpp">trunk/Source/WebCore/dom/Node.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodeh">trunk/Source/WebCore/dom/Node.h</a></li>
<li><a href="#trunkSourceWebCoredomRegisteredEventListenerh">trunk/Source/WebCore/dom/RegisteredEventListener.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementh">trunk/Source/WebCore/html/HTMLMediaElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlImageDocumentcpp">trunk/Source/WebCore/html/ImageDocument.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlshadowMediaControlsApplecpp">trunk/Source/WebCore/html/shadow/MediaControlsApple.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlshadowMediaControlsAppleh">trunk/Source/WebCore/html/shadow/MediaControlsApple.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp">trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowcpp">trunk/Source/WebCore/page/DOMWindow.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowh">trunk/Source/WebCore/page/DOMWindow.h</a></li>
<li><a href="#trunkSourceWebCoreplatformcocoaWebPlaybackSessionModelMediaElementh">trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h</a></li>
<li><a href="#trunkSourceWebCoreplatformcocoaWebPlaybackSessionModelMediaElementmm">trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformcocoaWebVideoFullscreenModelVideoElementh">trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.h</a></li>
<li><a href="#trunkSourceWebCoreplatformcocoaWebVideoFullscreenModelVideoElementmm">trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.mm</a></li>
<li><a href="#trunkSourceWebCoresvgSVGElementcpp">trunk/Source/WebCore/svg/SVGElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGElementh">trunk/Source/WebCore/svg/SVGElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGTRefElementcpp">trunk/Source/WebCore/svg/SVGTRefElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvganimationSVGSMILElementcpp">trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinDOMCoreClassescpp">trunk/Source/WebKit/win/DOMCoreClasses.cpp</a></li>
<li><a href="#trunkSourceWebKitwinDOMEventsClassescpp">trunk/Source/WebKit/win/DOMEventsClasses.cpp</a></li>
<li><a href="#trunkSourceWebKitwinDOMEventsClassesh">trunk/Source/WebKit/win/DOMEventsClasses.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPDFPDFPluginAnnotationh">trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginAnnotation.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPDFPDFPluginAnnotationmm">trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginAnnotation.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPDFPDFPluginPasswordFieldmm">trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginPasswordField.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPDFPDFPluginTextAnnotationmm">trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/ChangeLog        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -1,5 +1,104 @@
</span><span class="cx"> 2016-05-23  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Generate bindings code for EventTarget.addEventListener() / removeEventListener()
+        https://bugs.webkit.org/show_bug.cgi?id=157882
+
+        Reviewed by Darin Adler.
+
+        Generate bindings code for EventTarget.addEventListener() / removeEventListener()
+        instead of hardcoding them in the bindings generator.
+
+        No new tests, rebaselined existing test, no web-exposed behavior change.
+
+        * Modules/webaudio/AudioScheduledSourceNode.cpp:
+        (WebCore::AudioScheduledSourceNode::addEventListener):
+        (WebCore::AudioScheduledSourceNode::removeEventListener):
+        * Modules/webaudio/AudioScheduledSourceNode.h:
+        * Modules/webaudio/ScriptProcessorNode.cpp:
+        (WebCore::ScriptProcessorNode::addEventListener):
+        (WebCore::ScriptProcessorNode::removeEventListener):
+        * Modules/webaudio/ScriptProcessorNode.h:
+        * bindings/gobject/GObjectEventListener.cpp:
+        (WebCore::GObjectEventListener::operator==):
+        * bindings/gobject/GObjectEventListener.h:
+        * bindings/js/JSEventListener.cpp:
+        (WebCore::JSEventListener::operator==):
+        (WebCore::eventHandlerAttribute): Deleted.
+        * bindings/js/JSEventListener.h:
+        (WebCore::JSEventListener::create):
+        (WebCore::JSEventListener::cast): Deleted.
+        (WebCore::JSEventListener::jsFunction): Deleted.
+        * bindings/objc/ObjCEventListener.h:
+        * bindings/objc/ObjCEventListener.mm:
+        (WebCore::ObjCEventListener::operator==):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateImplementation):
+        (JSValueToNative):
+        (GetParentClassName): Deleted.
+        (GetCallbackClassName): Deleted.
+        (GetJSCallbackDataType): Deleted.
+        * dom/EventListener.h:
+        * dom/EventListenerMap.cpp:
+        (WebCore::addListenerToVector):
+        (WebCore::EventListenerMap::add):
+        (WebCore::removeListenerFromVector):
+        (WebCore::EventListenerMap::remove):
+        (WebCore::copyListenersNotCreatedFromMarkupToTarget):
+        * dom/EventListenerMap.h:
+        * dom/EventTarget.cpp:
+        (WebCore::EventTarget::addEventListener):
+        (WebCore::EventTarget::addEventListenerForBindings):
+        (WebCore::EventTarget::removeEventListenerForBindings):
+        (WebCore::EventTarget::removeEventListener):
+        (WebCore::EventTarget::setAttributeEventListener):
+        (WebCore::EventTarget::clearAttributeEventListener):
+        * dom/EventTarget.h:
+        * dom/EventTarget.idl:
+        * dom/MessagePort.cpp:
+        (WebCore::MessagePort::addEventListener):
+        * dom/MessagePort.h:
+        * dom/Node.cpp:
+        (WebCore::tryAddEventListener):
+        (WebCore::Node::addEventListener):
+        (WebCore::tryRemoveEventListener):
+        (WebCore::Node::removeEventListener):
+        * dom/Node.h:
+        * dom/RegisteredEventListener.h:
+        (WebCore::RegisteredEventListener::RegisteredEventListener):
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::addEventListener):
+        (WebCore::HTMLMediaElement::removeEventListener):
+        * html/HTMLMediaElement.h:
+        * html/ImageDocument.cpp:
+        (WebCore::ImageDocument::createDocumentStructure):
+        (WebCore::ImageEventListener::operator==):
+        * html/shadow/MediaControlsApple.cpp:
+        (WebCore::MediaControlsApple::showClosedCaptionTrackList):
+        (WebCore::MediaControlsApple::hideClosedCaptionTrackList):
+        (WebCore::MediaControlsAppleEventListener::operator==):
+        * html/shadow/MediaControlsApple.h:
+        * inspector/InspectorIndexedDBAgent.cpp:
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::addEventListener):
+        (WebCore::DOMWindow::removeEventListener):
+        * page/DOMWindow.h:
+        * platform/cocoa/WebPlaybackSessionModelMediaElement.h:
+        * platform/cocoa/WebVideoFullscreenModelVideoElement.h:
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::addEventListener):
+        (WebCore::SVGElement::removeEventListener):
+        * svg/SVGElement.h:
+        * svg/SVGTRefElement.cpp:
+        (WebCore::SVGTRefTargetEventListener::attach):
+        (WebCore::SVGTRefTargetEventListener::detach):
+        (WebCore::SVGTRefTargetEventListener::operator==):
+        * svg/animation/SVGSMILElement.cpp:
+        (WebCore::ConditionEventListener::operator==):
+        (WebCore::SVGSMILElement::connectConditions):
+        (WebCore::SVGSMILElement::disconnectConditions):
+
+2016-05-23  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         Fix undefined behavior introduced in r201290.
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=157961
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioAudioScheduledSourceNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -201,7 +201,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool AudioScheduledSourceNode::addEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</del><ins>+bool AudioScheduledSourceNode::addEventListener(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><span class="cx">     bool success = AudioNode::addEventListener(eventType, WTFMove(listener), useCapture);
</span><span class="cx">     if (success &amp;&amp; eventType == eventNames().endedEvent)
</span><span class="lines">@@ -209,7 +209,7 @@
</span><span class="cx">     return success;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool AudioScheduledSourceNode::removeEventListener(const AtomicString&amp; eventType, EventListener* listener, bool useCapture)
</del><ins>+bool AudioScheduledSourceNode::removeEventListener(const AtomicString&amp; eventType, EventListener&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><span class="cx">     bool success = AudioNode::removeEventListener(eventType, listener, useCapture);
</span><span class="cx">     if (success &amp;&amp; eventType == eventNames().endedEvent)
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioAudioScheduledSourceNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -101,8 +101,8 @@
</span><span class="cx">     static const double UnknownTime;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    bool addEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp;, bool useCapture) override;
-    bool removeEventListener(const AtomicString&amp; eventType, EventListener*, bool useCapture) override;
</del><ins>+    bool addEventListener(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp;, bool useCapture) override;
+    bool removeEventListener(const AtomicString&amp; eventType, EventListener&amp;, bool useCapture) override;
</ins><span class="cx">     void removeAllEventListeners() override;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioScriptProcessorNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -273,7 +273,7 @@
</span><span class="cx">     return std::numeric_limits&lt;double&gt;::infinity();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool ScriptProcessorNode::addEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</del><ins>+bool ScriptProcessorNode::addEventListener(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><span class="cx">     bool success = AudioNode::addEventListener(eventType, WTFMove(listener), useCapture);
</span><span class="cx">     if (success &amp;&amp; eventType == eventNames().audioprocessEvent)
</span><span class="lines">@@ -281,7 +281,7 @@
</span><span class="cx">     return success;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool ScriptProcessorNode::removeEventListener(const AtomicString&amp; eventType, EventListener* listener, bool useCapture)
</del><ins>+bool ScriptProcessorNode::removeEventListener(const AtomicString&amp; eventType, EventListener&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><span class="cx">     bool success = AudioNode::removeEventListener(eventType, listener, useCapture);
</span><span class="cx">     if (success &amp;&amp; eventType == eventNames().audioprocessEvent)
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioScriptProcessorNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -73,8 +73,8 @@
</span><span class="cx"> 
</span><span class="cx">     void fireProcessEvent();
</span><span class="cx"> 
</span><del>-    bool addEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp;, bool useCapture) override;
-    bool removeEventListener(const AtomicString&amp; eventType, EventListener*, bool useCapture) override;
</del><ins>+    bool addEventListener(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp;, bool useCapture) override;
+    bool removeEventListener(const AtomicString&amp; eventType, EventListener&amp;, bool useCapture) override;
</ins><span class="cx">     void removeAllEventListeners() override;
</span><span class="cx"> 
</span><span class="cx">     // Double buffering
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsgobjectGObjectEventListenercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/gobject/GObjectEventListener.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/gobject/GObjectEventListener.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/bindings/gobject/GObjectEventListener.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -57,9 +57,9 @@
</span><span class="cx">     // and later use-after-free with the m_handler = 0; assignment.
</span><span class="cx">     RefPtr&lt;GObjectEventListener&gt; protectedThis(this);
</span><span class="cx"> 
</span><del>-    m_coreTarget-&gt;removeEventListener(m_domEventName.data(), this, m_capture);
-    m_coreTarget = 0;
-    m_handler = 0;
</del><ins>+    m_coreTarget-&gt;removeEventListener(m_domEventName.data(), *this, m_capture);
+    m_coreTarget = nullptr;
+    m_handler = nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GObjectEventListener::handleEvent(ScriptExecutionContext*, Event* event)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">     g_value_unset(parameters + 1);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GObjectEventListener::operator==(const EventListener&amp; listener)
</del><ins>+bool GObjectEventListener::operator==(const EventListener&amp; listener) const
</ins><span class="cx"> {
</span><span class="cx">     if (const GObjectEventListener* gobjectEventListener = GObjectEventListener::cast(&amp;listener))
</span><span class="cx">         return m_target == gobjectEventListener-&gt;m_target
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsgobjectGObjectEventListenerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/gobject/GObjectEventListener.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/gobject/GObjectEventListener.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/bindings/gobject/GObjectEventListener.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -35,14 +35,14 @@
</span><span class="cx"> 
</span><span class="cx">     static bool addEventListener(GObject* target, EventTarget* coreTarget, const char* domEventName, GClosure* handler, bool useCapture)
</span><span class="cx">     {
</span><del>-        RefPtr&lt;GObjectEventListener&gt; listener(adoptRef(new GObjectEventListener(target, coreTarget, domEventName, handler, useCapture)));
-        return coreTarget-&gt;addEventListener(domEventName, listener.release(), useCapture);
</del><ins>+        Ref&lt;GObjectEventListener&gt; listener(adoptRef(*new GObjectEventListener(target, coreTarget, domEventName, handler, useCapture)));
+        return coreTarget-&gt;addEventListener(domEventName, WTFMove(listener), useCapture);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     static bool removeEventListener(GObject* target, EventTarget* coreTarget, const char* domEventName, GClosure* handler, bool useCapture)
</span><span class="cx">     {
</span><span class="cx">         GObjectEventListener key(target, coreTarget, domEventName, handler, useCapture);
</span><del>-        return coreTarget-&gt;removeEventListener(domEventName, &amp;key, useCapture);
</del><ins>+        return coreTarget-&gt;removeEventListener(domEventName, key, useCapture);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     static void gobjectDestroyedCallback(GObjectEventListener* listener, GObject*)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">             : 0;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    virtual bool operator==(const EventListener&amp; other);
</del><ins>+    bool operator==(const EventListener&amp; other) const override;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     GObjectEventListener(GObject*, EventTarget*, const char* domEventName, GClosure*, bool capture);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSEventListenercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSEventListener.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSEventListener.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/bindings/js/JSEventListener.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -163,20 +163,13 @@
</span><span class="cx">     return m_isAttribute;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool JSEventListener::operator==(const EventListener&amp; listener)
</del><ins>+bool JSEventListener::operator==(const EventListener&amp; listener) const
</ins><span class="cx"> {
</span><span class="cx">     if (const JSEventListener* jsEventListener = JSEventListener::cast(&amp;listener))
</span><span class="cx">         return m_jsFunction == jsEventListener-&gt;m_jsFunction &amp;&amp; m_isAttribute == jsEventListener-&gt;m_isAttribute;
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;JSEventListener&gt; createJSEventListenerForAdd(JSC::ExecState&amp; state, JSC::JSObject&amp; listener, JSC::JSObject&amp; wrapper)
-{
-    // FIXME: This abstraction is no longer needed. It was part of support for SVGElementInstance.
-    // We should remove it and simplify the bindings generation scripts.
-    return JSEventListener::create(&amp;listener, &amp;wrapper, false, currentWorld(&amp;state));
-}
-
</del><span class="cx"> static inline JSC::JSValue eventHandlerAttribute(EventListener* abstractListener, ScriptExecutionContext&amp; context)
</span><span class="cx"> {
</span><span class="cx">     if (!abstractListener)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSEventListenerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSEventListener.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSEventListener.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/bindings/js/JSEventListener.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -43,6 +43,14 @@
</span><span class="cx">         return adoptRef(*new JSEventListener(listener, wrapper, isAttribute, world));
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    static RefPtr&lt;JSEventListener&gt; create(JSC::JSValue listener, JSC::JSObject&amp; wrapper, bool isAttribute, DOMWrapperWorld&amp; world)
+    {
+        if (UNLIKELY(!listener.isObject()))
+            return nullptr;
+
+        return adoptRef(new JSEventListener(JSC::asObject(listener), &amp;wrapper, isAttribute, world));
+    }
+
</ins><span class="cx">     static const JSEventListener* cast(const EventListener* listener)
</span><span class="cx">     {
</span><span class="cx">         return listener-&gt;type() == JSEventListenerType
</span><span class="lines">@@ -52,7 +60,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual ~JSEventListener();
</span><span class="cx"> 
</span><del>-    bool operator==(const EventListener&amp; other) override;
</del><ins>+    bool operator==(const EventListener&amp; other) const override;
</ins><span class="cx"> 
</span><span class="cx">     // Returns true if this event listener was created for an event handler attribute, like &quot;onload&quot; or &quot;onclick&quot;.
</span><span class="cx">     bool isAttribute() const { return m_isAttribute; }
</span><span class="lines">@@ -99,9 +107,6 @@
</span><span class="cx"> JSC::JSValue documentEventHandlerAttribute(Document&amp;, const AtomicString&amp; eventType);
</span><span class="cx"> void setDocumentEventHandlerAttribute(JSC::ExecState&amp;, JSC::JSObject&amp;, Document&amp;, const AtomicString&amp; eventType, JSC::JSValue);
</span><span class="cx"> 
</span><del>-Ref&lt;JSEventListener&gt; createJSEventListenerForAdd(JSC::ExecState&amp;, JSC::JSObject&amp; listener, JSC::JSObject&amp; wrapper);
-Ref&lt;JSEventListener&gt; createJSEventListenerForRemove(JSC::ExecState&amp;, JSC::JSObject&amp; listener, JSC::JSObject&amp; wrapper);
-
</del><span class="cx"> inline JSC::JSObject* JSEventListener::jsFunction(ScriptExecutionContext* scriptExecutionContext) const
</span><span class="cx"> {
</span><span class="cx">     // initializeJSFunction can trigger code that deletes this event listener
</span><span class="lines">@@ -133,11 +138,6 @@
</span><span class="cx">     return m_jsFunction.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline Ref&lt;JSEventListener&gt; createJSEventListenerForRemove(JSC::ExecState&amp; state, JSC::JSObject&amp; listener, JSC::JSObject&amp; wrapper)
-{
-    return createJSEventListenerForAdd(state, listener, wrapper);
-}
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // JSEventListener_h
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsobjcObjCEventListenerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/objc/ObjCEventListener.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/objc/ObjCEventListener.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/bindings/objc/ObjCEventListener.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> 
</span><span class="cx">         ObjCEventListener(ObjCListener);
</span><span class="cx">         virtual ~ObjCEventListener();
</span><del>-        virtual bool operator==(const EventListener&amp;);
</del><ins>+        virtual bool operator==(const EventListener&amp;) const;
</ins><span class="cx">         virtual void handleEvent(ScriptExecutionContext*, Event*);
</span><span class="cx"> 
</span><span class="cx">         RetainPtr&lt;ObjCListener&gt; m_listener;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsobjcObjCEventListenermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/objc/ObjCEventListener.mm (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/objc/ObjCEventListener.mm        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/bindings/objc/ObjCEventListener.mm        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx">     [listener handleEvent:kit(event)];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool ObjCEventListener::operator==(const EventListener&amp; listener)
</del><ins>+bool ObjCEventListener::operator==(const EventListener&amp; listener) const
</ins><span class="cx"> {
</span><span class="cx">     if (const ObjCEventListener* objCEventListener = ObjCEventListener::cast(&amp;listener))
</span><span class="cx">         return m_listener == objCEventListener-&gt;m_listener;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -143,26 +143,6 @@
</span><span class="cx">     return &quot;eventNames().${eventType}Event&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub GenerateEventListenerCall
-{
-    my $functionName = shift;
-    my $suffix = ucfirst $functionName;
-    my $passRefPtrHandling = ($functionName eq &quot;add&quot;) ? &quot;&quot; : &quot;.ptr()&quot;;
-
-    $implIncludes{&quot;JSEventListener.h&quot;} = 1;
-
-    my @GenerateEventListenerImpl = ();
-
-    push(@GenerateEventListenerImpl, &lt;&lt;END);
-    JSValue listener = state-&gt;argument(1);
-    if (UNLIKELY(!listener.isObject()))
-        return JSValue::encode(jsUndefined());
-    impl.${functionName}EventListener(state-&gt;argument(0).toString(state)-&gt;toAtomicString(state), createJSEventListenerFor$suffix(*state, *asObject(listener), *castedThis)$passRefPtrHandling, state-&gt;argument(2).toBoolean(state));
-    return JSValue::encode(jsUndefined());
-END
-    return @GenerateEventListenerImpl;
-}
-
</del><span class="cx"> sub GetParentClassName
</span><span class="cx"> {
</span><span class="cx">     my $interface = shift;
</span><span class="lines">@@ -1722,6 +1702,9 @@
</span><span class="cx"> {
</span><span class="cx">     my $function = shift;
</span><span class="cx"> 
</span><ins>+    # FIXME: EventTarget.addEventListener() / removeEventListener() currently specifies all the parameters as optional.
+    return 2 if $function-&gt;signature-&gt;name eq &quot;addEventListener&quot; || $function-&gt;signature-&gt;name eq &quot;removeEventListener&quot;;
+
</ins><span class="cx">     my $length = 0;
</span><span class="cx">     foreach my $parameter (@{$function-&gt;parameters}) {
</span><span class="cx">         # Abort as soon as we find the first optional parameter as no mandatory
</span><span class="lines">@@ -3214,30 +3197,24 @@
</span><span class="cx">                         push(@implContent, &quot;            return JSValue::encode(jsUndefined());\n&quot;);
</span><span class="cx">                         push(@implContent, &quot;    }\n&quot;);
</span><span class="cx">                     }
</span><del>-                    # For compatibility with legacy content, the EventListener calls are generated without GenerateArgumentsCountCheck.
-                    if ($function-&gt;signature-&gt;name eq &quot;addEventListener&quot;) {
-                        push(@implContent, GenerateEventListenerCall(&quot;add&quot;));
-                    } elsif ($function-&gt;signature-&gt;name eq &quot;removeEventListener&quot;) {
-                        push(@implContent, GenerateEventListenerCall(&quot;remove&quot;));
-                    } else {
-                        GenerateArgumentsCountCheck(\@implContent, $function, $interface);
</del><span class="cx"> 
</span><del>-                        if ($raisesExceptionWithMessage) {
-                            push(@implContent, &quot;    ExceptionCodeWithMessage ec;\n&quot;);
-                        } elsif ($raisesException) {
-                            push(@implContent, &quot;    ExceptionCode ec = 0;\n&quot;);
-                        }
</del><ins>+                    GenerateArgumentsCountCheck(\@implContent, $function, $interface);
</ins><span class="cx"> 
</span><del>-                        if ($function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;CheckSecurityForNode&quot;}) {
-                            push(@implContent, &quot;    if (!shouldAllowAccessToNode(state, impl.&quot; . $function-&gt;signature-&gt;name . &quot;(&quot; . ($raisesException ? &quot;ec&quot; : &quot;&quot;) .&quot;)))\n&quot;);
-                            push(@implContent, &quot;        return JSValue::encode(jsNull());\n&quot;);
-                            $implIncludes{&quot;JSDOMBinding.h&quot;} = 1;
-                        }
</del><ins>+                    if ($raisesExceptionWithMessage) {
+                        push(@implContent, &quot;    ExceptionCodeWithMessage ec;\n&quot;);
+                    } elsif ($raisesException) {
+                        push(@implContent, &quot;    ExceptionCode ec = 0;\n&quot;);
+                    }
</ins><span class="cx"> 
</span><del>-                        my $numParameters = @{$function-&gt;parameters};
-                        my ($functionString, $dummy) = GenerateParametersCheck(\@implContent, $function, $interface, $numParameters, $functionImplementationName, $svgPropertyType, $svgPropertyOrListPropertyType, $svgListPropertyType);
-                        GenerateImplementationFunctionCall($function, $functionString, &quot;    &quot;, $svgPropertyType, $interface);
</del><ins>+                    if ($function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;CheckSecurityForNode&quot;}) {
+                        push(@implContent, &quot;    if (!shouldAllowAccessToNode(state, impl.&quot; . $function-&gt;signature-&gt;name . &quot;(&quot; . ($raisesException ? &quot;ec&quot; : &quot;&quot;) .&quot;)))\n&quot;);
+                        push(@implContent, &quot;        return JSValue::encode(jsNull());\n&quot;);
+                        $implIncludes{&quot;JSDOMBinding.h&quot;} = 1;
</ins><span class="cx">                     }
</span><ins>+
+                    my $numParameters = @{$function-&gt;parameters};
+                    my ($functionString, $dummy) = GenerateParametersCheck(\@implContent, $function, $interface, $numParameters, $functionImplementationName, $svgPropertyType, $svgPropertyOrListPropertyType, $svgListPropertyType);
+                    GenerateImplementationFunctionCall($function, $functionString, &quot;    &quot;, $svgPropertyType, $interface);
</ins><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="lines">@@ -4436,6 +4413,9 @@
</span><span class="cx"> 
</span><span class="cx">     AddToImplIncludes(&quot;JS$type.h&quot;, $conditional);
</span><span class="cx"> 
</span><ins>+    # FIXME: EventListener should be a callback interface.
+    return &quot;JSEventListener::create($value, *castedThis, false, currentWorld(state))&quot; if $type eq &quot;EventListener&quot;;
+
</ins><span class="cx">     my $extendedAttributes = $codeGenerator-&gt;getInterfaceExtendedAttributesFromName($type);
</span><span class="cx">     return (&quot;JS${type}::toWrapped(*state, $value)&quot;, 1) if $extendedAttributes-&gt;{&quot;JSCustomToNativeObject&quot;};
</span><span class="cx">     return (&quot;JS${type}::toWrapped($value)&quot;, 0);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -4390,10 +4390,18 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;addEventListener&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue listener = state-&gt;argument(1);
-    if (UNLIKELY(!listener.isObject()))
</del><ins>+    if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
+        return throwVMError(state, createNotEnoughArgumentsError(state));
+    auto type = state-&gt;argument(0).toWTFString(state);
+    if (UNLIKELY(state-&gt;hadException()))
</ins><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.addEventListener(state-&gt;argument(0).toString(state)-&gt;toAtomicString(state), createJSEventListenerForAdd(*state, *asObject(listener), *castedThis), state-&gt;argument(2).toBoolean(state));
</del><ins>+    auto listener = JSEventListener::create(state-&gt;argument(1), *castedThis, false, currentWorld(state));
+    if (UNLIKELY(!listener))
+        return throwArgumentTypeError(*state, 1, &quot;listener&quot;, &quot;TestObj&quot;, &quot;addEventListener&quot;, &quot;EventListener&quot;);
+    auto useCapture = state-&gt;argument(2).toBoolean(state);
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.addEventListener(WTFMove(type), *listener, WTFMove(useCapture));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4405,10 +4413,18 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;removeEventListener&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue listener = state-&gt;argument(1);
-    if (UNLIKELY(!listener.isObject()))
</del><ins>+    if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
+        return throwVMError(state, createNotEnoughArgumentsError(state));
+    auto type = state-&gt;argument(0).toWTFString(state);
+    if (UNLIKELY(state-&gt;hadException()))
</ins><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    impl.removeEventListener(state-&gt;argument(0).toString(state)-&gt;toAtomicString(state), createJSEventListenerForRemove(*state, *asObject(listener), *castedThis).ptr(), state-&gt;argument(2).toBoolean(state));
</del><ins>+    auto listener = JSEventListener::create(state-&gt;argument(1), *castedThis, false, currentWorld(state));
+    if (UNLIKELY(!listener))
+        return throwArgumentTypeError(*state, 1, &quot;listener&quot;, &quot;TestObj&quot;, &quot;removeEventListener&quot;, &quot;EventListener&quot;);
+    auto useCapture = state-&gt;argument(2).toBoolean(state);
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.removeEventListener(WTFMove(type), *listener, WTFMove(useCapture));
</ins><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventListenerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventListener.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventListener.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/dom/EventListener.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     virtual ~EventListener() { }
</span><del>-    virtual bool operator==(const EventListener&amp;) = 0;
</del><ins>+    virtual bool operator==(const EventListener&amp;) const = 0;
</ins><span class="cx">     virtual void handleEvent(ScriptExecutionContext*, Event*) = 0;
</span><span class="cx">     virtual bool wasCreatedFromMarkup() const { return false; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventListenerMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventListenerMap.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventListenerMap.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/dom/EventListenerMap.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -95,9 +95,9 @@
</span><span class="cx">     return types;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool addListenerToVector(EventListenerVector* vector, PassRefPtr&lt;EventListener&gt; listener, bool useCapture)
</del><ins>+static bool addListenerToVector(EventListenerVector* vector, Ref&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><del>-    RegisteredEventListener registeredListener(listener, useCapture);
</del><ins>+    RegisteredEventListener registeredListener(WTFMove(listener), useCapture);
</ins><span class="cx"> 
</span><span class="cx">     if (vector-&gt;find(registeredListener) != notFound)
</span><span class="cx">         return false; // Duplicate listener.
</span><span class="lines">@@ -106,20 +106,20 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool EventListenerMap::add(const AtomicString&amp; eventType, PassRefPtr&lt;EventListener&gt; listener, bool useCapture)
</del><ins>+bool EventListenerMap::add(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><span class="cx">     assertNoActiveIterators();
</span><span class="cx"> 
</span><span class="cx">     for (auto&amp; entry : m_entries) {
</span><span class="cx">         if (entry.first == eventType)
</span><del>-            return addListenerToVector(entry.second.get(), listener, useCapture);
</del><ins>+            return addListenerToVector(entry.second.get(), WTFMove(listener), useCapture);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_entries.append(std::make_pair(eventType, std::make_unique&lt;EventListenerVector&gt;()));
</span><del>-    return addListenerToVector(m_entries.last().second.get(), listener, useCapture);
</del><ins>+    return addListenerToVector(m_entries.last().second.get(), WTFMove(listener), useCapture);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool removeListenerFromVector(EventListenerVector* listenerVector, EventListener* listener, bool useCapture, size_t&amp; indexOfRemovedListener)
</del><ins>+static bool removeListenerFromVector(EventListenerVector* listenerVector, EventListener&amp; listener, bool useCapture, size_t&amp; indexOfRemovedListener)
</ins><span class="cx"> {
</span><span class="cx">     RegisteredEventListener registeredListener(listener, useCapture);
</span><span class="cx">     indexOfRemovedListener = listenerVector-&gt;find(registeredListener);
</span><span class="lines">@@ -129,7 +129,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool EventListenerMap::remove(const AtomicString&amp; eventType, EventListener* listener, bool useCapture, size_t&amp; indexOfRemovedListener)
</del><ins>+bool EventListenerMap::remove(const AtomicString&amp; eventType, EventListener&amp; listener, bool useCapture, size_t&amp; indexOfRemovedListener)
</ins><span class="cx"> {
</span><span class="cx">     assertNoActiveIterators();
</span><span class="cx"> 
</span><span class="lines">@@ -185,7 +185,7 @@
</span><span class="cx">         // Event listeners created from markup have already been transfered to the shadow tree during cloning.
</span><span class="cx">         if (listener.listener-&gt;wasCreatedFromMarkup())
</span><span class="cx">             continue;
</span><del>-        target-&gt;addEventListener(eventType, listener.listener.copyRef(), listener.useCapture);
</del><ins>+        target-&gt;addEventListener(eventType, *listener.listener, listener.useCapture);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventListenerMaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventListenerMap.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventListenerMap.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/dom/EventListenerMap.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -54,8 +54,8 @@
</span><span class="cx">     bool containsCapturing(const AtomicString&amp; eventType) const;
</span><span class="cx"> 
</span><span class="cx">     void clear();
</span><del>-    bool add(const AtomicString&amp; eventType, PassRefPtr&lt;EventListener&gt;, bool useCapture);
-    bool remove(const AtomicString&amp; eventType, EventListener*, bool useCapture, size_t&amp; indexOfRemovedListener);
</del><ins>+    bool add(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp;, bool useCapture);
+    bool remove(const AtomicString&amp; eventType, EventListener&amp;, bool useCapture, size_t&amp; indexOfRemovedListener);
</ins><span class="cx">     EventListenerVector* find(const AtomicString&amp; eventType);
</span><span class="cx">     Vector&lt;AtomicString&gt; eventTypes() const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventTargetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventTarget.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventTarget.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/dom/EventTarget.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -75,13 +75,29 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool EventTarget::addEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</del><ins>+bool EventTarget::addEventListener(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><span class="cx">     return ensureEventTargetData().eventListenerMap.add(eventType, WTFMove(listener), useCapture);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool EventTarget::removeEventListener(const AtomicString&amp; eventType, EventListener* listener, bool useCapture)
</del><ins>+void EventTarget::addEventListenerForBindings(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><ins>+    // FIXME: listener is not supposed to be nullable.
+    if (!listener)
+        return;
+    addEventListener(eventType, listener.releaseNonNull(), useCapture);
+}
+
+void EventTarget::removeEventListenerForBindings(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
+{
+    // FIXME: listener is not supposed to be nullable.
+    if (!listener)
+        return;
+    removeEventListener(eventType, *listener, useCapture);
+}
+
+bool EventTarget::removeEventListener(const AtomicString&amp; eventType, EventListener&amp; listener, bool useCapture)
+{
</ins><span class="cx">     EventTargetData* d = eventTargetData();
</span><span class="cx">     if (!d)
</span><span class="cx">         return false;
</span><span class="lines">@@ -110,12 +126,12 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool EventTarget::setAttributeEventListener(const AtomicString&amp; eventType, PassRefPtr&lt;EventListener&gt; listener)
</del><ins>+bool EventTarget::setAttributeEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp; listener)
</ins><span class="cx"> {
</span><span class="cx">     clearAttributeEventListener(eventType);
</span><span class="cx">     if (!listener)
</span><span class="cx">         return false;
</span><del>-    return addEventListener(eventType, listener, false);
</del><ins>+    return addEventListener(eventType, listener.releaseNonNull(), false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> EventListener* EventTarget::getAttributeEventListener(const AtomicString&amp; eventType)
</span><span class="lines">@@ -132,7 +148,7 @@
</span><span class="cx">     EventListener* listener = getAttributeEventListener(eventType);
</span><span class="cx">     if (!listener)
</span><span class="cx">         return false;
</span><del>-    return removeEventListener(eventType, listener, false);
</del><ins>+    return removeEventListener(eventType, *listener, false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool EventTarget::dispatchEventForBindings(Event* event, ExceptionCode&amp; ec)
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventTargeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventTarget.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventTarget.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/dom/EventTarget.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -121,15 +121,18 @@
</span><span class="cx">     virtual DOMWindow* toDOMWindow();
</span><span class="cx">     virtual bool isMessagePort() const;
</span><span class="cx"> 
</span><del>-    virtual bool addEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp;, bool useCapture);
-    virtual bool removeEventListener(const AtomicString&amp; eventType, EventListener*, bool useCapture);
</del><ins>+    void addEventListenerForBindings(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp;, bool useCapture);
+    void removeEventListenerForBindings(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp;, bool useCapture);
+    virtual bool addEventListener(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp;, bool useCapture);
+    virtual bool removeEventListener(const AtomicString&amp; eventType, EventListener&amp;, bool useCapture);
+
</ins><span class="cx">     virtual void removeAllEventListeners();
</span><span class="cx">     virtual bool dispatchEvent(Event&amp;);
</span><span class="cx">     bool dispatchEventForBindings(Event*, ExceptionCode&amp;); // DOM API
</span><span class="cx">     virtual void uncaughtExceptionInEventHandler();
</span><span class="cx"> 
</span><span class="cx">     // Used for legacy &quot;onEvent&quot; attribute APIs.
</span><del>-    bool setAttributeEventListener(const AtomicString&amp; eventType, PassRefPtr&lt;EventListener&gt;);
</del><ins>+    bool setAttributeEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp;);
</ins><span class="cx">     bool clearAttributeEventListener(const AtomicString&amp; eventType);
</span><span class="cx">     EventListener* getAttributeEventListener(const AtomicString&amp; eventType);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventTargetidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventTarget.idl (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventTarget.idl        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/dom/EventTarget.idl        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -25,8 +25,10 @@
</span><span class="cx">     JSCustomToNativeObject,
</span><span class="cx">     ObjCProtocol,
</span><span class="cx"> ] interface EventTarget {
</span><del>-    [ObjCLegacyUnnamedParameters] void addEventListener(DOMString type, EventListener? listener, optional boolean useCapture = false);
-    [ObjCLegacyUnnamedParameters] void removeEventListener(DOMString type, EventListener? listener, optional boolean useCapture = false);
</del><ins>+    // FIXME: The 'type' and 'listener' parameters should not be optional.
+    [ObjCLegacyUnnamedParameters, ImplementedAs=addEventListenerForBindings] void addEventListener([AtomicString] optional DOMString type = &quot;undefined&quot;, optional EventListener? listener, optional boolean useCapture = false);
+    [ObjCLegacyUnnamedParameters, ImplementedAs=removeEventListenerForBindings] void removeEventListener([AtomicString] optional DOMString type = &quot;undefined&quot;, optional EventListener? listener, optional boolean useCapture = false);
+
</ins><span class="cx">     // FIXME: event should not be nullable.
</span><span class="cx">     [ImplementedAs=dispatchEventForBindings, RaisesException] boolean dispatchEvent(Event? event);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoredomMessagePortcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/MessagePort.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/MessagePort.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/dom/MessagePort.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -221,9 +221,9 @@
</span><span class="cx">     return portArray;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool MessagePort::addEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</del><ins>+bool MessagePort::addEventListener(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><del>-    if (listener &amp;&amp; listener-&gt;isAttribute() &amp;&amp; eventType == eventNames().messageEvent)
</del><ins>+    if (listener-&gt;isAttribute() &amp;&amp; eventType == eventNames().messageEvent)
</ins><span class="cx">         start();
</span><span class="cx">     return EventTargetWithInlineData::addEventListener(eventType, WTFMove(listener), useCapture);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomMessagePorth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/MessagePort.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/MessagePort.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/dom/MessagePort.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx">         // A port gets neutered when it is transferred to a new owner via postMessage().
</span><span class="cx">         bool isNeutered() { return !m_entangledChannel; }
</span><span class="cx"> 
</span><del>-        bool addEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp;, bool useCapture) override;
</del><ins>+        bool addEventListener(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp;, bool useCapture) override;
</ins><span class="cx"> 
</span><span class="cx">     private:
</span><span class="cx">         explicit MessagePort(ScriptExecutionContext&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/dom/Node.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -1902,7 +1902,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline bool tryAddEventListener(Node* targetNode, const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</del><ins>+static inline bool tryAddEventListener(Node* targetNode, const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><span class="cx">     if (!targetNode-&gt;EventTarget::addEventListener(eventType, listener.copyRef(), useCapture))
</span><span class="cx">         return false;
</span><span class="lines">@@ -1938,12 +1938,12 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Node::addEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</del><ins>+bool Node::addEventListener(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><span class="cx">     return tryAddEventListener(this, eventType, WTFMove(listener), useCapture);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline bool tryRemoveEventListener(Node* targetNode, const AtomicString&amp; eventType, EventListener* listener, bool useCapture)
</del><ins>+static inline bool tryRemoveEventListener(Node* targetNode, const AtomicString&amp; eventType, EventListener&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><span class="cx">     if (!targetNode-&gt;EventTarget::removeEventListener(eventType, listener, useCapture))
</span><span class="cx">         return false;
</span><span class="lines">@@ -1979,7 +1979,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Node::removeEventListener(const AtomicString&amp; eventType, EventListener* listener, bool useCapture)
</del><ins>+bool Node::removeEventListener(const AtomicString&amp; eventType, EventListener&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><span class="cx">     return tryRemoveEventListener(this, eventType, listener, useCapture);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/dom/Node.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -506,8 +506,8 @@
</span><span class="cx">     EventTargetInterface eventTargetInterface() const override;
</span><span class="cx">     ScriptExecutionContext* scriptExecutionContext() const final; // Implemented in Document.h
</span><span class="cx"> 
</span><del>-    bool addEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp;, bool useCapture) override;
-    bool removeEventListener(const AtomicString&amp; eventType, EventListener*, bool useCapture) override;
</del><ins>+    bool addEventListener(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp;, bool useCapture) override;
+    bool removeEventListener(const AtomicString&amp; eventType, EventListener&amp;, bool useCapture) override;
</ins><span class="cx"> 
</span><span class="cx">     using EventTarget::dispatchEvent;
</span><span class="cx">     bool dispatchEvent(Event&amp;) override;
</span></span></pre></div>
<a id="trunkSourceWebCoredomRegisteredEventListenerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/RegisteredEventListener.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/RegisteredEventListener.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/dom/RegisteredEventListener.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -31,8 +31,8 @@
</span><span class="cx"> 
</span><span class="cx">     class RegisteredEventListener {
</span><span class="cx">     public:
</span><del>-        RegisteredEventListener(PassRefPtr&lt;EventListener&gt; listener, bool useCapture)
-            : listener(listener)
</del><ins>+        RegisteredEventListener(Ref&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
+            : listener(WTFMove(listener))
</ins><span class="cx">             , useCapture(useCapture)
</span><span class="cx">         {
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -5216,7 +5216,7 @@
</span><span class="cx">     return HTMLElement::dispatchEvent(event);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool HTMLMediaElement::addEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</del><ins>+bool HTMLMediaElement::addEventListener(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><span class="cx">     if (eventType != eventNames().webkitplaybacktargetavailabilitychangedEvent)
</span><span class="cx">         return Node::addEventListener(eventType, WTFMove(listener), useCapture);
</span><span class="lines">@@ -5236,7 +5236,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool HTMLMediaElement::removeEventListener(const AtomicString&amp; eventType, EventListener* listener, bool useCapture)
</del><ins>+bool HTMLMediaElement::removeEventListener(const AtomicString&amp; eventType, EventListener&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><span class="cx">     if (eventType != eventNames().webkitplaybacktargetavailabilitychangedEvent)
</span><span class="cx">         return Node::removeEventListener(eventType, listener, useCapture);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -344,8 +344,8 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WIRELESS_PLAYBACK_TARGET)
</span><span class="cx">     void webkitShowPlaybackTargetPicker();
</span><del>-    bool addEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp;, bool useCapture) override;
-    bool removeEventListener(const AtomicString&amp; eventType, EventListener*, bool useCapture) override;
</del><ins>+    bool addEventListener(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp;, bool useCapture) override;
+    bool removeEventListener(const AtomicString&amp; eventType, EventListener&amp;, bool useCapture) override;
</ins><span class="cx"> 
</span><span class="cx">     void wirelessRoutesAvailableDidChange() override;
</span><span class="cx">     bool canPlayToWirelessPlaybackTarget() const override;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlImageDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/ImageDocument.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/ImageDocument.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/html/ImageDocument.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    bool operator==(const EventListener&amp;) override;
</del><ins>+    bool operator==(const EventListener&amp;) const override;
</ins><span class="cx">     void handleEvent(ScriptExecutionContext*, Event*) override;
</span><span class="cx"> 
</span><span class="cx">     ImageDocument&amp; m_document;
</span><span class="lines">@@ -237,7 +237,7 @@
</span><span class="cx">         // Set the viewport to be in device pixels (rather than the default of 980).
</span><span class="cx">         processViewport(ASCIILiteral(&quot;width=device-width&quot;), ViewportArguments::ImageDocument);
</span><span class="cx"> #else
</span><del>-        RefPtr&lt;EventListener&gt; listener = ImageEventListener::create(*this);
</del><ins>+        auto listener = ImageEventListener::create(*this);
</ins><span class="cx">         if (DOMWindow* window = this-&gt;domWindow())
</span><span class="cx">             window-&gt;addEventListener(&quot;resize&quot;, listener.copyRef(), false);
</span><span class="cx">         imageElement-&gt;addEventListener(&quot;click&quot;, WTFMove(listener), false);
</span><span class="lines">@@ -407,7 +407,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool ImageEventListener::operator==(const EventListener&amp; other)
</del><ins>+bool ImageEventListener::operator==(const EventListener&amp; other) const
</ins><span class="cx"> {
</span><span class="cx">     // All ImageEventListener objects compare as equal; OK since there is only one per document.
</span><span class="cx">     return other.type() == ImageEventListenerType;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlshadowMediaControlsApplecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/shadow/MediaControlsApple.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/shadow/MediaControlsApple.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/html/shadow/MediaControlsApple.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -509,15 +509,15 @@
</span><span class="cx">     m_panel-&gt;setInlineStyleProperty(CSSPropertyPointerEvents, CSSValueNone);
</span><span class="cx"> 
</span><span class="cx">     EventListener&amp; listener = eventListener();
</span><del>-    m_closedCaptionsContainer-&gt;addEventListener(eventNames().wheelEvent, &amp;listener, true);
</del><ins>+    m_closedCaptionsContainer-&gt;addEventListener(eventNames().wheelEvent, listener, true);
</ins><span class="cx"> 
</span><span class="cx">     // Track click events in the capture phase at two levels, first at the document level
</span><span class="cx">     // such that a click outside of the &lt;video&gt; may dismiss the track list, second at the
</span><span class="cx">     // media controls level such that a click anywhere outside of the track list hides the
</span><span class="cx">     // track list. These two levels are necessary since it would not be possible to get a
</span><span class="cx">     // reference to the track list when handling the event outside of the shadow tree.
</span><del>-    document().addEventListener(eventNames().clickEvent, &amp;listener, true);
-    addEventListener(eventNames().clickEvent, &amp;listener, true);
</del><ins>+    document().addEventListener(eventNames().clickEvent, listener, true);
+    addEventListener(eventNames().clickEvent, listener, true);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaControlsApple::hideClosedCaptionTrackList()
</span><span class="lines">@@ -531,9 +531,9 @@
</span><span class="cx">     m_panel-&gt;removeInlineStyleProperty(CSSPropertyPointerEvents);
</span><span class="cx"> 
</span><span class="cx">     EventListener&amp; listener = eventListener();
</span><del>-    m_closedCaptionsContainer-&gt;removeEventListener(eventNames().wheelEvent, &amp;listener, true);
-    document().removeEventListener(eventNames().clickEvent, &amp;listener, true);
-    removeEventListener(eventNames().clickEvent, &amp;listener, true);
</del><ins>+    m_closedCaptionsContainer-&gt;removeEventListener(eventNames().wheelEvent, listener, true);
+    document().removeEventListener(eventNames().clickEvent, listener, true);
+    removeEventListener(eventNames().clickEvent, listener, true);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaControlsApple::setFullscreenSliderVolume()
</span><span class="lines">@@ -595,7 +595,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool MediaControlsAppleEventListener::operator==(const EventListener&amp; listener)
</del><ins>+bool MediaControlsAppleEventListener::operator==(const EventListener&amp; listener) const
</ins><span class="cx"> {
</span><span class="cx">     if (const MediaControlsAppleEventListener* mediaControlsAppleEventListener = MediaControlsAppleEventListener::cast(&amp;listener))
</span><span class="cx">         return m_mediaControls == mediaControlsAppleEventListener-&gt;m_mediaControls;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlshadowMediaControlsAppleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/shadow/MediaControlsApple.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/shadow/MediaControlsApple.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/html/shadow/MediaControlsApple.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx">             : 0;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    bool operator==(const EventListener&amp; other) override;
</del><ins>+    bool operator==(const EventListener&amp; other) const override;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     MediaControlsAppleEventListener(MediaControlsApple* mediaControls)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -112,7 +112,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual ~OpenDatabaseCallback() { }
</span><span class="cx"> 
</span><del>-    bool operator==(const EventListener&amp; other) override
</del><ins>+    bool operator==(const EventListener&amp; other) const override
</ins><span class="cx">     {
</span><span class="cx">         return this == &amp;other;
</span><span class="cx">     }
</span><span class="lines">@@ -371,7 +371,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual ~OpenCursorCallback() { }
</span><span class="cx"> 
</span><del>-    bool operator==(const EventListener&amp; other) override
</del><ins>+    bool operator==(const EventListener&amp; other) const override
</ins><span class="cx">     {
</span><span class="cx">         return this == &amp;other;
</span><span class="cx">     }
</span><span class="lines">@@ -660,7 +660,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual ~ClearObjectStoreListener() { }
</span><span class="cx"> 
</span><del>-    bool operator==(const EventListener&amp; other) override
</del><ins>+    bool operator==(const EventListener&amp; other) const override
</ins><span class="cx">     {
</span><span class="cx">         return this == &amp;other;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/page/DOMWindow.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -1723,7 +1723,7 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool DOMWindow::addEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</del><ins>+bool DOMWindow::addEventListener(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><span class="cx">     if (!EventTarget::addEventListener(eventType, WTFMove(listener), useCapture))
</span><span class="cx">         return false;
</span><span class="lines">@@ -1826,7 +1826,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool DOMWindow::removeEventListener(const AtomicString&amp; eventType, EventListener* listener, bool useCapture)
</del><ins>+bool DOMWindow::removeEventListener(const AtomicString&amp; eventType, EventListener&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><span class="cx">     if (!EventTarget::removeEventListener(eventType, listener, useCapture))
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/page/DOMWindow.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -279,8 +279,8 @@
</span><span class="cx"> 
</span><span class="cx">         // Events
</span><span class="cx">         // EventTarget API
</span><del>-        bool addEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp;, bool useCapture) override;
-        bool removeEventListener(const AtomicString&amp; eventType, EventListener*, bool useCapture) override;
</del><ins>+        bool addEventListener(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp;, bool useCapture) override;
+        bool removeEventListener(const AtomicString&amp; eventType, EventListener&amp;, bool useCapture) override;
</ins><span class="cx">         void removeAllEventListeners() override;
</span><span class="cx"> 
</span><span class="cx">         using EventTarget::dispatchEvent;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformcocoaWebPlaybackSessionModelMediaElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT void handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) final;
</span><span class="cx">     void updateForEventName(const WTF::AtomicString&amp;);
</span><del>-    bool operator==(const EventListener&amp; rhs) final { return static_cast&lt;WebCore::EventListener*&gt;(this) == &amp;rhs; }
</del><ins>+    bool operator==(const EventListener&amp; rhs) const final { return static_cast&lt;const WebCore::EventListener*&gt;(this) == &amp;rhs; }
</ins><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT void play() final;
</span><span class="cx">     WEBCORE_EXPORT void pause() final;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformcocoaWebPlaybackSessionModelMediaElementmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (m_mediaElement &amp;&amp; m_isListening) {
</span><span class="cx">         for (auto&amp; eventName : observedEventNames())
</span><del>-            m_mediaElement-&gt;removeEventListener(eventName, this, false);
</del><ins>+            m_mediaElement-&gt;removeEventListener(eventName, *this, false);
</ins><span class="cx">     }
</span><span class="cx">     m_isListening = false;
</span><span class="cx"> 
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     for (auto&amp; eventName : observedEventNames())
</span><del>-        m_mediaElement-&gt;addEventListener(eventName, this, false);
</del><ins>+        m_mediaElement-&gt;addEventListener(eventName, *this, false);
</ins><span class="cx">     m_isListening = true;
</span><span class="cx"> 
</span><span class="cx">     updateForEventName(eventNameAll());
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformcocoaWebVideoFullscreenModelVideoElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -60,8 +60,7 @@
</span><span class="cx">     
</span><span class="cx">     WEBCORE_EXPORT void handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) override;
</span><span class="cx">     void updateForEventName(const WTF::AtomicString&amp;);
</span><del>-    bool operator==(const EventListener&amp; rhs) override
-        {return static_cast&lt;WebCore::EventListener*&gt;(this) == &amp;rhs;}
</del><ins>+    bool operator==(const EventListener&amp; rhs) const override { return static_cast&lt;const WebCore::EventListener*&gt;(this) == &amp;rhs; }
</ins><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT void requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenMode) override;
</span><span class="cx">     WEBCORE_EXPORT void setVideoLayerFrame(FloatRect) override;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformcocoaWebVideoFullscreenModelVideoElementmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.mm (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.mm        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.mm        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (m_videoElement &amp;&amp; m_isListening) {
</span><span class="cx">         for (auto&amp; eventName : observedEventNames())
</span><del>-            m_videoElement-&gt;removeEventListener(eventName, this, false);
</del><ins>+            m_videoElement-&gt;removeEventListener(eventName, *this, false);
</ins><span class="cx">     }
</span><span class="cx">     m_isListening = false;
</span><span class="cx"> 
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     for (auto&amp; eventName : observedEventNames())
</span><del>-        m_videoElement-&gt;addEventListener(eventName, this, false);
</del><ins>+        m_videoElement-&gt;addEventListener(eventName, *this, false);
</ins><span class="cx">     m_isListening = true;
</span><span class="cx"> 
</span><span class="cx">     updateForEventName(eventNameAll());
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/svg/SVGElement.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -528,7 +528,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SVGElement::addEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</del><ins>+bool SVGElement::addEventListener(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp; listener, bool useCapture)
</ins><span class="cx"> {   
</span><span class="cx">     // Add event listener to regular DOM element
</span><span class="cx">     if (!Node::addEventListener(eventType, listener.copyRef(), useCapture))
</span><span class="lines">@@ -548,7 +548,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SVGElement::removeEventListener(const AtomicString&amp; eventType, EventListener* listener, bool useCapture)
</del><ins>+bool SVGElement::removeEventListener(const AtomicString&amp; eventType, EventListener&amp; listener, bool useCapture)
</ins><span class="cx"> {
</span><span class="cx">     if (containingShadowRoot())
</span><span class="cx">         return Node::removeEventListener(eventType, listener, useCapture);
</span><span class="lines">@@ -558,7 +558,7 @@
</span><span class="cx">     // event listener in a cache. If we want to be able to call removeEventListener() multiple
</span><span class="cx">     // times on different nodes, we have to delay its immediate destruction, which would happen
</span><span class="cx">     // after the first call below.
</span><del>-    RefPtr&lt;EventListener&gt; protector(listener);
</del><ins>+    Ref&lt;EventListener&gt; protector(listener);
</ins><span class="cx"> 
</span><span class="cx">     // Remove event listener from regular DOM element
</span><span class="cx">     if (!Node::removeEventListener(eventType, listener, useCapture))
</span><span class="lines">@@ -573,7 +573,7 @@
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><span class="cx">         // This case can only be hit for event listeners created from markup
</span><del>-        ASSERT(listener-&gt;wasCreatedFromMarkup());
</del><ins>+        ASSERT(listener.wasCreatedFromMarkup());
</ins><span class="cx"> 
</span><span class="cx">         // If the event listener 'listener' has been created from markup and has been fired before
</span><span class="cx">         // then JSLazyEventListener::parseCode() has been called and m_jsFunction of that listener
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/svg/SVGElement.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -133,8 +133,8 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool haveLoadedRequiredResources();
</span><span class="cx"> 
</span><del>-    bool addEventListener(const AtomicString&amp; eventType, RefPtr&lt;EventListener&gt;&amp;&amp;, bool useCapture) override;
-    bool removeEventListener(const AtomicString&amp; eventType, EventListener*, bool useCapture) override;
</del><ins>+    bool addEventListener(const AtomicString&amp; eventType, Ref&lt;EventListener&gt;&amp;&amp;, bool useCapture) override;
+    bool removeEventListener(const AtomicString&amp; eventType, EventListener&amp;, bool useCapture) override;
</ins><span class="cx">     bool hasFocusEventListeners() const;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_REGIONS)
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTRefElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTRefElement.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTRefElement.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/svg/SVGTRefElement.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx">     explicit SVGTRefTargetEventListener(SVGTRefElement&amp; trefElement);
</span><span class="cx"> 
</span><span class="cx">     void handleEvent(ScriptExecutionContext*, Event*) override;
</span><del>-    bool operator==(const EventListener&amp;) override;
</del><ins>+    bool operator==(const EventListener&amp;) const override;
</ins><span class="cx"> 
</span><span class="cx">     SVGTRefElement&amp; m_trefElement;
</span><span class="cx">     RefPtr&lt;Element&gt; m_target;
</span><span class="lines">@@ -92,8 +92,8 @@
</span><span class="cx">     ASSERT(target.get());
</span><span class="cx">     ASSERT(target-&gt;inDocument());
</span><span class="cx"> 
</span><del>-    target-&gt;addEventListener(eventNames().DOMSubtreeModifiedEvent, this, false);
-    target-&gt;addEventListener(eventNames().DOMNodeRemovedFromDocumentEvent, this, false);
</del><ins>+    target-&gt;addEventListener(eventNames().DOMSubtreeModifiedEvent, *this, false);
+    target-&gt;addEventListener(eventNames().DOMNodeRemovedFromDocumentEvent, *this, false);
</ins><span class="cx">     m_target = WTFMove(target);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -102,12 +102,12 @@
</span><span class="cx">     if (!isAttached())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_target-&gt;removeEventListener(eventNames().DOMSubtreeModifiedEvent, this, false);
-    m_target-&gt;removeEventListener(eventNames().DOMNodeRemovedFromDocumentEvent, this, false);
</del><ins>+    m_target-&gt;removeEventListener(eventNames().DOMSubtreeModifiedEvent, *this, false);
+    m_target-&gt;removeEventListener(eventNames().DOMNodeRemovedFromDocumentEvent, *this, false);
</ins><span class="cx">     m_target = nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SVGTRefTargetEventListener::operator==(const EventListener&amp; listener)
</del><ins>+bool SVGTRefTargetEventListener::operator==(const EventListener&amp; listener) const
</ins><span class="cx"> {
</span><span class="cx">     if (const SVGTRefTargetEventListener* targetListener = SVGTRefTargetEventListener::cast(&amp;listener))
</span><span class="cx">         return &amp;m_trefElement == &amp;targetListener-&gt;m_trefElement;
</span></span></pre></div>
<a id="trunkSourceWebCoresvganimationSVGSMILElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx">             : nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    bool operator==(const EventListener&amp; other) override;
</del><ins>+    bool operator==(const EventListener&amp; other) const override;
</ins><span class="cx">     
</span><span class="cx">     void disconnectAnimation()
</span><span class="cx">     {
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx">     SVGSMILElement::Condition* m_condition;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-bool ConditionEventListener::operator==(const EventListener&amp; listener)
</del><ins>+bool ConditionEventListener::operator==(const EventListener&amp; listener) const
</ins><span class="cx"> {
</span><span class="cx">     if (const ConditionEventListener* conditionEventListener = ConditionEventListener::cast(&amp;listener))
</span><span class="cx">         return m_animation == conditionEventListener-&gt;m_animation &amp;&amp; m_condition == conditionEventListener-&gt;m_condition;
</span><span class="lines">@@ -545,7 +545,7 @@
</span><span class="cx">                 continue;
</span><span class="cx">             ASSERT(!condition.m_eventListener);
</span><span class="cx">             condition.m_eventListener = ConditionEventListener::create(this, &amp;condition);
</span><del>-            eventBase-&gt;addEventListener(condition.m_name, condition.m_eventListener, false);
</del><ins>+            eventBase-&gt;addEventListener(condition.m_name, *condition.m_eventListener, false);
</ins><span class="cx">         } else if (condition.m_type == Condition::Syncbase) {
</span><span class="cx">             ASSERT(!condition.m_baseID.isEmpty());
</span><span class="cx">             condition.m_syncbase = treeScope().getElementById(condition.m_baseID);
</span><span class="lines">@@ -577,7 +577,7 @@
</span><span class="cx">             // our condition event listener, in case it later fires.
</span><span class="cx">             Element* eventBase = eventBaseFor(condition);
</span><span class="cx">             if (eventBase)
</span><del>-                eventBase-&gt;removeEventListener(condition.m_name, condition.m_eventListener.get(), false);
</del><ins>+                eventBase-&gt;removeEventListener(condition.m_name, *condition.m_eventListener, false);
</ins><span class="cx">             condition.m_eventListener-&gt;disconnectAnimation();
</span><span class="cx">             condition.m_eventListener = nullptr;
</span><span class="cx">         } else if (condition.m_type == Condition::Syncbase) {
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebKit/win/ChangeLog        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-05-23  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Generate bindings code for EventTarget.addEventListener() / removeEventListener()
+        https://bugs.webkit.org/show_bug.cgi?id=157882
+
+        Reviewed by Darin Adler.
+
+        Generate bindings code for EventTarget.addEventListener() / removeEventListener()
+        instead of hardcoding them in the bindings generator.
+
+        * DOMEventsClasses.cpp:
+        (WebEventListener::operator==):
+        * DOMEventsClasses.h:
+
</ins><span class="cx"> 2016-05-20  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove LegacyProfiler
</span></span></pre></div>
<a id="trunkSourceWebKitwinDOMCoreClassescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/DOMCoreClasses.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/DOMCoreClasses.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebKit/win/DOMCoreClasses.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -412,8 +412,8 @@
</span><span class="cx"> 
</span><span class="cx"> HRESULT DOMNode::addEventListener(_In_ BSTR type, _In_opt_ IDOMEventListener* listener, BOOL useCapture)
</span><span class="cx"> {
</span><del>-    RefPtr&lt;WebEventListener&gt; webListener = WebEventListener::create(listener);
-    m_node-&gt;addEventListener(type, webListener, useCapture);
</del><ins>+    auto webListener = WebEventListener::create(listener);
+    m_node-&gt;addEventListener(type, WTFMove(webListener), useCapture);
</ins><span class="cx"> 
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -424,8 +424,8 @@
</span><span class="cx">         return E_POINTER;
</span><span class="cx">     if (!m_node)
</span><span class="cx">         return E_FAIL;
</span><del>-    RefPtr&lt;WebEventListener&gt; webListener = WebEventListener::create(listener);
-    m_node-&gt;removeEventListener(type, webListener.get(), useCapture);
</del><ins>+    auto webListener = WebEventListener::create(listener);
+    m_node-&gt;removeEventListener(type, webListener, useCapture);
</ins><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -910,8 +910,8 @@
</span><span class="cx">         return E_POINTER;
</span><span class="cx">     if (!m_window)
</span><span class="cx">         return E_FAIL;
</span><del>-    RefPtr&lt;WebEventListener&gt; webListener = WebEventListener::create(listener);
-    m_window-&gt;addEventListener(type, webListener, useCapture);
</del><ins>+    auto webListener = WebEventListener::create(listener);
+    m_window-&gt;addEventListener(type, WTFMove(webListener), useCapture);
</ins><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -921,8 +921,8 @@
</span><span class="cx">         return E_POINTER;
</span><span class="cx">     if (!m_window)
</span><span class="cx">         return E_FAIL;
</span><del>-    RefPtr&lt;WebEventListener&gt; webListener = WebEventListener::create(listener);
-    m_window-&gt;removeEventListener(type, webListener.get(), useCapture);
</del><ins>+    auto webListener = WebEventListener::create(listener);
+    m_window-&gt;removeEventListener(type, webListener, useCapture);
</ins><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitwinDOMEventsClassescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/DOMEventsClasses.cpp (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/DOMEventsClasses.cpp        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebKit/win/DOMEventsClasses.cpp        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">     m_iDOMEventListener-&gt;Release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebEventListener::operator==(const WebCore::EventListener&amp; other)
</del><ins>+bool WebEventListener::operator==(const WebCore::EventListener&amp; other) const
</ins><span class="cx"> {
</span><span class="cx">     return (other.type() == CPPEventListenerType 
</span><span class="cx">         &amp;&amp; reinterpret_cast&lt;const WebEventListener*&gt;(&amp;other)-&gt;m_iDOMEventListener == m_iDOMEventListener);
</span><span class="lines">@@ -81,9 +81,9 @@
</span><span class="cx">     m_iDOMEventListener-&gt;handleEvent(domEvent.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;WebEventListener&gt; WebEventListener::create(IDOMEventListener* d)
</del><ins>+Ref&lt;WebEventListener&gt; WebEventListener::create(IDOMEventListener* d)
</ins><span class="cx"> {
</span><del>-    return adoptRef(new WebEventListener(d));
</del><ins>+    return adoptRef(*new WebEventListener(d));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // DOMEvent -------------------------------------------------------------------
</span></span></pre></div>
<a id="trunkSourceWebKitwinDOMEventsClassesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/DOMEventsClasses.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/DOMEventsClasses.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebKit/win/DOMEventsClasses.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -46,9 +46,9 @@
</span><span class="cx"> public:
</span><span class="cx">     WebEventListener(IDOMEventListener*);
</span><span class="cx">     ~WebEventListener();
</span><del>-    virtual bool operator==(const EventListener&amp;);
</del><ins>+    virtual bool operator==(const EventListener&amp;) const;
</ins><span class="cx">     virtual void handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*);
</span><del>-    static PassRefPtr&lt;WebEventListener&gt; create(IDOMEventListener*);
</del><ins>+    static Ref&lt;WebEventListener&gt; create(IDOMEventListener*);
</ins><span class="cx"> private:
</span><span class="cx">     IDOMEventListener* m_iDOMEventListener;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebKit2/ChangeLog        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2016-05-23  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Generate bindings code for EventTarget.addEventListener() / removeEventListener()
+        https://bugs.webkit.org/show_bug.cgi?id=157882
+
+        Reviewed by Darin Adler.
+
+        Generate bindings code for EventTarget.addEventListener() / removeEventListener()
+        instead of hardcoding them in the bindings generator.
+
+        * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
+        * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
+        (WebKit::PDFPluginAnnotation::attach):
+        (WebKit::PDFPluginAnnotation::~PDFPluginAnnotation):
+        * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
+        (WebKit::PDFPluginPasswordField::~PDFPluginPasswordField):
+        (WebKit::PDFPluginPasswordField::createAnnotationElement):
+        * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
+        (WebKit::PDFPluginTextAnnotation::~PDFPluginTextAnnotation):
+        (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
+
</ins><span class="cx"> 2016-05-23  Beth Dakin  &lt;bdakin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Need SPI for clients to require a user action to get an editing controls 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPDFPDFPluginAnnotationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginAnnotation.h (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginAnnotation.h        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginAnnotation.h        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">             return adoptRef(*new PDFPluginAnnotationEventListener(annotation));
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        bool operator==(const EventListener&amp; listener) override { return this == &amp;listener; }
</del><ins>+        bool operator==(const EventListener&amp; listener) const override { return this == &amp;listener; }
</ins><span class="cx"> 
</span><span class="cx">         void setAnnotation(PDFPluginAnnotation* annotation) { m_annotation = annotation; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPDFPDFPluginAnnotationmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginAnnotation.mm (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginAnnotation.mm        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginAnnotation.mm        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -69,8 +69,8 @@
</span><span class="cx">     m_element = createAnnotationElement();
</span><span class="cx"> 
</span><span class="cx">     m_element-&gt;setAttribute(classAttr, &quot;annotation&quot;);
</span><del>-    m_element-&gt;addEventListener(eventNames().changeEvent, m_eventListener, false);
-    m_element-&gt;addEventListener(eventNames().blurEvent, m_eventListener, false);
</del><ins>+    m_element-&gt;addEventListener(eventNames().changeEvent, *m_eventListener, false);
+    m_element-&gt;addEventListener(eventNames().blurEvent, *m_eventListener, false);
</ins><span class="cx"> 
</span><span class="cx">     updateGeometry();
</span><span class="cx"> 
</span><span class="lines">@@ -87,8 +87,8 @@
</span><span class="cx"> 
</span><span class="cx"> PDFPluginAnnotation::~PDFPluginAnnotation()
</span><span class="cx"> {
</span><del>-    m_element-&gt;removeEventListener(eventNames().changeEvent, m_eventListener.get(), false);
-    m_element-&gt;removeEventListener(eventNames().blurEvent, m_eventListener.get(), false);
</del><ins>+    m_element-&gt;removeEventListener(eventNames().changeEvent, *m_eventListener, false);
+    m_element-&gt;removeEventListener(eventNames().blurEvent, *m_eventListener, false);
</ins><span class="cx"> 
</span><span class="cx">     m_eventListener-&gt;setAnnotation(0);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPDFPDFPluginPasswordFieldmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginPasswordField.mm (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginPasswordField.mm        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginPasswordField.mm        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -49,14 +49,14 @@
</span><span class="cx"> 
</span><span class="cx"> PDFPluginPasswordField::~PDFPluginPasswordField()
</span><span class="cx"> {
</span><del>-    element()-&gt;removeEventListener(eventNames().keyupEvent, eventListener(), false);
</del><ins>+    element()-&gt;removeEventListener(eventNames().keyupEvent, *eventListener(), false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;Element&gt; PDFPluginPasswordField::createAnnotationElement()
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;Element&gt; element = PDFPluginTextAnnotation::createAnnotationElement();
</span><span class="cx">     element-&gt;setAttribute(typeAttr, &quot;password&quot;);
</span><del>-    element-&gt;addEventListener(eventNames().keyupEvent, eventListener(), false);
</del><ins>+    element-&gt;addEventListener(eventNames().keyupEvent, *eventListener(), false);
</ins><span class="cx">     return element;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPDFPDFPluginTextAnnotationmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm (201304 => 201305)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm        2016-05-23 23:33:13 UTC (rev 201304)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm        2016-05-24 00:17:04 UTC (rev 201305)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx"> 
</span><span class="cx"> PDFPluginTextAnnotation::~PDFPluginTextAnnotation()
</span><span class="cx"> {
</span><del>-    element()-&gt;removeEventListener(eventNames().keydownEvent, eventListener(), false);
</del><ins>+    element()-&gt;removeEventListener(eventNames().keydownEvent, *eventListener(), false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;Element&gt; PDFPluginTextAnnotation::createAnnotationElement()
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx">     else
</span><span class="cx">         element = document.createElement(inputTag, false);
</span><span class="cx"> 
</span><del>-    element-&gt;addEventListener(eventNames().keydownEvent, eventListener(), false);
</del><ins>+    element-&gt;addEventListener(eventNames().keydownEvent, *eventListener(), false);
</ins><span class="cx"> 
</span><span class="cx">     StyledElement* styledElement = static_cast&lt;StyledElement*&gt;(element.get());
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>