<!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>[193957] trunk</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/193957">193957</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2015-12-11 09:35:52 -0800 (Fri, 11 Dec 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Reduce the number of events that can be created by Document.createEvent
https://bugs.webkit.org/show_bug.cgi?id=151931

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/dom/events/ProgressEvent-expected.txt: Updated for progression.
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TrackEvent/createEvent-expected.txt:
Ditto.

Source/WebCore:

Document.createEvent is intended for use only with a certain set of legacy events.
Ideally it should only be the ones mentioned in the DOM specification.

For now, at least remove all the events that can't usefully be created and initialized
this way. Later, we should cut it down even smaller. And stop automatically generating
this, which was causing everyone who made an event IDL file to get supported here!

The modern alternative is to use event class constructors instead.

* CMakeLists.txt: Don't compile EventFactory.cpp. For now, we still generate
EventFactory.cpp but we do not use it.
* DerivedSources.make: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto. Also don't include EventFactory.h in the
project file.

* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::hasFeature): Added a comment about the SVGZoomEvents feature.

* dom/Document.cpp: Re-sorted includes and added the new ones needed for createEvent.
(WebCore::Document::createEvent): Moved all the logic here from EventFactory, and
took a crack at comments that explain what this should and should not be used for.

* dom/EventFactory.h: Removed.

LayoutTests:

* TestExpectations: Added expected failures for the two tests that depend
on createEvent(&quot;IDBVersionChangeEvent&quot;).

* animations/animation-events-create.html: Updated to use
&quot;new WebKitAnimationEvent&quot; instead of document.createEvent.

* fast/events/event-creation-expected.txt: Removed expected results for
various events that can no longer be created with createEvent.
* fast/events/event-creation.html: Removed tests for various events
that can no longer be created with createEvent.

* imported/blink/plugins/plugin-synthetic-event-crash.html: Updated to use
&quot;new PopStateEvent&quot; instead of document.createEvent.

* indieui/create-uirequestevent-expected.txt: Removed.
* indieui/create-uirequestevent.html: Removed.

* platform/mac-wk2/TestExpecations: Removed expectations for some deleted tests.

* platform/wk2/storage/indexeddb/removed-expected.txt: Removed, since this is
no different from the platform-independent expected result.

* transitions/transition-end-event-create.html: Updated to use
&quot;new WebKitTransitionEvent&quot; instead of document.createEvent.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsanimationsanimationeventscreatehtml">trunk/LayoutTests/animations/animation-events-create.html</a></li>
<li><a href="#trunkLayoutTestsfasteventseventcreationexpectedtxt">trunk/LayoutTests/fast/events/event-creation-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasteventseventcreationhtml">trunk/LayoutTests/fast/events/event-creation.html</a></li>
<li><a href="#trunkLayoutTestsimportedblinkpluginspluginsyntheticeventcrashhtml">trunk/LayoutTests/imported/blink/plugins/plugin-synthetic-event-crash.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomeventsProgressEventexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/ProgressEvent-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsembeddedcontentmediaelementsinterfacesTrackEventcreateEventexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TrackEvent/createEvent-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2TestExpectations">trunk/LayoutTests/platform/mac-wk2/TestExpectations</a></li>
<li><a href="#trunkLayoutTeststransitionstransitionendeventcreatehtml">trunk/LayoutTests/transitions/transition-end-event-create.html</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoredomDOMImplementationcpp">trunk/Source/WebCore/dom/DOMImplementation.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsindieuicreateuirequesteventexpectedtxt">trunk/LayoutTests/indieui/create-uirequestevent-expected.txt</a></li>
<li><a href="#trunkLayoutTestsindieuicreateuirequesteventhtml">trunk/LayoutTests/indieui/create-uirequestevent.html</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbremovedexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/removed-expected.txt</a></li>
<li><a href="#trunkSourceWebCoredomEventFactoryh">trunk/Source/WebCore/dom/EventFactory.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/LayoutTests/ChangeLog        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -1,3 +1,35 @@
</span><ins>+2015-12-11  Darin Adler  &lt;darin@apple.com&gt;
+
+        Reduce the number of events that can be created by Document.createEvent
+        https://bugs.webkit.org/show_bug.cgi?id=151931
+
+        Reviewed by Alex Christensen.
+
+        * TestExpectations: Added expected failures for the two tests that depend
+        on createEvent(&quot;IDBVersionChangeEvent&quot;).
+
+        * animations/animation-events-create.html: Updated to use
+        &quot;new WebKitAnimationEvent&quot; instead of document.createEvent.
+
+        * fast/events/event-creation-expected.txt: Removed expected results for
+        various events that can no longer be created with createEvent.
+        * fast/events/event-creation.html: Removed tests for various events
+        that can no longer be created with createEvent.
+
+        * imported/blink/plugins/plugin-synthetic-event-crash.html: Updated to use
+        &quot;new PopStateEvent&quot; instead of document.createEvent.
+
+        * indieui/create-uirequestevent-expected.txt: Removed.
+        * indieui/create-uirequestevent.html: Removed.
+
+        * platform/mac-wk2/TestExpecations: Removed expectations for some deleted tests.
+
+        * platform/wk2/storage/indexeddb/removed-expected.txt: Removed, since this is
+        no different from the platform-independent expected result.
+
+        * transitions/transition-end-event-create.html: Updated to use
+        &quot;new WebKitTransitionEvent&quot; instead of document.createEvent.
+
</ins><span class="cx"> 2015-12-11  Nikita Vasilyev  &lt;nvasilyev@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: When logging strings, detect stack traces and show them as StackTraceView
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/LayoutTests/TestExpectations        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -649,6 +649,11 @@
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/144258 [ Debug ] js/class-syntax-semicolon.html [ Skip ]
</span><span class="cx"> 
</span><ins>+# IDBVersionChangeEvent tests need to be rewritten to use event constructors instead of createEvent,
+# after we implement the IDBVersionChangeEvent constructor.
+webkit.org/b/145390 storage/indexeddb/events.html [ Failure ]
+webkit.org/b/145390 storage/indexeddb/removed.html [ Failure ]
+
</ins><span class="cx"> webkit.org/b/145390 storage/indexeddb/deleteIndex-bug110792.html [ Pass Failure ]
</span><span class="cx"> 
</span><span class="cx"> # DumpRenderTree does not allow GIFs to animate, thus animated GIF tests don't work in WebKit1.
</span></span></pre></div>
<a id="trunkLayoutTestsanimationsanimationeventscreatehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/animations/animation-events-create.html (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/animation-events-create.html        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/LayoutTests/animations/animation-events-create.html        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -17,7 +17,7 @@
</span><span class="cx"> debug(&quot;&quot;);
</span><span class="cx"> debug(&quot;Test creation of WebKitAnimationEvent&quot;);
</span><span class="cx"> 
</span><del>-var ev = document.createEvent(&quot;WebKitAnimationEvent&quot;);
</del><ins>+var ev = new WebKitAnimationEvent(&quot;&quot;);
</ins><span class="cx"> 
</span><span class="cx"> shouldBe(&quot;typeof(ev)&quot;, &quot;'object'&quot;);
</span><span class="cx"> shouldBe(&quot;ev.animationName&quot;, &quot;''&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventseventcreationexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/events/event-creation-expected.txt (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/event-creation-expected.txt        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/LayoutTests/fast/events/event-creation-expected.txt        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -9,21 +9,12 @@
</span><span class="cx"> PASS document.createEvent('Events').constructor === window.Event is true
</span><span class="cx"> PASS document.createEvent('HTMLEvents') instanceof window.Event is true
</span><span class="cx"> PASS document.createEvent('HTMLEvents').constructor === window.Event is true
</span><del>-PASS document.createEvent('AnimationEvent') instanceof window.AnimationEvent is true
-PASS document.createEvent('AnimationEvent') instanceof window.Event is true
-PASS document.createEvent('AnimationEvent').constructor === window.AnimationEvent is true
-PASS document.createEvent('BeforeLoadEvent') instanceof window.BeforeLoadEvent is true
-PASS document.createEvent('BeforeLoadEvent') instanceof window.Event is true
-PASS document.createEvent('BeforeLoadEvent').constructor === window.BeforeLoadEvent is true
</del><span class="cx"> PASS document.createEvent('CompositionEvent') instanceof window.CompositionEvent is true
</span><span class="cx"> PASS document.createEvent('CompositionEvent') instanceof window.Event is true
</span><span class="cx"> PASS document.createEvent('CompositionEvent').constructor === window.CompositionEvent is true
</span><span class="cx"> PASS document.createEvent('CustomEvent') instanceof window.CustomEvent is true
</span><span class="cx"> PASS document.createEvent('CustomEvent') instanceof window.Event is true
</span><span class="cx"> PASS document.createEvent('CustomEvent').constructor === window.CustomEvent is true
</span><del>-PASS document.createEvent('ErrorEvent') instanceof window.ErrorEvent is true
-PASS document.createEvent('ErrorEvent') instanceof window.Event is true
-PASS document.createEvent('ErrorEvent').constructor === window.ErrorEvent is true
</del><span class="cx"> PASS document.createEvent('HashChangeEvent') instanceof window.HashChangeEvent is true
</span><span class="cx"> PASS document.createEvent('HashChangeEvent') instanceof window.Event is true
</span><span class="cx"> PASS document.createEvent('HashChangeEvent').constructor === window.HashChangeEvent is true
</span><span class="lines">@@ -55,15 +46,6 @@
</span><span class="cx"> PASS document.createEvent('OverflowEvent') instanceof window.OverflowEvent is true
</span><span class="cx"> PASS document.createEvent('OverflowEvent') instanceof window.Event is true
</span><span class="cx"> PASS document.createEvent('OverflowEvent').constructor === window.OverflowEvent is true
</span><del>-PASS document.createEvent('PageTransitionEvent') instanceof window.PageTransitionEvent is true
-PASS document.createEvent('PageTransitionEvent') instanceof window.Event is true
-PASS document.createEvent('PageTransitionEvent').constructor === window.PageTransitionEvent is true
-PASS document.createEvent('PopStateEvent') instanceof window.PopStateEvent is true
-PASS document.createEvent('PopStateEvent') instanceof window.Event is true
-PASS document.createEvent('PopStateEvent').constructor === window.PopStateEvent is true
-PASS document.createEvent('ProgressEvent') instanceof window.ProgressEvent is true
-PASS document.createEvent('ProgressEvent') instanceof window.Event is true
-PASS document.createEvent('ProgressEvent').constructor === window.ProgressEvent is true
</del><span class="cx"> PASS document.createEvent('TextEvent') instanceof window.TextEvent is true
</span><span class="cx"> PASS document.createEvent('TextEvent') instanceof window.UIEvent is true
</span><span class="cx"> PASS document.createEvent('TextEvent') instanceof window.Event is true
</span><span class="lines">@@ -74,38 +56,17 @@
</span><span class="cx"> PASS document.createEvent('UIEvents') instanceof window.UIEvent is true
</span><span class="cx"> PASS document.createEvent('UIEvents') instanceof window.Event is true
</span><span class="cx"> PASS document.createEvent('UIEvents').constructor === window.UIEvent is true
</span><del>-PASS document.createEvent('TransitionEvent') instanceof window.TransitionEvent is true
-PASS document.createEvent('TransitionEvent') instanceof window.Event is true
-PASS document.createEvent('TransitionEvent').constructor === window.TransitionEvent is true
-PASS document.createEvent('WebKitAnimationEvent') instanceof window.WebKitAnimationEvent is true
-PASS document.createEvent('WebKitAnimationEvent') instanceof window.Event is true
-PASS document.createEvent('WebKitAnimationEvent').constructor === window.WebKitAnimationEvent is true
-PASS document.createEvent('WebKitTransitionEvent') instanceof window.WebKitTransitionEvent is true
-PASS document.createEvent('WebKitTransitionEvent') instanceof window.Event is true
-PASS document.createEvent('WebKitTransitionEvent').constructor === window.WebKitTransitionEvent is true
</del><span class="cx"> PASS document.createEvent('WheelEvent') instanceof window.WheelEvent is true
</span><span class="cx"> PASS document.createEvent('WheelEvent') instanceof window.MouseEvent is true
</span><span class="cx"> PASS document.createEvent('WheelEvent') instanceof window.UIEvent is true
</span><span class="cx"> PASS document.createEvent('WheelEvent') instanceof window.Event is true
</span><span class="cx"> PASS document.createEvent('WheelEvent').constructor === window.WheelEvent is true
</span><del>-PASS document.createEvent('XMLHttpRequestProgressEvent') instanceof window.XMLHttpRequestProgressEvent is true
-PASS document.createEvent('XMLHttpRequestProgressEvent') instanceof window.ProgressEvent is true
-PASS document.createEvent('XMLHttpRequestProgressEvent') instanceof window.Event is true
-PASS document.createEvent('XMLHttpRequestProgressEvent').constructor === window.XMLHttpRequestProgressEvent is true
</del><span class="cx"> PASS document.createEvent('StorageEvent') instanceof window.StorageEvent is true
</span><span class="cx"> PASS document.createEvent('StorageEvent') instanceof window.Event is true
</span><span class="cx"> PASS document.createEvent('StorageEvent').constructor === window.StorageEvent is true
</span><del>-PASS document.createEvent('SVGEvents') instanceof window.Event is true
-PASS document.createEvent('SVGEvents').constructor === window.Event is true
-PASS document.createEvent('SVGZoomEvent') instanceof window.SVGZoomEvent is true
-PASS document.createEvent('SVGZoomEvent') instanceof window.Event is true
-PASS document.createEvent('SVGZoomEvent').constructor === window.SVGZoomEvent is true
</del><span class="cx"> PASS document.createEvent('SVGZoomEvents') instanceof window.SVGZoomEvent is true
</span><span class="cx"> PASS document.createEvent('SVGZoomEvents') instanceof window.Event is true
</span><span class="cx"> PASS document.createEvent('SVGZoomEvents').constructor === window.SVGZoomEvent is true
</span><del>-PASS document.createEvent('CloseEvent') instanceof window.CloseEvent is true
-PASS document.createEvent('CloseEvent') instanceof window.Event is true
-PASS document.createEvent('CloseEvent').constructor === window.CloseEvent is true
</del><span class="cx"> PASS allEventInterfacesCreateEvents is true
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventseventcreationhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/events/event-creation.html (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/event-creation.html        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/LayoutTests/fast/events/event-creation.html        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -17,16 +17,6 @@
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('HTMLEvents') instanceof window.Event&quot;);
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('HTMLEvents').constructor === window.Event&quot;);
</span><span class="cx"> 
</span><del>-    // AnimationEvent
-    shouldBeTrue(&quot;document.createEvent('AnimationEvent') instanceof window.AnimationEvent&quot;);
-    shouldBeTrue(&quot;document.createEvent('AnimationEvent') instanceof window.Event&quot;);
-    shouldBeTrue(&quot;document.createEvent('AnimationEvent').constructor === window.AnimationEvent&quot;);
-
-    // BeforeLoadEvent
-    shouldBeTrue(&quot;document.createEvent('BeforeLoadEvent') instanceof window.BeforeLoadEvent&quot;);
-    shouldBeTrue(&quot;document.createEvent('BeforeLoadEvent') instanceof window.Event&quot;);
-    shouldBeTrue(&quot;document.createEvent('BeforeLoadEvent').constructor === window.BeforeLoadEvent&quot;);
-
</del><span class="cx">     // CompositionEvent
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('CompositionEvent') instanceof window.CompositionEvent&quot;);
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('CompositionEvent') instanceof window.Event&quot;);
</span><span class="lines">@@ -37,11 +27,6 @@
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('CustomEvent') instanceof window.Event&quot;);
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('CustomEvent').constructor === window.CustomEvent&quot;);
</span><span class="cx"> 
</span><del>-    // ErrorEvent
-    shouldBeTrue(&quot;document.createEvent('ErrorEvent') instanceof window.ErrorEvent&quot;);
-    shouldBeTrue(&quot;document.createEvent('ErrorEvent') instanceof window.Event&quot;);
-    shouldBeTrue(&quot;document.createEvent('ErrorEvent').constructor === window.ErrorEvent&quot;);
-
</del><span class="cx">     // HashChangeEvent
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('HashChangeEvent') instanceof window.HashChangeEvent&quot;);
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('HashChangeEvent') instanceof window.Event&quot;);
</span><span class="lines">@@ -91,21 +76,6 @@
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('OverflowEvent') instanceof window.Event&quot;);
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('OverflowEvent').constructor === window.OverflowEvent&quot;);
</span><span class="cx"> 
</span><del>-    // PageTransitionEvent
-    shouldBeTrue(&quot;document.createEvent('PageTransitionEvent') instanceof window.PageTransitionEvent&quot;);
-    shouldBeTrue(&quot;document.createEvent('PageTransitionEvent') instanceof window.Event&quot;);
-    shouldBeTrue(&quot;document.createEvent('PageTransitionEvent').constructor === window.PageTransitionEvent&quot;);
-
-    // PopStateEvent
-    shouldBeTrue(&quot;document.createEvent('PopStateEvent') instanceof window.PopStateEvent&quot;);
-    shouldBeTrue(&quot;document.createEvent('PopStateEvent') instanceof window.Event&quot;);
-    shouldBeTrue(&quot;document.createEvent('PopStateEvent').constructor === window.PopStateEvent&quot;);
-
-    // ProgressEvent
-    shouldBeTrue(&quot;document.createEvent('ProgressEvent') instanceof window.ProgressEvent&quot;);
-    shouldBeTrue(&quot;document.createEvent('ProgressEvent') instanceof window.Event&quot;);
-    shouldBeTrue(&quot;document.createEvent('ProgressEvent').constructor === window.ProgressEvent&quot;);
-
</del><span class="cx">     // TextEvent
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('TextEvent') instanceof window.TextEvent&quot;);
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('TextEvent') instanceof window.UIEvent&quot;);
</span><span class="lines">@@ -122,21 +92,6 @@
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('UIEvents') instanceof window.Event&quot;);
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('UIEvents').constructor === window.UIEvent&quot;);
</span><span class="cx"> 
</span><del>-    // TransitionEvent
-    shouldBeTrue(&quot;document.createEvent('TransitionEvent') instanceof window.TransitionEvent&quot;);
-    shouldBeTrue(&quot;document.createEvent('TransitionEvent') instanceof window.Event&quot;);
-    shouldBeTrue(&quot;document.createEvent('TransitionEvent').constructor === window.TransitionEvent&quot;);
-
-    // WebKitAnimationEvent
-    shouldBeTrue(&quot;document.createEvent('WebKitAnimationEvent') instanceof window.WebKitAnimationEvent&quot;);
-    shouldBeTrue(&quot;document.createEvent('WebKitAnimationEvent') instanceof window.Event&quot;);
-    shouldBeTrue(&quot;document.createEvent('WebKitAnimationEvent').constructor === window.WebKitAnimationEvent&quot;);
-
-    // WebKitTransitionEvent
-    shouldBeTrue(&quot;document.createEvent('WebKitTransitionEvent') instanceof window.WebKitTransitionEvent&quot;);
-    shouldBeTrue(&quot;document.createEvent('WebKitTransitionEvent') instanceof window.Event&quot;);
-    shouldBeTrue(&quot;document.createEvent('WebKitTransitionEvent').constructor === window.WebKitTransitionEvent&quot;);
-
</del><span class="cx">     // WheelEvent
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('WheelEvent') instanceof window.WheelEvent&quot;);
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('WheelEvent') instanceof window.MouseEvent&quot;);
</span><span class="lines">@@ -144,72 +99,18 @@
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('WheelEvent') instanceof window.Event&quot;);
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('WheelEvent').constructor === window.WheelEvent&quot;);
</span><span class="cx"> 
</span><del>-    // XMLHttpRequestProgressEvent
-    shouldBeTrue(&quot;document.createEvent('XMLHttpRequestProgressEvent') instanceof window.XMLHttpRequestProgressEvent&quot;);
-    shouldBeTrue(&quot;document.createEvent('XMLHttpRequestProgressEvent') instanceof window.ProgressEvent&quot;);
-    shouldBeTrue(&quot;document.createEvent('XMLHttpRequestProgressEvent') instanceof window.Event&quot;);
-    shouldBeTrue(&quot;document.createEvent('XMLHttpRequestProgressEvent').constructor === window.XMLHttpRequestProgressEvent&quot;);
-
</del><span class="cx">     // StorageEvent
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('StorageEvent') instanceof window.StorageEvent&quot;);
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('StorageEvent') instanceof window.Event&quot;);
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('StorageEvent').constructor === window.StorageEvent&quot;);
</span><span class="cx"> 
</span><del>-    // #if ENABLE(SVG)
-    // SVGEvents (Event alternative)
-    shouldBeTrue(&quot;document.createEvent('SVGEvents') instanceof window.Event&quot;);
-    shouldBeTrue(&quot;document.createEvent('SVGEvents').constructor === window.Event&quot;);
-
-    // #if ENABLE(SVG)
-    // SVGZoomEvent
-    shouldBeTrue(&quot;document.createEvent('SVGZoomEvent') instanceof window.SVGZoomEvent&quot;);
-    shouldBeTrue(&quot;document.createEvent('SVGZoomEvent') instanceof window.Event&quot;);
-    shouldBeTrue(&quot;document.createEvent('SVGZoomEvent').constructor === window.SVGZoomEvent&quot;);
-
-    // #if ENABLE(SVG)
-    // SVGZoomEvents (SVGZoomEvent alternative)
</del><ins>+    // SVGZoomEvents
</ins><span class="cx">     shouldBeTrue(&quot;document.createEvent('SVGZoomEvents') instanceof window.SVGZoomEvent&quot;);
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('SVGZoomEvents') instanceof window.Event&quot;);
</span><span class="cx">     shouldBeTrue(&quot;document.createEvent('SVGZoomEvents').constructor === window.SVGZoomEvent&quot;);
</span><span class="cx"> 
</span><del>-    // #if ENABLE(WEB_SOCKETS)
-    // CloseEvent
-    shouldBeTrue(&quot;document.createEvent('CloseEvent') instanceof window.CloseEvent&quot;);
-    shouldBeTrue(&quot;document.createEvent('CloseEvent') instanceof window.Event&quot;);
-    shouldBeTrue(&quot;document.createEvent('CloseEvent').constructor === window.CloseEvent&quot;);
</del><ins>+    // The following are here for completeness, but we won't run these tests until they are supported in more ports.
</ins><span class="cx"> 
</span><del>-    // The following are here for completeness, but won't until there is more widespread support for them.
-
-    // #if ENABLE(WEB_AUDIO)
-    // AudioProcessingEvent
-    // shouldBeTrue(&quot;document.createEvent('AudioProcessingEvent') instanceof window.AudioProcessingEvent&quot;);
-    // shouldBeTrue(&quot;document.createEvent('AudioProcessingEvent') instanceof window.Event&quot;);
-    // shouldBeTrue(&quot;document.createEvent('AudioProcessingEvent').constructor === window.AudioProcessingEvent&quot;);
-
-    // #if ENABLE(WEB_AUDIO)
-    // OfflineAudioCompletionEvent
-    // shouldBeTrue(&quot;document.createEvent('OfflineAudioCompletionEvent') instanceof window.OfflineAudioCompletionEvent&quot;);
-    // shouldBeTrue(&quot;document.createEvent('OfflineAudioCompletionEvent') instanceof window.Event&quot;);
-    // shouldBeTrue(&quot;document.createEvent('OfflineAudioCompletionEvent').constructor === window.OfflineAudioCompletionEvent&quot;);
-
-    // #if ENABLE(INPUT_SPEECH)
-    // MediaStreamEvent
-    // shouldBeTrue(&quot;document.createEvent('MediaStreamEvent') instanceof window.MediaStreamEvent&quot;);
-    // shouldBeTrue(&quot;document.createEvent('MediaStreamEvent') instanceof window.Event&quot;);
-    // shouldBeTrue(&quot;document.createEvent('MediaStreamEvent').constructor === window.MediaStreamEvent&quot;);
-
-    // #if ENABLE(INPUT_SPEECH)
-    // SpeechInputEvent
-    // shouldBeTrue(&quot;document.createEvent('SpeechInputEvent') instanceof window.SpeechInputEvent&quot;);
-    // shouldBeTrue(&quot;document.createEvent('SpeechInputEvent') instanceof window.Event&quot;);
-    // shouldBeTrue(&quot;document.createEvent('SpeechInputEvent').constructor === window.SpeechInputEvent&quot;);
-
-    // #if ENABLE(WEBGL)
-    // WebGLContextEvent
-    // shouldBeTrue(&quot;document.createEvent('WebGLContextEvent') instanceof window.WebGLContextEvent&quot;);
-    // shouldBeTrue(&quot;document.createEvent('WebGLContextEvent') instanceof window.Event&quot;);
-    // shouldBeTrue(&quot;document.createEvent('WebGLContextEvent').constructor === window.WebGLContextEvent&quot;);
-
</del><span class="cx">     // #if ENABLE(TOUCH_EVENTS)
</span><span class="cx">     // TouchEvent
</span><span class="cx">     // shouldBeTrue(&quot;document.createEvent('TouchEvent') instanceof window.TouchEvent&quot;);
</span><span class="lines">@@ -228,17 +129,6 @@
</span><span class="cx">     // shouldBeTrue(&quot;document.createEvent('DeviceOrientationEvent') instanceof window.Event&quot;);
</span><span class="cx">     // shouldBeTrue(&quot;document.createEvent('DeviceOrientationEvent').constructor === window.DeviceOrientationEvent&quot;);
</span><span class="cx"> 
</span><del>-    // #if ENABLE(ORIENTATION_EVENTS)
-    // OrientationEvent (Event alternative)
-    // shouldBeTrue(&quot;document.createEvent('OrientationEvent') instanceof window.Event&quot;);
-    // shouldBeTrue(&quot;document.createEvent('OrientationEvent').constructor === window.Event&quot;);
-
-    // #if ENABLE(REQUEST_AUTOCOMPLETE)
-    // AutocompleteErrorEvent
-    // shouldBeTrue(&quot;document.createEvent('AutocompleteErrorEvent') instanceof window.AutocompleteErrorEvent&quot;);
-    // shouldBeTrue(&quot;document.createEvent('AutocompleteErrorEvent') instanceof window.Event&quot;);
-    // shouldBeTrue(&quot;document.createEvent('AutocompleteErrorEvent').constructor === window.AutocompleteErrorEvent&quot;);
-
</del><span class="cx">     // We test both a hard coded set and the automated set below (using enumeration) to ensure that a constructor being removed
</span><span class="cx">     // from the window is caught a regression.
</span><span class="cx"> 
</span><span class="lines">@@ -278,8 +168,5 @@
</span><span class="cx">     }
</span><span class="cx">     shouldBeTrue('allEventInterfacesCreateEvents');
</span><span class="cx"> &lt;/script&gt;
</span><del>-
-
-
</del><span class="cx"> &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedblinkpluginspluginsyntheticeventcrashhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/blink/plugins/plugin-synthetic-event-crash.html (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/blink/plugins/plugin-synthetic-event-crash.html        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/LayoutTests/imported/blink/plugins/plugin-synthetic-event-crash.html        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -24,17 +24,9 @@
</span><span class="cx">     });
</span><span class="cx"> });
</span><span class="cx"> 
</span><del>-var event = document.createEvent(&quot;PopStateEvent&quot;);
-event.initEvent(&quot;touchmove&quot;, true, true);
-plugin.dispatchEvent(event);
-
-event = document.createEvent(&quot;PopStateEvent&quot;);
-event.initEvent(&quot;gesturescrollstart&quot;, true, true);
-plugin.dispatchEvent(event);
-
-event = document.createEvent(&quot;PopStateEvent&quot;);
-event.initEvent(&quot;mousewheel&quot;, true, true);
-plugin.dispatchEvent(event);
</del><ins>+plugin.dispatchEvent(new PopStateEvent(&quot;touchmove&quot;, { bubbles: true, cancelable: true }));
+plugin.dispatchEvent(new PopStateEvent(&quot;gesturescrollstart&quot;, { bubbles: true, cancelable: true }));
+plugin.dispatchEvent(new PopStateEvent(&quot;mousewheel&quot;, { bubbles: true, cancelable: true }));
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2015-12-11  Darin Adler  &lt;darin@apple.com&gt;
+
+        Reduce the number of events that can be created by Document.createEvent
+        https://bugs.webkit.org/show_bug.cgi?id=151931
+
+        Reviewed by Alex Christensen.
+
+        * web-platform-tests/dom/events/ProgressEvent-expected.txt: Updated for progression.
+        * web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TrackEvent/createEvent-expected.txt:
+        Ditto.
+
</ins><span class="cx"> 2015-12-09  Keith Rollin  &lt;krollin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         form.elements should reflect the element ordering after the HTML tree builder algorithm
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomeventsProgressEventexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/ProgressEvent-expected.txt (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/ProgressEvent-expected.txt        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/ProgressEvent-expected.txt        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -1,6 +1,4 @@
</span><span class="cx"> 
</span><span class="cx"> FAIL Default event values. assert_equals: expected (boolean) false but got (undefined) undefined
</span><del>-FAIL document.createEvent() should not work with ProgressEvent. assert_throws: function &quot;function () {
-    document.createEvent(&quot;ProgressEvent&quot;)
-  }&quot; did not throw
</del><ins>+PASS document.createEvent() should not work with ProgressEvent. 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsembeddedcontentmediaelementsinterfacesTrackEventcreateEventexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TrackEvent/createEvent-expected.txt (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TrackEvent/createEvent-expected.txt        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TrackEvent/createEvent-expected.txt        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -1,4 +1,3 @@
</span><span class="cx"> 
</span><del>-FAIL TrackEvent created with createEvent assert_throws: function &quot;function () {
-        var ev = document.createEvent('Trac...&quot; did not throw
</del><ins>+PASS TrackEvent created with createEvent 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsindieuicreateuirequesteventexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/indieui/create-uirequestevent-expected.txt (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/indieui/create-uirequestevent-expected.txt        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/LayoutTests/indieui/create-uirequestevent-expected.txt        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -1,21 +0,0 @@
</span><del>-Tests that document.createEvent() works with IndieUI events.
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-[object UIRequestEvent]
-PASS typeof event == 'object' is true
-PASS 'type' in event is true
-PASS 'bubbles' in event is true
-PASS 'cancelable' in event is true
-PASS 'receiver' in event is true
-PASS typeof event.type is 'string'
-PASS typeof event.bubbles is 'boolean'
-PASS typeof event.cancelable is 'boolean'
-PASS typeof event.receiver is 'object'
-
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsindieuicreateuirequesteventhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/indieui/create-uirequestevent.html (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/indieui/create-uirequestevent.html        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/LayoutTests/indieui/create-uirequestevent.html        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -1,35 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;script&gt;
-description('Tests that document.createEvent() works with IndieUI events.');
-
-var eventTypes = new Array(&quot;UIRequestEvent&quot;);
-
-for (var k = 0; k &lt; eventTypes.length; k++) {
-    var event = document.createEvent(&quot;UIRequestEvent&quot;);
-
-    debug(event);
-    shouldBeTrue(&quot;typeof event == 'object'&quot;);
-
-    shouldBeTrue(&quot;'type' in event&quot;);
-    shouldBeTrue(&quot;'bubbles' in event&quot;);
-    shouldBeTrue(&quot;'cancelable' in event&quot;);
-    shouldBeTrue(&quot;'receiver' in event&quot;);
-
-    shouldBe(&quot;typeof event.type&quot;, &quot;'string'&quot;);
-    shouldBe(&quot;typeof event.bubbles&quot;, &quot;'boolean'&quot;);
-    shouldBe(&quot;typeof event.cancelable&quot;, &quot;'boolean'&quot;);
-    shouldBe(&quot;typeof event.receiver&quot;, &quot;'object'&quot;);
-
-    debug(&quot;\n&quot;);
-}
-
-
-
-&lt;/script&gt;
-&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/TestExpectations        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -387,7 +387,6 @@
</span><span class="cx"> storage/indexeddb/cursor-advance.html [ Skip ]
</span><span class="cx"> storage/indexeddb/cursor-basics.html [ Skip ]
</span><span class="cx"> storage/indexeddb/cursor-continue-validity.html [ Skip ]
</span><del>-storage/indexeddb/cursor-continueprimarykey.html [ Skip ]
</del><span class="cx"> storage/indexeddb/cursor-index-delete.html [ Skip ]
</span><span class="cx"> storage/indexeddb/cursor-key-order.html [ Skip ]
</span><span class="cx"> storage/indexeddb/cursor-leak.html [ Skip ] # Missing needed WKTR feature?
</span><span class="lines">@@ -395,12 +394,10 @@
</span><span class="cx"> storage/indexeddb/cursor-primary-key-order.html [ Skip ]
</span><span class="cx"> storage/indexeddb/cursor-request-cycle.html [ Skip ] # Missing needed WKTR feature?
</span><span class="cx"> storage/indexeddb/cursor-update.html [ Skip ]
</span><del>-storage/indexeddb/data-corruption.html [ Skip ]
</del><span class="cx"> storage/indexeddb/database-close.html [ Skip ]
</span><span class="cx"> storage/indexeddb/database-quota.html [ Skip ]
</span><span class="cx"> storage/indexeddb/duplicates.html [ Skip ] # Difference between null + undefined
</span><span class="cx"> storage/indexeddb/events.html [ Skip ]
</span><del>-storage/indexeddb/factory-basics.html [ Skip ] # indexedDB.webkitGetDatabaseNames is missing)
</del><span class="cx"> storage/indexeddb/factory-cmp.html [ Skip ]
</span><span class="cx"> storage/indexeddb/get-keyrange.html [ Skip ]
</span><span class="cx"> storage/indexeddb/index-basics.html [ Skip ] # Difference between null + undefined
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbremovedexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/wk2/storage/indexeddb/removed-expected.txt (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/removed-expected.txt        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/removed-expected.txt        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -1,18 +0,0 @@
</span><del>-Ensure that some obsolete IndexedDB features are gone.
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
-
-dbname = &quot;removed.html&quot;
-PASS self.webkitIDBDatabaseError is undefined.
-PASS 'IDBDatabaseException' in self is false
-PASS 'errorCode' in indexedDB.open(dbname) is false
-PASS 'setVersion' in IDBDatabase.prototype is false
-PASS document.createEvent('IDBUpgradeNeededEvent') threw exception Error: NotSupportedError: DOM Exception 9.
-PASS 'version' in document.createEvent('IDBVersionChangeEvent') is false
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTeststransitionstransitionendeventcreatehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/transitions/transition-end-event-create.html (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/transitions/transition-end-event-create.html        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/LayoutTests/transitions/transition-end-event-create.html        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -17,7 +17,7 @@
</span><span class="cx"> debug(&quot;&quot;);
</span><span class="cx"> debug(&quot;Test creation of WebKitTransitionEvent&quot;);
</span><span class="cx"> 
</span><del>-var ev = document.createEvent(&quot;WebKitTransitionEvent&quot;);
</del><ins>+var ev = new WebKitTransitionEvent(&quot;&quot;);
</ins><span class="cx"> 
</span><span class="cx"> shouldBe(&quot;typeof(ev)&quot;, &quot;'object'&quot;);
</span><span class="cx"> shouldBe(&quot;ev.propertyName&quot;, &quot;''&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -3642,8 +3642,8 @@
</span><span class="cx"> list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/HTMLNames.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/HTMLElementFactory.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/JSHTMLElementWrapperFactory.cpp)
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-GENERATE_EVENT_FACTORY(${WEBCORE_DIR}/dom/EventNames.in EventFactory.cpp)
-list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/EventFactory.cpp)
</del><ins>+GENERATE_EVENT_FACTORY(${WEBCORE_DIR}/dom/EventNames.in EventInterfaces.h)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/EventInterfaces.h)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> GENERATE_EVENT_FACTORY(${WEBCORE_DIR}/dom/EventTargetFactory.in EventTargetInterfaces.h)
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/Source/WebCore/ChangeLog        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2015-12-11  Darin Adler  &lt;darin@apple.com&gt;
+
+        Reduce the number of events that can be created by Document.createEvent
+        https://bugs.webkit.org/show_bug.cgi?id=151931
+
+        Reviewed by Alex Christensen.
+
+        Document.createEvent is intended for use only with a certain set of legacy events.
+        Ideally it should only be the ones mentioned in the DOM specification.
+
+        For now, at least remove all the events that can't usefully be created and initialized
+        this way. Later, we should cut it down even smaller. And stop automatically generating
+        this, which was causing everyone who made an event IDL file to get supported here!
+
+        The modern alternative is to use event class constructors instead.
+
+        * CMakeLists.txt: Don't compile EventFactory.cpp. For now, we still generate
+        EventFactory.cpp but we do not use it.
+        * DerivedSources.make: Ditto.
+        * WebCore.vcxproj/WebCore.vcxproj: Ditto.
+        * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
+        * WebCore.xcodeproj/project.pbxproj: Ditto. Also don't include EventFactory.h in the
+        project file.
+
+        * dom/DOMImplementation.cpp:
+        (WebCore::DOMImplementation::hasFeature): Added a comment about the SVGZoomEvents feature.
+
+        * dom/Document.cpp: Re-sorted includes and added the new ones needed for createEvent.
+        (WebCore::Document::createEvent): Moved all the logic here from EventFactory, and
+        took a crack at comments that explain what this should and should not be used for.
+
+        * dom/EventFactory.h: Removed.
+
</ins><span class="cx"> 2015-12-10  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Modern IDB: storage/indexeddb/objectstore-count.html fails.
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/Source/WebCore/DerivedSources.make        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -799,7 +799,7 @@
</span><span class="cx">     CSSValueKeywords.cpp \
</span><span class="cx">     CSSValueKeywords.h \
</span><span class="cx">     ColorData.cpp \
</span><del>-    EventFactory.cpp \
</del><ins>+    EventInterfaces.h \
</ins><span class="cx">     EventTargetInterfaces.h \
</span><span class="cx">     ExceptionCodeDescription.cpp \
</span><span class="cx">     HTMLElementFactory.cpp \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -877,7 +877,6 @@
</span><span class="cx">       &lt;DisableSpecificWarnings Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;4819;%(DisableSpecificWarnings)&lt;/DisableSpecificWarnings&gt;
</span><span class="cx">       &lt;DisableSpecificWarnings Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;4819;%(DisableSpecificWarnings)&lt;/DisableSpecificWarnings&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\EventFactory.cpp&quot; /&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\ExceptionCodeDescription.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\HTMLElementFactory.cpp&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -5019,9 +5019,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\StylePropertyShorthandFunctions.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\EventFactory.cpp&quot;&gt;
-      &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\ExceptionCodeDescription.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -3772,8 +3772,6 @@
</span><span class="cx">                 97627B8D14FB3CEE002CDCA1 /* ContextDestructionObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97627B8B14FB3CEE002CDCA1 /* ContextDestructionObserver.cpp */; };
</span><span class="cx">                 97627B8E14FB3CEE002CDCA1 /* ContextDestructionObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 97627B8C14FB3CEE002CDCA1 /* ContextDestructionObserver.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 97627B9814FB5424002CDCA1 /* Supplementable.h in Headers */ = {isa = PBXBuildFile; fileRef = 97627B9714FB5424002CDCA1 /* Supplementable.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                97665013144FAA4200F6BB51 /* EventFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 97665011144FAA4200F6BB51 /* EventFactory.h */; };
-                9766504F144FBFFE00F6BB51 /* EventFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9766504E144FBFFE00F6BB51 /* EventFactory.cpp */; };
</del><span class="cx">                 9767CE0B145ABC13005E64DB /* ExceptionHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 9767CE09145ABC12005E64DB /* ExceptionHeaders.h */; };
</span><span class="cx">                 9767CE0C145ABC13005E64DB /* ExceptionInterfaces.h in Headers */ = {isa = PBXBuildFile; fileRef = 9767CE0A145ABC13005E64DB /* ExceptionInterfaces.h */; };
</span><span class="cx">                 976D6C78122B8A3D001FD1F7 /* Blob.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 976D6C59122B8A3D001FD1F7 /* Blob.cpp */; };
</span><span class="lines">@@ -11269,8 +11267,6 @@
</span><span class="cx">                 97627B8B14FB3CEE002CDCA1 /* ContextDestructionObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContextDestructionObserver.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 97627B8C14FB3CEE002CDCA1 /* ContextDestructionObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContextDestructionObserver.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 97627B9714FB5424002CDCA1 /* Supplementable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Supplementable.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                97665011144FAA4200F6BB51 /* EventFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventFactory.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                9766504E144FBFFE00F6BB51 /* EventFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventFactory.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 9767CE09145ABC12005E64DB /* ExceptionHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionHeaders.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9767CE0A145ABC13005E64DB /* ExceptionInterfaces.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionInterfaces.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 976D6C59122B8A3D001FD1F7 /* Blob.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Blob.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -17279,7 +17275,6 @@
</span><span class="cx">                                 6565814809D13043000E61D7 /* CSSValueKeywords.h */,
</span><span class="cx">                                 9B3A8871145632F9003AE8F5 /* DOMDOMSettableTokenList.h */,
</span><span class="cx">                                 E1C6CFC21746D293007B87A1 /* DOMWindowConstructors.idl */,
</span><del>-                                9766504E144FBFFE00F6BB51 /* EventFactory.cpp */,
</del><span class="cx">                                 970B72A5145008EB00F00A37 /* EventHeaders.h */,
</span><span class="cx">                                 970B7289144FFAC600F00A37 /* EventInterfaces.h */,
</span><span class="cx">                                 97AA3CA3145237CC003E1DA6 /* EventTargetHeaders.h */,
</span><span class="lines">@@ -23859,7 +23854,6 @@
</span><span class="cx">                                 418A06CE133C04D500CD379C /* EventDispatcher.h */,
</span><span class="cx">                                 BC60D9090D2A17CE00B9918F /* EventException.h */,
</span><span class="cx">                                 BC60D90A0D2A17CE00B9918F /* EventException.idl */,
</span><del>-                                97665011144FAA4200F6BB51 /* EventFactory.h */,
</del><span class="cx">                                 935FBC4409BA00B900E230B1 /* EventListener.h */,
</span><span class="cx">                                 85AFA7410AAF298400E84305 /* EventListener.idl */,
</span><span class="cx">                                 AD4495F1141FC08900541EDF /* EventListenerMap.cpp */,
</span><span class="lines">@@ -25451,7 +25445,6 @@
</span><span class="cx">                                 4138D3351244054800323D33 /* EventContext.h in Headers */,
</span><span class="cx">                                 418A06D0133C04D500CD379C /* EventDispatcher.h in Headers */,
</span><span class="cx">                                 BC60D90C0D2A17CE00B9918F /* EventException.h in Headers */,
</span><del>-                                97665013144FAA4200F6BB51 /* EventFactory.h in Headers */,
</del><span class="cx">                                 93C09A530B064DB3005ABD4D /* EventHandler.h in Headers */,
</span><span class="cx">                                 970B72A6145008EB00F00A37 /* EventHeaders.h in Headers */,
</span><span class="cx">                                 970B728A144FFAC600F00A37 /* EventInterfaces.h in Headers */,
</span><span class="lines">@@ -29111,7 +29104,6 @@
</span><span class="cx">                                 85031B410A44EFC700F992E0 /* Event.cpp in Sources */,
</span><span class="cx">                                 4138D3361244054800323D33 /* EventContext.cpp in Sources */,
</span><span class="cx">                                 418A06D1133C04D500CD379C /* EventDispatcher.cpp in Sources */,
</span><del>-                                9766504F144FBFFE00F6BB51 /* EventFactory.cpp in Sources */,
</del><span class="cx">                                 93C09A810B064F00005ABD4D /* EventHandler.cpp in Sources */,
</span><span class="cx">                                 FE6938B61045D67E008EABB6 /* EventHandlerIOS.mm in Sources */,
</span><span class="cx">                                 93C09A7F0B064EEF005ABD4D /* EventHandlerMac.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoredomDOMImplementationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DOMImplementation.cpp (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DOMImplementation.cpp        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/Source/WebCore/dom/DOMImplementation.cpp        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -192,6 +192,10 @@
</span><span class="cx">         return isSupportedSVG10Feature(feature, version) || isSupportedSVG11Feature(feature, version);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    // FIXME: SVG specifications &lt;http://www.w3.org/TR/SVG/script.html#InterfaceSVGZoomEvent&gt;
+    // and &lt;http://www.w3.org/TR/SVG2/interact.html#InterfaceSVGZoomEvent&gt;
+    // say that we should return true for the feature &quot;SVGZoomEvents&quot;.
+
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/Source/WebCore/dom/Document.cpp        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -41,8 +41,10 @@
</span><span class="cx"> #include &quot;Chrome.h&quot;
</span><span class="cx"> #include &quot;ChromeClient.h&quot;
</span><span class="cx"> #include &quot;Comment.h&quot;
</span><ins>+#include &quot;CompositionEvent.h&quot;
</ins><span class="cx"> #include &quot;ContentSecurityPolicy.h&quot;
</span><span class="cx"> #include &quot;CookieJar.h&quot;
</span><ins>+#include &quot;CustomEvent.h&quot;
</ins><span class="cx"> #include &quot;DOMImplementation.h&quot;
</span><span class="cx"> #include &quot;DOMNamedFlowCollection.h&quot;
</span><span class="cx"> #include &quot;DOMWindow.h&quot;
</span><span class="lines">@@ -56,7 +58,6 @@
</span><span class="cx"> #include &quot;Editor.h&quot;
</span><span class="cx"> #include &quot;ElementIterator.h&quot;
</span><span class="cx"> #include &quot;EntityReference.h&quot;
</span><del>-#include &quot;EventFactory.h&quot;
</del><span class="cx"> #include &quot;EventHandler.h&quot;
</span><span class="cx"> #include &quot;ExtensionStyleSheets.h&quot;
</span><span class="cx"> #include &quot;FocusController.h&quot;
</span><span class="lines">@@ -98,6 +99,7 @@
</span><span class="cx"> #include &quot;InspectorInstrumentation.h&quot;
</span><span class="cx"> #include &quot;JSLazyEventListener.h&quot;
</span><span class="cx"> #include &quot;JSModuleLoader.h&quot;
</span><ins>+#include &quot;KeyboardEvent.h&quot;
</ins><span class="cx"> #include &quot;Language.h&quot;
</span><span class="cx"> #include &quot;LoaderStrategy.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="lines">@@ -106,12 +108,15 @@
</span><span class="cx"> #include &quot;MediaProducer.h&quot;
</span><span class="cx"> #include &quot;MediaQueryList.h&quot;
</span><span class="cx"> #include &quot;MediaQueryMatcher.h&quot;
</span><ins>+#include &quot;MessageEvent.h&quot;
</ins><span class="cx"> #include &quot;MouseEventWithHitTestResults.h&quot;
</span><ins>+#include &quot;MutationEvent.h&quot;
</ins><span class="cx"> #include &quot;NameNodeList.h&quot;
</span><span class="cx"> #include &quot;NestingLevelIncrementer.h&quot;
</span><span class="cx"> #include &quot;NodeIterator.h&quot;
</span><span class="cx"> #include &quot;NodeRareData.h&quot;
</span><span class="cx"> #include &quot;NodeWithIndex.h&quot;
</span><ins>+#include &quot;OverflowEvent.h&quot;
</ins><span class="cx"> #include &quot;PageConsoleClient.h&quot;
</span><span class="cx"> #include &quot;PageGroup.h&quot;
</span><span class="cx"> #include &quot;PageTransitionEvent.h&quot;
</span><span class="lines">@@ -133,6 +138,7 @@
</span><span class="cx"> #include &quot;SVGElementFactory.h&quot;
</span><span class="cx"> #include &quot;SVGNames.h&quot;
</span><span class="cx"> #include &quot;SVGTitleElement.h&quot;
</span><ins>+#include &quot;SVGZoomEvent.h&quot;
</ins><span class="cx"> #include &quot;SchemeRegistry.h&quot;
</span><span class="cx"> #include &quot;ScopedEventQueue.h&quot;
</span><span class="cx"> #include &quot;ScriptController.h&quot;
</span><span class="lines">@@ -146,15 +152,18 @@
</span><span class="cx"> #include &quot;SelectorQuery.h&quot;
</span><span class="cx"> #include &quot;Settings.h&quot;
</span><span class="cx"> #include &quot;ShadowRoot.h&quot;
</span><ins>+#include &quot;StorageEvent.h&quot;
</ins><span class="cx"> #include &quot;StyleProperties.h&quot;
</span><span class="cx"> #include &quot;StyleResolver.h&quot;
</span><span class="cx"> #include &quot;StyleSheetContents.h&quot;
</span><span class="cx"> #include &quot;StyleSheetList.h&quot;
</span><span class="cx"> #include &quot;SubresourceLoader.h&quot;
</span><ins>+#include &quot;TextEvent.h&quot;
</ins><span class="cx"> #include &quot;TextNodeTraversal.h&quot;
</span><span class="cx"> #include &quot;TransformSource.h&quot;
</span><span class="cx"> #include &quot;TreeWalker.h&quot;
</span><span class="cx"> #include &quot;VisitedLinkState.h&quot;
</span><ins>+#include &quot;WheelEvent.h&quot;
</ins><span class="cx"> #include &quot;XMLDocumentParser.h&quot;
</span><span class="cx"> #include &quot;XMLNSNames.h&quot;
</span><span class="cx"> #include &quot;XMLNames.h&quot;
</span><span class="lines">@@ -171,13 +180,17 @@
</span><span class="cx"> #include &lt;wtf/text/StringBuffer.h&gt;
</span><span class="cx"> #include &lt;yarr/RegularExpression.h&gt;
</span><span class="cx"> 
</span><del>-#if ENABLE(XSLT)
-#include &quot;XSLTProcessor.h&quot;
</del><ins>+#if ENABLE(CSP_NEXT)
+#include &quot;DOMSecurityPolicy.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(DEVICE_ORIENTATION)
+#include &quot;DeviceMotionEvent.h&quot;
+#include &quot;DeviceOrientationEvent.h&quot;
+#endif
</ins><span class="cx"> 
</span><del>-#if ENABLE(TOUCH_EVENTS)
-#include &quot;TouchList.h&quot;
</del><ins>+#if ENABLE(FULLSCREEN_API)
+#include &quot;RenderFullScreen.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -197,14 +210,18 @@
</span><span class="cx"> #include &quot;GestureEvent.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(IOS_TEXT_AUTOSIZING)
+#include &quot;TextAutoSizing.h&quot;
+#endif
+
</ins><span class="cx"> #if ENABLE(MATHML)
</span><span class="cx"> #include &quot;MathMLElement.h&quot;
</span><span class="cx"> #include &quot;MathMLElementFactory.h&quot;
</span><span class="cx"> #include &quot;MathMLNames.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if ENABLE(FULLSCREEN_API)
-#include &quot;RenderFullScreen.h&quot;
</del><ins>+#if ENABLE(MEDIA_SESSION)
+#include &quot;MediaSession.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(REQUEST_ANIMATION_FRAME)
</span><span class="lines">@@ -212,16 +229,13 @@
</span><span class="cx"> #include &quot;ScriptedAnimationController.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if ENABLE(IOS_TEXT_AUTOSIZING)
-#include &quot;TextAutoSizing.h&quot;
-#endif
-
</del><span class="cx"> #if ENABLE(TEXT_AUTOSIZING)
</span><span class="cx"> #include &quot;TextAutosizer.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if ENABLE(CSP_NEXT)
-#include &quot;DOMSecurityPolicy.h&quot;
</del><ins>+#if ENABLE(TOUCH_EVENTS)
+#include &quot;TouchEvent.h&quot;
+#include &quot;TouchList.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="lines">@@ -238,8 +252,8 @@
</span><span class="cx"> #include &quot;MediaPlaybackTargetClient.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if ENABLE(MEDIA_SESSION)
-#include &quot;MediaSession.h&quot;
</del><ins>+#if ENABLE(XSLT)
+#include &quot;XSLTProcessor.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> using namespace WTF;
</span><span class="lines">@@ -4107,12 +4121,73 @@
</span><span class="cx">     m_eventQueue.enqueueEvent(WTF::move(event));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;Event&gt; Document::createEvent(const String&amp; eventType, ExceptionCode&amp; ec)
</del><ins>+RefPtr&lt;Event&gt; Document::createEvent(const String&amp; type, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;Event&gt; event = EventFactory::create(eventType);
-    if (event)
-        return event.release();
</del><ins>+    // Please do *not* add new event classes to this function unless they are
+    // required for compatibility of some actual legacy web content.
</ins><span class="cx"> 
</span><ins>+    // This mechanism is superceded by use of event constructors.
+    // That is what we should use for any new event classes.
+
+    // The following strings are the ones from the DOM specification
+    // &lt;https://dom.spec.whatwg.org/#dom-document-createevent&gt;.
+
+    if (equalIgnoringASCIICase(type, &quot;customevent&quot;))
+        return CustomEvent::create();
+    if (equalIgnoringASCIICase(type, &quot;event&quot;) || equalIgnoringASCIICase(type, &quot;events&quot;) || equalIgnoringASCIICase(type, &quot;htmlevents&quot;))
+        return Event::create();
+    if (equalIgnoringASCIICase(type, &quot;keyboardevent&quot;) || equalIgnoringASCIICase(type, &quot;keyboardevents&quot;))
+        return KeyboardEvent::create();
+    if (equalIgnoringASCIICase(type, &quot;messageevent&quot;))
+        return MessageEvent::create();
+    if (equalIgnoringASCIICase(type, &quot;mouseevent&quot;) || equalIgnoringASCIICase(type, &quot;mouseevents&quot;))
+        return MouseEvent::create();
+    if (equalIgnoringASCIICase(type, &quot;uievent&quot;) || equalIgnoringASCIICase(type, &quot;uievents&quot;))
+        return UIEvent::create();
+
+#if ENABLE(TOUCH_EVENTS)
+    if (equalIgnoringASCIICase(type, &quot;touchevent&quot;))
+        return TouchEvent::create();
+#endif
+
+    // The following string comes from the SVG specifications
+    // &lt;http://www.w3.org/TR/SVG/script.html#InterfaceSVGZoomEvent&gt;
+    // &lt;http://www.w3.org/TR/SVG2/interact.html#InterfaceSVGZoomEvent&gt;.
+    // However, since there is no provision for initializing the event once it is created,
+    // there is no practical value in this feature.
+
+    if (equalIgnoringASCIICase(type, &quot;svgzoomevents&quot;))
+        return SVGZoomEvent::create();
+
+    // The following strings are for event classes where WebKit supplies an init function.
+    // These strings are not part of the DOM specification and we would like to eliminate them.
+    // However, we currently include these because we have concerns about backward compatibility.
+
+    // FIXME: For each of the strings below, prove there is no content depending on it and remove
+    // both the string and the corresponding init function for that class.
+
+    if (equalIgnoringASCIICase(type, &quot;compositionevent&quot;))
+        return CompositionEvent::create();
+    if (equalIgnoringASCIICase(type, &quot;hashchangeevent&quot;))
+        return HashChangeEvent::create();
+    if (equalIgnoringASCIICase(type, &quot;mutationevent&quot;) || equalIgnoringASCIICase(type, &quot;mutationevents&quot;))
+        return MutationEvent::create();
+    if (equalIgnoringASCIICase(type, &quot;overflowevent&quot;))
+        return OverflowEvent::create();
+    if (equalIgnoringASCIICase(type, &quot;storageevent&quot;))
+        return StorageEvent::create();
+    if (equalIgnoringASCIICase(type, &quot;textevent&quot;))
+        return TextEvent::create();
+    if (equalIgnoringASCIICase(type, &quot;wheelevent&quot;))
+        return WheelEvent::create();
+
+#if ENABLE(DEVICE_ORIENTATION)
+    if (equalIgnoringASCIICase(type, &quot;devicemotionevent&quot;))
+        return DeviceMotionEvent::create();
+    if (equalIgnoringASCIICase(type, &quot;deviceorientationevent&quot;))
+        return DeviceOrientationEvent::create();
+#endif
+
</ins><span class="cx">     ec = NOT_SUPPORTED_ERR;
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventFactoryh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/dom/EventFactory.h (193956 => 193957)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventFactory.h        2015-12-11 17:34:32 UTC (rev 193956)
+++ trunk/Source/WebCore/dom/EventFactory.h        2015-12-11 17:35:52 UTC (rev 193957)
</span><span class="lines">@@ -1,44 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Google, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef EventFactory_h
-#define EventFactory_h
-
-#include &quot;DOMWrapperWorld.h&quot;
-#include &lt;wtf/PassRefPtr.h&gt;
-#include &lt;wtf/text/AtomicString.h&gt;
-
-namespace WebCore {
-
-class Event;
-
-class EventFactory {
-public:
-    static PassRefPtr&lt;Event&gt; create(const String&amp; eventType);
-};
-
-}
-
-#endif
</del></span></pre>
</div>
</div>

</body>
</html>