Argument flush formats should not be presumed to be JSValue since 'this' is weird
https://bugs.webkit.org/show_bug.cgi?id=132404

Reviewed by Michael Saboff.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCurrentBlock): Don't assume that arguments are flushed as JSValue. Use the logic for locals instead.
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile): SetArgument "changes" the format because before this we wouldn't know we had arguments.
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile): Ditto.
* dfg/DFGValueSource.cpp:
(JSC::DFG::ValueSource::dumpInContext): Make this easier to dump.
* dfg/DFGValueSource.h:
(JSC::DFG::ValueSource::operator!): Make this easier to dump because Operands<T> uses T::operator!().
* ftl/FTLOSREntry.cpp:
(JSC::FTL::prepareOSREntry): This had a useful assertion for everything except 'this'.
* tests/stress/strict-to-this-int.js: Added.
(foo):
(Number.prototype.valueOf):
(test):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix after r168041.

* WebCore.exp.in: Add missing iOS exports.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Phone number data detection UI is offset for iframes, pages with topContentInset
https://bugs.webkit.org/show_bug.cgi?id=132372
-and corresponding-
<rdar://problem/16651235>

Reviewed by Tim Horton.

Make the overlay an OverlayType::Document, which will keep everything relative to 
the main Document’s coordinates. 
* WebProcess/WebPage/TelephoneNumberOverlayController.cpp:
(WebKit::TelephoneNumberOverlayController::createOverlayIfNeeded):

Make frames work by converting to the main  document’s coordinate space.
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
(WebKit::TelephoneNumberOverlayController::drawRect):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move Blob.slice() implementation into BlobRegistryImpl
https://bugs.webkit.org/show_bug.cgi?id=132402

Reviewed by Anders Carlsson.


Source/WebCore: 
Part or centralizing the responsibility for file size tracking.

* fileapi/Blob.cpp:
(WebCore::Blob::Blob):
(WebCore::Blob::slice): Deleted.
* fileapi/Blob.h:
(WebCore::Blob::slice):
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::ThreadableBlobRegistry::registerBlobURL):
(WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):
(WebCore::registerBlobURLTask): Deleted.
(WebCore::registerBlobURLFromTask): Deleted.
* fileapi/ThreadableBlobRegistry.h:
* platform/network/BlobRegistry.h:
* platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::appendStorageItems):
(WebCore::BlobRegistryImpl::registerBlobURLForSlice):
(WebCore::BlobRegistryImpl::blobSize):
* platform/network/BlobRegistryImpl.h:

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



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Updated ANGLE.
https://bugs.webkit.org/show_bug.cgi?id=132367
<rdar://problem/16211451>

Reviewed by Dean Jackson.


Source/ThirdParty/ANGLE: 
* ANGLE.plist:
Updated and xml encoded.
* ANGLE.xcodeproj/project.pbxproj:
Added needed new source files.
* changes.diff: 
Added to keep track of differences between WebKit's copy of ANGLE and the master repository.
        
Updated ANGLE source files to e7a453a5bd76705ccb151117fa844846d4aa90af.  Long list of changes omitted.

Source/WebCore: 
* CMakeLists.txt
Fixed ANGLE compiling with the update.
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
Removed SH_MAP_LONG_VARIABLE_NAMES which is no longer defined in ANGLE.
See https://chromium.googlesource.com/angle/angle/+/3cdfcce86b38ef31a0afd71855887193a7924468
* platform/graphics/opengl/Extensions3DOpenGLES.h:
* platform/graphics/opengl/Extensions3DOpenGLES.cpp:
Updated type names from ANGLE.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix build error when building for iOS simulator.

* UIProcess/ios/ProcessAssertion.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Let Xcode have its way with the WebKit workspace.

* WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme:
* WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme:

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

* WebKit.xcodeproj/project.pbxproj:
Remove old WK forwarding headers from WebKitLegacy.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][GStreamer] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=132390

Reviewed by Philippe Normand.

Since EFL port use GLib 2.38 and GTK+, 2.33.2, I assume it is OK
remove, in GTK+ and GST, the existing glib version guards.

Source/WebCore:
No new tests, already covered by current tests.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkDispose):
(webkitVideoSinkFinalize): Deleted.

Source/WTF:
This code was rollback from r149879 because Qt MIPS used it. But since
Qt is gone, it is safe to remove now.

* wtf/gobject/GRefPtr.cpp:
(WTF::refGPtr): Deleted.
(WTF::derefGPtr): Deleted.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] Use GstMetaVideo
https://bugs.webkit.org/show_bug.cgi?id=132247

Reviewed by Philippe Normand.

In WebKitVideoSink we announce the usage of GstMetaVideo, but we do
not use it when handling the video frames. This might break
some decoders and filters that rely on buffer's meta, rather
that in the caps structures.

This patch enables the use of GstMetaVideo through the GstVideoFrame
API. And it is used everywhere the buffer mapping is required.

Also this patch changes to nullptr where zeros were used.

Also, compile conditionally the video buffer conversion when it is
ARGB/BGRA, since it is only required for the Cairo backend.

No new tests, already covered by current tests.

* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::getVideoSizeAndFormatFromCaps): init the GstVideoInfo before
used and remove caps fixate check since it is done by
gst_video_info_from_caps().
* platform/graphics/gstreamer/ImageGStreamer.h:
* platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
(ImageGStreamer::ImageGStreamer): use GstVideoFrame for buffer mapping
and unmapping.
(ImageGStreamer::~ImageGStreamer): ditto.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): ditto.
(WebCore::MediaPlayerPrivateGStreamerBase::currentVideoSinkCaps):
return nullptr if failed.
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkRender): rely on GstVideoInfo rather than on the
caps. Use GstVideoFrame for buffer mapping and unmapping. Add guards
for buffer transformation, since it's only used by Cairo.
(webkitVideoSinkDispose): remove glib version guards.
(webkitVideoSinkSetCaps): update the value of the private
GstVideoInfo.


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

* WebKit.xcodeproj/project.pbxproj:
Remove WK headers from WebKit.framework as well when WebKitLegacy WK headers are encountered.

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

* WebKit.xcodeproj/project.pbxproj:
Remove headers if it seems like the WKWebViewPrivate header imports itself.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS][WK2] Add a SPI to exclude the extended background from some areas of WKWebView
https://bugs.webkit.org/show_bug.cgi?id=132406
<rdar://problem/16762197>

Reviewed by Beth Dakin.

Move the extended background to a separate layer bellow the UIScrollView.

The geometry of that layer is then changed based on ExtendedBackgroundExclusionInsets
as needed.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _updateScrollViewBackground]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _setExtendedBackgroundExclusionInsets:]):
(-[WKWebView _extendedBackgroundExclusionInsets]):
(-[WKWebView pageExtendedBackgroundColor]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make sure the "All" targets build WebKitLegacy, rather than WebKit.

Reviewed by Dan Bernstein/Anders Carlsson.

* WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme:
* WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cursor gets thinner on empty lines.
https://bugs.webkit.org/show_bug.cgi?id=132411
<rdar://problem/15994556>

Reviewed by Benjamin Poulain.

RenderLineBreak::localCaretRect should not define
locally the constant caretWidth, but use the one from
RenderObject.h which knows about the differences between
iOS and the other platforms.

* rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::localCaretRect):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r167879 and r167942.
https://bugs.webkit.org/show_bug.cgi?id=132408

OrderIterator changes caused regressions in flexbox (Requested
by rego on #webkit).

We're keeping the new layout test introduced in r167942
(fast/flexbox/order-iterator-crash.html) to avoid similar
regressions in the future.

Reverted changesets:

"OrderIterator refactoring to avoid extra loops"
https://bugs.webkit.org/show_bug.cgi?id=119061
http://trac.webkit.org/changeset/167879

"REGRESSION (r167879): Heap-use-after-free in
WebCore::RenderFlexibleBox"
https://bugs.webkit.org/show_bug.cgi?id=132337
http://trac.webkit.org/changeset/167942

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix PageVisibility on iOS
https://bugs.webkit.org/show_bug.cgi?id=132393

Rubber stamped by Tim Horton

* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewWindowActive):
(WebKit::PageClientImpl::isViewFocused):
(WebKit::PageClientImpl::isViewVisible):
(WebKit::PageClientImpl::isViewVisibleOrOccluded):
(WebKit::PageClientImpl::isVisuallyIdle):
    - m_contentView -> m_webView



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=132415
Fix snapshotting on WebKit2

Reviewed by Geoff Garen

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
    - Use a VisibilityToken to keep the process runnable.



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