DFG::Safepoint::begin() should set m_didCallBegin before releasing the rightToRun lock, because otherwise, Safepoint::checkLivenessAndVisitChildren() may assert due to a race
https://bugs.webkit.org/show_bug.cgi?id=133525
<rdar://problem/16790296>

Reviewed by Oliver Hunt.

* dfg/DFGSafepoint.cpp:
(JSC::DFG::Safepoint::begin):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] allow UA to specify network interface
https://bugs.webkit.org/show_bug.cgi?id=133396

Reviewed by Jer Noble.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerInterfaceName): Return settings->networkInterfaceName.
* html/HTMLMediaElement.h:

* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::mediaPlayerNetworkInterfaceName): Pass through the media element.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerNetworkInterfaceName):

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): If the media player
    wants to use a specific netork interface name, pass it to the AVAsset allocator.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ArrayIterator should not be exposed in Safari 8
https://bugs.webkit.org/show_bug.cgi?id=133494

Reviewed by Michael Saboff.

Source/JavaScriptCore:
Separate out types that require constructor objects, and don't
include the iterator types in that list.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
* runtime/JSGlobalObject.h:

LayoutTests:
Add tests.

* js/no-iterator-constructors.html: Added.
* js/script-tests/no-iterator-constructors.js: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Regression(r169547): Crash in WebCore::styleForFirstLetter() while loading http://thenextweb.com/apple/2014/02/21/apple-confirms-acquired-testflight-creator-burstly/
https://bugs.webkit.org/show_bug.cgi?id=133500

Reviewed by Antti Koivisto.


Source/WebCore: 
Unlike the other tree marking optimization, adding HasPseudoStyle() on an element style
during style resolution must be conservative and not set the flag unless every other filter
matched first.

After r169547, the SelectorChecker was setting flags on HasPseudoStyle() during the pseudo
element matching. If that passed but the remaining filter did not match, the element style
could have the flag "FIRST_LETTER" while not being able to resolve a style for "FIRST_LETTER".

When the layout code was creating the renderer, it would find the FIRST_LETTER flag on the main style
and try to get the specific style for FIRST_LETTER. Since no rule would resolve for FIRST_LETTER,
the style would be null and the code would be crashing when accessing its parameters.

This patch fixes the issue by moving the style marking for pseudo element at the end of the matching.

Test: fast/css/first-letter-on-non-matching-selectors.html

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::match):
(WebCore::SelectorChecker::matchRecursively):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::match): Deleted.

LayoutTests: 
* fast/css/first-letter-on-non-matching-selectors-expected.txt: Added.
* fast/css/first-letter-on-non-matching-selectors.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Enable WebGL on Windows.
https://bugs.webkit.org/show_bug.cgi?id=133503

Reviewed by Brent Fulgham.


Source/ThirdParty/ANGLE: 
* changes.diff
Recorded additional changes from ANGLE.
* ANGLE.vcxproj/libEGL.vcxproj:
* ANGLE.vcxproj/libEGL.vcxproj.filters:
* ANGLE.vcxproj/libGLESv2.vcxproj:
* ANGLE.vcxproj/libGLESv2.vcxproj.filters:
* include/EGL/egl.h:
* include/EGL/eglsoftlinking.h: Added.
* include/GLES2/gl2.h:
* include/GLES2/gl2softlinking.h: Added.
Resurrected soft linking headers from r153664.
* src/libGLESv2/renderer/VertexBuffer.cpp:
(rx::VertexBufferInterface::directStoragePossible):
Compile fix for Win64.

Source/WebCore: 
No new tests, but we should enable the webgl tests soon.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::markContextChanged):
Check if the context and RenderBox are accelerated to use accelerated code path.
* html/canvas/WebGLRenderingContext.h:
Disable accelerated compositing on WebGL canvases until that works.
* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::reshapeFBOs):
Compile fix after r166563.

Source/WebKit: 
* WebKit.vcxproj/WebKit.sln:
Build ANGLE projects and add them as a dependency for linking WebKit.dll.
* WebKit.vcxproj/WebKit/WebKitCommon.props:
Link to ANGLE libraries to get EGL, GLESv2, and GLSL translator symbols.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
Added 64-bit linker symbol.

Source/WTF: 
* wtf/FeatureDefines.h:
Enable WebGL for AppleWin and WinCairo ports.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169601 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS][WK2] Restore the visual scroll position instead of the dom scroll position when restoring states from the history
https://bugs.webkit.org/show_bug.cgi?id=133490

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-06-04
Reviewed by Tim Horton.


Source/WebCore: 
Expose the WebKit1 parameter "ScaleIsInitial". It is used for a similar concept in WebKit2 (userHasChangedPageScaleFactor).

Add "exposedContentPosition", which is the scroll position of the exposed rect.

* history/HistoryItem.h:
(WebCore::HistoryItem::exposedContentPosition):
(WebCore::HistoryItem::setExposedContentPosition):
(WebCore::HistoryItem::setScaleIsInitial):
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):

Source/WebKit2: 
Instead of restoring the scroll position, restore the visual position. This makes pages appear at the same position
on screen ignoring changes in the obscured top inset.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
(WebKit::WebFrameLoaderClient::saveViewStateToItem):
(WebKit::WebFrameLoaderClient::restoreViewState):
Save and restore userHasChangedPageScaleFactor to handle rescaling correctly.
Limit the scale into valid viewport limits in case the viewport meta tag has changed or the device has rotated.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::userHasChangedPageScaleFactor):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::restorePageState):
(WebKit::WebPage::updateVisibleContentRects):
In updateVisibleContentRects, we keep track or the current difference between the exposed rect and the unobscured rect.
When restoring the page position, we use the current top inset and the saved exposed rect to restore the visual
scroll position.

It is not very robust as it does not resolve races between the two processes, but that is not worse than what we is there now.


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