Change ctiTrampoline into a thunk
https://bugs.webkit.org/show_bug.cgi?id=123844

Reviewed by Filip Pizlo.

Converted ctiTrampoline and ctiOpThrowNotCaught into thunks named callToJavaScript
and returnFromJavaScript.  Cleaned up and in some cases removed JITStubsXXX.h files
after removing ctiTrampoline and ctiOpThrowNotCaught.  Added callJavaScriptJITFunction
to VM that is a function pointer to the callToJavaScript thunk.

* GNUmakefile.list.am:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
* jit/JITCode.cpp:
(JSC::JITCode::execute):
* jit/JITExceptions.cpp:
(JSC::genericUnwind):
* jit/JITStubs.cpp:
* jit/JITStubs.h:
* jit/JITStubsARM.h:
* jit/JITStubsARM64.h: Removed.
* jit/JITStubsARMv7.h:
* jit/JITStubsMIPS.h: Removed.
* jit/JITStubsMSVC64.asm:
* jit/JITStubsSH4.h: Removed.
* jit/JITStubsX86.h:
* jit/JITStubsX86_64.h:
* jit/JSInterfaceJIT.h:
* jit/ThunkGenerators.cpp:
(JSC::returnFromJavaScript):
(JSC::callToJavaScript):
* jit/ThunkGenerators.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening; Fix expected results for video-seek-with-negative-playback.html,
and modify the test to conform to media test style.

* media/video-seek-with-negative-playback-expected.txt:
* media/video-seek-with-negative-playback.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cocoa] History delegate
https://bugs.webkit.org/show_bug.cgi?id=123837

Reviewed by Sam Weinig.

* Shared/Cocoa/APIObject.mm:
(WebKit::APIObject::newObject): Allocate a WKNavigationData if the object is a
WebNavigationData.

* Shared/Cocoa/WKNSString.h:
(WebKit::wrapper): Added. Returns a WebString’s wrapper as an NSString.

* Shared/Cocoa/WKNSURL.h:
(WebKit::wrapper): Added. Returns a WebURL’s wrapper as an NSURL.

* UIProcess/API/C/WKNavigationData.cpp: Renamed.
* UIProcess/API/C/WKNavigationData.h: Renamed.
* UIProcess/API/C/WKNavigationDataRef.cpp: Copied from Source/WebKit2/UIProcess/API/C/WKNavigationData.cpp.
* UIProcess/API/C/WKNavigationDataRef.h: Copied from Source/WebKit2/UIProcess/API/C/WKNavigationData.h.

* UIProcess/API/mac/WKBrowsingContextController.h: Declared historyDelegate property.

* UIProcess/API/mac/WKProcessGroup.mm:
(didNavigateWithNavigationData): Added history client callback that calls the browsing
context’s history delegate.
(didPerformClientRedirect): Ditto.
(didPerformServerRedirect): Ditto.
(didUpdateHistoryTitle): Ditto.
(setUpHistoryClient): Added.
(-[WKProcessGroup initWithInjectedBundleURL:]): Added call to setUpHistoryClient.
(-[WKProcessGroup dealloc]): Clear the history client.

* UIProcess/Cocoa/WKBrowsingContextHistoryDelegate.h: Added.

* UIProcess/Cocoa/WKNavigationData.h: Added.
* UIProcess/Cocoa/WKNavigationData.mm: Added.
(-[WKNavigationData dealloc]): Calls the WebNavigationData destructor.
(-[WKNavigationData title]): Added.
(-[WKNavigationData originalRequest]): Added.
(-[WKNavigationData destinationURL]): Added.
(-[WKNavigationData _apiObject]): Returns the wrapped WebNavigationData.
* UIProcess/Cocoa/WKNavigationDataInternal.h: Added.
(WebKit::wrapper): Added. Returns a WebNavigationData’s wrapper as a WKNavigationData.
* WebKit2.xcodeproj/project.pbxproj: Updated for renames and additions.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] Providing new table related accessibility expectations after r158742
https://bugs.webkit.org/show_bug.cgi?id=123893

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

New baselines after added missing implementation in r158742.

* platform/efl-wk1/TestExpectations: Tests are no longer failing.
* platform/efl-wk2/TestExpectations: Tests are no longer failing.
* platform/efl-wk2/accessibility/table-attributes-expected.txt: Added.
* platform/efl-wk2/accessibility/table-sections-expected.txt: Added.
* platform/efl/accessibility/table-attributes-expected.txt: Added.
* platform/efl/accessibility/table-sections-expected.txt: Added.
* platform/gtk-wk2/accessibility/table-attributes-expected.txt: Added.
* platform/gtk-wk2/accessibility/table-sections-expected.txt: Added.
* platform/gtk/TestExpectations: Tests are no longer failing.
* platform/gtk/accessibility/table-attributes-expected.txt: Added.
* platform/gtk/accessibility/table-sections-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening. Media elements wrongly exposed after r158743.

* platform/gtk/TestExpectations: Added failure expectations.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Promoted WKBrowsingContextHistoryDelegate.h to private.

Rubber-stamped by Sam Weinig.

* WebKit2.xcodeproj/project.pbxproj:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] accessibility/title-ui-element-correctness.html fails
https://bugs.webkit.org/show_bug.cgi?id=99825

Reviewed by Mario Sanchez Prada.

Source/WebCore:

When calling setAtkRelationSetFromCoreObject a new ATK_LABELLED_BY_RELATION
is added, adding proper label element as a relation. When the document structure
has been changed and a different label should be linked as a relation, current ATK
implementation adds it as a next target on relation's target list, while
WTR/DumpRenderTree implementation takes only first one into account.
This patch adds a new function removing current relations before adding new ones.

Covered by existing tests.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(removeAtkRelationFromRelationSetByType):
(setAtkRelationSetFromCoreObject):

LayoutTests:

Remove failure test expectation for the test fixed by this patch.

* platform/efl-wk1/TestExpectations:
* platform/efl-wk2/TestExpectations:
* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move array position caching out from HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=123895

Reviewed by Darin Adler.

This caching complicates the logic but is used by a single subclass
(HTMLFormControlsCollection) only. The subclass can do the caching itself.

* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::HTMLAllCollection):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::create):
(WebCore::HTMLCollection::item):
(WebCore::HTMLCollection::elementBeforeOrAfterCachedElement):
(WebCore::HTMLCollection::firstElement):
        
    Renamed from traverseFirstElement.

(WebCore::HTMLCollection::traverseForwardToOffset):
(WebCore::HTMLCollection::invalidateCache):
        
    Make cache invalidation virtual so we can clear HTMLTableRowsCollection index cache.

(WebCore::HTMLCollection::namedItem):
(WebCore::HTMLCollection::updateNameCache):
        
    Use traverseForwardToOffset instead traverseNextElement. This allows removal of traverseNextElement.

* html/HTMLCollection.h:
(WebCore::HTMLCollection::usesCustomForwardOnlyTraversal):
        
    Renamed the enum and the accessor to be more informative.

(WebCore::HTMLCollection::setCachedElement):
(WebCore::HTMLCollection::customElementAfter):
        
    Renamed from virtualItemAfter.

* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
(WebCore::findFormAssociatedElement):
(WebCore::HTMLFormControlsCollection::customElementAfter):
        
    Move the array position caching logic here.

(WebCore::HTMLFormControlsCollection::invalidateCache):
* html/HTMLFormControlsCollection.h:
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::HTMLNameCollection):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
(WebCore::HTMLTableRowsCollection::customElementAfter):
* html/HTMLTableRowsCollection.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove dead code
https://bugs.webkit.org/show_bug.cgi?id=123902

Reviewed by Tim Horton.

Remove the PageClient::containingWindowGraphicsContext() as well as the
WKPageSetDebugPaintFlags and WKPageGetDebugPaintFlags API functions.

* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::searchTheWeb):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add "id" attribute to TextTrack
https://bugs.webkit.org/show_bug.cgi?id=123825

Patch by Brendan Long <b.long@cablelabs.com> on 2013-11-06
Reviewed by Eric Carlson.

Source/WebCore:

Test: media/track/track-id.html

* html/HTMLMediaElement.cpp:
(HTMLMediaElement::addTextTrack): Add emptyString() for track id.
* html/track/AudioTrack.cpp:
(WebCore::AudioTrack::AudioTrack): Pass trackPrivate->id() to TrackBase.
(WebCore::AudioTrack::idChanged): Added, set id.
* html/track/AudioTrack.h: Move m_id to TrackBase.
* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::InbandTextTrack): Pass trackPrivate->id() to TrackBase.
(WebCore::InbandTextTrack::idChanged): Added, set id.
* html/track/InbandTextTrack.h: Add idChanged().
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::LoadableTextTrack): Add emptyString() for track id.
(WebCore::LoadableTextTrack::id): Override to return the track element's id.
* html/track/TextTrack.cpp:
(WebCore::TextTrack::captionMenuOffItem): Add empty string for track id.
(WebCore::TextTrack::captionMenuAutomaticItem): Add empty string for track id.
(WebCore::TextTrack::TextTrack): Pass id to TrackBase.
* html/track/TextTrack.h:
(WebCore::TextTrack::create): Add id parameter.
* html/track/TextTrack.idl: Add id attribute.
* html/track/TrackBase.cpp:
(WebCore::TrackBase::TrackBase): Add m_id.
* html/track/TrackBase.h: Add id attribute / m_id.
* html/track/VideoTrack.cpp:
(WebCore::VideoTrack::VideoTrack): Pass trackPrivate->id() to TrackBase.
(WebCore::VideoTrack::idChanged): Added, set id.
* html/track/VideoTrack.h: Move m_id to TrackBase.
* platform/graphics/TrackPrivateBase.h: Add idChanged() callback.

LayoutTests:

* media/track/track-id-expected.txt: Added.
* media/track/track-id.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix a Mountain Lion test failure.

NSURLRequest doesn't conform to NSSecureCoding on Mountain Lion, so don't try to test encoding it.

* TestWebKitAPI/Tests/WebKit2ObjC/WKRemoteObjectRegistry.mm:
(TestWebKitAPI::TEST):

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