More WKRemoteObjectRegistry work
https://bugs.webkit.org/show_bug.cgi?id=123754

Reviewed by Dan Bernstein.

Source/WebKit2:

* Shared/API/Cocoa/WKRemoteObjectCoder.h:
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectEncoder rootObjectDictionary]):
Add a getter for the root object dictionary.

* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
(-[WKRemoteObjectRegistry _sendInvocation:interface:]):
Call _sendMessageWithBody:.
(-[WKRemoteObjectRegistry _sendMessageWithBody:]):
Call WebConnection::postMessage.

Tools:

* TestWebKitAPI/Tests/WebKit2ObjC/WKRemoteObjectRegistry.mm:
(TestWebKitAPI::TEST):
Use the correct bundle test name. Call Util::run.

* TestWebKitAPI/Tests/mac/WKRemoteObjectRegistry_Bundle.mm:
(-[BundleObject sayHello]):
(-[BundleObject testMethodWithString:double:integer:]):
Add BundleObject implementation. Register the bundle object with
the remote object registry. Call _handleMessageWithName:body: on the incoming message.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] image valued shape element margin can cause an ASSERT fail
https://bugs.webkit.org/show_bug.cgi?id=123743

Reviewed by Andreas Kling.

Source/WebCore:

When margin-top is specified for a shape's element, the Y coordinates passed
to RasterShapeIntervals::getExcludedIntervals() may be negative. This is
because the incoming logical coordinates are relative to the content or
padding box, depending on the box-sizing property. The RasterShape::getExcludedIntervals()
method now clips the incoming Y coordinates to the shape's bounds before
accessing the shape's intervals.

Test: fast/shapes/shape-outside-floats/shape-outside-floats-margin-crash.html

* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShapeIntervals::getExcludedIntervals):

LayoutTests:

Verify that an element with an image valued shape and a non-negative margin
does not cause an assertion failure.

* fast/shapes/shape-outside-floats/shape-outside-floats-margin-crash-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-margin-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MSE] [Mac] Disclaim support for MSE in AVFoundation and QTKit engines
https://bugs.webkit.org/show_bug.cgi?id=123593

Reviewed by Eric Carlson.

Immediately fail if asked to load a Media Source in engines which do not support
them.

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::load):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::load):
(WebCore::MediaPlayerPrivateQTKit::supportsType):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r158561): fast/block/float/float-append-child-crash.html asserting.

The non-const ancestor iterator was walking siblings, not ancestors.

Rubber-stamped by Antti Koivisto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[PluginProxy] Add a setting to disable video plugin proxy support in HTMLMediaElement.
https://bugs.webkit.org/show_bug.cgi?id=123621

Reviewed by Eric Carlson.

Source/WebCore:

Add a new Setting which will disable the video plugin proxy. Enable support for AVFoundation
in iOS (which requries fixing a few compile errors resulting from classes and methods which
are not available on iOS.

* WebCore.exp.in: Export wkAVAssetResolvedURL.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement): Make conditional upon
    new isVideoPluginProxyEnabled() setting.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute): Ditto.
* html/HTMLMediaElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::createRenderer): Ditto.
(WebCore::HTMLVideoElement::attach): Ditto.
(WebCore::HTMLVideoElement::parseAttribute): Ditto.
(HTMLVideoElement::setDisplayMode): Ditto.
* html/HTMLVideoElement.h:
* page/Settings.cpp:
(WebCore::Settings::setVideoPluginProxyEnabled): Simple setter.
* page/Settings.h:
(WebCore::Settings::isVideoPluginProxyEnabled): Simple getter.
* platform/graphics/MediaPlayer.cpp:
(WebCore::installedMediaEngines): Conditionally add MediaPlayerPrivateIOS and always add
    MediaPlayerPriateAVFoundationObjC.
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::deliverNotification): Add default implementation.
(WebCore::MediaPlayerPrivateInterface::setMediaPlayerProxy): Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Use new
    HAS_ and USE_ macros instead of __MAC_OS_MIN_VERNSION_REQUIRED.
(WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasContextRenderer): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createContextVideoRenderer): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyContextVideoRenderer): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Use cachedCGColor instead
    of CGColorGetConstantColor.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Use CVPixelBuffer pixel
    format constant instead of QuickDraw constant.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): Draw to intermediary
    CGImage on iOS.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:

Source/WebKit/mac:

Add a new isVideoPluginProxyEnabled setting.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Set isVideoPluginProxyEnabled preference.
(-[WebPreferences isVideoPluginProxyEnabled]): Pass through to Settings.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Set isVideoPluginProxyEnabled preference.

Source/WebKit2:

Add WebKit2 functions for setting then new isVideoPluginProxyEnabled preference.

* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetVideoPluginProxyEnabled):
(WKPreferencesGetVideoPluginProxyEnabled):
* UIProcess/API/C/WKPreferences.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Source/WTF:

Enable WTF_USE_AVFOUNDATION and add some HAVE_AVFOUNDATION_* defines
to replace the existing __MAC_OS_X_VERSION_MIN_REQUIRED macros in
MediaPlayerPrivateAVFoundationObjC.mm.

* wtf/Platform.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Update WebGeolocationManager to support multiple WebContent processes
https://bugs.webkit.org/show_bug.cgi?id=123658

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-11-04
Reviewed by Anders Carlsson.

Change WebGeolocationManagerProxy to track which WebProcessProxy needs geolocation.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::disconnectProcess):
WebContext::disconnectProcess does not handle ContextSupplement yet when using multiple
WebContent processes. Add an explicit call for WebGeolocationManagerProxy as a temporary
solution.

* UIProcess/WebGeolocationManagerProxy.cpp:
(WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy):
(WebKit::WebGeolocationManagerProxy::contextDestroyed):
(WebKit::WebGeolocationManagerProxy::processDidClose):
(WebKit::WebGeolocationManagerProxy::startUpdating):
(WebKit::WebGeolocationManagerProxy::stopUpdating):
(WebKit::WebGeolocationManagerProxy::removeRequester):
* UIProcess/WebGeolocationManagerProxy.h:
* UIProcess/WebGeolocationManagerProxy.messages.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
../WebKit: [Win] Use VersionStamper for official builds
https://bugs.webkit.org/show_bug.cgi?id=123758

Reviewed by Tim Horton.

* WebKit.vcxproj/WebKit/WebKitPostBuild.cmd: Restore command to
call VersionStamper on final stage of build.

../WTF: [Win] User VersionStamper for official builds
https://bugs.webkit.org/show_bug.cgi?id=123758

Reviewed by Tim Horton.

* WTF.vcxproj/WTFPostBuild.cmd: Add missing command to run VersionStamper.exe.


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