Try to fix the iOS build.

* WebKit.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Another build fix attempt.

* WebKit.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try yet again to fix the build.

* WebKit.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
If there are no services available, do not show the service controls UI
<rdar://problem/16735665> and https://bugs.webkit.org/show_bug.cgi?id=132410

Reviewed by Tim Horton.

Add a lightweight class that lazily polls the appropriate APIs for whether or not appropriate services
are installed and usable on the system:
* UIProcess/mac/ServicesController.h: Added.
(WebKit::ServicesController::imageServicesExist):
(WebKit::ServicesController::selectionServicesExist):
* UIProcess/mac/ServicesController.mm: Added.
(WebKit::ServicesController::shared):
(WebKit::ServicesController::ServicesController):
(WebKit::ServicesController::refreshExistingServices):
(WebKit::ServicesController::refreshExistingServicesTimerFired):

Add "image services exist" and "selection services exist" parameters:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:

* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
(WebKit::WebContext::refreshExistingServices): Called when the context menu proxy realizes that
  services no longer exist.
* UIProcess/WebContext.h:

Each WebProcess hangs on to its own copy of the flags for whether or not the services exist:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::setEnabledServices):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::imageServicesExist):
(WebKit::WebProcess::selectionServicesExist):

* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu): If the menu creation failed, the set of services
  on the system must have changed. So ask the WebContext to refresh them.

* WebProcess/WebPage/SelectionOverlayController.cpp:
(WebKit::SelectionOverlayController::selectionRectsDidChange): If services don't exist, don't create an
  overlay (and destroy any existing overlay!)

* WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
(WebKit::SelectionOverlayController::drawRect): If services don't exist, don't draw, and destroy the overlay.

* WebProcess/WebProcess.messages.in:
* WebKit2.xcodeproj/project.pbxproj:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] do not pause video when entering background while playing to external device
https://bugs.webkit.org/show_bug.cgi?id=132374

Reviewed by Jer Noble.


Source/WebCore: 
* WebCore.exp.in: Update beginInterruption signature.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::canOverrideBackgroundPlaybackRestriction): New, return true when
    playing to external device.
* html/HTMLMediaElement.h:

* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::beginInterruption): Add interruption type to beginInterruption.
* platform/audio/MediaSession.h:

* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::beginInterruption): Ditto.
(WebCore::MediaSessionManager::applicationWillEnterBackground): Ditto.
(WebCore::MediaSessionManager::systemWillSleep): Ditto.
* platform/audio/MediaSessionManager.h:

* platform/audio/ios/AudioDestinationIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper interruption:]): Ditto.

* platform/audio/mac/AudioDestinationMac.h: Make most methods private. Add 
    canOverrideBackgroundPlaybackRestriction. Add missing overrides.
* testing/Internals.cpp:
(WebCore::Internals::beginMediaSessionInterruption): Pass interruption type.

Source/webkit: 
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r168046): [New Multicolumn] Painting order is wrong for columns and fixed positioned elements
https://bugs.webkit.org/show_bug.cgi?id=132377

Reviewed by Simon Fraser.


Source/WebCore: 
Added fast/multicol/fixed-stack.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldBeSelfPaintingLayer):
(WebCore::RenderLayer::shouldBeNormalFlowOnly):
Change the flow thread layer for multicolumn layout to be normal flow only and to
stay self-painting. This has the effect of keeping the flow thread layer grouped
with the enclosing multicolumn layer, and this keeps the paint order correct when
compositing kicks in (or when something would otherwise try to get between the
two layers).

LayoutTests: 
* compositing/columns/composited-nested-columns-expected.txt:
* fast/multicol/fixed-stack-expected.html: Added.
* fast/multicol/fixed-stack.html: Added.
* fast/multicol/flipped-blocks-border-after-expected.txt:
* fast/multicol/progression-reverse-expected.txt:
* fast/multicol/single-line-expected.txt:
* fast/multicol/vertical-lr/rules-with-border-before-expected.txt:
* fast/multicol/vertical-rl/rule-style-expected.txt:
* fast/multicol/vertical-rl/rules-with-border-before-expected.txt:
* platform/mac/fast/multicol/client-rects-expected.txt:
* platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt:
* platform/mac/fast/multicol/client-rects-spanners-expected.txt:
* platform/mac/fast/multicol/column-break-with-balancing-expected.txt:
* platform/mac/fast/multicol/column-count-with-rules-expected.txt:
* platform/mac/fast/multicol/float-paginate-complex-expected.txt:
* platform/mac/fast/multicol/layers-in-multicol-expected.txt:
* platform/mac/fast/multicol/layers-split-across-columns-expected.txt:
* platform/mac/fast/multicol/newmulticol/client-rects-expected.txt:
* platform/mac/fast/multicol/span/span-as-immediate-child-complex-splitting-expected.txt:
* platform/mac/fast/multicol/span/span-as-immediate-child-generated-content-expected.txt:
* platform/mac/fast/multicol/span/span-as-immediate-child-property-removal-expected.txt:
* platform/mac/fast/multicol/span/span-as-immediate-columns-child-dynamic-expected.txt:
* platform/mac/fast/multicol/span/span-as-immediate-columns-child-expected.txt:
* platform/mac/fast/multicol/span/span-as-immediate-columns-child-removal-expected.txt:
* platform/mac/fast/multicol/span/span-as-nested-columns-child-dynamic-expected.txt:
* platform/mac/fast/multicol/span/span-as-nested-columns-child-expected.txt:
* platform/mac/fast/multicol/span/span-margin-collapsing-expected.txt:
* platform/mac/fast/multicol/table-vertical-align-expected.txt:
* platform/mac/fast/multicol/vertical-lr/column-break-with-balancing-expected.txt:
* platform/mac/fast/multicol/vertical-lr/column-count-with-rules-expected.txt:
* platform/mac/fast/multicol/vertical-lr/float-paginate-complex-expected.txt:
* platform/mac/fast/multicol/vertical-rl/column-break-with-balancing-expected.txt:
* platform/mac/fast/multicol/vertical-rl/column-count-with-rules-expected.txt:
* platform/mac/fast/multicol/vertical-rl/float-paginate-complex-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline compositing/overflow tests for iOS.

* platform/ios-sim/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt:
* platform/ios-sim/compositing/overflow/composited-scrolling-paint-phases-expected.txt:
* platform/ios-sim/compositing/overflow/content-gains-scrollbars-expected.txt:
* platform/ios-sim/compositing/overflow/fixed-position-ancestor-clip-expected.txt:
* platform/ios-sim/compositing/overflow/overflow-scroll-expected.txt:
* platform/ios-sim/compositing/overflow/overflow-scrollbar-layers-expected.txt:
* platform/ios-sim/compositing/overflow/remove-overflow-crash2-expected.txt:
* platform/ios-sim/compositing/overflow/scrollbar-painting-expected.txt:
* platform/ios-sim/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt:
* platform/ios-sim/compositing/overflow/scrolling-without-painting-expected.txt:
* platform/ios-sim/compositing/overflow/textarea-scroll-touch-expected.txt:
* platform/ios-sim/compositing/overflow/updating-scrolling-content-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS WK2] Some accerated overflow-scroll doesn't scroll correctly
https://bugs.webkit.org/show_bug.cgi?id=132375

Reviewed by Tim Horton.

Source/WebCore:
We set the size of the scrolling layer (which becomes the bounds of
the UIScrollView) to a non-pixel-snapped padding box size, but the
size of the contents layer is an integral-snapped scroll size.
This would result in a fractional difference between the two, which
makes us thing that the element is scrollable when it really is not.

Fix by setting the size of the scroll layer to pixel snapped client size,
which is what we also use for scrollability computation.

Added some FIXMEs in code that requires pixel snapping.

Also use #if PLATFORM(IOS)/#else to bracket some code that never runs on iOS
but tries to do something similar to iOS-only code.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):

LayoutTests:
New test that dumps compositing layers on iOS so we can see the sizes of the
scroll layers that get created.

* compositing/overflow/subpixel-overflow-expected.txt: Added.
* compositing/overflow/subpixel-overflow.html: Added.
* platform/ios-sim/compositing/overflow/subpixel-overflow-expected.txt: Added.
* platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt:
This is a progression; the old code failed to take the scrollbar width into
account, and the new code does.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO
https://bugs.webkit.org/show_bug.cgi?id=132396

Reviewed by Eric Carlson.

Source/JavaScriptCore:

Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO and related code.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO and related code.

* Configurations/FeatureDefines.xcconfig:
* WebCore.exp.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement):
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
* editing/TextIterator.cpp:
(WebCore::isRendererReplacedElement):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::setNeedWidgetUpdate): Deleted.
* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::showPlaybackTargetPicker):
(WebCore::HTMLMediaSession::hasWirelessPlaybackTargets):
(WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::createElementRenderer):
(WebCore::HTMLVideoElement::didAttachRenderers):
(WebCore::HTMLVideoElement::parseAttribute):
(WebCore::HTMLVideoElement::setDisplayMode):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateSizes):
* loader/EmptyClients.cpp:
(WebCore::EmptyFrameLoaderClient::createMediaPlayerProxyPlugin): Deleted.
* loader/EmptyClients.h:
* loader/FrameLoaderClient.h:
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadPlugin):
(WebCore::SubframeLoader::loadMediaPlayerProxyPlugin): Deleted.
* loader/SubframeLoader.h:
* page/FrameView.cpp:
(WebCore::FrameView::updateEmbeddedObject):
* page/Settings.cpp:
(WebCore::Settings::setVideoPluginProxyEnabled): Deleted.
* page/Settings.h:
(WebCore::Settings::isVideoPluginProxyEnabled): Deleted.
* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::mediaLayerMustBeUpdatedOnMainThread): Deleted.
* platform/graphics/MediaPlayer.cpp:
(WebCore::installedMediaEngines):
(WebCore::MediaPlayer::MediaPlayer):
(WebCore::MediaPlayer::loadWithNextMediaEngine):
(WebCore::NullMediaPlayerPrivate::deliverNotification): Deleted.
(WebCore::NullMediaPlayerPrivate::setMediaPlayerProxy): Deleted.
(WebCore::NullMediaPlayerPrivate::setControls): Deleted.
(WebCore::MediaPlayer::deliverNotification): Deleted.
(WebCore::MediaPlayer::setMediaPlayerProxy): Deleted.
(WebCore::MediaPlayer::setControls): Deleted.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::deliverNotification): Deleted.
(WebCore::MediaPlayerPrivateInterface::setMediaPlayerProxy): Deleted.
(WebCore::MediaPlayerPrivateInterface::setControls): Deleted.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateGeometry):
(WebCore::GraphicsLayerCA::updateContentsRects):
(WebCore::GraphicsLayerCA::mediaLayerMustBeUpdatedOnMainThread): Deleted.
* platform/graphics/ca/GraphicsLayerCA.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::canHaveChildren):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::mediaLayerMustBeUpdatedOnMainThread): Deleted.
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForVideo):

Source/WebKit/mac:

Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO and related code.

* Configurations/FeatureDefines.xcconfig:
* Plugins/WebPluginContainerPrivate.h:
* Plugins/WebPluginController.h:
* Plugins/WebPluginController.mm:
(-[WebPluginController dealloc]):
(-[WebPluginController plugInsAreRunning]):
(-[WebPluginController stopAllPlugins]):
(-[WebPluginController stopPluginsForPageCache]):
(-[WebPluginController restorePluginsFromCache]):
(-[WebPluginController addPlugin:]):
(-[WebPluginController destroyPlugin:]):
(-[WebPluginController destroyAllPlugins]):
(-[NSView isMediaPlugInProxyView]): Deleted.
(-[NSView setIsMediaPlugInProxyView:]): Deleted.
(-[WebPluginController mediaPlugInProxyViewCreated:]): Deleted.
(+[WebPluginController pluginViewHidden:]): Deleted.
(mediaProxyClient): Deleted.
(-[WebPluginController _webPluginContainerSetMediaPlayerProxy:forElement:]): Deleted.
(-[WebPluginController _webPluginContainerPostMediaPlayerNotification:forElement:]): Deleted.
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(pluginView):
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
(-[WebView _videoProxyPluginForMIMEType:]): Deleted.
* WebView/WebViewInternal.h:

Source/WebKit2:

Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO and related code.

* Configurations/FeatureDefines.xcconfig:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createMediaPlayerProxyPlugin): Deleted.
(WebKit::WebFrameLoaderClient::hideMediaPlayerProxyPlugin): Deleted.
(WebKit::WebFrameLoaderClient::showMediaPlayerProxyPlugin): Deleted.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Source/WTF:

Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO and related code.

* wtf/FeatureDefines.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS][WK2] Animated resize incorrectly assumes the layout width is the same as the view width
https://bugs.webkit.org/show_bug.cgi?id=132373
<rdar://problem/16762178>

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
Fix a couple of bugs when the left/right obscured insets change, and/or when the minimum layout size
is narrower than the view itself.

In order:
-We need to perfom and update if the insets change since the unobscuredRect will also change.
-The min/max zoom scale should be based on the minimum layout size, that's the definition of minimum layout size
 in scrollview coordinate :)
-The old web view width in content coordinate could be narrower than the old view bounds if there are left or right
 insets.


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