REGRESSION(168053): Repro crash navigating to another page after selecting phone 
numbers on a page
https://bugs.webkit.org/show_bug.cgi?id=132444
-and corresponding-
<rdar://problem/16787285>

Reviewed by Darin Adler.

Missing null-check.
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
(WebKit::TelephoneNumberOverlayController::drawRect):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] audio and video should automatically play to active external device
https://bugs.webkit.org/show_bug.cgi?id=132428

Reviewed by Jer Noble.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Set
    AVPlayer.usesExternalPlaybackWhileExternalScreenIsActive.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move size computation for Blob constructor into BlobRegistryImpl
https://bugs.webkit.org/show_bug.cgi?id=132439

Reviewed by Sam Weinig.

Source/WebCore:
* Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveBinaryData):
Don't pass the size, anyone who cares can get it from BlobData.

* bindings/js/JSBlobCustom.cpp: (WebCore::JSBlobConstructor::constructJSBlob):
Updated for BlobBuilder changes.

* fileapi/Blob.cpp: (WebCore::Blob::Blob):
* fileapi/Blob.h: (WebCore::Blob::create):
No longer take a precomputed size with BlobData, BlobRegistry will compute it as
part of registration.

* fileapi/File.h:
* fileapi/File.cpp:
(WebCore::File::File): Don't pass a size (that's unknown anyway).
(WebCore::File::captureSnapshot): Deleted. Finally, only the registry is responsible
for snapshot tracking now (I doubt that either new or old code is particularly compliant).

* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::ThreadableBlobRegistry::registerBlobURL):
* fileapi/ThreadableBlobRegistry.h:
Plumbing to make this version of registerBlobURL return a size. I may make size
calculation lazy and the function async later, but this is needed to move the behavior
to the right place first.

* fileapi/WebKitBlobBuilder.h:
* fileapi/WebKitBlobBuilder.cpp:
(WebCore::BlobBuilder::BlobBuilder):
(WebCore::BlobBuilder::append):
(WebCore::BlobBuilder::appendBytesData):
(WebCore::BlobBuilder::finalize):
(WebCore::BlobBuilder::getBlob): Deleted.
Don't track sizes or modification times, registry will do that with appropriate laziness.
Cleaned up the API - now that BlobBuilder is not exposed to JS as an object, it
does not need to be reusable.

* platform/network/BlobRegistry.h: Made this version of registerBlobURL return a size.
* platform/network/BlobRegistryImpl.h:
* platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::appendStorageItems): Assert that length computations are accurate.
(WebCore::BlobRegistryImpl::registerBlobURL): Compute a size to return, and record
modification time as necessary.

* xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseBlob): Don't pass the
size, which can be computed from data. Soon, I want to add a constructor that doesn't
require wrapping a single Vector as BlobData to construct a Blob.

Source/WebKit2:
Plumbing to make this version of registerBlobURL synchronous for now.
I expect to make it async again when data structures on client side are simplified.

* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::registerBlobURL):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::registerBlobURL):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerBlobURL):
* WebProcess/FileAPI/BlobRegistryProxy.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix for !ENABLE(BLOB) builds.

* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::ThreadableBlobRegistry::registerBlobURL):
(WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS][WK2] Tweak the extended background exclusion for MobileSafari
https://bugs.webkit.org/show_bug.cgi?id=132449

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-05-01
Reviewed by Beth Dakin.

Some tweaks for Mobile:
-Use UIViews instead of CALayers to have the same animation timing as the top views.
-The left extended background insets should not exclude the top and bottom insets.

Since this code is in the middle of 2 hot paths, also added some performance tweaks.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
In the normal case, we do not have extended background exclusion. To avoid creating a background view, we use
the scrollview to render the background.
The separate background view is created lazily if needed.

(-[WKWebView _updateScrollViewBackground]):
(-[WKWebView _frameOrBoundsChanged]):
(updateTopAndBottomExtendedBackgroundExclusionIfNecessary):
This create the top and bottom extended background view as needed and update their frames for the current insets.

(-[WKWebView _setObscuredInsets:]):
(-[WKWebView _setExtendedBackgroundExclusionInsets:]):
When an exclusion inset is needed, create a view for it, transfer the color from the ScrollView, and reset the color
of the scrollview.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ViewportConfiguration::minimumScale() uses the initial scale as initial value
https://bugs.webkit.org/show_bug.cgi?id=132451
<rdar://problem/16780111>

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-05-01
Reviewed by Enrica Casucci.

* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::minimumScale):
The initial minimum scale was set to the initial scale, preventing some pages from zooming
out.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HTMLMediaElement: Remove two unnecessary virtual overrides.
<https://webkit.org/b/132445>

Now that ENABLE_PLUGIN_PROXY_FOR_VIDEO is gone, we can remove
these overrides:

    - defaultEventHandler()
    - willRespondToMouseClickEvents()

Reviewed by Darin Adler.

* html/HTMLMediaElement.cpp:
* html/HTMLMediaElement.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support OS-version-specific install paths for WebKit.framework
https://bugs.webkit.org/show_bug.cgi?id=132448
<rdar://problem/16784932>

Reviewed by Dan Bernstein.

Source/WebKit:
* WebKit.xcodeproj/project.pbxproj:
Add a build step to put a symlink in place from PrivateFrameworks to Frameworks.

Source/WebKit/mac:
* WebKitLegacy/WebKit.m:
Add version specific install names.

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