Commit 4b902270 authored by philipj@opera.com's avatar philipj@opera.com

Move onresize from just Window to Window and elements

The resize event was added to HTMLMediaElement in http://crbug.com/328140

Add a trailing newline to some files to work around http://crbug.com/307023

Also sync with the list of properties in the latest spec revision.

BUG=330953

Review URL: https://codereview.chromium.org/136593002

git-svn-id: svn://svn.chromium.org/blink/trunk@165057 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f4a8da6f
......@@ -31,6 +31,14 @@ PASS Set HTMLFrameSetElement.onload
PASS Enumerate HTMLFrameSetElement.onload
PASS Reflect HTMLFrameSetElement.onload
PASS Forward HTMLFrameSetElement.onload to Window
PASS Set HTMLBodyElement.onresize
PASS Enumerate HTMLBodyElement.onresize
PASS Reflect HTMLBodyElement.onresize
PASS Forward HTMLBodyElement.onresize to Window
PASS Set HTMLFrameSetElement.onresize
PASS Enumerate HTMLFrameSetElement.onresize
PASS Reflect HTMLFrameSetElement.onresize
PASS Forward HTMLFrameSetElement.onresize to Window
PASS Set HTMLBodyElement.onscroll
PASS Enumerate HTMLBodyElement.onscroll
PASS Reflect HTMLBodyElement.onscroll
......
......@@ -4,12 +4,13 @@
<script src="../../resources/testharnessreport.js"></script>
<script src="script-tests/event-handlers.js"></script>
<script>
// attribute list from WHATWG HTML Living Standard r8239
// attribute list from WHATWG HTML Living Standard r8389
[
"onblur",
"onerror",
"onfocus",
"onload",
"onresize",
"onscroll"
].forEach(function(attribute) {
testSet("HTMLBodyElement", attribute);
......
......@@ -21,28 +21,6 @@ PASS Set Document.onblur
PASS Enumerate Document.onblur
PASS Set Window.onblur
PASS Enumerate Window.onblur
PASS No Element.onerror
PASS Set HTMLElement.onerror
PASS Enumerate HTMLElement.onerror
PASS Reflect HTMLElement.onerror
PASS Set SVGElement.onerror
PASS Enumerate SVGElement.onerror
FAIL Reflect SVGElement.onerror assert_equals: Convert to function expected "function" but got "object"
PASS Set Document.onerror
PASS Enumerate Document.onerror
PASS Set Window.onerror
PASS Enumerate Window.onerror
PASS No Element.onfocus
PASS Set HTMLElement.onfocus
PASS Enumerate HTMLElement.onfocus
PASS Reflect HTMLElement.onfocus
PASS Set SVGElement.onfocus
PASS Enumerate SVGElement.onfocus
FAIL Reflect SVGElement.onfocus assert_equals: Convert to function expected "function" but got "object"
PASS Set Document.onfocus
PASS Enumerate Document.onfocus
PASS Set Window.onfocus
PASS Enumerate Window.onfocus
PASS No Element.oncancel
PASS Set HTMLElement.oncancel
PASS Enumerate HTMLElement.oncancel
......@@ -263,6 +241,28 @@ PASS Set Document.onended
PASS Enumerate Document.onended
PASS Set Window.onended
PASS Enumerate Window.onended
PASS No Element.onerror
PASS Set HTMLElement.onerror
PASS Enumerate HTMLElement.onerror
PASS Reflect HTMLElement.onerror
PASS Set SVGElement.onerror
PASS Enumerate SVGElement.onerror
FAIL Reflect SVGElement.onerror assert_equals: Convert to function expected "function" but got "object"
PASS Set Document.onerror
PASS Enumerate Document.onerror
PASS Set Window.onerror
PASS Enumerate Window.onerror
PASS No Element.onfocus
PASS Set HTMLElement.onfocus
PASS Enumerate HTMLElement.onfocus
PASS Reflect HTMLElement.onfocus
PASS Set SVGElement.onfocus
PASS Enumerate SVGElement.onfocus
FAIL Reflect SVGElement.onfocus assert_equals: Convert to function expected "function" but got "object"
PASS Set Document.onfocus
PASS Enumerate Document.onfocus
PASS Set Window.onfocus
PASS Enumerate Window.onfocus
PASS No Element.oninput
PASS Set HTMLElement.oninput
PASS Enumerate HTMLElement.oninput
......@@ -516,6 +516,17 @@ PASS Set Document.onreset
PASS Enumerate Document.onreset
PASS Set Window.onreset
PASS Enumerate Window.onreset
PASS No Element.onresize
PASS Set HTMLElement.onresize
PASS Enumerate HTMLElement.onresize
PASS Reflect HTMLElement.onresize
PASS Set SVGElement.onresize
PASS Enumerate SVGElement.onresize
FAIL Reflect SVGElement.onresize assert_equals: Convert to function expected "function" but got "object"
PASS Set Document.onresize
PASS Enumerate Document.onresize
PASS Set Window.onresize
PASS Enumerate Window.onresize
PASS No Element.onscroll
PASS Set HTMLElement.onscroll
PASS Enumerate HTMLElement.onscroll
......@@ -626,6 +637,17 @@ PASS Set Document.ontimeupdate
PASS Enumerate Document.ontimeupdate
PASS Set Window.ontimeupdate
PASS Enumerate Window.ontimeupdate
PASS No Element.ontoggle
FAIL Set HTMLElement.ontoggle assert_equals: Initially null expected null but got undefined
FAIL Enumerate HTMLElement.ontoggle assert_true: expected true got undefined
FAIL Reflect HTMLElement.ontoggle assert_equals: Convert to function expected "function" but got "undefined"
FAIL Set SVGElement.ontoggle assert_equals: Initially null expected null but got undefined
FAIL Enumerate SVGElement.ontoggle assert_true: expected true got undefined
FAIL Reflect SVGElement.ontoggle assert_equals: Convert to function expected "function" but got "undefined"
FAIL Set Document.ontoggle assert_equals: Initially null expected null but got undefined
FAIL Enumerate Document.ontoggle assert_true: expected true got undefined
FAIL Set Window.ontoggle assert_equals: Initially null expected null but got undefined
FAIL Enumerate Window.ontoggle assert_true: expected true got undefined
PASS No Element.onvolumechange
PASS Set HTMLElement.onvolumechange
PASS Enumerate HTMLElement.onvolumechange
......
......@@ -4,12 +4,10 @@
<script src="../../resources/testharnessreport.js"></script>
<script src="script-tests/event-handlers.js"></script>
<script>
// attribute list from WHATWG HTML Living Standard r8212
// attribute list from WHATWG HTML Living Standard r8389
[
"onabort",
"onblur",
"onerror",
"onfocus",
"oncancel",
"oncanplay",
"oncanplaythrough",
......@@ -30,6 +28,8 @@
"ondurationchange",
"onemptied",
"onended",
"onerror",
"onfocus",
"oninput",
"oninvalid",
"onkeydown",
......@@ -53,6 +53,7 @@
"onprogress",
"onratechange",
"onreset",
"onresize",
"onscroll",
"onseeked",
"onseeking",
......@@ -63,6 +64,7 @@
"onsubmit",
"onsuspend",
"ontimeupdate",
"ontoggle",
"onvolumechange",
"onwaiting"
].forEach(function(attribute) {
......
......@@ -99,16 +99,6 @@ PASS Set HTMLFrameSetElement.onpopstate
PASS Enumerate HTMLFrameSetElement.onpopstate
PASS Reflect HTMLFrameSetElement.onpopstate
PASS Forward HTMLFrameSetElement.onpopstate to Window
PASS Set Window.onresize
PASS Enumerate Window.onresize
PASS Set HTMLBodyElement.onresize
PASS Enumerate HTMLBodyElement.onresize
PASS Reflect HTMLBodyElement.onresize
PASS Forward HTMLBodyElement.onresize to Window
PASS Set HTMLFrameSetElement.onresize
PASS Enumerate HTMLFrameSetElement.onresize
PASS Reflect HTMLFrameSetElement.onresize
PASS Forward HTMLFrameSetElement.onresize to Window
PASS Set Window.onstorage
PASS Enumerate Window.onstorage
PASS Set HTMLBodyElement.onstorage
......
......@@ -4,7 +4,7 @@
<script src="../../resources/testharnessreport.js"></script>
<script src="script-tests/event-handlers.js"></script>
<script>
// attribute list from WHATWG HTML Living Standard r8239
// attribute list from WHATWG HTML Living Standard r8389
[
"onafterprint",
"onbeforeprint",
......@@ -16,7 +16,6 @@
"onpagehide",
"onpageshow",
"onpopstate",
"onresize",
"onstorage",
"onunload"
].forEach(function(attribute) {
......
......@@ -217,3 +217,4 @@ callback CustomElementConstructor = Element ();
Document implements GlobalEventHandlers;
Document implements ParentNode;
......@@ -81,6 +81,7 @@ DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(playing);
DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(progress);
DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(ratechange);
DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(reset);
DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(resize);
DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(scroll);
DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(seeked);
DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(seeking);
......
......@@ -77,6 +77,7 @@
attribute EventHandler onprogress;
attribute EventHandler onratechange;
attribute EventHandler onreset;
attribute EventHandler onresize;
attribute EventHandler onscroll;
attribute EventHandler onseeked;
attribute EventHandler onseeking;
......@@ -87,6 +88,7 @@
attribute EventHandler onsubmit;
attribute EventHandler onsuspend;
attribute EventHandler ontimeupdate;
//attribute EventHandler ontoggle;
attribute EventHandler onvolumechange;
attribute EventHandler onwaiting;
};
......@@ -43,7 +43,6 @@ DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(online);
DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(pagehide);
DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(pageshow);
DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(popstate);
DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(resize);
DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(storage);
DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(unload);
}
......
......@@ -241,3 +241,4 @@ Window implements ImageBitmapFactories;
Window implements WindowBase64;
Window implements WindowEventHandlers;
Window implements WindowTimers;
......@@ -41,7 +41,6 @@
attribute EventHandler onpagehide;
attribute EventHandler onpageshow;
attribute EventHandler onpopstate;
attribute EventHandler onresize;
attribute EventHandler onstorage;
attribute EventHandler onunload;
};
......@@ -39,6 +39,7 @@ public:
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(error);
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(focus);
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(load);
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(resize);
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(scroll);
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(orientationchange);
......
......@@ -33,6 +33,7 @@ interface HTMLBodyElement : HTMLElement {
attribute EventHandler onerror;
attribute EventHandler onfocus;
attribute EventHandler onload;
attribute EventHandler onresize;
attribute EventHandler onscroll;
};
......
......@@ -284,6 +284,7 @@ const AtomicString& HTMLElement::eventNameForAttributeName(const QualifiedName&
attributeNameToEventNameMap.set(onprogressAttr.localName(), EventTypeNames::progress);
attributeNameToEventNameMap.set(onratechangeAttr.localName(), EventTypeNames::ratechange);
attributeNameToEventNameMap.set(onresetAttr.localName(), EventTypeNames::reset);
attributeNameToEventNameMap.set(onresizeAttr.localName(), EventTypeNames::resize);
attributeNameToEventNameMap.set(onseekedAttr.localName(), EventTypeNames::seeked);
attributeNameToEventNameMap.set(onseekingAttr.localName(), EventTypeNames::seeking);
attributeNameToEventNameMap.set(onselectAttr.localName(), EventTypeNames::select);
......
......@@ -52,3 +52,4 @@
};
HTMLElement implements GlobalEventHandlers;
......@@ -51,6 +51,7 @@ public:
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(error);
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(focus);
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(load);
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(resize);
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(scroll);
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(orientationchange);
......
......@@ -30,6 +30,7 @@ interface HTMLFrameSetElement : HTMLElement {
attribute EventHandler onerror;
attribute EventHandler onfocus;
attribute EventHandler onload;
attribute EventHandler onresize;
attribute EventHandler onscroll;
};
......
......@@ -39,3 +39,4 @@
};
SVGElement implements GlobalEventHandlers;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment