[EFl][WK2] Sub menu items should be of EWK_SUBMENU_TYPE and not checkable
https://bugs.webkit.org/show_bug.cgi?id=116959

Patch by Michał Pakuła vel Rutka <m.pakula@samsung.com> on 2013-06-04
Reviewed by Gyuyoung Kim.

Currently using ewk API it is possible to create a sub menu item which is not an EWK_SUBMENU_TYPE
or set checkable flag for it, while it is not possible for items created by WebKit.
This patch changes ewk context menu API to match WebKit2 behaviour, by creating sub menus with
proper type and checkable flags.

* UIProcess/API/efl/ewk_context_menu_item.cpp:
(ewk_context_menu_item_new_with_submenu):
* UIProcess/API/efl/ewk_context_menu_item.h:
* UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
(showContextMenu):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Automatically generate WorkerContext constructor attributes
https://bugs.webkit.org/show_bug.cgi?id=117183

Reviewed by Kentaro Hara.

.:

Update GENERATE_BINDINGS macro to take an additional _workercontext_constructors_file
optional argument.

* Source/cmake/WebKitMacros.cmake:

Source/WebCore:

Add [GlobalContext=WindowOnly|WorkerOnly|WindowAndWorker] IDL extended attribute
to indicate to the bindings generator on which global context the constructor
attribute should be generated for interfaces without [NoInterfaceObject]:
- WindowOnly: only on the global Window object (default if ommitted)
- WorkerOnly: only on the worker context
- WindowAndWorker: On both the global Window object and the worker context

This covers all the current use cases.

The JSC bindings generator now automatically generates the Constructor attributes
on the WorkerContext for non-callback interfaces which do not have the
[NoInterfaceObject] extended attribute but have [GlobalContext=WorkerOnly|WindowAndWorker]
extended attribute.

No new tests, already covered by:
fast/js/global-constructors-attributes.html
fast/js/global-constructors-attributes-worker.html

* CMakeLists.txt:
* DerivedSources.make: Pass new --workerContextConstructorsFile argument to preprocess-idls.pl.
* DerivedSources.pri: Ditto.
* GNUmakefile.am: Ditto.
* PlatformBlackBerry.cmake: Ditto.
* UseJSC.cmake: Ditto.
* bindings/scripts/IDLAttributes.txt: Add [GlobalContext=WindowOnly|WorkerOnly|WindowAndWorker]
IDL extended attribute.
* bindings/scripts/preprocess-idls.pl: Add support for [GlobalContext] extended attribute and
generate a partial interface for WorkerContext global constructors that are automatically
generated.
* dom/MessageEvent.idl: Add [GlobalContext=WindowAndWorker].
* fileapi/Blob.idl: Add [GlobalContext=WindowAndWorker].
* fileapi/FileReader.idl: Add [GlobalContext=WindowAndWorker].
* fileapi/FileReaderSync.idl: Add [GlobalContext=WorkerOnly] and remove [NoInterfaceObject]
as the interface should only be visible in worker environment as per the spec.
* html/DOMURL.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/ArrayBuffer.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/DataView.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Float32Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Float64Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Int16Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Int32Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Int8Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Uint16Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Uint32Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Uint8Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Uint8ClampedArray.idl: Add [GlobalContext=WindowAndWorker].
* workers/WorkerContext.idl: Remove several Constructor attributes which are now automatically
generated.
* workers/WorkerLocation.idl: Add [GlobalContext=WorkerOnly] and remove [NoInterfaceObject]
as the interface should only be visible in worker environment as per the spec.

Tools:

Pass new --workerContextConstructorsFile to preprocess-idl.pl for bindings
tests.

* Scripts/webkitpy/bindings/main.py:
(BindingsTests.generate_supplemental_dependency):
(BindingsTests.main):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix a crash in QtPixmapRuntime.
https://bugs.webkit.org/show_bug.cgi?id=117193
https://bugreports.qt-project.org/browse/QTBUG-30736

Reviewed by Allan Sandfeld Jensen.

The crash could only be reproduced in release builds on Windows.
JSClassCreate calculates the size of JSClassDefinition.staticValues
and staticFunctions by iterating until an entry with a null name is found.

* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::QtPixmapRuntime::getClassRef):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening.

* platform/qt-5.0-wk1/TestExpectations:
* platform/qt-5.0-wk2/scrollingcoordinator/non-fast-scrollable-region-scaled-iframe-expected.png: Rebaselining after r150798.
* platform/qt-mac/scrollingcoordinator/non-fast-scrollable-region-scaled-iframe-expected.png: Moved to qt-5.0-wk2.
* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r151043): Frequent crashes inside WebPageProxy::getPlugInInformation
<http://webkit.org/b/117180>

Reviewed by Brady Eidson.

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::getPlugInInformation): Return early when plugInProcessProxy is null
since there's nothing we can do.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151172 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed test correction.

* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreePostBuild.cmd: Also copy the
QuartzCore dll's, which are needed by TestWebKitAPI.
* TestWebKitAPI/win/main.cpp: Declare proper manfifest dependencies to ensure TestWebKitAPI built
with VS2010 will run when linked against VS2005 support libraries.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[sh4] Add floating point absolute function support in baseline JIT.
https://bugs.webkit.org/show_bug.cgi?id=117147

Patch by Julien Brianceau <jbrianceau@nds.com> on 2013-06-04
Reviewed by Geoffrey Garen.

* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::supportsFloatingPointAbs):
(JSC::MacroAssemblerSH4::absDouble):
* assembler/SH4Assembler.h:
(JSC::SH4Assembler::dabs):
(JSC::SH4Assembler::printInstr):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Prevent race when pad caps is set on gstreamer player
https://bugs.webkit.org/show_bug.cgi?id=115355

Patch by Thiago Santos <thiago.sousa.santos@collabora.com> on 2013-06-04
Reviewed by Philippe Normand.

Prevent race when pad caps is set on gstreamer player and
Also protect internal paint buffer with a mutex.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
(MediaPlayerPrivateGStreamerBase):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor the code that decides whether to enable WebGL from settings to helper functions
https://bugs.webkit.org/show_bug.cgi?id=117181

This removes some #ifdef crud out of the getContext() function.

Patch by Noam Rosenthal <noam@webkit.org> on 2013-06-04
Reviewed by Benjamin Poulain.

* html/HTMLCanvasElement.cpp:
(WebCore::requiresAcceleratedCompositingForWebGL):
(WebCore::shouldEnableWebGL):
(WebCore::HTMLCanvasElement::getContext):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed build fix.  The last check-in lost CR/LF endings on the batch file,
causing build failure.

* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreePostBuild.cmd: Revert to
DOS-style CR/LF endings.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Rollout of r151146. Broke some tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add "VisibleOnly" key to search predicate
https://bugs.webkit.org/show_bug.cgi?id=115491

Patch by Greg Hughes <ghughes@apple.com> on 2013-06-04
Reviewed by Chris Fleizach.

Source/WebCore:

Added support for accessibility clients to use the search predicate to find only visible elements

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch):
(WebCore::AccessibilityObject::isOnscreen):
(WebCore):
* accessibility/AccessibilityObject.h:
(AccessibilitySearchCriteria):
(WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria):
(AccessibilityObject):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

Tools:

Added support for accessibility clients to use the search predicate to find only visible elements

* DumpRenderTree/AccessibilityUIElement.cpp:
(uiElementForSearchPredicateCallback):
* DumpRenderTree/AccessibilityUIElement.h:
(AccessibilityUIElement):
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::uiElementForSearchPredicate):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::uiElementForSearchPredicate):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
(AccessibilityUIElement):
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):

LayoutTests:

Added tests support for visibleOnly search predicate.

* platform/mac/accessibility/search-predicate-expected.txt:
* platform/mac/accessibility/search-predicate.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: MathML multiscripts not exposed in Accessibility
https://bugs.webkit.org/show_bug.cgi?id=115069

Unreviewed, build fix.

Remove an accessibility iOS method that was erroneously added.

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: WK2: accessibility position is calculated every time window frame is updated
https://bugs.webkit.org/show_bug.cgi?id=117201

Reviewed by Tim Horton.

Only calculate the AX position if AX has already been enabled when updating the
WKView's window and frame.

* UIProcess/API/mac/WKView.mm:
(-[WKView _updateWindowAndViewFrames]):
(-[WKView _accessibilityRegisterUIProcessTokens]):
    Don't call accessibilityAttributeValue: here because it could enable accessibility prematurely.
(-[WKView enableAccessibilityIfNecessary]):
    After enabling AX for the first time, also update the frame so that the AX position is correct.
(-[WKView accessibilityFocusedUIElement]):
(-[WKView accessibilityHitTest:]):
(-[WKView accessibilityAttributeValue:]):
    Tell the AXObjectCache that AX is now enabled.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove [NoInterfaceObject] from XPathExpression and NodeIterator
https://bugs.webkit.org/show_bug.cgi?id=117204

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Remove [NoInterfaceObject] from XPathExpression and NodeIterator to match
their respective specifications:
- http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathExpression
- http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-NodeIterator

No new tests, already covered by:
fast/js/global-constructors-attributes.html

* dom/NodeIterator.idl:
* xml/XPathExpression.idl:

LayoutTests:

Rebaseline fast/js/global-constructors-attributes.html and fast/dom/dom-constructors.html
now that XPathExpression and NodeIterator properties are exposed on the global Window
object.

* fast/dom/dom-constructors-expected.txt:
* fast/js/global-constructors-attributes-expected.txt:
* platform/efl/fast/js/global-constructors-attributes-expected.txt:
* platform/gtk/fast/js/global-constructors-attributes-expected.txt:
* platform/mac-lion/fast/js/global-constructors-attributes-expected.txt:
* platform/qt/fast/js/global-constructors-attributes-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix after r150592. We need to disable \2 shouldn't be treated as an escape character.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[kn] Kannada Translation for webkit - Updated
https://bugs.webkit.org/show_bug.cgi?id=116941

Patch by Shankar Prasad <svenkate@redhat.com> on 2013-06-04
Reviewed by Gustavo Noronha Silva (kov).

* kn.po: Updated.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Updated WebKitGTK+ Translation for Odia [or] language.
https://bugs.webkit.org/show_bug.cgi?id=116825

Patch by Manoj Kumar Giri <mgiri@redhat.com> on 2013-06-04
Reviewed by Gustavo Noronha Silva (kov).

* or.po: Updated.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Updated Telugu [te] Translations for WebKitGTK+ HEAD
https://bugs.webkit.org/show_bug.cgi?id=115856

Patch by Krishnababu Krothapalli <kkrothap@redhat.com> on 2013-06-04
Reviewed by Gustavo Noronha Silva (kov).

* te.po: Updated.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Updated WebKit Translation in Hindi [hi] language
https://bugs.webkit.org/show_bug.cgi?id=115508

Patch by Rajesh Ranjan <rajeshkajha@yahoo.com> on 2013-06-04
Reviewed by Gustavo Noronha Silva (kov).

* hi.po: Updated.

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