<!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>[195953] 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/195953">195953</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-01-31 22:34:07 -0800 (Sun, 31 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add resize event for HTMLMediaElement
https://bugs.webkit.org/show_bug.cgi?id=125715

Patch by Jeremy Jones &lt;jeremyj@apple.com&gt; on 2016-01-31
Reviewed by Darin Adler.
LayoutTests/imported/w3c:

Rebaselined test after moving 'resize' from DOMWindow.idl to GlobalEventHandlers.idl
per https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers

* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Tests: http/tests/media/hls/hls-video-resize.html
       media/video-resize.html

Move resize javascript event from DOMWindow.idl to GlobalEventHandlers.idl
per https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers

Post resize event from video element when metadata loads and when content size changes.

* dom/GlobalEventHandlers.idl: Add onresize.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::createEventHandlerNameMap): Add onresizeAttr.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::mediaPlayerSizeChanged):
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::scheduleResizeEvent):
(WebCore::HTMLMediaElement::scheduleResizeEventIfSizeChanged):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::scheduleResizeEvent): Sechedule event.
(WebCore::HTMLVideoElement::scheduleResizeEventIfSizeChanged): Schedule event if size has changed.
* html/HTMLVideoElement.h: Add declarations.
* page/DOMWindow.idl: Remove onresize.

Source/WebInspectorUI:

Add a display name for &quot;resize&quot; event.

* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.EventType.displayName):

LayoutTests:

Update test for change: move resize javascript event from DOMWindow.idl to GlobalEventHandlers.idl
per https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers

* fast/dom/event-handler-attributes-expected.txt: Rebaselined.
* fast/dom/event-handler-attributes.html:
    Move resize from uniqueWindowEvents to eventsInGlobalEventHandlers.
* http/tests/media/hls/hls-video-resize-expected.txt: Added.
* http/tests/media/hls/hls-video-resize.html: Added.
* js/dom/dom-static-property-for-in-iteration-expected.txt: Rebaselined.
* media/video-resize-expected.txt: Added.
* media/video-resize.html: Added.
* media/video-test.js:
(requiredEvents): Deleted global. Value is now captured by closure.
(waitForEventsAndCall): Remove dependence on global variable, and fix event observation leak.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastdomeventhandlerattributesexpectedtxt">trunk/LayoutTests/fast/dom/event-handler-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomeventhandlerattributeshtml">trunk/LayoutTests/fast/dom/event-handler-attributes.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmldominterfacesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomdomstaticpropertyforiniterationexpectedtxt">trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediavideotestjs">trunk/LayoutTests/media/video-test.js</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomGlobalEventHandlersidl">trunk/Source/WebCore/dom/GlobalEventHandlers.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLElementcpp">trunk/Source/WebCore/html/HTMLElement.cpp</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="#trunkSourceWebCorehtmlHTMLVideoElementcpp">trunk/Source/WebCore/html/HTMLVideoElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLVideoElementh">trunk/Source/WebCore/html/HTMLVideoElement.h</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowidl">trunk/Source/WebCore/page/DOMWindow.idl</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsScriptTimelineRecordjs">trunk/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestshttptestsmediahlshlsvideoresizeexpectedtxt">trunk/LayoutTests/http/tests/media/hls/hls-video-resize-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsmediahlshlsvideoresizehtml">trunk/LayoutTests/http/tests/media/hls/hls-video-resize.html</a></li>
<li><a href="#trunkLayoutTestsmediavideoresizeexpectedtxt">trunk/LayoutTests/media/video-resize-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediavideoresizehtml">trunk/LayoutTests/media/video-resize.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/LayoutTests/ChangeLog        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2016-01-31  Jeremy Jones  &lt;jeremyj@apple.com&gt;
+
+        Add resize event for HTMLMediaElement
+        https://bugs.webkit.org/show_bug.cgi?id=125715
+
+        Reviewed by Darin Adler.
+        
+        Update test for change: move resize javascript event from DOMWindow.idl to GlobalEventHandlers.idl
+        per https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers
+
+        * fast/dom/event-handler-attributes-expected.txt: Rebaselined.
+        * fast/dom/event-handler-attributes.html:
+            Move resize from uniqueWindowEvents to eventsInGlobalEventHandlers.
+        * http/tests/media/hls/hls-video-resize-expected.txt: Added.
+        * http/tests/media/hls/hls-video-resize.html: Added.
+        * js/dom/dom-static-property-for-in-iteration-expected.txt: Rebaselined.
+        * media/video-resize-expected.txt: Added.
+        * media/video-resize.html: Added.
+        * media/video-test.js:
+        (requiredEvents): Deleted global. Value is now captured by closure.
+        (waitForEventsAndCall): Remove dependence on global variable, and fix event observation leak.
+
</ins><span class="cx"> 2016-01-31  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add &quot;WebKit built-in PDF&quot; Plugin to set of publicly visible plugins
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomeventhandlerattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/event-handler-attributes-expected.txt (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/event-handler-attributes-expected.txt        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/LayoutTests/fast/dom/event-handler-attributes-expected.txt        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -148,6 +148,7 @@
</span><span class="cx"> PASS testScriptAttribute(document, &quot;ratechange&quot;) is &quot;document&quot;
</span><span class="cx"> PASS testScriptAttribute(document, &quot;readystatechange&quot;) is &quot;document&quot;
</span><span class="cx"> PASS testScriptAttribute(document, &quot;reset&quot;) is &quot;document&quot;
</span><ins>+PASS testScriptAttribute(document, &quot;resize&quot;) is &quot;document&quot;
</ins><span class="cx"> PASS testScriptAttribute(document, &quot;scroll&quot;) is &quot;document&quot;
</span><span class="cx"> PASS testScriptAttribute(document, &quot;search&quot;) is &quot;document&quot;
</span><span class="cx"> PASS testScriptAttribute(document, &quot;seeked&quot;) is &quot;document&quot;
</span><span class="lines">@@ -180,7 +181,6 @@
</span><span class="cx"> PASS testScriptAttribute(document, &quot;pagehide&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testScriptAttribute(document, &quot;pageshow&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testScriptAttribute(document, &quot;popstate&quot;) is &quot;none&quot;
</span><del>-PASS testScriptAttribute(document, &quot;resize&quot;) is &quot;none&quot;
</del><span class="cx"> PASS testScriptAttribute(document, &quot;storage&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testScriptAttribute(document, &quot;transitionend&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testScriptAttribute(document, &quot;unload&quot;) is &quot;none&quot;
</span><span class="lines">@@ -246,6 +246,7 @@
</span><span class="cx"> PASS testElementAttribute(element, &quot;progress&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(element, &quot;ratechange&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(element, &quot;reset&quot;) is &quot;target&quot;
</span><ins>+PASS testElementAttribute(element, &quot;resize&quot;) is &quot;target&quot;
</ins><span class="cx"> PASS testElementAttribute(element, &quot;scroll&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(element, &quot;search&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(element, &quot;seeked&quot;) is &quot;target&quot;
</span><span class="lines">@@ -277,7 +278,6 @@
</span><span class="cx"> PASS testElementAttribute(element, &quot;pageshow&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(element, &quot;popstate&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(element, &quot;readystatechange&quot;) is &quot;none&quot;
</span><del>-PASS testElementAttribute(element, &quot;resize&quot;) is &quot;none&quot;
</del><span class="cx"> PASS testElementAttribute(element, &quot;selectionchange&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(element, &quot;storage&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(element, &quot;unload&quot;) is &quot;none&quot;
</span><span class="lines">@@ -339,6 +339,7 @@
</span><span class="cx"> PASS testElementAttribute(inputElement, &quot;progress&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(inputElement, &quot;ratechange&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(inputElement, &quot;reset&quot;) is &quot;target&quot;
</span><ins>+PASS testElementAttribute(inputElement, &quot;resize&quot;) is &quot;target&quot;
</ins><span class="cx"> PASS testElementAttribute(inputElement, &quot;scroll&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(inputElement, &quot;search&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(inputElement, &quot;seeked&quot;) is &quot;target&quot;
</span><span class="lines">@@ -370,7 +371,6 @@
</span><span class="cx"> PASS testElementAttribute(inputElement, &quot;pageshow&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(inputElement, &quot;popstate&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(inputElement, &quot;readystatechange&quot;) is &quot;none&quot;
</span><del>-PASS testElementAttribute(inputElement, &quot;resize&quot;) is &quot;none&quot;
</del><span class="cx"> PASS testElementAttribute(inputElement, &quot;selectionchange&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(inputElement, &quot;storage&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(inputElement, &quot;unload&quot;) is &quot;none&quot;
</span><span class="lines">@@ -432,6 +432,7 @@
</span><span class="cx"> PASS testElementAttribute(audioElement, &quot;progress&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(audioElement, &quot;ratechange&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(audioElement, &quot;reset&quot;) is &quot;target&quot;
</span><ins>+PASS testElementAttribute(audioElement, &quot;resize&quot;) is &quot;target&quot;
</ins><span class="cx"> PASS testElementAttribute(audioElement, &quot;scroll&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(audioElement, &quot;search&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(audioElement, &quot;seeked&quot;) is &quot;target&quot;
</span><span class="lines">@@ -463,7 +464,6 @@
</span><span class="cx"> PASS testElementAttribute(audioElement, &quot;pageshow&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(audioElement, &quot;popstate&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(audioElement, &quot;readystatechange&quot;) is &quot;none&quot;
</span><del>-PASS testElementAttribute(audioElement, &quot;resize&quot;) is &quot;none&quot;
</del><span class="cx"> PASS testElementAttribute(audioElement, &quot;selectionchange&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(audioElement, &quot;storage&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(audioElement, &quot;unload&quot;) is &quot;none&quot;
</span><span class="lines">@@ -525,6 +525,7 @@
</span><span class="cx"> PASS testElementAttribute(videoElement, &quot;progress&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(videoElement, &quot;ratechange&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(videoElement, &quot;reset&quot;) is &quot;target&quot;
</span><ins>+PASS testElementAttribute(videoElement, &quot;resize&quot;) is &quot;target&quot;
</ins><span class="cx"> PASS testElementAttribute(videoElement, &quot;scroll&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(videoElement, &quot;search&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(videoElement, &quot;seeked&quot;) is &quot;target&quot;
</span><span class="lines">@@ -556,7 +557,6 @@
</span><span class="cx"> PASS testElementAttribute(videoElement, &quot;pageshow&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(videoElement, &quot;popstate&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(videoElement, &quot;readystatechange&quot;) is &quot;none&quot;
</span><del>-PASS testElementAttribute(videoElement, &quot;resize&quot;) is &quot;none&quot;
</del><span class="cx"> PASS testElementAttribute(videoElement, &quot;selectionchange&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(videoElement, &quot;storage&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(videoElement, &quot;unload&quot;) is &quot;none&quot;
</span><span class="lines">@@ -816,6 +816,7 @@
</span><span class="cx"> PASS testElementAttribute(rectElement, &quot;progress&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(rectElement, &quot;ratechange&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(rectElement, &quot;reset&quot;) is &quot;target&quot;
</span><ins>+PASS testElementAttribute(rectElement, &quot;resize&quot;) is &quot;target&quot;
</ins><span class="cx"> PASS testElementAttribute(rectElement, &quot;scroll&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(rectElement, &quot;search&quot;) is &quot;target&quot;
</span><span class="cx"> PASS testElementAttribute(rectElement, &quot;seeked&quot;) is &quot;target&quot;
</span><span class="lines">@@ -847,7 +848,6 @@
</span><span class="cx"> PASS testElementAttribute(rectElement, &quot;pageshow&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(rectElement, &quot;popstate&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(rectElement, &quot;readystatechange&quot;) is &quot;none&quot;
</span><del>-PASS testElementAttribute(rectElement, &quot;resize&quot;) is &quot;none&quot;
</del><span class="cx"> PASS testElementAttribute(rectElement, &quot;selectionchange&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(rectElement, &quot;storage&quot;) is &quot;none&quot;
</span><span class="cx"> PASS testElementAttribute(rectElement, &quot;unload&quot;) is &quot;none&quot;
</span><span class="lines">@@ -919,7 +919,7 @@
</span><span class="cx"> FAIL testElementAttribute(nonHTMLElement, &quot;ratechange&quot;) should be none. Was script: target; content: none.
</span><span class="cx"> PASS testElementAttribute(nonHTMLElement, &quot;readystatechange&quot;) is &quot;none&quot;
</span><span class="cx"> FAIL testElementAttribute(nonHTMLElement, &quot;reset&quot;) should be none. Was script: target; content: none.
</span><del>-PASS testElementAttribute(nonHTMLElement, &quot;resize&quot;) is &quot;none&quot;
</del><ins>+FAIL testElementAttribute(nonHTMLElement, &quot;resize&quot;) should be none. Was script: target; content: none.
</ins><span class="cx"> FAIL testElementAttribute(nonHTMLElement, &quot;scroll&quot;) should be none. Was script: target; content: none.
</span><span class="cx"> FAIL testElementAttribute(nonHTMLElement, &quot;search&quot;) should be none. Was script: target; content: none.
</span><span class="cx"> FAIL testElementAttribute(nonHTMLElement, &quot;seeked&quot;) should be none. Was script: target; content: none.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomeventhandlerattributeshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/event-handler-attributes.html (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/event-handler-attributes.html        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/LayoutTests/fast/dom/event-handler-attributes.html        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -56,6 +56,7 @@
</span><span class="cx">     &quot;progress&quot;,
</span><span class="cx">     &quot;ratechange&quot;,
</span><span class="cx">     &quot;reset&quot;,
</span><ins>+    &quot;resize&quot;,
</ins><span class="cx">     &quot;scroll&quot;,
</span><span class="cx">     &quot;seeked&quot;,
</span><span class="cx">     &quot;seeking&quot;,
</span><span class="lines">@@ -105,7 +106,6 @@
</span><span class="cx"> ];
</span><span class="cx"> 
</span><span class="cx"> const uniqueWindowEvents = [
</span><del>-    &quot;resize&quot;
</del><span class="cx"> ];
</span><span class="cx"> 
</span><span class="cx"> const uniqueDocumentEvents = [
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsmediahlshlsvideoresizeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/media/hls/hls-video-resize-expected.txt (0 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/media/hls/hls-video-resize-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/media/hls/hls-video-resize-expected.txt        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+
+Test &lt;video&gt; element initial resize event for HLS.
+
+EXPECTED (video.videoWidth == '0') OK
+EXPECTED (video.videoHeight == '0') OK
+EVENT(resize)
+Receive first resize event before loadedmetadata. OK
+EXPECTED (video.videoWidth == '0') OK
+EXPECTED (video.videoHeight == '0') OK
+EVENT(loadedmetadata)
+Receive loadmetadata event before second resize. OK
+EVENT(resize)
+EXPECTED (video.videoWidth == '640') OK
+EXPECTED (video.videoHeight == '480') OK
+END OF TEST
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsmediahlshlsvideoresizehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/media/hls/hls-video-resize.html (0 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/media/hls/hls-video-resize.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/media/hls/hls-video-resize.html        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+&lt;html&gt;
+    &lt;head&gt;
+        &lt;title&gt;&amp;lt;video&amp;gt; element initial resize event test for HLS&lt;/title&gt;
+        &lt;script src=../../media-resources/video-test.js&gt;&lt;/script&gt;
+
+        &lt;script&gt;
+            function test()
+            {
+                var receiveLoadMetadata = false;
+                var receiveSecondResize = false;
+
+                findMediaElement();
+
+                testExpected(&quot;video.videoWidth&quot;, 0);
+                testExpected(&quot;video.videoHeight&quot;, 0);
+
+                waitForEventOnceOn(video, &quot;error&quot;, function () {
+                    failTest(&quot;Load failed.&quot;);
+                });
+
+                waitForEventOnceOn(video, &quot;loadedmetadata&quot;, function () {
+                    receiveLoadMetadata = true;
+                    logResult(!receiveSecondResize, &quot;Receive loadmetadata event before second resize.&quot;);
+                });
+
+                waitForEventOnceOn(video, &quot;resize&quot;, function () {
+                    logResult(!receiveLoadMetadata, &quot;Receive first resize event before loadedmetadata.&quot;);
+
+                    receivedFirstResizeEvent = true;
+                    testExpected(&quot;video.videoWidth&quot;, 0);
+                    testExpected(&quot;video.videoHeight&quot;, 0);
+
+                    waitForEventOnceOn(video, &quot;resize&quot;, function () {
+                        receiveSecondResize = true;
+                        testExpected(&quot;video.videoWidth&quot;, 640);
+                        testExpected(&quot;video.videoHeight&quot;, 480);
+                        endTest();                      
+                    });
+                });
+
+                video.src = &quot;../resources/hls/bipbop/prog_index.m3u8&quot;;
+            }
+        &lt;/script&gt;
+    &lt;/head&gt;
+
+    &lt;body onload=&quot;setTimeout(test, 100)&quot;&gt;
+
+        &lt;video controls width=640 height=480&quot;&gt;&lt;/video&gt;
+        &lt;p&gt;Test &amp;lt;video&amp;gt; element initial resize event for HLS.&lt;/p&gt;
+
+    &lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-01-31  Jeremy Jones  &lt;jeremyj@apple.com&gt;
+
+        Add resize event for HTMLMediaElement
+        https://bugs.webkit.org/show_bug.cgi?id=125715
+
+        Reviewed by Darin Adler.
+
+        Rebaselined test after moving 'resize' from DOMWindow.idl to GlobalEventHandlers.idl
+        per https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers
+
+        * web-platform-tests/html/dom/interfaces-expected.txt:
+
</ins><span class="cx"> 2016-01-31  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
</span><span class="cx"> 
</span><span class="cx">         imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection.html asserts frequently
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmldominterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx"> FAIL Document interface: attribute onprogress assert_equals: getter must be Function expected &quot;function&quot; but got &quot;undefined&quot;
</span><span class="cx"> FAIL Document interface: attribute onratechange assert_equals: getter must be Function expected &quot;function&quot; but got &quot;undefined&quot;
</span><span class="cx"> FAIL Document interface: attribute onreset assert_equals: getter must be Function expected &quot;function&quot; but got &quot;undefined&quot;
</span><del>-FAIL Document interface: attribute onresize assert_true: The prototype object must have a property &quot;onresize&quot; expected true got false
</del><ins>+FAIL Document interface: attribute onresize assert_equals: getter must be Function expected &quot;function&quot; but got &quot;undefined&quot;
</ins><span class="cx"> FAIL Document interface: attribute onscroll assert_equals: getter must be Function expected &quot;function&quot; but got &quot;undefined&quot;
</span><span class="cx"> FAIL Document interface: attribute onseeked assert_equals: getter must be Function expected &quot;function&quot; but got &quot;undefined&quot;
</span><span class="cx"> FAIL Document interface: attribute onseeking assert_equals: getter must be Function expected &quot;function&quot; but got &quot;undefined&quot;
</span><span class="lines">@@ -341,7 +341,7 @@
</span><span class="cx"> PASS Document interface: iframe.contentDocument must inherit property &quot;onprogress&quot; with the proper type (140) 
</span><span class="cx"> PASS Document interface: iframe.contentDocument must inherit property &quot;onratechange&quot; with the proper type (141) 
</span><span class="cx"> PASS Document interface: iframe.contentDocument must inherit property &quot;onreset&quot; with the proper type (142) 
</span><del>-FAIL Document interface: iframe.contentDocument must inherit property &quot;onresize&quot; with the proper type (143) assert_inherits: property &quot;onresize&quot; not found in prototype chain
</del><ins>+PASS Document interface: iframe.contentDocument must inherit property &quot;onresize&quot; with the proper type (143) 
</ins><span class="cx"> PASS Document interface: iframe.contentDocument must inherit property &quot;onscroll&quot; with the proper type (144) 
</span><span class="cx"> PASS Document interface: iframe.contentDocument must inherit property &quot;onseeked&quot; with the proper type (145) 
</span><span class="cx"> PASS Document interface: iframe.contentDocument must inherit property &quot;onseeking&quot; with the proper type (146) 
</span><span class="lines">@@ -656,7 +656,7 @@
</span><span class="cx"> PASS Document interface: document.implementation.createDocument(null, &quot;&quot;, null) must inherit property &quot;onprogress&quot; with the proper type (140) 
</span><span class="cx"> PASS Document interface: document.implementation.createDocument(null, &quot;&quot;, null) must inherit property &quot;onratechange&quot; with the proper type (141) 
</span><span class="cx"> PASS Document interface: document.implementation.createDocument(null, &quot;&quot;, null) must inherit property &quot;onreset&quot; with the proper type (142) 
</span><del>-FAIL Document interface: document.implementation.createDocument(null, &quot;&quot;, null) must inherit property &quot;onresize&quot; with the proper type (143) assert_inherits: property &quot;onresize&quot; not found in prototype chain
</del><ins>+PASS Document interface: document.implementation.createDocument(null, &quot;&quot;, null) must inherit property &quot;onresize&quot; with the proper type (143) 
</ins><span class="cx"> PASS Document interface: document.implementation.createDocument(null, &quot;&quot;, null) must inherit property &quot;onscroll&quot; with the proper type (144) 
</span><span class="cx"> PASS Document interface: document.implementation.createDocument(null, &quot;&quot;, null) must inherit property &quot;onseeked&quot; with the proper type (145) 
</span><span class="cx"> PASS Document interface: document.implementation.createDocument(null, &quot;&quot;, null) must inherit property &quot;onseeking&quot; with the proper type (146) 
</span><span class="lines">@@ -938,7 +938,7 @@
</span><span class="cx"> FAIL HTMLElement interface: attribute onprogress assert_own_property: expected property &quot;onprogress&quot; missing
</span><span class="cx"> FAIL HTMLElement interface: attribute onratechange assert_own_property: expected property &quot;onratechange&quot; missing
</span><span class="cx"> FAIL HTMLElement interface: attribute onreset assert_own_property: expected property &quot;onreset&quot; missing
</span><del>-FAIL HTMLElement interface: attribute onresize assert_true: The prototype object must have a property &quot;onresize&quot; expected true got false
</del><ins>+FAIL HTMLElement interface: attribute onresize assert_own_property: expected property &quot;onresize&quot; missing
</ins><span class="cx"> FAIL HTMLElement interface: attribute onscroll assert_own_property: expected property &quot;onscroll&quot; missing
</span><span class="cx"> FAIL HTMLElement interface: attribute onseeked assert_own_property: expected property &quot;onseeked&quot; missing
</span><span class="cx"> FAIL HTMLElement interface: attribute onseeking assert_own_property: expected property &quot;onseeking&quot; missing
</span><span class="lines">@@ -1035,7 +1035,7 @@
</span><span class="cx"> PASS HTMLElement interface: document.createElement(&quot;noscript&quot;) must inherit property &quot;onprogress&quot; with the proper type (78) 
</span><span class="cx"> PASS HTMLElement interface: document.createElement(&quot;noscript&quot;) must inherit property &quot;onratechange&quot; with the proper type (79) 
</span><span class="cx"> PASS HTMLElement interface: document.createElement(&quot;noscript&quot;) must inherit property &quot;onreset&quot; with the proper type (80) 
</span><del>-FAIL HTMLElement interface: document.createElement(&quot;noscript&quot;) must inherit property &quot;onresize&quot; with the proper type (81) assert_inherits: property &quot;onresize&quot; not found in prototype chain
</del><ins>+PASS HTMLElement interface: document.createElement(&quot;noscript&quot;) must inherit property &quot;onresize&quot; with the proper type (81) 
</ins><span class="cx"> PASS HTMLElement interface: document.createElement(&quot;noscript&quot;) must inherit property &quot;onscroll&quot; with the proper type (82) 
</span><span class="cx"> PASS HTMLElement interface: document.createElement(&quot;noscript&quot;) must inherit property &quot;onseeked&quot; with the proper type (83) 
</span><span class="cx"> PASS HTMLElement interface: document.createElement(&quot;noscript&quot;) must inherit property &quot;onseeking&quot; with the proper type (84) 
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomdomstaticpropertyforiniterationexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -111,6 +111,7 @@
</span><span class="cx"> PASS a[&quot;onprogress&quot;] is null
</span><span class="cx"> PASS a[&quot;onratechange&quot;] is null
</span><span class="cx"> PASS a[&quot;onreset&quot;] is null
</span><ins>+PASS a[&quot;onresize&quot;] is null
</ins><span class="cx"> PASS a[&quot;onscroll&quot;] is null
</span><span class="cx"> PASS a[&quot;onseeked&quot;] is null
</span><span class="cx"> PASS a[&quot;onseeking&quot;] is null
</span></span></pre></div>
<a id="trunkLayoutTestsmediavideoresizeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/video-resize-expected.txt (0 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/video-resize-expected.txt                                (rev 0)
+++ trunk/LayoutTests/media/video-resize-expected.txt        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+
+Test &lt;video&gt; element initial resize event.
+
+EXPECTED (video.videoWidth == '0') OK
+EXPECTED (video.videoHeight == '0') OK
+EVENT(resize)
+EXPECTED (video.videoWidth == '320') OK
+EXPECTED (video.videoHeight == '240') OK
+END OF TEST
+
</ins></span></pre></div>
<a id="trunkLayoutTestsmediavideoresizehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/video-resize.html (0 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/video-resize.html                                (rev 0)
+++ trunk/LayoutTests/media/video-resize.html        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+&lt;html&gt;
+    &lt;head&gt;
+        &lt;title&gt;&amp;lt;video&amp;gt; element initial resize event test&lt;/title&gt;
+        &lt;script src=video-test.js&gt;&lt;/script&gt;
+        &lt;script src=media-file.js&gt;&lt;/script&gt;
+
+        &lt;script&gt;
+            function test()
+            {
+                var receivedFirstResizeEvent = false;
+
+                findMediaElement();
+
+                testExpected(&quot;video.videoWidth&quot;, 0);
+                testExpected(&quot;video.videoHeight&quot;, 0);
+
+                waitForEventOnceOn(video, &quot;loadedmetadata&quot;, function () {
+                    logResult(receivedFirstResizeEvent, &quot;Receive loadedmetadata after first resize event.&quot;);
+                });
+
+                waitForEventOnceOn(video, &quot;resize&quot;, function () {
+                    receivedFirstResizeEvent = true;
+                    testExpected(&quot;video.videoWidth&quot;, 320);
+                    testExpected(&quot;video.videoHeight&quot;, 240);
+                    endTest();
+                });
+
+                video.src = findMediaFile(&quot;video&quot;, &quot;content/test&quot;);
+            }
+        &lt;/script&gt;
+    &lt;/head&gt;
+
+    &lt;body onload=&quot;setTimeout(test, 100)&quot;&gt;
+
+        &lt;video controls width=640 height=480&quot;&gt;&lt;/video&gt;
+        &lt;p&gt;Test &amp;lt;video&amp;gt; element initial resize event.&lt;/p&gt;
+
+    &lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsmediavideotestjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/video-test.js (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/video-test.js        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/LayoutTests/media/video-test.js        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -349,19 +349,24 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-var requiredEvents = [];
-
</del><span class="cx"> function waitForEventsAndCall(eventList, func)
</span><span class="cx"> {
</span><ins>+    var requiredEvents = []
+
</ins><span class="cx">     function _eventCallback(event)
</span><span class="cx">     {
</span><span class="cx">         if (!requiredEvents.length)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        var index = requiredEvents.indexOf(event.type);
-        if (index &lt; 0)
</del><ins>+        for (var index = 0; index &lt; requiredEvents.length; index++) {
+            if (requiredEvents[index][1] === event.type) {
+                break;
+            }
+        }
+        if (index &gt;= requiredEvents.length)
</ins><span class="cx">             return;
</span><span class="cx"> 
</span><ins>+        requiredEvents[index][0].removeEventListener(event, _eventCallback);
</ins><span class="cx">         requiredEvents.splice(index, 1);
</span><span class="cx">         if (requiredEvents.length)
</span><span class="cx">             return;
</span><span class="lines">@@ -369,10 +374,9 @@
</span><span class="cx">         func();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    requiredEvents = [];
</del><span class="cx">     for (var i = 0; i &lt; eventList.length; i++) {
</span><del>-        requiredEvents[i] = eventList[i][1];
-        eventList[i][0].addEventListener(requiredEvents[i], _eventCallback, true);
</del><ins>+        requiredEvents[i] = eventList[i].slice(0);
+        requiredEvents[i][0].addEventListener(requiredEvents[i][1], _eventCallback, true);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/Source/WebCore/ChangeLog        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2016-01-31  Jeremy Jones  &lt;jeremyj@apple.com&gt;
+
+        Add resize event for HTMLMediaElement
+        https://bugs.webkit.org/show_bug.cgi?id=125715
+
+        Reviewed by Darin Adler.
+
+        Tests: http/tests/media/hls/hls-video-resize.html
+               media/video-resize.html
+
+        Move resize javascript event from DOMWindow.idl to GlobalEventHandlers.idl
+        per https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers
+
+        Post resize event from video element when metadata loads and when content size changes.
+
+        * dom/GlobalEventHandlers.idl: Add onresize.
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::createEventHandlerNameMap): Add onresizeAttr.
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::setReadyState):
+        (WebCore::HTMLMediaElement::mediaPlayerSizeChanged):
+        * html/HTMLMediaElement.h:
+        (WebCore::HTMLMediaElement::scheduleResizeEvent):
+        (WebCore::HTMLMediaElement::scheduleResizeEventIfSizeChanged):
+        * html/HTMLVideoElement.cpp:
+        (WebCore::HTMLVideoElement::scheduleResizeEvent): Sechedule event.
+        (WebCore::HTMLVideoElement::scheduleResizeEventIfSizeChanged): Schedule event if size has changed.
+        * html/HTMLVideoElement.h: Add declarations.
+        * page/DOMWindow.idl: Remove onresize.
+
</ins><span class="cx"> 2016-01-31  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Revert accidental behavior change from previous patch.
</span></span></pre></div>
<a id="trunkSourceWebCoredomGlobalEventHandlersidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/GlobalEventHandlers.idl (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/GlobalEventHandlers.idl        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/Source/WebCore/dom/GlobalEventHandlers.idl        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx">     attribute EventHandler onprogress;
</span><span class="cx">     attribute EventHandler onratechange;
</span><span class="cx">     attribute EventHandler onreset;
</span><del>-    // attribute EventHandler onresize;
</del><ins>+    attribute EventHandler onresize;
</ins><span class="cx">     attribute EventHandler onscroll;
</span><span class="cx">     attribute EventHandler onseeked;
</span><span class="cx">     attribute EventHandler onseeking;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLElement.cpp (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLElement.cpp        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/Source/WebCore/html/HTMLElement.cpp        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -314,6 +314,7 @@
</span><span class="cx">         &amp;onprogressAttr,
</span><span class="cx">         &amp;onratechangeAttr,
</span><span class="cx">         &amp;onresetAttr,
</span><ins>+        &amp;onresizeAttr,
</ins><span class="cx">         &amp;onscrollAttr,
</span><span class="cx">         &amp;onsearchAttr,
</span><span class="cx">         &amp;onseekedAttr,
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -2150,6 +2150,7 @@
</span><span class="cx">     if (m_readyState &gt;= HAVE_METADATA &amp;&amp; oldState &lt; HAVE_METADATA) {
</span><span class="cx">         prepareMediaFragmentURI();
</span><span class="cx">         scheduleEvent(eventNames().durationchangeEvent);
</span><ins>+        scheduleResizeEvent();
</ins><span class="cx">         scheduleEvent(eventNames().loadedmetadataEvent);
</span><span class="cx"> #if ENABLE(WIRELESS_PLAYBACK_TARGET)
</span><span class="cx">         if (hasEventListeners(eventNames().webkitplaybacktargetavailabilitychangedEvent))
</span><span class="lines">@@ -4496,6 +4497,8 @@
</span><span class="cx">         downcast&lt;MediaDocument&gt;(document()).mediaElementNaturalSizeChanged(expandedIntSize(m_player-&gt;naturalSize()));
</span><span class="cx"> 
</span><span class="cx">     beginProcessingMediaPlayerCallback();
</span><ins>+    if (m_readyState &gt; HAVE_NOTHING)
+        scheduleResizeEventIfSizeChanged();
</ins><span class="cx">     if (renderer())
</span><span class="cx">         renderer()-&gt;updateFromElement();
</span><span class="cx">     endProcessingMediaPlayerCallback();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.h        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -638,6 +638,8 @@
</span><span class="cx">     void addPlayedRange(const MediaTime&amp; start, const MediaTime&amp; end);
</span><span class="cx">     
</span><span class="cx">     void scheduleTimeupdateEvent(bool periodicEvent);
</span><ins>+    virtual void scheduleResizeEvent() { }
+    virtual void scheduleResizeEventIfSizeChanged() { }
</ins><span class="cx"> 
</span><span class="cx">     // loading
</span><span class="cx">     void selectMediaResource();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLVideoElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLVideoElement.cpp (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLVideoElement.cpp        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/Source/WebCore/html/HTMLVideoElement.cpp        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -186,6 +186,20 @@
</span><span class="cx">     return clampToUnsigned(player()-&gt;naturalSize().height());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void HTMLVideoElement::scheduleResizeEvent()
+{
+    m_lastReportedVideoWidth = videoWidth();
+    m_lastReportedVideoHeight = videoHeight();
+    scheduleEvent(eventNames().resizeEvent);
+}
+
+void HTMLVideoElement::scheduleResizeEventIfSizeChanged()
+{
+    if (m_lastReportedVideoWidth == videoWidth() &amp;&amp; m_lastReportedVideoHeight == videoHeight())
+        return;
+    scheduleResizeEvent();
+}
+
</ins><span class="cx"> bool HTMLVideoElement::isURLAttribute(const Attribute&amp; attribute) const
</span><span class="cx"> {
</span><span class="cx">     return attribute.name() == posterAttr || HTMLMediaElement::isURLAttribute(attribute);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLVideoElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLVideoElement.h (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLVideoElement.h        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/Source/WebCore/html/HTMLVideoElement.h        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT unsigned videoWidth() const;
</span><span class="cx">     WEBCORE_EXPORT unsigned videoHeight() const;
</span><del>-    
</del><ins>+
</ins><span class="cx">     // Fullscreen
</span><span class="cx">     void webkitEnterFullscreen(ExceptionCode&amp;);
</span><span class="cx">     void webkitExitFullscreen();
</span><span class="lines">@@ -89,6 +89,8 @@
</span><span class="cx"> private:
</span><span class="cx">     HTMLVideoElement(const QualifiedName&amp;, Document&amp;, bool);
</span><span class="cx"> 
</span><ins>+    virtual void scheduleResizeEvent() override;
+    virtual void scheduleResizeEventIfSizeChanged() override;
</ins><span class="cx">     virtual bool rendererIsNeeded(const RenderStyle&amp;) override;
</span><span class="cx">     virtual void didAttachRenderers() override;
</span><span class="cx">     virtual void parseAttribute(const QualifiedName&amp;, const AtomicString&amp;) override;
</span><span class="lines">@@ -110,6 +112,9 @@
</span><span class="cx">     std::unique_ptr&lt;HTMLImageLoader&gt; m_imageLoader;
</span><span class="cx"> 
</span><span class="cx">     AtomicString m_defaultPosterURL;
</span><ins>+
+    unsigned m_lastReportedVideoWidth { 0 };
+    unsigned m_lastReportedVideoHeight { 0 };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.idl (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.idl        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/Source/WebCore/page/DOMWindow.idl        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -215,9 +215,6 @@
</span><span class="cx"> 
</span><span class="cx">     // Event Handlers
</span><span class="cx"> 
</span><del>-    // FIXME: This should be in GlobalEventHandlers.idl according to HTML5 - https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers
-    [NotEnumerable] attribute EventHandler onresize;
-
</del><span class="cx">     // Unique to Element and DOMWindow
</span><span class="cx">     // FIXME: Should these be exposed on Document as well (and therefore moved to GlobalEventHandlers.idl)?
</span><span class="cx">     [NotEnumerable] attribute EventHandler onanimationend;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-01-31  Jeremy Jones  &lt;jeremyj@apple.com&gt;
+
+        Add resize event for HTMLMediaElement
+        https://bugs.webkit.org/show_bug.cgi?id=125715
+
+        Reviewed by Darin Adler.
+
+        Add a display name for &quot;resize&quot; event.
+
+        * UserInterface/Models/ScriptTimelineRecord.js:
+        (WebInspector.ScriptTimelineRecord.EventType.displayName):
+
</ins><span class="cx"> 2016-01-30  Dave Hyatt  &lt;hyatt@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add the break-* properties to Web Inspector's completion set
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsScriptTimelineRecordjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js (195952 => 195953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js        2016-02-01 05:51:48 UTC (rev 195952)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js        2016-02-01 06:34:07 UTC (rev 195953)
</span><span class="lines">@@ -292,6 +292,7 @@
</span><span class="cx">         nameMap.set(&quot;removesourcebuffer&quot;, &quot;Remove Source Buffer&quot;);
</span><span class="cx">         nameMap.set(&quot;removestream&quot;, &quot;Remove Stream&quot;);
</span><span class="cx">         nameMap.set(&quot;removetrack&quot;, &quot;Remove Track&quot;);
</span><ins>+        nameMap.set(&quot;resize&quot;, &quot;Resize&quot;);
</ins><span class="cx">         nameMap.set(&quot;securitypolicyviolation&quot;, &quot;Security Policy Violation&quot;);
</span><span class="cx">         nameMap.set(&quot;selectionchange&quot;, &quot;Selection Change&quot;);
</span><span class="cx">         nameMap.set(&quot;selectstart&quot;, &quot;Select Start&quot;);
</span></span></pre>
</div>
</div>

</body>
</html>