IndieUI: Add basic IndieUI infrastructure
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jun 2013 08:51:37 +0000 (08:51 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jun 2013 08:51:37 +0000 (08:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=117367

Reviewed by Ryosuke Niwa.

Source/WebCore:

IndieUI is a new W3C spec that aims to abstract the connection between input and action, so that
a user (possibly using assistive technologies like a screen reader) does not need a specific kind
of device (like a mouse) to interact with an object.
http://www.w3.org/WAI/IndieUI/

This initial patch adds in the basic support for UIRequestEvent and the uiactions attribute.
It modifies the config files to enable and build this feature.

Tests: indieui/create-uirequestevent.html
       indieui/uiactions.html

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* GNUmakefile.am:
* Modules/indieui: Added.
* Modules/indieui/UIRequestEvent.cpp: Added.
(WebCore::UIRequestEventInit::UIRequestEventInit):
(WebCore::UIRequestEvent::create):
(WebCore::UIRequestEvent::UIRequestEvent):
(WebCore::UIRequestEvent::~UIRequestEvent):
(WebCore::UIRequestEvent::interfaceName):
(WebCore::UIRequestEventDispatchMediator::UIRequestEventDispatchMediator):
(WebCore::UIRequestEventDispatchMediator::event):
(WebCore::UIRequestEventDispatchMediator::dispatchEvent):
* Modules/indieui/UIRequestEvent.h: Added.
(WebCore::UIRequestEvent::receiver):
(WebCore::UIRequestEventDispatchMediator::create):
* Modules/indieui/UIRequestEvent.idl: Added.
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityNodeObject.h:
* dom/Element.cpp:
(WebCore::Element::setUIActions):
(WebCore::Element::UIActions):
* dom/Element.h:
* dom/Element.idl:
* dom/Event.cpp:
(WebCore::EventInit::EventInit):
* dom/Event.h:
* dom/EventNames.in:
* dom/Node.cpp:
(WebCore::Node::dispatchUIRequestEvent):
* dom/Node.h:
* dom/UIEvent.cpp:
(WebCore::UIEventInit::UIEventInit):
* dom/UIEvent.h:
* html/HTMLAttributeNames.in:

LayoutTests:

* fast/js/dom-static-property-for-in-iteration-expected.txt:
* fast/js/global-constructors-attributes-expected.txt:
* indieui: Added.
* indieui/create-uirequestevent-expected.txt: Added.
* indieui/create-uirequestevent.html: Added.
* indieui/uiactions-expected.txt: Added.
* indieui/uiactions.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:
* platform/qt/fast/js/dom-static-property-for-in-iteration-expected.txt: Added.
* platform/win/TestExpectations:
* platform/win/fast/js/dom-static-property-for-in-iteration-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151827 268f45cc-cd09-0410-ab3c-d52691b4dbfc

34 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/js/dom-static-property-for-in-iteration-expected.txt
LayoutTests/fast/js/global-constructors-attributes-expected.txt
LayoutTests/indieui/create-uirequestevent-expected.txt [new file with mode: 0644]
LayoutTests/indieui/create-uirequestevent.html [new file with mode: 0644]
LayoutTests/indieui/uiactions-expected.txt [new file with mode: 0644]
LayoutTests/indieui/uiactions.html [new file with mode: 0644]
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/qt/TestExpectations
LayoutTests/platform/qt/fast/js/dom-static-property-for-in-iteration-expected.txt [new file with mode: 0644]
LayoutTests/platform/win/TestExpectations
LayoutTests/platform/win/fast/js/dom-static-property-for-in-iteration-expected.txt [new file with mode: 0644]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/DerivedSources.make
Source/WebCore/GNUmakefile.am
Source/WebCore/Modules/indieui/UIRequestEvent.cpp [new file with mode: 0644]
Source/WebCore/Modules/indieui/UIRequestEvent.h [new file with mode: 0644]
Source/WebCore/Modules/indieui/UIRequestEvent.idl [new file with mode: 0644]
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/accessibility/AccessibilityNodeObject.h
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/Element.idl
Source/WebCore/dom/Event.cpp
Source/WebCore/dom/Event.h
Source/WebCore/dom/EventNames.in
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/dom/UIEvent.cpp
Source/WebCore/dom/UIEvent.h
Source/WebCore/html/HTMLAttributeNames.in

index 7c163f7..5deb39e 100644 (file)
@@ -1,3 +1,24 @@
+2013-06-20  Chris Fleizach  <cfleizach@apple.com>
+
+        IndieUI: Add basic IndieUI infrastructure
+        https://bugs.webkit.org/show_bug.cgi?id=117367
+
+        Reviewed by Ryosuke Niwa.
+
+        * fast/js/dom-static-property-for-in-iteration-expected.txt:
+        * fast/js/global-constructors-attributes-expected.txt:
+        * indieui: Added.
+        * indieui/create-uirequestevent-expected.txt: Added.
+        * indieui/create-uirequestevent.html: Added.
+        * indieui/uiactions-expected.txt: Added.
+        * indieui/uiactions.html: Added.
+        * platform/efl/TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/qt/TestExpectations:
+        * platform/qt/fast/js/dom-static-property-for-in-iteration-expected.txt: Added.
+        * platform/win/TestExpectations:
+        * platform/win/fast/js/dom-static-property-for-in-iteration-expected.txt: Added.
+
 2013-06-20  Ryosuke Niwa  <rniwa@webkit.org>
 
         REGRESSION(r151808): fast/xmlhttprequest/xmlhttprequest-recursive-sync-event.html fails
index 2fc3e9e..cffe4f5 100644 (file)
@@ -58,10 +58,11 @@ PASS a["previousElementSibling"] is [object HTMLDivElement]
 PASS a["childElementCount"] is 0
 PASS a["scrollLeft"] is 0
 PASS a["firstElementChild"] is null
+PASS a["uiactions"] is 
 PASS a["clientLeft"] is 0
 PASS a["offsetHeight"] is 18
 PASS a["clientHeight"] is 0
-PASS a["offsetTop"] is 954
+PASS a["offsetTop"] is 969
 PASS a["scrollTop"] is 0
 PASS a["scrollHeight"] is 0
 PASS a["previousSibling"] is [object Text]
index ee8d345..6af90cf 100644 (file)
@@ -1778,6 +1778,11 @@ PASS Object.getOwnPropertyDescriptor(global, 'UIEvent').hasOwnProperty('get') is
 PASS Object.getOwnPropertyDescriptor(global, 'UIEvent').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'UIEvent').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'UIEvent').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'UIRequestEvent').value is UIRequestEvent
+PASS Object.getOwnPropertyDescriptor(global, 'UIRequestEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'UIRequestEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'UIRequestEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'UIRequestEvent').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'URL').value is URL
 PASS Object.getOwnPropertyDescriptor(global, 'URL').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'URL').hasOwnProperty('set') is false
diff --git a/LayoutTests/indieui/create-uirequestevent-expected.txt b/LayoutTests/indieui/create-uirequestevent-expected.txt
new file mode 100644 (file)
index 0000000..863b5b3
--- /dev/null
@@ -0,0 +1,21 @@
+Tests that document.createEvent() works with IndieUI events.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+[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
+
diff --git a/LayoutTests/indieui/create-uirequestevent.html b/LayoutTests/indieui/create-uirequestevent.html
new file mode 100644 (file)
index 0000000..95771d3
--- /dev/null
@@ -0,0 +1,35 @@
+<html>
+<head>
+<script src="../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+description('Tests that document.createEvent() works with IndieUI events.');
+
+var eventTypes = new Array("UIRequestEvent");
+
+for (var k = 0; k < eventTypes.length; k++) {
+    var event = document.createEvent("UIRequestEvent");
+
+    debug(event);
+    shouldBeTrue("typeof event == 'object'");
+
+    shouldBeTrue("'type' in event");
+    shouldBeTrue("'bubbles' in event");
+    shouldBeTrue("'cancelable' in event");
+    shouldBeTrue("'receiver' in event");
+
+    shouldBe("typeof event.type", "'string'");
+    shouldBe("typeof event.bubbles", "'boolean'");
+    shouldBe("typeof event.cancelable", "'boolean'");
+    shouldBe("typeof event.receiver", "'object'");
+
+    debug("\n");
+}
+
+
+
+</script>
+<script src="../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/indieui/uiactions-expected.txt b/LayoutTests/indieui/uiactions-expected.txt
new file mode 100644 (file)
index 0000000..ce4a266
--- /dev/null
@@ -0,0 +1,12 @@
+a
+This tests that we can get and set uiActions.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS item.uiactions is 'valuechange redo'
+PASS item.uiactions is 'undo'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/indieui/uiactions.html b/LayoutTests/indieui/uiactions.html
new file mode 100644 (file)
index 0000000..8dfd63e
--- /dev/null
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body id="body">
+
+<div id="item" uiactions="valuechange redo">a</div>
+
+<div id="console"></div>
+
+<script>
+    description("This tests that we can get and set uiActions.");
+
+    var item = document.getElementById("item");
+    shouldBe("item.uiactions", "'valuechange redo'");
+    item.uiactions = "undo";
+    shouldBe("item.uiactions", "'undo'");
+
+</script>
+
+<script src="../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
index 82867c5..14227db 100644 (file)
@@ -1164,6 +1164,9 @@ webkit.org/b/87662 fast/events/constructors/media-stream-event-constructor.html
 webkit.org/b/95302 fast/speech [ Skip ]
 webkit.org/b/95302 fast/events/constructors/speech-recognition-event-constructor.html [ Skip ]
 
+# Requires INDIE_UI support
+webkit.org/b/111446 indieui [ Skip ]
+
 # Requires support for Web notifications
 webkit.org/b/73544 fast/notifications [ Skip ]
 webkit.org/b/73544 http/tests/notifications [ Skip ]
index 89b909b..4998ee6 100644 (file)
@@ -180,6 +180,9 @@ webkit.org/b/98937 gamepad [ Skip ]
 webkit.org/b/98938 fast/speech [ Skip ]
 webkit.org/b/98938 fast/events/constructors/speech-recognition-event-constructor.html [ Skip ]
 
+# Requires INDIE_UI support
+webkit.org/b/111446 indieui [ Skip ]
+
 # FileSystem API is not supported.
 webkit.org/b/58443 fast/filesystem [ Skip ]
 webkit.org/b/58443 http/tests/filesystem [ Skip ]
index e07474a..cb44b87 100644 (file)
@@ -93,6 +93,9 @@ gamepad/
 # ENABLE(INPUT_SPEECH) is disabled.
 fast/speech
 
+# ENABLE(INDIE_UI) is disabled.
+indieui/
+
 # ENABLE(SCRIPTEDSPEECH) is disabled.
 fast/events/constructors/speech-recognition-event-constructor.html
 fast/events/constructors/speech-recognition-error-constructor.html
diff --git a/LayoutTests/platform/qt/fast/js/dom-static-property-for-in-iteration-expected.txt b/LayoutTests/platform/qt/fast/js/dom-static-property-for-in-iteration-expected.txt
new file mode 100644 (file)
index 0000000..2fc3e9e
--- /dev/null
@@ -0,0 +1,110 @@
+Checks that get_by_pname doesn't get confused about which properties go where when it comes to stacic properties.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS a["origin"] is file://
+PASS a["hash"] is 
+PASS a["search"] is 
+PASS a["text"] is nerget
+PASS a["hostname"] is 
+PASS a["rel"] is 
+PASS a["name"] is 
+PASS a["hreflang"] is 
+PASS a["ping"] is 
+PASS a["rev"] is 
+PASS a["host"] is 
+PASS a["charset"] is 
+PASS a["target"] is 
+PASS a["type"] is 
+PASS a["coords"] is 
+PASS a["shape"] is 
+PASS a["port"] is 
+PASS a["protocol"] is file:
+PASS a["outerHTML"] is <a id="foo" href="bar">nerget</a>
+PASS a["spellcheck"] is true
+PASS a["webkitdropzone"] is 
+PASS a["id"] is foo
+PASS a["title"] is 
+PASS a["lang"] is 
+PASS a["translate"] is true
+PASS a["hidden"] is false
+PASS a["innerText"] is nerget
+PASS a["dir"] is 
+PASS a["innerHTML"] is nerget
+PASS a["contentEditable"] is inherit
+PASS a["tabIndex"] is 0
+PASS a["draggable"] is true
+PASS a["outerText"] is nerget
+PASS a["accessKey"] is 
+PASS a["children"] is [object HTMLCollection]
+PASS a["isContentEditable"] is false
+PASS a["style"] is [object CSSStyleDeclaration]
+PASS a["dataset"] is [object DOMStringMap]
+PASS a["clientWidth"] is 0
+PASS a["scrollWidth"] is 0
+PASS a["attributes"] is [object NamedNodeMap]
+PASS a["webkitRegionOverset"] is undefined
+PASS a["offsetWidth"] is 39
+PASS a["classList"] is 
+PASS a["offsetLeft"] is 8
+PASS a["className"] is 
+PASS a["clientTop"] is 0
+PASS a["lastElementChild"] is null
+PASS a["offsetParent"] is [object HTMLBodyElement]
+PASS a["nextElementSibling"] is [object HTMLScriptElement]
+PASS a["tagName"] is A
+PASS a["previousElementSibling"] is [object HTMLDivElement]
+PASS a["childElementCount"] is 0
+PASS a["scrollLeft"] is 0
+PASS a["firstElementChild"] is null
+PASS a["clientLeft"] is 0
+PASS a["offsetHeight"] is 18
+PASS a["clientHeight"] is 0
+PASS a["offsetTop"] is 954
+PASS a["scrollTop"] is 0
+PASS a["scrollHeight"] is 0
+PASS a["previousSibling"] is [object Text]
+PASS a["parentNode"] is [object HTMLBodyElement]
+PASS a["lastChild"] is [object Text]
+PASS a["firstChild"] is [object Text]
+PASS a["nodeValue"] is null
+PASS a["textContent"] is nerget
+PASS a["nodeType"] is 1
+PASS a["nodeName"] is A
+PASS a["prefix"] is null
+PASS a["childNodes"] is [object NodeList]
+PASS a["nextSibling"] is [object Text]
+PASS a["ownerDocument"] is [object HTMLDocument]
+PASS a["namespaceURI"] is http://www.w3.org/1999/xhtml
+PASS a["localName"] is a
+PASS a["parentElement"] is [object HTMLBodyElement]
+PASS a["foo"] is 1
+PASS a["bar"] is 2
+PASS a["wibble"] is 3
+PASS a["hick"] is 4
+PASS a["hock"] is 5
+PASS a["snood"] is 6
+PASS a["ALLOW_KEYBOARD_INPUT"] is 1
+PASS a["NOTATION_NODE"] is 12
+PASS a["CDATA_SECTION_NODE"] is 4
+PASS a["ELEMENT_NODE"] is 1
+PASS a["DOCUMENT_POSITION_DISCONNECTED"] is 1
+PASS a["ENTITY_NODE"] is 6
+PASS a["TEXT_NODE"] is 3
+PASS a["ENTITY_REFERENCE_NODE"] is 5
+PASS a["DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC"] is 32
+PASS a["DOCUMENT_FRAGMENT_NODE"] is 11
+PASS a["PROCESSING_INSTRUCTION_NODE"] is 7
+PASS a["DOCUMENT_POSITION_PRECEDING"] is 2
+PASS a["DOCUMENT_TYPE_NODE"] is 10
+PASS a["COMMENT_NODE"] is 8
+PASS a["DOCUMENT_POSITION_FOLLOWING"] is 4
+PASS a["ATTRIBUTE_NODE"] is 2
+PASS a["DOCUMENT_POSITION_CONTAINED_BY"] is 16
+PASS a["DOCUMENT_NODE"] is 9
+PASS a["DOCUMENT_POSITION_CONTAINS"] is 8
+PASS successfullyParsed is true
+
+TEST COMPLETE
+nerget
index 489c2b6..1d2f479 100644 (file)
@@ -586,6 +586,9 @@ svg/custom/gradient-stop-style-change.svg
 # Application cache
 http/tests/appcache
 
+# ENABLE(INDIE_UI) required
+indieui
+
 # <rdar://problem/5961006> LayoutTests that send an OPTIONS request don't work on Windows due to Apache 1.3
 http/tests/xmlhttprequest/access-control-basic-non-simple-allow-async.html
 http/tests/xmlhttprequest/access-control-basic-non-simple-allow.html
diff --git a/LayoutTests/platform/win/fast/js/dom-static-property-for-in-iteration-expected.txt b/LayoutTests/platform/win/fast/js/dom-static-property-for-in-iteration-expected.txt
new file mode 100644 (file)
index 0000000..2fc3e9e
--- /dev/null
@@ -0,0 +1,110 @@
+Checks that get_by_pname doesn't get confused about which properties go where when it comes to stacic properties.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS a["origin"] is file://
+PASS a["hash"] is 
+PASS a["search"] is 
+PASS a["text"] is nerget
+PASS a["hostname"] is 
+PASS a["rel"] is 
+PASS a["name"] is 
+PASS a["hreflang"] is 
+PASS a["ping"] is 
+PASS a["rev"] is 
+PASS a["host"] is 
+PASS a["charset"] is 
+PASS a["target"] is 
+PASS a["type"] is 
+PASS a["coords"] is 
+PASS a["shape"] is 
+PASS a["port"] is 
+PASS a["protocol"] is file:
+PASS a["outerHTML"] is <a id="foo" href="bar">nerget</a>
+PASS a["spellcheck"] is true
+PASS a["webkitdropzone"] is 
+PASS a["id"] is foo
+PASS a["title"] is 
+PASS a["lang"] is 
+PASS a["translate"] is true
+PASS a["hidden"] is false
+PASS a["innerText"] is nerget
+PASS a["dir"] is 
+PASS a["innerHTML"] is nerget
+PASS a["contentEditable"] is inherit
+PASS a["tabIndex"] is 0
+PASS a["draggable"] is true
+PASS a["outerText"] is nerget
+PASS a["accessKey"] is 
+PASS a["children"] is [object HTMLCollection]
+PASS a["isContentEditable"] is false
+PASS a["style"] is [object CSSStyleDeclaration]
+PASS a["dataset"] is [object DOMStringMap]
+PASS a["clientWidth"] is 0
+PASS a["scrollWidth"] is 0
+PASS a["attributes"] is [object NamedNodeMap]
+PASS a["webkitRegionOverset"] is undefined
+PASS a["offsetWidth"] is 39
+PASS a["classList"] is 
+PASS a["offsetLeft"] is 8
+PASS a["className"] is 
+PASS a["clientTop"] is 0
+PASS a["lastElementChild"] is null
+PASS a["offsetParent"] is [object HTMLBodyElement]
+PASS a["nextElementSibling"] is [object HTMLScriptElement]
+PASS a["tagName"] is A
+PASS a["previousElementSibling"] is [object HTMLDivElement]
+PASS a["childElementCount"] is 0
+PASS a["scrollLeft"] is 0
+PASS a["firstElementChild"] is null
+PASS a["clientLeft"] is 0
+PASS a["offsetHeight"] is 18
+PASS a["clientHeight"] is 0
+PASS a["offsetTop"] is 954
+PASS a["scrollTop"] is 0
+PASS a["scrollHeight"] is 0
+PASS a["previousSibling"] is [object Text]
+PASS a["parentNode"] is [object HTMLBodyElement]
+PASS a["lastChild"] is [object Text]
+PASS a["firstChild"] is [object Text]
+PASS a["nodeValue"] is null
+PASS a["textContent"] is nerget
+PASS a["nodeType"] is 1
+PASS a["nodeName"] is A
+PASS a["prefix"] is null
+PASS a["childNodes"] is [object NodeList]
+PASS a["nextSibling"] is [object Text]
+PASS a["ownerDocument"] is [object HTMLDocument]
+PASS a["namespaceURI"] is http://www.w3.org/1999/xhtml
+PASS a["localName"] is a
+PASS a["parentElement"] is [object HTMLBodyElement]
+PASS a["foo"] is 1
+PASS a["bar"] is 2
+PASS a["wibble"] is 3
+PASS a["hick"] is 4
+PASS a["hock"] is 5
+PASS a["snood"] is 6
+PASS a["ALLOW_KEYBOARD_INPUT"] is 1
+PASS a["NOTATION_NODE"] is 12
+PASS a["CDATA_SECTION_NODE"] is 4
+PASS a["ELEMENT_NODE"] is 1
+PASS a["DOCUMENT_POSITION_DISCONNECTED"] is 1
+PASS a["ENTITY_NODE"] is 6
+PASS a["TEXT_NODE"] is 3
+PASS a["ENTITY_REFERENCE_NODE"] is 5
+PASS a["DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC"] is 32
+PASS a["DOCUMENT_FRAGMENT_NODE"] is 11
+PASS a["PROCESSING_INSTRUCTION_NODE"] is 7
+PASS a["DOCUMENT_POSITION_PRECEDING"] is 2
+PASS a["DOCUMENT_TYPE_NODE"] is 10
+PASS a["COMMENT_NODE"] is 8
+PASS a["DOCUMENT_POSITION_FOLLOWING"] is 4
+PASS a["ATTRIBUTE_NODE"] is 2
+PASS a["DOCUMENT_POSITION_CONTAINED_BY"] is 16
+PASS a["DOCUMENT_NODE"] is 9
+PASS a["DOCUMENT_POSITION_CONTAINS"] is 8
+PASS successfullyParsed is true
+
+TEST COMPLETE
+nerget
index b5b7e46..733c2a1 100644 (file)
@@ -5,6 +5,7 @@ set(WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/Modules/gamepad"
     "${WEBCORE_DIR}/Modules/geolocation"
     "${WEBCORE_DIR}/Modules/indexeddb"
+    "${WEBCORE_DIR}/Modules/indieui"
     "${WEBCORE_DIR}/Modules/mediasource"
     "${WEBCORE_DIR}/Modules/mediastream"
     "${WEBCORE_DIR}/Modules/navigatorcontentutils"
@@ -118,6 +119,7 @@ set(WebCore_IDL_INCLUDES
     Modules/gamepad
     Modules/geolocation
     Modules/indexeddb
+    Modules/indieui
     Modules/mediastream
     Modules/networkinfo
     Modules/notifications
index 5f2f0d2..b0636c7 100644 (file)
@@ -1,3 +1,58 @@
+2013-06-21  Chris Fleizach  <cfleizach@apple.com>
+
+        IndieUI: Add basic IndieUI infrastructure
+        https://bugs.webkit.org/show_bug.cgi?id=117367
+
+        Reviewed by Ryosuke Niwa.
+
+        IndieUI is a new W3C spec that aims to abstract the connection between input and action, so that
+        a user (possibly using assistive technologies like a screen reader) does not need a specific kind
+        of device (like a mouse) to interact with an object.
+        http://www.w3.org/WAI/IndieUI/
+
+        This initial patch adds in the basic support for UIRequestEvent and the uiactions attribute.
+        It modifies the config files to enable and build this feature.
+
+        Tests: indieui/create-uirequestevent.html
+               indieui/uiactions.html
+
+        * CMakeLists.txt:
+        * Configurations/FeatureDefines.xcconfig:
+        * DerivedSources.make:
+        * GNUmakefile.am:
+        * Modules/indieui: Added.
+        * Modules/indieui/UIRequestEvent.cpp: Added.
+        (WebCore::UIRequestEventInit::UIRequestEventInit):
+        (WebCore::UIRequestEvent::create):
+        (WebCore::UIRequestEvent::UIRequestEvent):
+        (WebCore::UIRequestEvent::~UIRequestEvent):
+        (WebCore::UIRequestEvent::interfaceName):
+        (WebCore::UIRequestEventDispatchMediator::UIRequestEventDispatchMediator):
+        (WebCore::UIRequestEventDispatchMediator::event):
+        (WebCore::UIRequestEventDispatchMediator::dispatchEvent):
+        * Modules/indieui/UIRequestEvent.h: Added.
+        (WebCore::UIRequestEvent::receiver):
+        (WebCore::UIRequestEventDispatchMediator::create):
+        * Modules/indieui/UIRequestEvent.idl: Added.
+        * WebCore.xcodeproj/project.pbxproj:
+        * accessibility/AccessibilityNodeObject.h:
+        * dom/Element.cpp:
+        (WebCore::Element::setUIActions):
+        (WebCore::Element::UIActions):
+        * dom/Element.h:
+        * dom/Element.idl:
+        * dom/Event.cpp:
+        (WebCore::EventInit::EventInit):
+        * dom/Event.h:
+        * dom/EventNames.in:
+        * dom/Node.cpp:
+        (WebCore::Node::dispatchUIRequestEvent):
+        * dom/Node.h:
+        * dom/UIEvent.cpp:
+        (WebCore::UIEventInit::UIEventInit):
+        * dom/UIEvent.h:
+        * html/HTMLAttributeNames.in:
+
 2013-06-20  Ryosuke Niwa  <rniwa@webkit.org>
 
         REGRESSION(r145788): mouse drag on canvas shouldn't start selection
index 72aee65..c2b227a 100644 (file)
@@ -97,6 +97,7 @@ ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(PLATFORM_NAME));
 ENABLE_ICONDATABASE_macosx = ENABLE_ICONDATABASE;
 ENABLE_IFRAME_SEAMLESS = ENABLE_IFRAME_SEAMLESS;
 ENABLE_INDEXED_DATABASE = ;
+ENABLE_INDIE_UI = ENABLE_INDIE_UI;
 ENABLE_INPUT_SPEECH = ;
 ENABLE_INPUT_TYPE_COLOR = ;
 ENABLE_INPUT_TYPE_DATE = $(ENABLE_INPUT_TYPE_DATE_$(PLATFORM_NAME));
@@ -184,4 +185,4 @@ ENABLE_WORKERS = ENABLE_WORKERS;
 ENABLE_XHR_TIMEOUT = ENABLE_XHR_TIMEOUT;
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIALOG_ELEMENT) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MICRODATA) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_THREADED_HTML_PARSER) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(FEATURE_DEFINES_$(PLATFORM_NAME));
+FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIALOG_ELEMENT) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MICRODATA) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_THREADED_HTML_PARSER) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(FEATURE_DEFINES_$(PLATFORM_NAME));
index 814fa14..3235891 100644 (file)
 
 VPATH = \
     $(WebCore) \
-       $(WebCore)/Modules/encryptedmedia \
+    $(WebCore)/Modules/encryptedmedia \
     $(WebCore)/Modules/filesystem \
     $(WebCore)/Modules/geolocation \
     $(WebCore)/Modules/indexeddb \
+    $(WebCore)/Modules/indieui \
     $(WebCore)/Modules/mediasource \
     $(WebCore)/Modules/notifications \
     $(WebCore)/Modules/quota \
@@ -110,6 +111,7 @@ BINDING_IDLS = \
     $(WebCore)/Modules/indexeddb/IDBTransaction.idl \
     $(WebCore)/Modules/indexeddb/IDBVersionChangeEvent.idl \
     $(WebCore)/Modules/indexeddb/WorkerContextIndexedDatabase.idl \
+    $(WebCore)/Modules/indieui/UIRequestEvent.idl \
     $(WebCore)/Modules/mediasource/MediaSource.idl \
     $(WebCore)/Modules/mediasource/SourceBuffer.idl \
     $(WebCore)/Modules/mediasource/SourceBufferList.idl \
index 0574b8a..2fb8816 100644 (file)
@@ -14,6 +14,7 @@ webcore_cppflags += \
        -I$(srcdir)/Source/WebCore/Modules/gamepad \
        -I$(srcdir)/Source/WebCore/Modules/geolocation \
        -I$(srcdir)/Source/WebCore/Modules/indexeddb \
+       -I$(srcdir)/Source/WebCore/Modules/indieui \
        -I$(srcdir)/Source/WebCore/Modules/mediasource \
        -I$(srcdir)/Source/WebCore/Modules/mediastream \
        -I$(srcdir)/Source/WebCore/Modules/navigatorcontentutils \
diff --git a/Source/WebCore/Modules/indieui/UIRequestEvent.cpp b/Source/WebCore/Modules/indieui/UIRequestEvent.cpp
new file mode 100644 (file)
index 0000000..984ea2d
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2013 Apple 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.
+ */
+
+#include "config.h"
+#include "UIRequestEvent.h"
+
+#include "EventDispatcher.h"
+
+#if ENABLE(INDIE_UI)
+
+namespace WebCore {
+
+UIRequestEventInit::UIRequestEventInit()
+    : UIEventInit(true, true)
+    , receiver(0)
+{
+}
+    
+PassRefPtr<UIRequestEvent> UIRequestEvent::create()
+{
+    return adoptRef(new UIRequestEvent);
+}
+    
+PassRefPtr<UIRequestEvent> UIRequestEvent::create(const AtomicString& type, const UIRequestEventInit& initializer)
+{
+    return adoptRef(new UIRequestEvent(type, initializer));
+}
+
+PassRefPtr<UIRequestEvent> UIRequestEvent::create(const AtomicString& type, bool bubbles, bool cancelable, PassRefPtr<AbstractView> view, int detail, PassRefPtr<EventTarget> receiver)
+{
+    return adoptRef(new UIRequestEvent(type, bubbles, cancelable, view, detail, receiver));
+}
+
+UIRequestEvent::UIRequestEvent(const AtomicString& type, const UIRequestEventInit& initializer)
+    : UIEvent(type, initializer.bubbles, initializer.cancelable, initializer.view, initializer.detail)
+    , m_receiver(initializer.receiver)
+{
+}
+    
+UIRequestEvent::UIRequestEvent(const AtomicString& type, bool bubbles, bool cancelable, PassRefPtr<AbstractView> view, int detail, PassRefPtr<EventTarget> receiver)
+    : UIEvent(type, bubbles, cancelable, view, detail)
+    , m_receiver(receiver)
+{
+}
+
+UIRequestEvent::UIRequestEvent()
+    : m_receiver(0)
+{
+}
+
+UIRequestEvent::~UIRequestEvent()
+{
+}
+    
+const AtomicString& UIRequestEvent::interfaceName() const
+{
+    return eventNames().interfaceForUIRequestEvent;
+}
+
+UIRequestEventDispatchMediator::UIRequestEventDispatchMediator(PassRefPtr<UIRequestEvent> event)
+    : EventDispatchMediator(event)
+{
+}
+
+UIRequestEvent* UIRequestEventDispatchMediator::event() const
+{
+    return static_cast<UIRequestEvent*>(EventDispatchMediator::event());
+}
+
+bool UIRequestEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
+{
+    dispatcher->dispatch();
+    return event()->defaultHandled() || event()->defaultPrevented();
+}
+    
+} // namespace WebCore
+
+#endif // ENABLE(INDIE_UI)
+
diff --git a/Source/WebCore/Modules/indieui/UIRequestEvent.h b/Source/WebCore/Modules/indieui/UIRequestEvent.h
new file mode 100644 (file)
index 0000000..1c2800e
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2013 Apple 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 UIRequestEvent_h
+#define UIRequestEvent_h
+
+#include "EventTarget.h"
+#include "UIEvent.h"
+
+#if ENABLE(INDIE_UI)
+
+namespace WebCore {
+    
+struct UIRequestEventInit : public UIEventInit {
+    UIRequestEventInit();
+    
+    RefPtr<EventTarget> receiver;
+};
+
+class UIRequestEvent : public UIEvent {
+public:
+    static PassRefPtr<UIRequestEvent> create();
+    static PassRefPtr<UIRequestEvent> create(const AtomicString& type, bool bubbles, bool cancelable, PassRefPtr<AbstractView>, int detail, PassRefPtr<EventTarget> receiver);
+    
+    static PassRefPtr<UIRequestEvent> create(const AtomicString& eventType, const UIRequestEventInit&);
+    
+    virtual ~UIRequestEvent();
+    
+    EventTarget* receiver() const { return m_receiver.get(); }
+
+protected:
+    UIRequestEvent(const AtomicString& type, bool bubbles, bool cancelable, PassRefPtr<AbstractView>, int detail, PassRefPtr<EventTarget> receiver);
+    
+    UIRequestEvent(const AtomicString& type, const UIRequestEventInit&);
+    
+    UIRequestEvent();
+    
+    const AtomicString& interfaceName() const OVERRIDE;
+    
+private:
+    RefPtr<EventTarget> m_receiver;
+};
+
+class UIRequestEventDispatchMediator : public EventDispatchMediator {
+public:
+    static PassRefPtr<UIRequestEventDispatchMediator> create(PassRefPtr<UIRequestEvent> event)
+    {
+        return adoptRef(new UIRequestEventDispatchMediator(event));
+    }
+    
+private:
+    explicit UIRequestEventDispatchMediator(PassRefPtr<UIRequestEvent>);
+    
+    UIRequestEvent* event() const;
+    
+    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
+};
+    
+} // namespace WebCore
+
+#endif // ENABLE(INDIE_UI)
+
+#endif // UIRequestEvent_h
diff --git a/Source/WebCore/Modules/indieui/UIRequestEvent.idl b/Source/WebCore/Modules/indieui/UIRequestEvent.idl
new file mode 100644 (file)
index 0000000..45efdec
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2013 Apple 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. 
+ */
+[
+    Conditional=INDIE_UI,
+    ConstructorTemplate=Event
+] interface UIRequestEvent : UIEvent { 
+    readonly attribute EventTarget receiver;
+};
+
index b81a8c8..e6bc0c7 100644 (file)
                AA2A5AD516A4861400975A25 /* SpeechSynthesis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA2A5ABD16A485D500975A25 /* SpeechSynthesis.cpp */; };
                AA2A5AD616A4861600975A25 /* DOMWindowSpeechSynthesis.h in Headers */ = {isa = PBXBuildFile; fileRef = AA2A5AB916A485D500975A25 /* DOMWindowSpeechSynthesis.h */; };
                AA2A5AD716A4861A00975A25 /* DOMWindowSpeechSynthesis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA2A5AB816A485D500975A25 /* DOMWindowSpeechSynthesis.cpp */; };
+               AA4739D11757AFEC00E76767 /* UIRequestEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA4739CF1757AFEC00E76767 /* UIRequestEvent.cpp */; };
+               AA4739D21757AFEC00E76767 /* UIRequestEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = AA4739D01757AFEC00E76767 /* UIRequestEvent.h */; };
                AA478A7F16CD70C3007D1BB4 /* WebAccessibilityObjectWrapperMac.h in Headers */ = {isa = PBXBuildFile; fileRef = AA478A7D16CD70C3007D1BB4 /* WebAccessibilityObjectWrapperMac.h */; };
                AA478A8016CD70C3007D1BB4 /* WebAccessibilityObjectWrapperMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = AA478A7E16CD70C3007D1BB4 /* WebAccessibilityObjectWrapperMac.mm */; };
                AA4C3A760B2B1679002334A2 /* StyleElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA4C3A740B2B1679002334A2 /* StyleElement.cpp */; };
                AA7FEEA816A4E6F3004C0C33 /* JSSpeechSynthesisVoice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA7FEEA016A4E6F3004C0C33 /* JSSpeechSynthesisVoice.cpp */; };
                AA7FEEA916A4E6F3004C0C33 /* JSSpeechSynthesisVoice.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7FEEA116A4E6F3004C0C33 /* JSSpeechSynthesisVoice.h */; };
                AA7FEEAD16A4E74B004C0C33 /* JSSpeechSynthesis.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7FEEAC16A4E74B004C0C33 /* JSSpeechSynthesis.h */; };
+               AAA4FAD2175D5CB300743873 /* JSUIRequestEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = AAA4FACE175D5CB300743873 /* JSUIRequestEvent.h */; };
+               AAA4FAD3175D5CB300743873 /* JSUIRequestEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AAA4FACF175D5CB300743873 /* JSUIRequestEvent.cpp */; };
                AAA728F616D1D8BC00D3BBC6 /* AccessibilityObjectIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = AAA728F016D1D8BC00D3BBC6 /* AccessibilityObjectIOS.mm */; };
                AAA728F716D1D8BC00D3BBC6 /* WebAccessibilityObjectWrapperIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = AAA728F116D1D8BC00D3BBC6 /* WebAccessibilityObjectWrapperIOS.h */; };
                AAA728F816D1D8BC00D3BBC6 /* WebAccessibilityObjectWrapperIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = AAA728F216D1D8BC00D3BBC6 /* WebAccessibilityObjectWrapperIOS.mm */; };
                AA2A5AC616A485D500975A25 /* SpeechSynthesisVoice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = SpeechSynthesisVoice.cpp; path = Modules/speech/SpeechSynthesisVoice.cpp; sourceTree = "<group>"; };
                AA2A5AC716A485D500975A25 /* SpeechSynthesisVoice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SpeechSynthesisVoice.h; path = Modules/speech/SpeechSynthesisVoice.h; sourceTree = "<group>"; };
                AA2A5AC816A485D500975A25 /* SpeechSynthesisVoice.idl */ = {isa = PBXFileReference; lastKnownFileType = text; name = SpeechSynthesisVoice.idl; path = Modules/speech/SpeechSynthesisVoice.idl; sourceTree = "<group>"; };
+               AA4739CF1757AFEC00E76767 /* UIRequestEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIRequestEvent.cpp; path = Modules/indieui/UIRequestEvent.cpp; sourceTree = "<group>"; };
+               AA4739D01757AFEC00E76767 /* UIRequestEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIRequestEvent.h; path = Modules/indieui/UIRequestEvent.h; sourceTree = "<group>"; };
                AA478A7D16CD70C3007D1BB4 /* WebAccessibilityObjectWrapperMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAccessibilityObjectWrapperMac.h; sourceTree = "<group>"; };
                AA478A7E16CD70C3007D1BB4 /* WebAccessibilityObjectWrapperMac.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = WebAccessibilityObjectWrapperMac.mm; sourceTree = "<group>"; };
                AA4C3A740B2B1679002334A2 /* StyleElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = StyleElement.cpp; sourceTree = "<group>"; };
                AA5F3B9016CC5BEB00455EB0 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
                AA73183C159255B900A93E6E /* InjectedScriptCanvasModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedScriptCanvasModule.cpp; sourceTree = "<group>"; };
                AA73183D159255B900A93E6E /* InjectedScriptCanvasModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedScriptCanvasModule.h; sourceTree = "<group>"; };
+               AA7EA0AA17557B9000DF4643 /* UIRequestEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = UIRequestEvent.idl; path = Modules/indieui/UIRequestEvent.idl; sourceTree = "<group>"; };
                AA7FEE9C16A4E6F3004C0C33 /* JSSpeechSynthesis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSpeechSynthesis.cpp; sourceTree = "<group>"; };
                AA7FEE9E16A4E6F3004C0C33 /* JSSpeechSynthesisUtterance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSpeechSynthesisUtterance.cpp; sourceTree = "<group>"; };
                AA7FEE9F16A4E6F3004C0C33 /* JSSpeechSynthesisUtterance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSpeechSynthesisUtterance.h; sourceTree = "<group>"; };
                AA7FEEAC16A4E74B004C0C33 /* JSSpeechSynthesis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSpeechSynthesis.h; sourceTree = "<group>"; };
                AA9030FE157E16A000276247 /* InjectedScriptCanvasModuleSource.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = InjectedScriptCanvasModuleSource.js; sourceTree = "<group>"; };
                AA912750157E35A500454E54 /* InjectedScriptCanvasModuleSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedScriptCanvasModuleSource.h; sourceTree = "<group>"; };
+               AAA4FACE175D5CB300743873 /* JSUIRequestEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSUIRequestEvent.h; sourceTree = "<group>"; };
+               AAA4FACF175D5CB300743873 /* JSUIRequestEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSUIRequestEvent.cpp; sourceTree = "<group>"; };
                AAA728F016D1D8BC00D3BBC6 /* AccessibilityObjectIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AccessibilityObjectIOS.mm; sourceTree = "<group>"; };
                AAA728F116D1D8BC00D3BBC6 /* WebAccessibilityObjectWrapperIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAccessibilityObjectWrapperIOS.h; sourceTree = "<group>"; };
                AAA728F216D1D8BC00D3BBC6 /* WebAccessibilityObjectWrapperIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebAccessibilityObjectWrapperIOS.mm; sourceTree = "<group>"; };
                                A83B79120CCB003F000B0825 /* Events */,
                                89878576122CA1DA003AABDA /* FileAPI */,
                                A83B79080CCAFF2B000B0825 /* HTML */,
+                               AA93C850175D5B2000FD3CE3 /* IndieUI */,
                                1C5FAECA0DCFD8C900D58F78 /* Inspector */,
                                33503C9C10179A9A003B47E1 /* Notifications */,
                                1AC226020DB69EA70089B669 /* Offline */,
                        children = (
                                CDA98DBD16014E0800FEA3B1 /* encryptedmedia */,
                                971145FF14EF007900674FD9 /* geolocation */,
+                               AA7EA0A917557B1C00DF4643 /* indieui */,
                                9712A55315004E3C0048AF10 /* indexeddb */,
                                B1A942DD15B5CE2200D525D1 /* mediasource */,
                                333F703D0FB49C16008E12A6 /* notifications */,
                        name = speech;
                        sourceTree = "<group>";
                };
+               AA7EA0A917557B1C00DF4643 /* indieui */ = {
+                       isa = PBXGroup;
+                       children = (
+                               AA4739CF1757AFEC00E76767 /* UIRequestEvent.cpp */,
+                               AA4739D01757AFEC00E76767 /* UIRequestEvent.h */,
+                               AA7EA0AA17557B9000DF4643 /* UIRequestEvent.idl */,
+                       );
+                       name = indieui;
+                       sourceTree = "<group>";
+               };
                AA7FEE9B16A491A1004C0C33 /* Speech */ = {
                        isa = PBXGroup;
                        children = (
                        name = Speech;
                        sourceTree = "<group>";
                };
+               AA93C850175D5B2000FD3CE3 /* IndieUI */ = {
+                       isa = PBXGroup;
+                       children = (
+                               AAA4FACF175D5CB300743873 /* JSUIRequestEvent.cpp */,
+                               AAA4FACE175D5CB300743873 /* JSUIRequestEvent.h */,
+                       );
+                       name = IndieUI;
+                       sourceTree = "<group>";
+               };
                AAA728EF16D1D8BC00D3BBC6 /* ios */ = {
                        isa = PBXGroup;
                        children = (
                                BC1A37B5097C715F0019F3D8 /* DOMExtensions.h in Headers */,
                                BC00F0040E0A185500FD04E3 /* DOMFile.h in Headers */,
                                2E3BC108117D479800B9409A /* DOMFileError.h in Headers */,
+                               AAA4FAD2175D5CB300743873 /* JSUIRequestEvent.h in Headers */,
                                2E3BC10B117D47C800B9409A /* DOMFileErrorInternal.h in Headers */,
                                BC00F0060E0A185500FD04E3 /* DOMFileInternal.h in Headers */,
                                BC00F0070E0A185500FD04E3 /* DOMFileList.h in Headers */,
                                B2FA3E170AB75A6F000E5AC4 /* JSSVGViewElement.h in Headers */,
                                7118FED515685CC60030B79A /* JSSVGViewSpec.h in Headers */,
                                8485227E1190162C006EDC7F /* JSSVGVKernElement.h in Headers */,
+                               AA4739D21757AFEC00E76767 /* UIRequestEvent.h in Headers */,
                                71DCB7021568197600862271 /* JSSVGZoomAndPan.h in Headers */,
                                B2FA3E190AB75A6F000E5AC4 /* JSSVGZoomEvent.h in Headers */,
                                65DF320409D1CC60000BE325 /* JSText.h in Headers */,
                                BCE1C41C0D982981003B02F2 /* Location.cpp in Sources */,
                                A8239E0009B3CF8A00B60641 /* Logging.cpp in Sources */,
                                1402645E0AFDC19B005919E2 /* LoggingMac.mm in Sources */,
+                               AAA4FAD3175D5CB300743873 /* JSUIRequestEvent.cpp in Sources */,
                                1A8F6BC50DB55CDC001DB794 /* ManifestParser.cpp in Sources */,
                                93309DF7099E64920056E581 /* markup.cpp in Sources */,
                                9728C3131268E4390041E89B /* MarkupAccumulator.cpp in Sources */,
                                1A3586DF15264C450022A659 /* RenderMultiColumnFlowThread.cpp in Sources */,
                                BCE32B9E1517C22700F542EC /* RenderMultiColumnSet.cpp in Sources */,
                                1A3FF9C315265359002288A1 /* RenderNamedFlowThread.cpp in Sources */,
+                               AA4739D11757AFEC00E76767 /* UIRequestEvent.cpp in Sources */,
                                BCEA487F097D93020094C9E4 /* RenderObject.cpp in Sources */,
                                BC60EFB70F33A0E700812A93 /* RenderObjectChildList.cpp in Sources */,
                                A871DED00A1530C700B12A68 /* RenderPart.cpp in Sources */,
index dd224cd..1f88e54 100644 (file)
@@ -198,6 +198,11 @@ private:
     String alternativeTextForWebArea() const;
     void ariaLabeledByText(Vector<AccessibilityText>&) const;
     virtual bool computeAccessibilityIsIgnored() const;
+    
+#if ENABLE(INDIE_UI)
+    const AtomicString& uiActionNameForRequestEvent(const AtomicString&);
+    Node* receiverForUIRequestEvent(const AtomicString&);
+#endif
 };
 
 inline AccessibilityNodeObject* toAccessibilityNodeObject(AccessibilityObject* object)
index 772b449..829e813 100644 (file)
@@ -2654,6 +2654,19 @@ void Element::setUnsignedIntegralAttribute(const QualifiedName& attributeName, u
     setAttribute(attributeName, String::number(value));
 }
 
+#if ENABLE(INDIE_UI)
+void Element::setUIActions(const AtomicString& actions)
+{
+    setAttribute(uiactionsAttr, actions);
+}
+
+const AtomicString& Element::UIActions() const
+{
+    return getAttribute(uiactionsAttr);
+}
+#endif
+
+    
 #if ENABLE(SVG)
 bool Element::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
 {
index da76f18..b070450 100644 (file)
@@ -622,6 +622,11 @@ public:
     void webkitRequestPointerLock();
 #endif
 
+#if ENABLE(INDIE_UI)
+    void setUIActions(const AtomicString&);
+    const AtomicString& UIActions() const;
+#endif
+    
     virtual bool isSpellCheckingEnabled() const;
 
     PassRefPtr<RenderStyle> styleForRenderer();
index 5f3bfd1..fffd1d5 100644 (file)
     void webkitRequestFullscreen();
 #endif
 
+#if defined(ENABLE_INDIE_UI) && ENABLE_INDIE_UI
+    [Reflect] attribute DOMString uiactions;
+#endif
+
     [Conditional=POINTER_LOCK] void webkitRequestPointerLock();
 
     // CSS Regions API
index bcb94f9..7435bad 100644 (file)
@@ -38,6 +38,11 @@ EventInit::EventInit()
 {
 }
 
+EventInit::EventInit(bool b, bool c)
+    : bubbles(b)
+    , cancelable(c)
+{
+}
 
 Event::Event()
     : m_canBubble(false)
index 7dbd429..0beab13 100644 (file)
@@ -41,7 +41,8 @@ class HTMLIFrameElement;
 
 struct EventInit {
     EventInit();
-     
+    EventInit(bool bubbles, bool cancelable);
+
     bool bubbles;
     bool cancelable;
 };
index b568343..feb36ff 100644 (file)
@@ -57,4 +57,5 @@ MediaKeyNeededEvent conditional=ENCRYPTED_MEDIA_V2
 TrackEvent conditional=VIDEO_TRACK
 CSSFontFaceLoadEvent conditional=FONT_LOAD_EVENTS
 SecurityPolicyViolationEvent conditional=CSP_NEXT
+UIRequestEvent conditional=INDIE_UI
 
index d99f171..4241fba 100644 (file)
 #include "GestureEvent.h"
 #endif
 
+#if ENABLE(INDIE_UI)
+#include "UIRequestEvent.h"
+#endif
+
 #if ENABLE(INSPECTOR)
 #include "InspectorController.h"
 #endif
@@ -2276,6 +2280,13 @@ bool Node::dispatchTouchEvent(PassRefPtr<TouchEvent> event)
 }
 #endif
 
+#if ENABLE(INDIE_UI)
+bool Node::dispatchUIRequestEvent(PassRefPtr<UIRequestEvent> event)
+{
+    return EventDispatcher::dispatchEvent(this, UIRequestEventDispatchMediator::create(event));
+}
+#endif
+    
 bool Node::dispatchBeforeLoadEvent(const String& sourceURL)
 {
     if (!document()->hasListenerType(Document::BEFORELOAD_LISTENER))
index a641320..d581c30 100644 (file)
@@ -89,6 +89,10 @@ class TagNodeList;
 class PlatformGestureEvent;
 #endif
 
+#if ENABLE(INDIE_UI)
+class UIRequestEvent;
+#endif
+    
 #if ENABLE(TOUCH_EVENTS)
 class TouchEvent;
 #endif
@@ -597,6 +601,9 @@ public:
 #if ENABLE(TOUCH_EVENTS)
     bool dispatchTouchEvent(PassRefPtr<TouchEvent>);
 #endif
+#if ENABLE(INDIE_UI)
+    bool dispatchUIRequestEvent(PassRefPtr<UIRequestEvent>);
+#endif
 
     bool dispatchBeforeLoadEvent(const String& sourceURL);
 
index 3074b52..48b52d0 100644 (file)
@@ -36,6 +36,14 @@ UIEventInit::UIEventInit()
 {
 }
 
+UIEventInit::UIEventInit(bool bubbles, bool cancelable)
+    : EventInit(bubbles, cancelable)
+    , view(0)
+    , detail(0)
+{
+}
+
+    
 UIEvent::UIEvent()
     : m_detail(0)
 {
index d36220d..267e830 100644 (file)
@@ -34,6 +34,7 @@ typedef DOMWindow AbstractView;
 
 struct UIEventInit : public EventInit {
     UIEventInit();
+    UIEventInit(bool bubbles, bool cancelable);
 
     RefPtr<AbstractView> view;
     int detail;
index 17d7afe..383e86c 100644 (file)
@@ -328,6 +328,7 @@ topmargin
 translate
 truespeed
 type
+uiactions
 usemap
 valign
 value