Flaky Test: media/video-buffered.html
https://bugs.webkit.org/show_bug.cgi?id=116277

* platform/mac/TestExpectations: Mark it as such.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160785 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify bindings codegen for adding getOwnPropertySlot overrides
https://bugs.webkit.org/show_bug.cgi?id=125934

Reviewed by Alexey Proskuryakov.

Simple refactoring no change in behavior.

* bindings/scripts/CodeGeneratorJS.pm:
(InstanceOverridesGetOwnPropertySlot):
(PrototypeOverridesGetOwnPropertySlot):
(GenerateHeader):
(GenerateImplementation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make WKObjectRegistry objects be per page
https://bugs.webkit.org/show_bug.cgi?id=125937

Reviewed by Andreas Kling.

Remove WKObjectRegistry from WKConnection. Also, add a C++ object that is in charge
of actually sending and receiving messages.

* DerivedSources.make:
* Shared/API/Cocoa/RemoteObjectRegistry.h: Added.
* Shared/API/Cocoa/RemoteObjectRegistry.messages.in: Added.
* Shared/API/Cocoa/RemoteObjectRegistry.mm: Added.
(WebKit::RemoteObjectRegistry::RemoteObjectRegistry):
(WebKit::RemoteObjectRegistry::~RemoteObjectRegistry):
(WebKit::RemoteObjectRegistry::sendInvocation):
(WebKit::RemoteObjectRegistry::invokeMethod):
* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
(-[WKRemoteObjectRegistry _initWithMessageSender:IPC::]):
(-[WKRemoteObjectRegistry _invalidate]):
(-[WKRemoteObjectRegistry _sendInvocation:interface:]):
(-[WKRemoteObjectRegistry WebKit::]):
(-[WKRemoteObjectRegistry _invokeMethod:]):
* Shared/API/Cocoa/WKRemoteObjectRegistryInternal.h:
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController dealloc]):
(-[WKBrowsingContextController remoteObjectRegistry]):
* UIProcess/API/Cocoa/WKBrowsingContextControllerPrivate.h:
* UIProcess/API/Cocoa/WKConnection.h:
* UIProcess/API/Cocoa/WKConnection.mm:
(didReceiveMessage):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix 32-bit build.

* Shared/API/Cocoa/RemoteObjectRegistry.mm:
(WebKit::RemoteObjectRegistry::invokeMethod):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: make aria-hidden=false work with subtrees
https://bugs.webkit.org/show_bug.cgi?id=125592

Reviewed by Mario Sanchez Prada.

Source/WebCore: 

When a hidden object uses aria-hidden=false, that needs to apply to
the entire sub-tree (not just the object with aria-hidden on it as it does now).

Enabling this had the side effect of exposing non-rendered text nodes, so there's
some extra checks to ensure we don't include those elements in this cases.

Test: accessibility/aria-hidden-false-works-in-subtrees.html

* accessibility/AXObjectCache.cpp:
(WebCore::isNodeAriaVisible):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored):

LayoutTests: 

* platform/mac/accessibility/aria-hidden-false-works-in-subtrees-expected.txt: Added.
* accessibility/aria-hidden-false-works-in-subtrees.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160789 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix page visibility api test, initialization in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=125933

Reviewed by Anders Carlsson.

The API test for page visibility is broken, fix this. This revealed a recent regression in WebKit2
(introduced in https://bugs.webkit.org/show_bug.cgi?id=123379), caused by a typo removing a '!'.

Source/WebKit2: 

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setVisibilityState):
    - Fix regression, accidentally removed a '!'.

Tools: 

* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm:
(TestWebKitAPI::TEST_F):
    - Running a test on WebKit1 twice is not the same as running it on WebKit2!



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Starting a momentum scroll while rubber banding can cause scrolling to jump back 
when the rubberband snaps
https://bugs.webkit.org/show_bug.cgi?id=119507
-and corresponding-
<rdar://problem/14655893>

Reviewed by Simon Fraser.

This line of code was added with the very first implementation of rubber-banding. 
As far as I can tell, it was always a belt-and-suspenders line of code that is a 
no-op in all normal rubber-banding. In this J-shaped scrolling case, this line of 
code is what causes the bug to occur because this line of code assumes that your 
rubber-band is always trying to take you back to the origin. 
* platform/mac/ScrollElasticityController.mm:
(WebCore::ScrollElasticityController::snapRubberBandTimerFired):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Frequent ASSERT(hasOneRef()) in SharedBuffer::releasePurgeableBuffer
https://bugs.webkit.org/show_bug.cgi?id=125939

Reviewed by Simon Fraser.

r146082 fixed these assertions by not making a purgeable buffer if a SharedBuffer
has multiple refs, but the check was put in ResourceBuffer::createPurgeableBuffer
instead of down in SharedBuffer::createPurgeableBuffer.

This is fine for most WebKit ports, because ResourceBuffer::createPurgeableBuffer
is the only caller of SharedBuffer::createPurgeableBuffer, but causes trouble for
not-quite-yet-upstreamed iOS SharedBuffer code, which adds another caller
of SharedBuffer::createPurgeableBuffer.

Push the early-return down into SharedBuffer::createPurgeableBuffer to ensure
that all callers are protected from creating a purgeable buffer if the SharedBuffer
has previously been vended elsewhere.

No new tests, has no effect on the current Open Source tree.

* loader/ResourceBuffer.cpp:
(WebCore::ResourceBuffer::createPurgeableBuffer):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::createPurgeableBuffer):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor CodeGeneratorJS - Move attribute function creation out of getOwnPropertyName guard
https://bugs.webkit.org/show_bug.cgi?id=125940

Reviewed by Simon Fraser.

This is just a huge block move of code out from behind the
ImplementationOverridesGetOwnProperty guard.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove now useless test.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2ObjC/WKRemoteObjectRegistry.mm: Removed.
* TestWebKitAPI/Tests/mac/WKRemoteObjectRegistry_Bundle.mm: Removed.
* TestWebKitAPI/Tests/mac/WKRemoteObjectRegistry_Shared.h: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160794 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WKRemoteObjectRegistry should invoke invocations
https://bugs.webkit.org/show_bug.cgi?id=125945

Reviewed by Tim Horton.

* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
(-[WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]):

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