[WK2] Looping for EINTR on close() is incorrect for Linux, at least
https://bugs.webkit.org/show_bug.cgi?id=117266

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-06-20
Reviewed by Darin Adler.

Source/WebKit2:

Call closeWithRetry() to work around a difference in how the retry needs to
be done on Linux.

* Platform/CoreIPC/unix/AttachmentUnix.cpp:
(CoreIPC::Attachment::dispose):
* Platform/CoreIPC/unix/ConnectionUnix.cpp:
(CoreIPC::Connection::platformInvalidate):
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::Handle::~Handle):
(WebKit::SharedMemory::create):
(WebKit::SharedMemory::~SharedMemory):
(WebKit::SharedMemory::createHandle):
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::createWebProcessConnection):
* SharedWorkerProcess/SharedWorkerProcess.cpp:
(WebKit::SharedWorkerProcess::createWebProcessConnection):
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::ProcessLauncher::launchProcess): All these places had
``close-followed-by-EINTR-handling'' replaced with the new closeWithRetry()
function added in this commit.

Source/WTF:

Added file UniStdExtras with a closeWithRetry() function that works around
the EINTR behavior on Linux during a close() call: it closes the descriptor
unconditionally even when the call is interrupted.

* wtf/UniStdExtras.h: Added.
(WTF::closeWithRetry): Wrapper around POSIX close() that handles EINTR
correctly.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Migrate WebKitWebResource to GTask
https://bugs.webkit.org/show_bug.cgi?id=117152

Reviewed by Gustavo Noronha Silva.

* UIProcess/API/gtk/WebKitWebResource.cpp:
(resourceDataCallback):
(webkit_web_resource_get_data):
(webkit_web_resource_get_data_finish):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndieUI: Add basic IndieUI infrastructure
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: http://svn.webkit.org/repository/webkit/trunk@151827 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][EFL]: Invalidate the ProcessLauncher when the process is terminated before it has finished launching
https://bugs.webkit.org/show_bug.cgi?id=117865

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-06-21
Reviewed by Christophe Dumez.

Original patch from Carlos Garcia Campos for the Gtk port.

* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::ProcessLauncher::terminateProcess): If process is still
launching, just invalidate the launcher. Reset the process
identifier after killing the process.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151828 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndieUI: Add basic IndieUI infrastructure
https://bugs.webkit.org/show_bug.cgi?id=117367

Unreviewed. Revert erroneous file that was included accidentally.

* accessibility/AccessibilityNodeObject.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndieUI: Add basic IndieUI infrastructure
https://bugs.webkit.org/show_bug.cgi?id=117367

Unreviewed. Update Lion expected results.

* platform/mac-lion/fast/js/global-constructors-attributes-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] Added support for aria-required attribute.
https://bugs.webkit.org/show_bug.cgi?id=117730

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-06-21
Reviewed by Chris Fleizach.

Source/WebCore:

Tests: accessibility/aria-required.html
       accessibility/html5-required-attribute.html

The aria-required attribute is used to indicate that user input is required on an
element before a form can be submitted.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(setAtkStateSetFromCoreObject):

Tools:

Added support for testing aria-required attribute.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::isRequired):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::isRequired):

LayoutTests:

Moving specific platform accessibility tests.

* accessibility/aria-required-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/aria-required-expected.txt.
* accessibility/aria-required.html: Renamed from LayoutTests/platform/mac/accessibility/aria-required.html.
* accessibility/html5-required-attribute-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/html5-required-attribute-expected.txt.
* accessibility/html5-required-attribute.html: Renamed from LayoutTests/platform/mac/accessibility/html5-required-attribute.html.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r150663): Using webkitAudioContext in Inspector makes it undefined everywhere
https://bugs.webkit.org/show_bug.cgi?id=117825

Reviewed by Kentaro Hara.

Source/WebCore:

Partially revert r150663 so that we use Settings to enable WebAudio instead of
RuntimeEnabledFeatures.

Introduce a new [EnabledBySetting] IDL extended attribute which behaves similarly to
the existing [EnabledAtRuntime] but relies on Settings instead of RuntimeEnabledFeatures
to determine if the feature should be enabled. Make use of this new IDL attribute for
webkitAudioContext interface.

No new tests, no behavior change.

* Modules/webaudio/AudioContext.idl:
* WebCore.exp.in:
* WebCore.order:
* bindings/generic/RuntimeEnabledFeatures.cpp:
* bindings/generic/RuntimeEnabledFeatures.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/preprocess-idls.pl:
(GenerateConstructorAttribute):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
(WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj TestSubObjEnabledBySetting]):
(-[DOMTestObj setTestSubObjEnabledBySetting:]):
* bindings/scripts/test/TestObj.idl:
* page/Settings.in:

Source/WebKit/efl:

Use Settings to enable Web Audio instead of RuntimeEnabledFeatures.

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::setWebAudioEnabled):
* WebCoreSupport/DumpRenderTreeSupportEfl.h:
* ewk/ewk_view.cpp:
(_ewk_view_priv_new):

Source/WebKit/gtk:

Use Settings to enable Web Audio instead of RuntimeEnabledFeatures.

* webkit/webkitwebview.cpp:
(webkit_web_view_update_settings):
(webkit_web_view_settings_notify):

Source/WebKit/mac:

Use Settings to enable Web Audio instead of RuntimeEnabledFeatures.

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit/qt:

Use Settings to enable Web Audio instead of RuntimeEnabledFeatures.

* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply):

Source/WebKit/win:

Use Settings to enable Web Audio instead of RuntimeEnabledFeatures.

* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WebKit2:

Use Settings to enable Web Audio instead of RuntimeEnabledFeatures.

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

DumpRenderTreeSupportEfl::setWebAudioEnabled() now requires an additional view argument.

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::resetDefaultsToConsistentValues):
* DumpRenderTree/efl/TestRunnerEfl.cpp:
(TestRunner::overridePreference):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Do not try to load videos in unit tests
https://bugs.webkit.org/show_bug.cgi?id=117866

Reviewed by Philippe Normand.

It makes the tests slower, and generates and error because we use
a fake src.

* UIProcess/API/gtk/tests/TestContextMenu.cpp:
(testContextMenuDefaultMenu): Use preload='none' in video tag.
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewMouseTarget): Ditto.

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