WebKit-https.git
4 years agoJSRopeString should use release asserts, not debug asserts, about substring bounds
fpizlo@apple.com [Tue, 28 Jun 2016 21:03:15 +0000 (21:03 +0000)]
JSRopeString should use release asserts, not debug asserts, about substring bounds
https://bugs.webkit.org/show_bug.cgi?id=159227

Reviewed by Saam Barati.

According to my experiments this change costs nothing.  That's not surprising since the
most common way to construct a rope these days is inlined into the JIT, which does its own
safety checks.  This makes us crash sooner rather than corrupting memory.

* runtime/JSString.h:

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

4 years agoMove the user gesture requirement to the ApplePaySession constructor
andersca@apple.com [Tue, 28 Jun 2016 21:02:52 +0000 (21:02 +0000)]
Move the user gesture requirement to the ApplePaySession constructor
https://bugs.webkit.org/show_bug.cgi?id=159225
rdar://problem/26507267

Reviewed by Tim Horton.

By doing this, clients can do pre-validation before showing the sheet, while we still maintain the user gesture requirement.

* Modules/applepay/ApplePaySession.cpp:
(WebCore::ApplePaySession::create):
(WebCore::ApplePaySession::begin): Deleted.

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

4 years agoIterable interfaces should have their related prototype @@iterator property writable
commit-queue@webkit.org [Tue, 28 Jun 2016 20:19:01 +0000 (20:19 +0000)]
Iterable interfaces should have their related prototype @@iterator property writable
https://bugs.webkit.org/show_bug.cgi?id=159211
Source/WebCore:

<rdar://problem/26950766>

Patch by Youenn Fablet <youenn@apple.com> on 2016-06-28
Reviewed by Chris Dumez.

Updating @@iterator property according  http://heycam.github.io/webidl/#es-iterator.

Covered by updated test.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Removing ReadOnly flag from @@iterator property of iterable interfaces.
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNodePrototype::finishCreation): Rebasing expectation.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjPrototype::finishCreation): Ditto.

LayoutTests:

Patch by Youenn Fablet <youenn@apple.com> on 2016-06-28
Reviewed by Chris Dumez.

* fast/dom/nodeListIterator-expected.txt:
* fast/dom/nodeListIterator.html: Overriding NodeList @@iterator by Array one and checking everything is fine.

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

4 years ago"Total amount is too big" error message is displaying on clicking Pay button
andersca@apple.com [Tue, 28 Jun 2016 19:50:01 +0000 (19:50 +0000)]
"Total amount is too big" error message is displaying on clicking Pay button
https://bugs.webkit.org/show_bug.cgi?id=159219
rdar://problem/26722110

Reviewed by Tim Horton.

Match the PassKit max amount.

* Modules/applepay/PaymentRequestValidator.cpp:
(WebCore::PaymentRequestValidator::validateTotal):

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

4 years agoPaymentMerchantSession should wrap a PKPaymentMerchantSession
andersca@apple.com [Tue, 28 Jun 2016 19:31:10 +0000 (19:31 +0000)]
PaymentMerchantSession should wrap a PKPaymentMerchantSession
https://bugs.webkit.org/show_bug.cgi?id=159218
rdar://problem/26872118

Reviewed by Tim Horton.

Source/WebCore:

* Modules/applepay/ApplePaySession.cpp:
(WebCore::ApplePaySession::completeMerchantValidation):
Use PaymentMerchantSession::fromJS.

(WebCore::createMerchantSession): Deleted.

* Modules/applepay/PaymentCoordinator.h:
PaymentMerchantSession is now a class.

* Modules/applepay/PaymentCoordinatorClient.h:
PaymentMerchantSession is now a class.

* Modules/applepay/PaymentMerchantSession.h:
(WebCore::PaymentMerchantSession::PaymentMerchantSession):
(WebCore::PaymentMerchantSession::~PaymentMerchantSession):
(WebCore::PaymentMerchantSession::pkPaymentMerchantSession):
Store a PKPaymentMerchantSession in a RetainPtr inside the PaymentMerchantSession object.

* Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm:
(WebCore::PaymentMerchantSession::fromJS):
Convert the JS object to a PKPaymentMerchantSession and return a PaymentMerchantSession that wraps it.

* WebCore.xcodeproj/project.pbxproj:
Add new files.

* bindings/js/Dictionary.h:
(WebCore::Dictionary::initializerObject):
Add new getter.

Source/WebKit2:

* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::encode):
(IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::decode):
Use NSCoder.

* UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
PaymentMerchantSession is now a class.

* UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:
PaymentMerchantSession is now a class.

* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::WebPaymentCoordinatorProxy::platformCompleteMerchantValidation):
Just get the underlying PKPaymentMerchantSession from the PaymentMerchantSession object.
(WebKit::toPKPaymentMerchantSession): Deleted.

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

4 years agoRunLoop::Timer should use constructor templates instead of class templates
bburg@apple.com [Tue, 28 Jun 2016 19:10:31 +0000 (19:10 +0000)]
RunLoop::Timer should use constructor templates instead of class templates
https://bugs.webkit.org/show_bug.cgi?id=159153

Reviewed by Alex Christensen.

Source/JavaScriptCore:

Remove the RunLoop::Timer class template argument, and pass its constructor
a reference to `this` instead of a pointer to `this`.

* inspector/agents/InspectorHeapAgent.cpp:
(Inspector::SendGarbageCollectionEventsTask::SendGarbageCollectionEventsTask):

Source/WebCore:

Remove the RunLoop::Timer class template argument, and pass its constructor
a reference to `this` instead of a pointer to `this`.

* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::WebMediaSessionManager):
* Modules/mediasession/WebMediaSessionManager.h:
* page/WheelEventTestTrigger.cpp:
(WebCore::WheelEventTestTrigger::WheelEventTestTrigger):
* page/WheelEventTestTrigger.h:
* page/mac/TextIndicatorWindow.h:
* page/mac/TextIndicatorWindow.mm:
(WebCore::TextIndicatorWindow::TextIndicatorWindow):
* platform/MainThreadSharedTimer.h:
* platform/cocoa/ScrollController.h:
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::ScrollController):
* platform/glib/MainThreadSharedTimerGLib.cpp:
(WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
* platform/graphics/MediaPlaybackTargetPicker.cpp:
(WebCore::MediaPlaybackTargetPicker::MediaPlaybackTargetPicker):
* platform/graphics/MediaPlaybackTargetPicker.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(VideoRenderRequestScheduler::VideoRenderRequestScheduler):
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
(WebCore::TextureMapperPlatformLayerProxy::TextureMapperPlatformLayerProxy):
(WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread):
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
* platform/mock/MediaPlaybackTargetPickerMock.cpp:
(WebCore::MediaPlaybackTargetPickerMock::MediaPlaybackTargetPickerMock):
* platform/mock/MediaPlaybackTargetPickerMock.h:
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):
* platform/mock/MockRealtimeVideoSource.h:
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):

Source/WebKit2:

Remove the RunLoop::Timer class template argument, and pass its constructor
a reference to `this` instead of a pointer to `this`.

* NetworkProcess/Downloads/soup/DownloadSoup.cpp:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::PluginControllerProxy):
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::PluginProcess):
* PluginProcess/PluginProcess.h:
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::ChildProcess):
* Shared/ChildProcess.h:
* Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
* UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:
(API::SharedJSContext::SharedJSContext):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
* UIProcess/DrawingAreaProxy.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/Plugins/gtk/PluginInfoCache.cpp:
(WebKit::PluginInfoCache::PluginInfoCache):
* UIProcess/Plugins/gtk/PluginInfoCache.h:
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::ProcessThrottler):
* UIProcess/ProcessThrottler.h:
* UIProcess/ResponsivenessTimer.cpp:
(WebKit::ResponsivenessTimer::ResponsivenessTimer):
* UIProcess/ResponsivenessTimer.h:
* UIProcess/ViewGestureController.cpp:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::SnapshotRemovalTracker::SnapshotRemovalTracker):
* UIProcess/VisitedLinkStore.cpp:
(WebKit::VisitedLinkStore::VisitedLinkStore):
* UIProcess/VisitedLinkStore.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::WebInspectorProxy):
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::m_hiddenPageThrottlingTimer):
* UIProcess/WebProcessPool.h:
* UIProcess/gtk/GestureController.cpp:
(WebKit::GestureController::DragGesture::DragGesture):
(WebKit::GestureController::ZoomGesture::ZoomGesture):
* UIProcess/gtk/GestureController.h:
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
* UIProcess/gtk/WebPopupMenuProxyGtk.h:
* UIProcess/mac/ViewGestureController.h:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::WebLoaderStrategy):
* WebProcess/Network/WebLoaderStrategy.h:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin):
(WebKit::NetscapePlugin::Timer::Timer):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
(WebKit::NetscapePluginStream::NetscapePluginStream):
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::PluginView):
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost):
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::RenderFrameScheduler::RenderFrameScheduler):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):

Source/WTF:

Refactor RunLoop::Timer to align with WebCore::Timer. Use a constructor
template instead of a class template. Store a bound std::function rather than
a templated member and function. Add a constructor that takes a std::function.

* wtf/RunLoop.h:
(WTF::RunLoop::Timer::Timer):
(WTF::RunLoop::Timer::fired):

Tools:

Remove the RunLoop::Timer class template argument, and pass its constructor
a reference to `this` instead of a pointer to `this`.

* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::TestRunner):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* TestWebKitAPI/Tests/WTF/RunLoop.cpp:
(TestWebKitAPI::TEST):

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

4 years agoCross-domain video loads do not prompt for authorization.
jer.noble@apple.com [Tue, 28 Jun 2016 18:25:27 +0000 (18:25 +0000)]
Cross-domain video loads do not prompt for authorization.
https://bugs.webkit.org/show_bug.cgi?id=159195
<rdar://problem/26234612>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/media/video-auth.html (modified)

We should prompt for authorization when a cross-origin <video> is embedded
in a web page.

* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::requestResource):

LayoutTests:

Add a cross-origin authorization sub-test.

* http/tests/media/video-auth.html:
* http/tests/media/video-auth-expected.txt:

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

4 years agoREGRESSION(r201471): FormClient.textFieldDidEndEditing is no longer called when a...
rniwa@webkit.org [Tue, 28 Jun 2016 18:20:42 +0000 (18:20 +0000)]
REGRESSION(r201471): FormClient.textFieldDidEndEditing is no longer called when a text field is removed
https://bugs.webkit.org/show_bug.cgi?id=159199
Source/WebCore:

<rdar://problem/26748189>

Reviewed by Alexey Proskuryakov.

The bug was caused by HTMLInputElement's endEditing no longer getting called due to the behavior change.
Preserve the WebKit2 API semantics by manually calling HTMLInputElement::endEditing in setFocusedElement.

Tests: WebKit2TextFieldDidBeginAndEndEditing

* dom/Document.cpp:
(WebCore::Document::setFocusedElement):

Tools:

Reviewed by Alexey Proskuryakov.

Added a test case for removing a text field. Also fixed the flakiness and re-enabled it on Mac.

* TestWebKitAPI/Tests/WebKit2/TextFieldDidBeginAndEndEditing.cpp:
* TestWebKitAPI/Tests/WebKit2/TextFieldDidBeginAndEndEditing_Bundle.cpp:
* TestWebKitAPI/Tests/WebKit2/input-focus-blur.html: Focus a div upfront to avoid the flakiness from
an input element getting automatically focused on Mac.

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

4 years agoFixed Open Graph meta data and image entries.
jond@apple.com [Tue, 28 Jun 2016 18:12:23 +0000 (18:12 +0000)]
Fixed Open Graph meta data and image entries.
https://bugs.webkit.org/show_bug.cgi?id=159167.

Reviewed by Timothy Hatcher.

This patch addresses Open Graph meta data issues:

- Added a high-resolution PNG of the WebKit logo because Facebook doesn't support SVG images
- Uses the first image of a page or post if not featured image is set
- Article date/time information should not be given for the homepage
- Added Facebook admins as per the Facebook Open Graph debugger

* wp-content/plugins/social-meta.php:
* wp-content/themes/webkit/images/ogimage.png: Added.

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

4 years ago[WK2] Add some logging related to NetworkProcess suspension
cdumez@apple.com [Tue, 28 Jun 2016 18:08:59 +0000 (18:08 +0000)]
[WK2] Add some logging related to NetworkProcess suspension
https://bugs.webkit.org/show_bug.cgi?id=159178

Reviewed by Andreas Kling.

Add some logging related to NetworkProcess suspension to help debug
suspension issues.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::prepareToSuspend):
(WebKit::NetworkProcess::cancelPrepareToSuspend):
(WebKit::NetworkProcess::processDidResume):

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

4 years agoAdd some more UIProcess-side logging related to process assertions
cdumez@apple.com [Tue, 28 Jun 2016 18:08:39 +0000 (18:08 +0000)]
Add some more UIProcess-side logging related to process assertions
https://bugs.webkit.org/show_bug.cgi?id=159188

Reviewed by Andreas Kling.

Add some more UIProcess-side logging related to process assertions
to help debug process suspension issues.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::fetchWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::updateAssertionNow):
(WebKit::ProcessThrottler::updateAssertion):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateActivityToken):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::fetchWebsiteData):
(WebKit::WebProcessProxy::deleteWebsiteData):
(WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
(WebKit::WebProcessProxy::didSetAssertionState):

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

4 years ago[WK2] Do not suppress navigation snapshotting on session restore if we are not naviga...
cdumez@apple.com [Tue, 28 Jun 2016 18:07:05 +0000 (18:07 +0000)]
[WK2] Do not suppress navigation snapshotting on session restore if we are not navigating right away
https://bugs.webkit.org/show_bug.cgi?id=159216
<rdar://problem/27058360>

Reviewed by Andreas Kling.

Do not suppress navigation snapshotting on session restore if we are not navigating
right away. The snapshot we already have may be outdated by the time we actually
navigate (e.g. Because the user scrolled) so we don't want to suppress snapshotting
in this case.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreFromSessionState):

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

4 years agoMarking fast/multicol/fixed-stack.html as failing on ios-simulator
ryanhaddad@apple.com [Tue, 28 Jun 2016 17:23:43 +0000 (17:23 +0000)]
Marking fast/multicol/fixed-stack.html as failing on ios-simulator

Unreviewed test gardening.

* platform/ios-simulator-wk1/TestExpectations:
* platform/ios-simulator/TestExpectations:

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

4 years agoPhrasing content should be accepted in <mo> elements
fred.wang@free.fr [Tue, 28 Jun 2016 17:01:29 +0000 (17:01 +0000)]
Phrasing content should be accepted in <mo> elements
https://bugs.webkit.org/show_bug.cgi?id=130245

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-28
Reviewed by Brent Fulgham.

Source/WebCore:

After r202420, the RenderMathMLOperator element no longer messes with anonymous block and
text nodes. Hence it is now safe to allow foreign content inside <mo>.

We extend foreign-element-in-token.html to cover the mo case.

* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::childShouldCreateRenderer): Remove the early return for <mo> so
that it accepts phrasing content children.

LayoutTests:

* mathml/presentation/foreign-element-in-token.html: Copy test cases to
check <mo> elements too.
* mathml/presentation/foreign-element-in-token-expected.txt: Add the
expectations for <mo>.

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

4 years agoSierra test expectation gardening.
ap@apple.com [Tue, 28 Jun 2016 16:53:27 +0000 (16:53 +0000)]
Sierra test expectation gardening.

* platform/mac-elcapitan/fast/canvas: Added.
* platform/mac-elcapitan/fast/canvas/canvas-strokePath-gradient-shadow-expected.txt: Copied from platform/mac/fast/canvas/canvas-strokePath-gradient-shadow-expected.txt.
* platform/mac-elcapitan/fast/canvas/canvas-strokeRect-gradient-shadow-expected.txt: Copied from platform/mac/fast/canvas/canvas-strokeRect-gradient-shadow-expected.txt.
* platform/mac/fast/canvas/canvas-strokePath-gradient-shadow-expected.txt: Removed.
* platform/mac/fast/canvas/canvas-strokeRect-gradient-shadow-expected.txt: Removed.
Sierra matches cross-platform expectations.

* platform/mac/TestExpectations: Removed expectations for fast/canvas/canvas-strokeRect-alpha-shadow.html

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

4 years agoWebKit::WebPaymentCoordinator leak
andersca@apple.com [Tue, 28 Jun 2016 16:45:12 +0000 (16:45 +0000)]
WebKit::WebPaymentCoordinator leak
https://bugs.webkit.org/show_bug.cgi?id=159168
rdar://problem/26929772

Reviewed by Beth Dakin.

Source/WebCore:

* Modules/applepay/PaymentCoordinator.cpp:
(WebCore::PaymentCoordinator::~PaymentCoordinator):
Call paymentCoordinatorDestroyed().

* Modules/applepay/PaymentCoordinatorClient.h:
Rename mainFrameDestroyed to paymentCoordinatorDestroyed().

* loader/EmptyClients.cpp:

Source/WebKit/mac:

Update for WebCore changes.

* WebCoreSupport/WebPaymentCoordinatorClient.h:
* WebCoreSupport/WebPaymentCoordinatorClient.mm:
(WebPaymentCoordinatorClient::paymentCoordinatorDestroyed):
(WebPaymentCoordinatorClient::mainFrameDestroyed): Deleted.

Source/WebKit2:

Update for WebCore changes.

* WebProcess/ApplePay/WebPaymentCoordinator.cpp:
(WebKit::WebPaymentCoordinator::paymentCoordinatorDestroyed):
(WebKit::WebPaymentCoordinator::mainFrameDestroyed): Deleted.
* WebProcess/ApplePay/WebPaymentCoordinator.h:

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

4 years agoRemove anonymous in renderName for all MathML renderers but RenderMathMLOperator
fred.wang@free.fr [Tue, 28 Jun 2016 15:36:13 +0000 (15:36 +0000)]
Remove anonymous in renderName for all MathML renderers but RenderMathMLOperator
https://bugs.webkit.org/show_bug.cgi?id=159114

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-28
Reviewed by Martin Robinson.

After r202420, the only anonymous MathML renderers are the RenderMathMLOperators created by
the mfenced element. Hence we remove the special case for anonymous in the renderName
implementation of most MathML renderers.

No new tests, behavior unchanged.

* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLSpace.h:
* rendering/mathml/RenderMathMLToken.h:

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

4 years agoWeb Inspector: selectElement.options shows unexpected entries in console (named index...
commit-queue@webkit.org [Tue, 28 Jun 2016 15:33:49 +0000 (15:33 +0000)]
Web Inspector: selectElement.options shows unexpected entries in console (named indexes beyond collection length)
https://bugs.webkit.org/show_bug.cgi?id=159192

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-06-28
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
(InjectedScript.prototype.arrayIndexPropertyNames):
Start with an empty array because we just push valid indexes.

(InjectedScript.prototype._propertyDescriptors):
Avoid the >100 length requirement, and always treat the
array-like objects the same. The frontend currently
doesn't show named indexes for arrays anyways, so they
would have been unused.

LayoutTests:

* inspector/model/remote-object-get-properties-expected.txt:
* inspector/model/remote-object-get-properties.html:
* inspector/runtime/getProperties-expected.txt:

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

4 years ago[Win] Skip failing INTL test.
pvollan@apple.com [Tue, 28 Jun 2016 15:32:39 +0000 (15:32 +0000)]
[Win] Skip failing INTL test.
https://bugs.webkit.org/show_bug.cgi?id=159141

Reviewed by Brent Fulgham.

INTL is not enabled on Windows.

* tests/stress/intl-constructors-with-proxy.js:
(shouldBe):

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

4 years agoWeb Inspector: QuickConsole should update its selection when RuntimeManager.defaultEx...
bburg@apple.com [Tue, 28 Jun 2016 15:12:10 +0000 (15:12 +0000)]
Web Inspector: QuickConsole should update its selection when RuntimeManager.defaultExecutionContextIdentifier changes
https://bugs.webkit.org/show_bug.cgi?id=159183

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

Currently, the UI listens for state changes in the Frame tree to decide when to reset
the selected execution context back to its default value. This is no good, because this
should happen even if we have no UI (i.e., testing models only). The UI should simply
display changes to the model rather than driving them based on other model changes.

Move the logic to reset the execution context into RuntimeManager. When the selected
context changes, an event is fired which causes the QuickConsole to rebuild its path components.

* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager):
(WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier):
Fire an event when the execution context actually changes.

(WebInspector.RuntimeManager.prototype._frameExecutionContextsCleared):
Added. If the selected context was cleared, reset back to default.

* UserInterface/Models/Frame.js:
(WebInspector.Frame.prototype.clearExecutionContexts):
Include the contexts that were cleared so clients can match against them.

* UserInterface/Views/QuickConsole.js:
(WebInspector.QuickConsole):
Use the proper constant name. Both the old and new names evaluated to `undefined`.
No need to keep track of the selected path component, it will always match the
defaultExecutionContextIdentifier in RuntimeManager.

(WebInspector.QuickConsole.prototype.get selectedExecutionContextIdentifier):
(WebInspector.QuickConsole.prototype.set selectedExecutionContextIdentifier):
Forward to RuntimeManager. This name is less awkward for the UI code that manages selections.

(WebInspector.QuickConsole.prototype._executionContextPathComponentsToDisplay):
Special-case for the main frame execution context.

(WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
Remove indirection.

(WebInspector.QuickConsole.prototype._frameExecutionContextsCleared):
Fix the guard to handle undefined execution contexts in the case where it represents the main frame (undefined).

(WebInspector.QuickConsole.prototype._defaultExecutionContextChanged):
Rebuild when the model changes.

(WebInspector.QuickConsole.prototype._pathComponentSelected): Simplify.
(WebInspector.QuickConsole.prototype.get executionContextIdentifier):
(WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
Move the fallback selection behavior into RuntimeManager.

(WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame): Deleted.
This has been dead code ever since we removed iOS 6 legacy support.

LayoutTests:

Add a new test case for reverting to the top-level execution context when the selected context is destroyed.

* inspector/runtime/change-execution-context-identifier-expected.txt:
* inspector/runtime/change-execution-context-identifier.html:

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

4 years agoWebRTC: Robustify 'this' type check in RTCPeerConnection JS built-ins
adam.bergkvist@ericsson.com [Tue, 28 Jun 2016 15:10:50 +0000 (15:10 +0000)]
WebRTC: Robustify 'this' type check in RTCPeerConnection JS built-ins
https://bugs.webkit.org/show_bug.cgi?id=158831

Reviewed by Youenn Fablet.

Source/WebCore:

Use @operations slot in RTCPeerConnection type check.

Updated results of existing test.

* Modules/mediastream/RTCPeerConnection.js:
(initializeRTCPeerConnection):
Initialize @operations slot in constructor.
* Modules/mediastream/RTCPeerConnectionInternals.js:
(isRTCPeerConnection):
Use @operations slot in type check.

LayoutTests:

* fast/mediastream/RTCPeerConnection-js-built-ins-check-this-expected.txt:
Flip some result lines from FAIL to PASS. Clean out unnecessary tests (third set).

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

4 years agoRemove flakiness expectations for mathml/wbr-in-mroot-crash.html
fred.wang@free.fr [Tue, 28 Jun 2016 15:05:47 +0000 (15:05 +0000)]
Remove flakiness expectations for mathml/wbr-in-mroot-crash.html
https://bugs.webkit.org/show_bug.cgi?id=130353

Unreviewed gardening.

The flakiness seemed to be due to the timeout of mathml/very-large-stretchy-operators.html.
The latter was fixed in r202489, so we update the test expectations.

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-28

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator-wk2/TestExpectations:

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

4 years agoIncrease opacity of stretched operators in mo-stacked-glyphs.html
fred.wang@free.fr [Tue, 28 Jun 2016 14:43:39 +0000 (14:43 +0000)]
Increase opacity of stretched operators in mo-stacked-glyphs.html
https://bugs.webkit.org/show_bug.cgi?id=159201

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-28
Reviewed by Martin Robinson.

The reftest mo-stacked-glyphs.html fails with small pixel differences invisible at the naked
eyes. We increase opacity of stretched operators in that test to reduce these differences and
make the test pass.

* mathml/presentation/mo-stacked-glyphs-expected.html: Increase opacity of stretched operators.
* mathml/presentation/mo-stacked-glyphs.html: Ditto.
* platform/gtk/TestExpectations: Remove failure expectation.

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

4 years agoAX: Remove dead code in AccessibilityRenderObject::textUnderElement
fred.wang@free.fr [Tue, 28 Jun 2016 14:16:36 +0000 (14:16 +0000)]
AX: Remove dead code in AccessibilityRenderObject::textUnderElement
https://bugs.webkit.org/show_bug.cgi?id=159205

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-28
Reviewed by Joanmarie Diggs.

RenderMathMLOperator used to destroy its descendants and to replace them with an anonymous
text node wrapped inside anonymous blocks. After r202420, it just behaves as any other token
elements. Hence we remove the code in AccessibilityRenderObject::textUnderElement that was
used to handle this specific render tree structure.

No new tests, already covered by accessibility/math-text.html.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement): Remove dead code for RenderText and RenderMathMLOperator.

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

4 years ago[GTK] Update expectations for subtle crypto layout tests
mcatanzaro@igalia.com [Tue, 28 Jun 2016 14:10:03 +0000 (14:10 +0000)]
[GTK] Update expectations for subtle crypto layout tests

Unreviewed.

* platform/gtk/TestExpectations:

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

4 years agoTHUMB2 support not correctly detected on Fedora with GCC 6.1.
commit-queue@webkit.org [Tue, 28 Jun 2016 13:25:18 +0000 (13:25 +0000)]
THUMB2 support not correctly detected on Fedora with GCC 6.1.
https://bugs.webkit.org/show_bug.cgi?id=159083

Patch by Tomas Popela <tpopela@redhat.com> on 2016-06-28
Reviewed by Carlos Garcia Campos.

On Fedora 24 with GCC 6.1. the __thumb2__ and __thumb__ are not
defined so the detection of THUMB2 support will fail. Look also
whether the __ARM_ARCH_ISA_THUMB is defined to fix the THUMB2
detection.

* wtf/Platform.h:

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

4 years ago[Win] Custom elements tests are failing.
pvollan@apple.com [Tue, 28 Jun 2016 11:49:21 +0000 (11:49 +0000)]
[Win] Custom elements tests are failing.
https://bugs.webkit.org/show_bug.cgi?id=159139

Reviewed by Alex Christensen.

.:

Enable custom element API on Windows.

* Source/cmake/OptionsWin.cmake:

Source/WebCore:

Fix compile errors after enabling custom element API.

* bindings/js/JSHTMLElementCustom.cpp:
(WebCore::constructJSHTMLElement):
* dom/CustomElementDefinitions.cpp:
(WebCore::CustomElementDefinitions::addElementDefinition):
* dom/Document.cpp:
(WebCore::createHTMLElementWithNameValidation):
(WebCore::createFallbackHTMLElement):
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
* dom/LifecycleCallbackQueue.cpp:
(WebCore::LifecycleQueueItem::LifecycleQueueItem):
(WebCore::LifecycleCallbackQueue::enqueueElementUpgrade):
(WebCore::LifecycleCallbackQueue::enqueueAttributeChangedCallback):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertHTMLElementOrFindCustomElementInterface):
(WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::CustomElementConstructionData::CustomElementConstructionData):
(WebCore::HTMLTreeBuilder::insertGenericHTMLElement):
* html/parser/HTMLTreeBuilder.h:

Source/WebKit/win:

Add preference for enabling custom element API.

* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::customElementsEnabled):
(WebPreferences::setCustomElementsEnabled):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Tools:

Enable custom element API when running tests.

* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):

LayoutTests:

Update test expectations for passing custom elements tests.

* platform/win/TestExpectations:

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

4 years ago[GStreamer] usec rounding is wrong during accurate seeking
philn@webkit.org [Tue, 28 Jun 2016 11:26:07 +0000 (11:26 +0000)]
[GStreamer] usec rounding is wrong during accurate seeking
https://bugs.webkit.org/show_bug.cgi?id=90734

Reviewed by Carlos Garcia Campos.

Use floor() to round the microseconds value, this is more robust
than roundf.

* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::toGstClockTime):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition):

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

4 years ago[GTK] Web audio tests failing since GStreamer 1.6 upgrade
philn@webkit.org [Tue, 28 Jun 2016 11:24:15 +0000 (11:24 +0000)]
[GTK] Web audio tests failing since GStreamer 1.6 upgrade
https://bugs.webkit.org/show_bug.cgi?id=158927

Unreviewed GTK rebaseline of webaudio tests.

* platform/gtk/TestExpectations:
* platform/gtk/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav:
* platform/gtk/webaudio/codec-tests/vorbis/vbr-128kbps-44khz-expected.wav:
* platform/gtk/webaudio/codec-tests/vorbis/vbr-70kbps-44khz-expected.wav:
* platform/gtk/webaudio/codec-tests/vorbis/vbr-96kbps-44khz-expected.wav:

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

4 years ago[GStreamer] improved duration query support in the HTTP source element
philn@webkit.org [Tue, 28 Jun 2016 10:20:59 +0000 (10:20 +0000)]
[GStreamer] improved duration query support in the HTTP source element
https://bugs.webkit.org/show_bug.cgi?id=159204

Reviewed by Carlos Garcia Campos.

When we have the Content-Length value it is possible to infer the TIME
duration in most cases by performing a convert query in the downstream
elements. This is especially useful when the duration query wasn't
managed by the sinks and thus reached the source element.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcQueryWithParent):

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

4 years ago[JSC] Fix build break since r202502 - 2
jh718.park@samsung.com [Tue, 28 Jun 2016 10:15:58 +0000 (10:15 +0000)]
[JSC] Fix build break since r202502 - 2
https://bugs.webkit.org/show_bug.cgi?id=159194

Reviewed by Gyuyoung Kim.

Fix about the error message below.
error: control reaches end of non-void function [-Werror=return-type]

* b3/B3TypeMap.h: add #pragma GCC diagnostic ignored "-Wreturn-type".

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

4 years agohttp/tests/media/hls/video-controller-getStartDate.html is failing on non-PDT time...
commit-queue@webkit.org [Tue, 28 Jun 2016 07:17:26 +0000 (07:17 +0000)]
http/tests/media/hls/video-controller-getStartDate.html is failing on non-PDT time-based computers
https://bugs.webkit.org/show_bug.cgi?id=159134

Patch by Youenn Fablet <youenn@apple.com> on 2016-06-28
Reviewed by Alex Christensen.

* http/tests/media/hls/video-controller-getStartDate-expected.txt: Converting date to UTC string before making the comparison.
* http/tests/media/hls/video-controller-getStartDate.html: Rebasing.

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

4 years ago[JSC] Fix build break since r202502
jh718.park@samsung.com [Tue, 28 Jun 2016 07:10:01 +0000 (07:10 +0000)]
[JSC] Fix build break since r202502
https://bugs.webkit.org/show_bug.cgi?id=159194

Reviewed by Alex Christensen.

Fix about the error message below.
error: control reaches end of non-void function [-Werror=return-type]

* b3/B3TypeMap.h:
(JSC::B3::TypeMap::at): add missing ASSERT_NOT_REACHED().

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

4 years agoUnreviewed EFL Gardening on 28th Jun.
hs85.jeong@samsung.com [Tue, 28 Jun 2016 07:09:19 +0000 (07:09 +0000)]
Unreviewed EFL Gardening on 28th Jun.

* platform/efl/accessibility/aria-hidden-negates-no-visibility-expected.txt: Added.
* platform/efl/accessibility/aria-labelledby-overrides-aria-label-expected.txt: Added.
* platform/efl/accessibility/aria-labelledby-overrides-label-expected.txt: Added.
* platform/efl/accessibility/aria-option-role-expected.txt: Added.
* platform/efl/accessibility/aria-role-on-label-expected.txt: Added.
* platform/efl/accessibility/aria-switch-text-expected.txt:
* platform/efl/accessibility/auto-fill-crash-expected.txt: Added.
* platform/efl/accessibility/empty-image-with-title-expected.txt: Added.
* platform/efl/accessibility/form-control-value-settable-expected.txt: Added.
* platform/efl/accessibility/image-link-expected.txt:
* platform/efl/accessibility/image-map1-expected.txt:
* platform/efl/accessibility/image-map2-expected.txt:
* platform/efl/accessibility/image-with-alt-and-map-expected.txt:
* platform/efl/accessibility/img-fallsback-to-title-expected.txt:
* platform/efl/accessibility/math-fenced-expected.txt: Added.
* platform/efl/accessibility/math-foreign-content-expected.txt: Added.
* platform/efl/accessibility/math-multiscript-attributes-expected.txt:
* platform/efl/accessibility/math-text-expected.txt:
* platform/efl/accessibility/media-element-expected.txt:
* platform/efl/accessibility/meter-element-expected.txt:
* platform/efl/accessibility/radio-button-title-label-expected.txt:
* platform/efl/accessibility/table-detection-expected.txt:

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

4 years agoBinding generator should generate accessors for constructors safely accessed from...
commit-queue@webkit.org [Tue, 28 Jun 2016 07:04:55 +0000 (07:04 +0000)]
Binding generator should generate accessors for constructors safely accessed from JS builtin
https://bugs.webkit.org/show_bug.cgi?id=159087

Patch by Youenn Fablet <youenn@apple.com> on 2016-06-28
Reviewed by Alex Christensen.

Removed constructor private slots direct additions in JSDOMGlobalObject.
Added support for generating the code that will do that.
Advantage of the implementation:
- Private slots will expose constructors that are also publically visible (previously workers had some private slots filled with WebRTC constructors).
- Private slots no longer require the creation of the constructors at window creation time.

Although PublicIdentifier and PrivateIdentifier are both added where needed, the binding generator does not
support the case of a constructor accessible only privately.

Covered by existing test set and adding binding test.

* Modules/mediastream/MediaStream.idl: Marked as PublicIdentifier/PrivateIdentifier.
* Modules/mediastream/MediaStreamTrack.idl: Ditto.
* Modules/mediastream/RTCIceCandidate.idl: Ditto.
* Modules/mediastream/RTCSessionDescription.idl: Ditto.
* Modules/streams/ReadableStream.idl: Ditto.
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::addBuiltinGlobals): Removed unneeded additions.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Added support for private slots for interface constructors marked as
PrivateIdentifier.
* bindings/scripts/preprocess-idls.pl:
(GenerateConstructorAttribute): Make PublicIdentifier/PrivateIdentifier copied interface attributes.
* bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.cpp:
(webkit_dom_test_global_object_set_property):
(webkit_dom_test_global_object_get_property):
(webkit_dom_test_global_object_class_init):
(webkit_dom_test_global_object_get_public_and_private_attribute):
(webkit_dom_test_global_object_set_public_and_private_attribute):
* bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.h:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
(WebCore::JSTestGlobalObject::finishCreation):
(WebCore::jsTestGlobalObjectPublicAndPrivateAttribute):
(WebCore::setJSTestGlobalObjectPublicAndPrivateAttribute):
* bindings/scripts/test/ObjC/DOMTestGlobalObject.h:
* bindings/scripts/test/ObjC/DOMTestGlobalObject.mm:
(-[DOMTestGlobalObject publicAndPrivateAttribute]):
(-[DOMTestGlobalObject setPublicAndPrivateAttribute:]):
* bindings/scripts/test/TestGlobalObject.idl:

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

4 years agoREGRESSION?(r202466): http/tests/security/canvas-remote-read-remote-video-redirect...
jer.noble@apple.com [Tue, 28 Jun 2016 06:44:01 +0000 (06:44 +0000)]
REGRESSION?(r202466): http/tests/security/canvas-remote-read-remote-video-redirect.html failing on Sierra
https://bugs.webkit.org/show_bug.cgi?id=159172
<rdar://problem/27030025>

Reviewed by Brent Fulgham.

Add a hasSingleSecurityOrigin property to WebCoreNSURLSession that gets updated each time one of that
sessions' tasks receieves a response or a redirect request. Check that property from the MediaPlayerPrivate.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin):
* platform/network/cocoa/WebCoreNSURLSession.h:
* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSession updateHasSingleSecurityOrigin:]):
(-[WebCoreNSURLSession dataTaskWithRequest:]):
(-[WebCoreNSURLSession dataTaskWithURL:]):
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:]):
(-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:]):

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

4 years agoCMake build fix.
achristensen@apple.com [Tue, 28 Jun 2016 06:38:32 +0000 (06:38 +0000)]
CMake build fix.

* PlatformMac.cmake:

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

4 years agoUnreviewed, rebaseline test on iOS after r202539.
cdumez@apple.com [Tue, 28 Jun 2016 06:22:46 +0000 (06:22 +0000)]
Unreviewed, rebaseline test on iOS after r202539.

* platform/ios-simulator/fast/dom/event-handler-attributes-expected.txt:

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

4 years agoTest commit. Please ignore.
lforschler@apple.com [Tue, 28 Jun 2016 06:11:21 +0000 (06:11 +0000)]
Test commit. Please ignore.

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

4 years agoRemove didFailAccessControlCheck ThreadableLoaderClient callback
commit-queue@webkit.org [Tue, 28 Jun 2016 06:09:05 +0000 (06:09 +0000)]
Remove didFailAccessControlCheck ThreadableLoaderClient callback
https://bugs.webkit.org/show_bug.cgi?id=159149

Patch by Youenn Fablet <youenn@apple.com> on 2016-06-27
Reviewed by Daniel Bates.

LayoutTests/imported/w3c:

* web-platform-tests/XMLHttpRequest/send-authentication-cors-setrequestheader-no-cred-expected.txt:

Source/WebCore:

Adding an AccessControl ResourceError type.
Replacing didFailAccessControlCheck callback by a direct call to didFail with an error of type AccessControl.

Making CrossOriginPreflightChecker always return an AccessControl error. Previously some errors created below
were passed directly to threadable loader clients.

When doing preflight on unauthorized web sites, WTR/DRT will trigger a cancellation error which was translating into an abort event in XMLHttpRequest.
This patch is changing the error type to AccessControl, which translates into an error event in XMLHttpReauest.

This change of behavior is seen in imported/w3c/web-platform-tests/XMLHttpRequest/send-authentication-cors-setrequestheader-no-cred.htm.
No other observable change of behavior should be expected.

* inspector/InspectorNetworkAgent.cpp: Computing error message in didFail according the error type.
* loader/CrossOriginPreflightChecker.cpp:
(WebCore::CrossOriginPreflightChecker::validatePreflightResponse): Setting preflightFailure error type to AccessControl.
(WebCore::CrossOriginPreflightChecker::notifyFinished): Ditto.
(WebCore::CrossOriginPreflightChecker::doPreflight): Ditto.
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest): Replacing didFailAccessControlCheck
callback by a direct call to didFail with an error of type AccessControl.
(WebCore::reportContentSecurityPolicyError): Ditto.
(WebCore::reportCrossOriginResourceSharingError): Ditto.
(WebCore::DocumentThreadableLoader::didReceiveResponse): Ditto.
(WebCore::DocumentThreadableLoader::preflightFailure): Calling didFail directly.
* loader/ThreadableLoaderClient.h: Removing didFailAccessControlCheck.
* loader/ThreadableLoaderClientWrapper.h: Ditto.
* loader/WorkerThreadableLoader.cpp: Ditto.
* loader/WorkerThreadableLoader.h: Ditto.
* page/EventSource.cpp:
(WebCore::EventSource::didFail): Removing didFailAccessControlCheck and putting handling code in didFail.
* page/EventSource.h:
* platform/network/ResourceErrorBase.cpp:
(WebCore::ResourceErrorBase::setType): Softening the assertion to cover the case of migration to AccessControl.
* platform/network/ResourceErrorBase.h: Adding AccessControl error type.
(WebCore::ResourceErrorBase::isAccessControl):

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

4 years agoMark some tests as image failures.
simon.fraser@apple.com [Tue, 28 Jun 2016 06:07:58 +0000 (06:07 +0000)]
Mark some tests as image failures.

These tests started to fail with the render server snapshotting enabled in r202532.

* platform/ios-simulator-wk2/TestExpectations:

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

4 years agoFix TestWebKitAPI crash introduced in r202532.
simon.fraser@apple.com [Tue, 28 Jun 2016 05:56:04 +0000 (05:56 +0000)]
Fix TestWebKitAPI crash introduced in r202532.

WebPageProxy::forceRepaint() could trigger a call to the didForceRepaintCallback()
after the WebPageProxy had been invalidated, causing a null de-ref of m_drawingArea.
Fix by checking for error and isValid().

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::forceRepaint):

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

4 years agoHTMLElement / SVGElement should implement GlobalEventHandlers, not Element
cdumez@apple.com [Tue, 28 Jun 2016 05:10:30 +0000 (05:10 +0000)]
HTMLElement / SVGElement should implement GlobalEventHandlers, not Element
https://bugs.webkit.org/show_bug.cgi?id=159191
<rdar://problem/27019299>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline test now that more checks are passing.

* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

HTMLElement / SVGElement should implement GlobalEventHandlers, not Element:
- https://html.spec.whatwg.org/multipage/dom.html#htmlelement
- https://www.w3.org/TR/SVG2/types.html#InterfaceSVGElement

Firefox and Chrome behave as per the specification.

Fixing this also fixes rendering on http://survey123.arcgis.com/.

No new tests, covered by existing tests that were rebaselined.

* dom/Element.idl:
* html/HTMLElement.idl:
* svg/SVGElement.idl:

LayoutTests:

* fast/dom/event-handler-attributes-expected.txt:
Rebaseline tests now that more checks are passing.

* js/dom/dom-static-property-for-in-iteration-expected.txt:
Rebaseline test now that enumeration order is different.

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

4 years ago[macOS] Test gardening: Generic font families should not map to fonts which aren...
mmaxfield@apple.com [Tue, 28 Jun 2016 04:04:48 +0000 (04:04 +0000)]
[macOS] Test gardening: Generic font families should not map to fonts which aren't installed
https://bugs.webkit.org/show_bug.cgi?id=159111
<rdar://problem/25807529>

Unreviewed.

Osaka-Mono does not come preinstalled on macOS Sierra. However, many Japanese users
will have the font installed. Before setting the generic font family, we should check
to see if the font is present.

* page/cocoa/SettingsCocoa.mm:
(WebCore::osakaMonoIsInstalled):
(WebCore::Settings::initializeDefaultFontFamilies):

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

4 years agoDon't keep all newly created potential custom elements alive when the feature is...
rniwa@webkit.org [Tue, 28 Jun 2016 03:25:47 +0000 (03:25 +0000)]
Don't keep all newly created potential custom elements alive when the feature is disabled
https://bugs.webkit.org/show_bug.cgi?id=159113

Reviewed by Daniel Bates.

Don't keep all HTML unknown elements which has a valid custom element alive when the feature is turned off.

Ideally we want to conform to the behavior in the Custom Elements specification and only upgrade an element
that is inserted into the document. We'll implement that later.

* dom/Document.cpp:
(WebCore::createHTMLElementWithNameValidation):

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

4 years ago[iOS] -webkit-overflow-scrolling: touch prevents repaint with RTL
simon.fraser@apple.com [Tue, 28 Jun 2016 02:58:16 +0000 (02:58 +0000)]
[iOS] -webkit-overflow-scrolling: touch prevents repaint with RTL
https://bugs.webkit.org/show_bug.cgi?id=159186
rdar://problem/26659341

Reviewed by Zalan Bujtas.
Source/WebCore:

There were two issues with repaints in -webkit-overflow-scrolling:touch scrolling
layers.

First, if the scrolled contents were inline (e.g. a <span>), then repaints were
broken because RenderInline didn't call shouldApplyClipAndScrollPositionForRepaint().
Fix by making shouldApplyClipAndScrollPositionForRepaint() a member function of RenderBox
and calling it from RenderBox::computeRectForRepaint() and RenderInline::clippedOverflowRectForRepaint().

Second, repaints were broken in RTL because RenderLayerBacking::setContentsNeedDisplayInRect()
confused scroll offset and scroll position; it needs to subtract scrollPosition.

Finally renamed to applyCachedClipAndScrollOffsetForRepaint() to applyCachedClipAndScrollPositionForRepaint()
to make it clear that it uses scrollPosition, not scrollOffset.

Tests: compositing/scrolling/touch-scrolling-repaint-spans.html
       compositing/scrolling/touch-scrolling-repaint.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::applyCachedClipAndScrollPositionForRepaint):
(WebCore::RenderBox::shouldApplyClipAndScrollPositionForRepaint):
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::applyCachedClipAndScrollOffsetForRepaint): Deleted.
(WebCore::shouldApplyContainersClipAndOffset): Deleted.
* rendering/RenderBox.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::clippedOverflowRectForRepaint):
(WebCore::RenderInline::computeRectForRepaint):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::computeRectForRepaint):

LayoutTests:

* compositing/scrolling/touch-scrolling-repaint-expected.html: Added.
* compositing/scrolling/touch-scrolling-repaint-spans-expected.html: Added.
* compositing/scrolling/touch-scrolling-repaint-spans.html: Added.
* compositing/scrolling/touch-scrolling-repaint.html: Added.

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

4 years ago[GTK][EFL] Disable subtle-crypto in FeatureList.pm
mcatanzaro@igalia.com [Tue, 28 Jun 2016 02:47:23 +0000 (02:47 +0000)]
[GTK][EFL] Disable subtle-crypto in FeatureList.pm
https://bugs.webkit.org/show_bug.cgi?id=155073

Reviewed by Daniel Bates.

* Scripts/webkitperl/FeatureList.pm:

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

4 years agoUpdated content for the color blog post.
dino@apple.com [Tue, 28 Jun 2016 02:38:16 +0000 (02:38 +0000)]
Updated content for the color blog post.

* blog-files/color-gamut/Iceland-P3.jpg:
* blog-files/color-gamut/Iceland-oog.jpg:
* blog-files/color-gamut/Iceland-sRGB.jpg:
* blog-files/color-gamut/Italy-P3.jpg:
* blog-files/color-gamut/Italy-sRGB.jpg:
* blog-files/color-gamut/Sunset-P3.jpg:
* blog-files/color-gamut/Sunset-sRGB.jpg:
* blog-files/color-gamut/YellowFlower-P3.jpg:
* blog-files/color-gamut/YellowFlower-oog.jpg:
* blog-files/color-gamut/YellowFlower-sRGB.jpg:
* blog-files/color-gamut/index.html:

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

4 years agoUnreviewed, rolling out r202436.
commit-queue@webkit.org [Tue, 28 Jun 2016 02:00:59 +0000 (02:00 +0000)]
Unreviewed, rolling out r202436.
https://bugs.webkit.org/show_bug.cgi?id=159190

We don't need to make this change. (Requested by thorton on
#webkit).

Reverted changeset:

"Do not use iOS specific telephone detection on macOS."
https://bugs.webkit.org/show_bug.cgi?id=159096
http://trac.webkit.org/changeset/202436

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

4 years ago[iOS] Make DumpRenderTree and WebKitTestRunner in the simulator use render server...
simon.fraser@apple.com [Tue, 28 Jun 2016 01:44:41 +0000 (01:44 +0000)]
[iOS] Make DumpRenderTree and WebKitTestRunner in the simulator use render server snapshotting
https://bugs.webkit.org/show_bug.cgi?id=159077

Reviewed by Tim Horton.

Source/WebKit2:

Fix WebPageProxy::forceRepaint() to correctly wait for the next commit from the web process,
which is necessary for UI-side compositing.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::forceRepaint):

Tools:

Re-enable render server snapshotting for iOS WTR via the change in InjectedBundlePage.cpp.

Fix WebPageProxy::forceRepaint() to correctly wait for the next commit from the web process,
which is necessary for UI-side compositing.

Add some null checks to fix issues when the WKWebView gets resized to be empty, which
seems to happen for some tests that call window.resizeTo().

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dump): Deleted.
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::dumpResults):
* WebKitTestRunner/cg/TestInvocationCG.cpp:
(WTR::createCGContextFromImage):
(WTR::computeMD5HashStringForContext):
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::windowSnapshotImage):

LayoutTests:

fast/harness/snapshot-captures-compositing.html passes now.

* platform/ios-simulator-wk2/TestExpectations:

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

4 years agoAdopt the iOS TouchEventHandler API for cases that must have synchronous dispatch
benjamin@webkit.org [Tue, 28 Jun 2016 01:13:53 +0000 (01:13 +0000)]
Adopt the iOS TouchEventHandler API for cases that must have synchronous dispatch
https://bugs.webkit.org/show_bug.cgi?id=159179
rdar://problem/27006387

Reviewed by Simon Fraser.

Source/WebCore:

Tests: fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-block-scrolling-state.html
       fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-document-scrolling-state.html
       fast/events/touch/ios/block-without-overflow-scroll-scrolling-state.html
       fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-block.html
       fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-document.html
       fast/events/touch/ios/drag-block-without-overflow-scroll.html

* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):
(WebCore::Document::removeAllEventListeners):
* dom/Node.cpp:
(WebCore::Node::willBeDeletedFrom):
(WebCore::tryAddEventListener):
(WebCore::tryRemoveEventListener):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::registerForTouchEvents):
(WebCore::SliderThumbElement::unregisterForTouchEvents):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::registerAsTouchEventListenerForScrolling):
(WebCore::RenderLayer::unregisterAsTouchEventListenerForScrolling):

LayoutTests:

Several of those tests expose existing bugs with overflow scrolling.
They are not using PASS/FAIL at the moment, just dump the called listeners.

* fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-block-scrolling-state-expected.txt: Added.
* fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-block-scrolling-state.html: Added.
* fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-document-scrolling-state-expected.txt: Added.
* fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-document-scrolling-state.html: Added.
* fast/events/touch/ios/block-without-overflow-scroll-scrolling-state-expected.txt: Added.
* fast/events/touch/ios/block-without-overflow-scroll-scrolling-state.html: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-block-expected.txt: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-block.html: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-document-expected.txt: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-document.html: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll-expected.txt: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll.html: Added.

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

4 years agoFix Windows build.
achristensen@apple.com [Tue, 28 Jun 2016 01:00:25 +0000 (01:00 +0000)]
Fix Windows build.

* bindings/js/SerializedScriptValue.h:
WTF

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

4 years agoWeb Inspector: When modifying sessionStorage, localStorage gets updated
commit-queue@webkit.org [Tue, 28 Jun 2016 00:55:05 +0000 (00:55 +0000)]
Web Inspector: When modifying sessionStorage, localStorage gets updated
https://bugs.webkit.org/show_bug.cgi?id=159181
<rdar://problem/27043447>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-06-27
Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

* UserInterface/Test/Test.js:
(WebInspector.loaded):
Add registration for StorageManager and StorageObserver.

Source/WebKit2:

* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
This should be dispatching storage events.

LayoutTests:

* inspector/storage/domStorage-events-expected.txt: Added.
* inspector/storage/domStorage-events.html: Added.
Add a new test for DOMStorage domain events. Ensures that sessionStorage
and localStorage events are dispatched for the appropriate DOMStorageObject.

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

4 years agoFix bad assert in StructureRareData::setObjectToStringValue
keith_miller@apple.com [Tue, 28 Jun 2016 00:42:26 +0000 (00:42 +0000)]
Fix bad assert in StructureRareData::setObjectToStringValue
https://bugs.webkit.org/show_bug.cgi?id=159171
<rdar://problem/26987355>

Reviewed by Mark Lam.

We should not have expected the generateConditionsForPrototypePropertyHit would succeed.
There are many reasons it might fail including that there is a proxy somewhere on the
prototype chain of the object.

* runtime/StructureRareData.cpp:
(JSC::StructureRareData::setObjectToStringValue):
* tests/stress/object-toString-with-proxy.js: Added.
(get target):

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

4 years agoUnreviewed, rolling out r202520.
ryanhaddad@apple.com [Tue, 28 Jun 2016 00:36:40 +0000 (00:36 +0000)]
Unreviewed, rolling out r202520.
https://bugs.webkit.org/show_bug.cgi?id=159185

This change broke the 32-bit El Capitan build (Requested by
ryanhaddad on #webkit).

Reverted changeset:

"REGRESSION?(r202466): http/tests/security/canvas-remote-read-
remote-video-redirect.html failing on Sierra"
https://bugs.webkit.org/show_bug.cgi?id=159172
http://trac.webkit.org/changeset/202520

Patch by Commit Queue <commit-queue@webkit.org> on 2016-06-27

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

4 years ago[Cocoa] Test gardening for the system font in macOS Sierra and iOS 10
mmaxfield@apple.com [Tue, 28 Jun 2016 00:36:03 +0000 (00:36 +0000)]
[Cocoa] Test gardening for the system font in macOS Sierra and iOS 10
https://bugs.webkit.org/show_bug.cgi?id=159175
<rdar://problem/26478081>

Unreviewed.

* fast/text/trak-optimizeLegibility.html:

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

4 years agoFix flakiness on Sierra after r202511
achristensen@apple.com [Tue, 28 Jun 2016 00:34:10 +0000 (00:34 +0000)]
Fix flakiness on Sierra after r202511
https://bugs.webkit.org/show_bug.cgi?id=159071

Source/WebKit2:

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSession::clearCredentials):
Replacing the NSURLSessions immediately caused assertions because the tasks are not always all stopped immediately when tearing down a test.
Stopping an NSURLSession needs to be done asynchronously.  I'll try a different testing technique for r202511.

LayoutTests:

* http/tests/xmlhttprequest/sync-delegate-callbacks-expected.txt: Removed.
* http/tests/xmlhttprequest/sync-delegate-callbacks.html: Removed.
* platform/ios-simulator-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/wk2/http/tests/xmlhttprequest/sync-delegate-callbacks-expected.txt: Removed.

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

4 years agoREGRESSION (r189052): Clipping occurs when using context menu to Look Up words within...
timothy_horton@apple.com [Tue, 28 Jun 2016 00:33:28 +0000 (00:33 +0000)]
REGRESSION (r189052): Clipping occurs when using context menu to Look Up words within the Dictionary app
https://bugs.webkit.org/show_bug.cgi?id=159184
<rdar://problem/26370206>

Reviewed by Beth Dakin.

* WebView/WebHTMLView.mm:
(-[WebHTMLView _lookUpInDictionaryFromMenu:]):
* WebView/WebImmediateActionController.h:
* WebView/WebImmediateActionController.mm:
(+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]):
(-[WebImmediateActionController _animationControllerForText]):
(dictionaryPopupInfoForRange): Deleted.
WebImmediateActionController's code to make a DictionaryPopupInfo and TextIndicator
from a Range in WebKit1 is much better than WebHTMLView's; use it in both cases.

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

4 years ago[EFL] Support to build on Debian linux
gyuyoung.kim@webkit.org [Tue, 28 Jun 2016 00:26:31 +0000 (00:26 +0000)]
[EFL] Support to build on Debian linux
https://bugs.webkit.org/show_bug.cgi?id=159123

Reviewed by Antonio Gomes.

* efl/install-dependencies: Install libgnutls28-dev.

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

4 years agoWeb Inspector: RuntimeManager should not use view object WebInspector.quickConsole
bburg@apple.com [Tue, 28 Jun 2016 00:23:09 +0000 (00:23 +0000)]
Web Inspector: RuntimeManager should not use view object WebInspector.quickConsole
https://bugs.webkit.org/show_bug.cgi?id=128092
<rdar://problem/15966526>

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

This is a layering violation which makes it harder to use RuntimeManager.evaluateInInspectedWindow
from a testing context where the QuickConsole view does not exist.

Store the selected execution context identifier on RuntimeManager and use it
when doing subsequent evaluations that act on the currently selected frame.

* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
(WebInspector.RuntimeManager.prototype.saveResult):
Use local state.

(WebInspector.RuntimeManager.prototype.get defaultExecutionContextIdentifier):
(WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier):
Added.

(WebInspector.RuntimeManager):
* UserInterface/Models/ExecutionContext.js:
(WebInspector.ExecutionContext):
Move the symbolic name for the top level execution context to RuntimeManager.

* UserInterface/Test/Test.js:
(WebInspector.loaded): No need to stub out WebInspector.QuickConsole any more.

* UserInterface/Views/QuickConsole.js:
(WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
(WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
(WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame):
(WebInspector.QuickConsole.prototype._pathComponentSelected):
For now, set RuntimeManager's selected execution context whenever we set the
selected path component. In a future patch, we should invert the dependency and have
the selected component change whenever RuntimeManager.defaultExecutionContext changes.

LayoutTests:

Add some really basic coverage for RuntimeManager.defaultExecutionContextIdentifier
and using it in RuntimeManager.evaluateInInspectedWindow.

* inspector/runtime/change-execution-context-identifier-expected.txt: Added.
* inspector/runtime/change-execution-context-identifier.html: Added.
* inspector/runtime/resources/change-execution-context-identifier-subframe.html: Added.

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

4 years agoSet a default image for sharing webkit.org links via social.
jond@apple.com [Mon, 27 Jun 2016 23:59:50 +0000 (23:59 +0000)]
Set a default image for sharing webkit.org links via social.
https://bugs.webkit.org/show_bug.cgi?id=159167

Reviewed by Timothy Hatcher.

* wp-content/plugins/social-meta.php:

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

4 years agoREGRESSION?(r202466): http/tests/security/canvas-remote-read-remote-video-redirect...
jer.noble@apple.com [Mon, 27 Jun 2016 23:56:09 +0000 (23:56 +0000)]
REGRESSION?(r202466): http/tests/security/canvas-remote-read-remote-video-redirect.html failing on Sierra
https://bugs.webkit.org/show_bug.cgi?id=159172
<rdar://problem/27030025>

Reviewed by Brent Fulgham.

Add a hasSingleSecurityOrigin property to WebCoreNSURLSession that gets updated each time one of that
sessions' tasks receieves a response or a redirect request. Check that property from the MediaPlayerPrivate.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin):
* platform/network/cocoa/WebCoreNSURLSession.h:
* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSession updateHasSingleSecurityOrigin:]):
(-[WebCoreNSURLSession dataTaskWithRequest:]):
(-[WebCoreNSURLSession dataTaskWithURL:]):
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:]):
(-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:]):

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

4 years agoCrashing at an unreachable code trap in FTL should give more information
fpizlo@apple.com [Mon, 27 Jun 2016 23:26:41 +0000 (23:26 +0000)]
Crashing at an unreachable code trap in FTL should give more information
https://bugs.webkit.org/show_bug.cgi?id=159177

Reviewed by Saam Barati.

This stuffs information into registers so that we have some chance of seeing what happened
by looking at the register dumps.

* assembler/AbortReason.h:
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::ftlUnreachable):
(JSC::FTL::DFG::LowerDFGToB3::compileBlock):
(JSC::FTL::DFG::LowerDFGToB3::crash):

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

4 years agoClean up resetting reachability in B3/Air
fpizlo@apple.com [Mon, 27 Jun 2016 22:26:41 +0000 (22:26 +0000)]
Clean up resetting reachability in B3/Air
https://bugs.webkit.org/show_bug.cgi?id=159170

Reviewed by Geoffrey Garen.

When I fixed bug 159165, I took the brute force approach. I still used the
B3::resetReachability() method, and changed the callback to record the set of deleted values
instead of deleting them eagerly. But this means tracking the set of deleted values, even
though resetReachability() already internally tracks the set of deleted blocks. You can find
out if a value is deleted by asking if its owning block was deleted.

So, this change refactors B3::resetReachability() into a new helper called
B3::recomputePredecessors(). This new helper skips the block deletion step, and lets the
client delete blocks. This lets Air delete blocks the same way that it did before, and it
lets B3 use the isBlockDead() method (which is a glorified proxy for
block->predecessors().isEmpty()) to track which values are deleted. This allows B3 to turn
Upsilons that point to dead Phis into Nops before deleting the blocks.

This shouldn't affect performance or anything real. It just makes the code cleaner.

* b3/B3BasicBlockUtils.h:
(JSC::B3::updatePredecessorsAfter):
(JSC::B3::recomputePredecessors):
(JSC::B3::isBlockDead):
(JSC::B3::resetReachability): Deleted.
* b3/B3Procedure.cpp:
(JSC::B3::Procedure::resetReachability):
(JSC::B3::Procedure::invalidateCFG):
* b3/air/AirCode.cpp:
(JSC::B3::Air::Code::resetReachability):
(JSC::B3::Air::Code::dump):

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

4 years agoFix style invalidation for :active when the activated node has no renderer
benjamin@webkit.org [Mon, 27 Jun 2016 22:20:17 +0000 (22:20 +0000)]
Fix style invalidation for :active when the activated node has no renderer
https://bugs.webkit.org/show_bug.cgi?id=159125

Reviewed by Antti Koivisto.

Source/WebCore:

Same old bug: a style invalidation path was depending
on the style.

Here we really need both flags. An element can have
childrenAffectedByActive() false and renderStyle->affectedByActive() true
if it was subject to style sharing.

The element state "childrenAffectedByActive" should be renamed
"styleAffectedByActive" since it is not a parent invalidation flag.
That will be done separately.

Tests: fast/css/pseudo-active-on-labeled-control-without-renderer.html
       fast/css/pseudo-active-style-sharing-1.html
       fast/css/pseudo-active-style-sharing-2.html
       fast/css/pseudo-active-style-sharing-3.html
       fast/css/pseudo-active-style-sharing-4.html
       fast/css/pseudo-active-style-sharing-5.html
       fast/css/pseudo-active-style-sharing-6.html

* dom/Element.cpp:
(WebCore::Element::setActive):
* style/StyleRelations.cpp:
(WebCore::Style::commitRelationsToRenderStyle):

LayoutTests:

There was no bug with style sharing but I wanted that covered anyway.
Style sharing depends on 2 flags which is uncommon.
There was no test coverage whatsoever, breaking it did not fail any test.

* fast/css/pseudo-active-on-labeled-control-without-renderer-expected.txt: Added.
* fast/css/pseudo-active-on-labeled-control-without-renderer.html: Added.
* fast/css/pseudo-active-style-sharing-1-expected.txt: Added.
* fast/css/pseudo-active-style-sharing-1.html: Added.
* fast/css/pseudo-active-style-sharing-2-expected.txt: Added.
* fast/css/pseudo-active-style-sharing-2.html: Added.
* fast/css/pseudo-active-style-sharing-3-expected.txt: Added.
* fast/css/pseudo-active-style-sharing-3.html: Added.
* fast/css/pseudo-active-style-sharing-4-expected.txt: Added.
* fast/css/pseudo-active-style-sharing-4.html: Added.
* fast/css/pseudo-active-style-sharing-5-expected.txt: Added.
* fast/css/pseudo-active-style-sharing-5.html: Added.
* fast/css/pseudo-active-style-sharing-6-expected.txt: Added.
* fast/css/pseudo-active-style-sharing-6.html: Added.

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

4 years agoAX: REGRESSION (r202063): ARIA role attribute is being ignored for label element
jdiggs@igalia.com [Mon, 27 Jun 2016 22:13:16 +0000 (22:13 +0000)]
AX: REGRESSION (r202063): ARIA role attribute is being ignored for label element
https://bugs.webkit.org/show_bug.cgi?id=159162

Reviewed by Chris Fleizach.

Source/WebCore:

createFromRenderer() was creating an AccessibilityLabel for any HTMLLabelElement which
lacked an explicitly-handled ARIA role. We should instead create an AccessibilityLabel
when there is no ARIA role.

Test: accessibility/aria-role-on-label.html

* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):

LayoutTests:

This regression was caught by a GTK-specific layout test. Adding a cross-platform
test for additional coverage.

* accessibility/aria-role-on-label.html: Added.
* platform/gtk/accessibility/aria-role-on-label-expected.txt: Added.
* platform/mac/accessibility/aria-role-on-label-expected.txt: Added.

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

4 years agoWeb Inspector: CRASH in backend at Inspector::HeapFrontendDispatcher::garbageCollecte...
bburg@apple.com [Mon, 27 Jun 2016 21:50:46 +0000 (21:50 +0000)]
Web Inspector: CRASH in backend at Inspector::HeapFrontendDispatcher::garbageCollected + 552 when closing frontend/inspected page
https://bugs.webkit.org/show_bug.cgi?id=159075
<rdar://problem/26094341>

Reviewed by Filip Pizlo.

This change caused JSC stress tests to all hit an assertion in RunLoop.
We should use RunLoop::current() to create the RunLoop::Timer since JSC-only
clients like testapi and jsc don't ever call initializeMainRunLoop().

* inspector/agents/InspectorHeapAgent.cpp:
(Inspector::SendGarbageCollectionEventsTask::SendGarbageCollectionEventsTask):

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

4 years agoUnreviewed, rolling out r202505.
ryanhaddad@apple.com [Mon, 27 Jun 2016 21:45:49 +0000 (21:45 +0000)]
Unreviewed, rolling out r202505.
https://bugs.webkit.org/show_bug.cgi?id=159169

The test added with this change is flaky and it caused an
existing test to time out on El Capitan. (Requested by
ryanhaddad on #webkit).

Reverted changeset:

"[iOS] Media controls are too cramped with small video"
https://bugs.webkit.org/show_bug.cgi?id=158815
http://trac.webkit.org/changeset/202505

Patch by Commit Queue <commit-queue@webkit.org> on 2016-06-27

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

4 years agoAdd :focus-within to the status page
benjamin@webkit.org [Mon, 27 Jun 2016 21:44:39 +0000 (21:44 +0000)]
Add :focus-within to the status page

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-27

* features.json:
I forgot to update the json file when landing the feature.

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

4 years agoB3::Procedure::resetReachability() can create dangling references from Upsilons to...
fpizlo@apple.com [Mon, 27 Jun 2016 21:36:19 +0000 (21:36 +0000)]
B3::Procedure::resetReachability() can create dangling references from Upsilons to Phis
https://bugs.webkit.org/show_bug.cgi?id=159165

Reviewed by Mark Lam.

You can delete an unreachable block that has a Phi but some prior block may still have an
Upsilon pointing to that Phi. This can happen if the Upsilon precedes a Check that always
exits or it can happen if we remove some successor of a block and this block had an Upsilon
for one of the removed successors. These things are valid IR even if they are not canonical.
Our policy for not-canonical-but-valid IR is that the compiler should still emit valid code
in the end.

The solution is to have Procedure::resetReachability() turn those Upsilons into Nops.

* b3/B3Procedure.cpp:
(JSC::B3::Procedure::resetReachability): Fix the bug.
* b3/B3Validate.h:
* b3/testb3.cpp:
(JSC::B3::testResetReachabilityDanglingReference): Add a test. This always crashes prior to this change.
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::killUnreachableBlocks): Add a FIXME about a possible similar bug.

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

4 years agoSend canAuthenticateAgainstProtectionSpace calls from NetworkProcess directly to...
commit-queue@webkit.org [Mon, 27 Jun 2016 20:59:27 +0000 (20:59 +0000)]
Send canAuthenticateAgainstProtectionSpace calls from NetworkProcess directly to UIProcess
https://bugs.webkit.org/show_bug.cgi?id=159071

Patch by Alex Christensen <achristensen@webkit.org> on 2016-06-27
Reviewed by Brady Eidson.

Source/WebKit2:

When CFNetwork asks the NetworkProcess if we can authenticate against this protection space, we used to ask
the WebProcess, which would call ResourceLoader::canAuthenticateAgainstProtectionSpace which would ask the FrameLoaderClient,
which would synchronously ask the UIProcess.  Going directly from the NetworkProcess to the UIProcess gives us many advantages:
1. It reduces IPC because we ask fewer loads.
2. It reduces synchronous IPC because we are not using the same code path as WebKit1 any more.
3. It allows us to check if the NetworkProcess is still valid in sendToNetworkingProcess, possibly fixing rdar://problem/26825408
4. It allows us to ask the UIProcess when we get authentication challenges for synchronous xhr.

I added a new test http/tests/xmlhttprequest/sync-delegate-callbacks.html to verify the change in behavior of synchronous xhr.
In order to make this test not flaky on platforms using NSURLSession, we clear the NSURLSessions used by WebKitTestRunner
to make sure that the TLS session cache is cleared so we get NSURLAuthenticationChallenges corresponding to the NSURLConnection
canAuthenticateAgainstProtectionSpace callback when we initiate the first HTTPS connection to 127.0.0.1 with this session.

* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::didReceiveChallenge):
(WebKit::NetworkLoad::didReceiveResponseNetworkSession):
(WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::clearCachedCredentials):
(WebKit::NetworkProcess::ensurePrivateBrowsingSession):
(WebKit::NetworkProcess::cancelDownload):
(WebKit::NetworkProcess::canAuthenticateAgainstProtectionSpace):
(WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpaceDownload):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkResourceLoader.messages.in:
* NetworkProcess/NetworkSession.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSession::networkStorageSession):
(WebKit::NetworkSession::clearCredentials):
(WebKit::NetworkSession::dataTaskForIdentifier):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::canAuthenticateAgainstProtectionSpace):
(WebKit::DownloadProxy::willSendRequest):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::logSampledDiagnosticMessageWithValue):
(WebKit::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace):
(WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::backForwardClear):
(WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpace):
(WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
(WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResource):
(WebKit::WebResourceLoader::isAlwaysOnLoggingAllowed):
(WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): Deleted.
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::clearCachedCredentials):
(WebKit::WebProcess::focusedWebPage):

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setHandlesAuthenticationChallenges):
(WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace):
(WTR::TestRunner::setAuthenticationUsername):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::TestController):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::didFinishNavigation):
(WTR::TestController::canAuthenticateAgainstProtectionSpace):
(WTR::TestController::didReceiveAuthenticationChallenge):
(WTR::TestController::didCommitNavigation):
* WebKitTestRunner/TestController.h:
(WTR::TestController::setBlockAllPlugins):
(WTR::TestController::setShouldLogHistoryClientCallbacks):
(WTR::TestController::setShouldLogCanAuthenticateAgainstProtectionSpace):
(WTR::TestController::isCurrentInvocation):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
Added output so we can see when canAuthenticateAgainstProtectionSpace is called from the test expectations.

LayoutTests:

* http/tests/xmlhttprequest/sync-delegate-callbacks-expected.txt: Added.
* http/tests/xmlhttprequest/sync-delegate-callbacks.html: Added.
* platform/ios-simulator-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/wk2/http/tests/xmlhttprequest/sync-delegate-callbacks-expected.txt: Added.

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

4 years agoRemove OS X Mavericks test results
ap@apple.com [Mon, 27 Jun 2016 20:52:43 +0000 (20:52 +0000)]
Remove OS X Mavericks test results

Rubber-stamped by Lucas Forschler.

* platform/mac-mavericks: Removed.

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

4 years ago[Mac] PiP placeholder should remain visible when 'controls' attribute is removed
eric.carlson@apple.com [Mon, 27 Jun 2016 20:37:48 +0000 (20:37 +0000)]
[Mac] PiP placeholder should remain visible when 'controls' attribute is removed
https://bugs.webkit.org/show_bug.cgi?id=159158
<rdar://problem/26727435>

Reviewed by Jer Noble.

Source/WebCore:

No new tests, existing test updated.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.shouldHaveControls): Always return true when in PiP or AirPlay mode.

LayoutTests:

* media/controls/picture-in-picture-expected.txt: Updated.
* media/controls/picture-in-picture.html: Ditto.

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

4 years agoAdd comment to Module feature in features.json
keith_miller@apple.com [Mon, 27 Jun 2016 19:52:26 +0000 (19:52 +0000)]
Add comment to Module feature in features.json
https://bugs.webkit.org/show_bug.cgi?id=159159

Reviewed by Saam Barati.

* features.json:

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

4 years agoUpdate ATS WebContent exception for more robust framework information
oliver@apple.com [Mon, 27 Jun 2016 19:17:24 +0000 (19:17 +0000)]
Update ATS WebContent exception for more robust framework information
https://bugs.webkit.org/show_bug.cgi?id=159151

Reviewed by Alex Christensen.

We found some unexpected poor interaction with AVFoundation in the existing
CFNetwork SPI. This new SPI is more solid and let's us provide more useful
information while also being more future proof against new frameworks and
ATS modes.

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):

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

4 years agoRemove now unused WTF::findNextLineStart
commit-queue@webkit.org [Mon, 27 Jun 2016 19:11:33 +0000 (19:11 +0000)]
Remove now unused WTF::findNextLineStart
https://bugs.webkit.org/show_bug.cgi?id=159157

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-06-27
Reviewed by Mark Lam.

Unused after r202498.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::findNextLineStart): Deleted.
* wtf/text/StringImpl.h:
(WTF::findNextLineStart): Deleted.
* wtf/text/WTFString.h:
(WTF::String::findNextLineStart): Deleted.

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

4 years ago[iOS] Media controls are too cramped with small video
commit-queue@webkit.org [Mon, 27 Jun 2016 19:06:45 +0000 (19:06 +0000)]
[iOS] Media controls are too cramped with small video
https://bugs.webkit.org/show_bug.cgi?id=158815
<rdar://problem/26824238>

Patch by Antoine Quint <graouts@apple.com> on 2016-06-27
Reviewed by Dean Jackson.

Source/WebCore:

In updateLayoutForDisplayedWidth(), we try to ensure a minimum width is guaranteed
for the progress indicator. However, we were not accounting for the width used by
the current and remaining time labels on either side of it, so we would incorrectly
conclude that we were guaranteeing the minimum time and yield incorrect layouts since
we were trying to fit more buttons than we had room for.

In order to correctly compute the available width for the progress indicator, we now
have clones of the current and remaining time labels, hidden from video and VoiceOver,
that we update along with the originals. The same styles apply to both clones and
originals, so we may measure the clones to determine the space used by the time labels.
The reason we need to use clones is that if the time labels had previously been hidden
from view, precisely because there was not enough space to display them along with the
progress indicator, then trying to obtain metrics from them would yield 0 since they had
"display: none" styles applied. In order to avoid extra layouts and possible flashing, we
use the clones so that we never have to toggle the "display" property of the originals
just to obtain their measurements.

As a result of this change, we adjust the constant used to set the minimum required
width available to display the progress indicator after all other essential controls
and labels have been measured. That constant used to account for the width of the
time labels, and this is no longer correct.

Test: media/video-controls-drop-and-restore-timeline.html

* Modules/mediacontrols/mediaControlsApple.css:
(::-webkit-media-controls-time-remaining-display.clone):
* Modules/mediacontrols/mediaControlsApple.js:
(Controller):
(Controller.prototype.createTimeClones):
(Controller.prototype.removeTimeClass):
(Controller.prototype.addTimeClass):
(Controller.prototype.updateDuration):
(Controller.prototype.updateLayoutForDisplayedWidth):
(Controller.prototype.updateTime):
(Controller.prototype.updateControlsWhileScrubbing):
* Modules/mediacontrols/mediaControlsiOS.css:
(::-webkit-media-controls-time-remaining-display.clone):
* Modules/mediacontrols/mediaControlsiOS.js:

LayoutTests:

Adjust the output of this test to account for the time label clones and add a new test.

* media/video-controls-drop-and-restore-timeline-expected.txt: Added.
* media/video-controls-drop-and-restore-timeline.html: Added.
* platform/mac-yosemite/http/tests/media/hls/video-controls-live-stream-expected.txt:
* platform/mac/http/tests/media/hls/video-controls-live-stream-expected.txt:

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

4 years agoDiscounted items are displayed with positive values
andersca@apple.com [Mon, 27 Jun 2016 19:06:21 +0000 (19:06 +0000)]
Discounted items are displayed with positive values
https://bugs.webkit.org/show_bug.cgi?id=159160
rdar://problem/26980772

Reviewed by Dean Jackson.

* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toDecimalNumber):
Add new helper function. Correctly compute the mantissa.

(WebKit::toPKPaymentSummaryItem):
(WebKit::toPKShippingMethod):
Use toDecimalNumber.

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

4 years agoUpdate features.json for ES6 completed features.
keith_miller@apple.com [Mon, 27 Jun 2016 18:52:36 +0000 (18:52 +0000)]
Update features.json for ES6 completed features.
https://bugs.webkit.org/show_bug.cgi?id=159152

Reviewed by Mark Lam.

* features.json:

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

4 years agoB3 should not use Nops when deleting unreachable code
fpizlo@apple.com [Mon, 27 Jun 2016 18:35:09 +0000 (18:35 +0000)]
B3 should not use Nops when deleting unreachable code
https://bugs.webkit.org/show_bug.cgi?id=159120
rdar://problem/26500743

Reviewed by Michael Saboff.

Prior to this change, transformations that obviated the need for some value could choose
from these ways to kill it:

- replaceWithIdentity() if we're replacing with another value.
- replaceWithNop() if the type is Void or if we know that we'll fix any users of this
  value.
- deleteValue() if the code is unreachable.

The bug here is that reduceStrength() was being clever about how to get rid of a value.
reduceStrength() may find a Check that must always exit. The goal is to remove any code
dominated by the Check. But it would be awkward to eagerly delete all of the blocks
dominated by this one. So this code took a much simpler approach: it would
replaceWithNop() for all of the values in this block after the Check and it would replace
the terminal with Oops.

But this corrupts the IR in a subtle way: some of those values may have been non-Void but
now they are Nops so they are Void. reduceStrength() will not yet realize that the blocks
dominated by the one with the Check are unreachable, so it will run all sorts of
optimizations on those blocks. This could have probably manifested as many different kinds
of badness, but the way I found out about this issue was through a crash in
IntRange::top(Type) when inlined into ReduceStrength::rangeFor(). We'd die in a switch
statement over a child's type.

We could fix this by making rangeFor() tolerate Void. But I think that this would be
dangerous. There could easily be other places in reduceStrength() that assume that value's
children are non-Void. So, this change fixes the Check optimization and adds mechanisms to
prevent other optimizations from breaking the children-are-not-Void rule.

This introduces two high-level changes:

- It's no longer legal to replaceWithNop() if the value is not Void. This change alone
  would cause reduceStrength() to instacrash in its Check optimization. Almost all other
  uses of replaceWithNop() were already following this rule, so they were fine. One other
  place was using replaceWithNop() on non-Void values after arranging for them to no
  longer have any parents. That was changed to call replaceWithNopIgnoringType(), which
  doesn't have any type assertions.

- For reduceStrength() there is a new Value::replaceWithBottom() method that works with
  Void or non-Void and behaves like you would want replaceWithNop() to behave: if you know
  that the code is unreachable then it produces something that is guaranteed to be deleted
  by later optimizations, and if it's not unreachable, then it's guaranteed to be compiled
  to something harmless and cheap. This means replacing the value with an identity that
  points to a bottom constant (the 0 for whatever type we have), or just replacing it with
  Nop if it's Void.

This also adds a test case for the reason why we do this: we may have two blocks, where
the first block unconditionally exits while dominating the second block. The second block
references values in the part of the first block that is unreachable. In trunk, this test
would assert in ReduceStrength::rangeFor() because the CheckAdd in the second block would
reference a Nop in the first block.

This fixes a high volume crash in ReduceStrength::rangeFor(). This crash was very
confusing. Even though we were crashing at a RELEASE_ASSERT_NOT_REACHED() in a switch
statement in IntRange::top(Type), clang was merging that trap with the trap it used for
Vector OOB. The top of the stack in crash dumps looked like:

    JSC::B3::(anonymous namespace)::ReduceStrength::rangeFor(JSC::B3::Value*, unsigned int) + 4477 (Vector.h:655)

Where Vector.h:655 is:

    OverflowHandler::overflowed();

But this crash was not at Vector.h:655. It was at B3ReduceStrength.cpp:121. The two lines
are both traps, so they got merged despite differences in debug info. This bug would have
been so much easier to fix if I had the right line number.

* b3/B3BottomProvider.h: Added. This is a utility for creating bottom values.
(JSC::B3::BottomProvider::BottomProvider):
(JSC::B3::BottomProvider::operator()):
* b3/B3InsertionSet.cpp: Optimized adding bottom values a bit. We will no longer create pointless duplicates.
(JSC::B3::InsertionSet::insertBottom):
(JSC::B3::InsertionSet::execute):
(JSC::B3::InsertionSet::bottomForType):
* b3/B3InsertionSet.h:
* b3/B3MoveConstants.cpp: Use replaceWithNopIgnoringType() because we *know* that we can replaceWithNop even for non-Void.
* b3/B3Procedure.h:
* b3/B3ReduceStrength.cpp: Use replaceWithBottom().
* b3/B3ReduceStrength.h:
* b3/B3TypeMap.h: I figured if I wrote type-casing code like this once then I'd never want to write it again.
* b3/B3Value.cpp:
(JSC::B3::Value::replaceWithIdentity):
(JSC::B3::Value::replaceWithNop):
(JSC::B3::Value::replaceWithNopIgnoringType):
* b3/B3Value.h:
* b3/B3ValueInlines.h:
(JSC::B3::Value::replaceWithBottom): This is the new method of killing unreachable code.
(JSC::B3::Value::as):
* b3/testb3.cpp: Add new tests!
(JSC::B3::testLateRegister):
(JSC::B3::testReduceStrengthCheckBottomUseInAnotherBlock):
(JSC::B3::zero):
(JSC::B3::run):

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

4 years agoNo error message when passing an invalid API version to ApplePaySession constructor
andersca@apple.com [Mon, 27 Jun 2016 18:28:00 +0000 (18:28 +0000)]
No error message when passing an invalid API version to ApplePaySession constructor
https://bugs.webkit.org/show_bug.cgi?id=159154

Reviewed by Tim Horton.

Log an error message if the version is not supported. Also, check for version 0 since that is also not supported.

* Modules/applepay/ApplePaySession.cpp:
(WebCore::ApplePaySession::create):

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

4 years agoREGRESSION: Web Inspector: Text search broken in resources with <CR>
joepeck@webkit.org [Mon, 27 Jun 2016 18:18:37 +0000 (18:18 +0000)]
REGRESSION: Web Inspector: Text search broken in resources with <CR>
https://bugs.webkit.org/show_bug.cgi?id=159110
<rdar://problem/27008485>

Reviewed by Brian Burg.

Source/JavaScriptCore:

* inspector/ContentSearchUtilities.cpp:
(Inspector::ContentSearchUtilities::lineEndings):
The frontend moved to only treated newlines as line endings in
the TextEditor. The backend however was looking for many
different types of line endings (\r\n, \r, \n). This caused
the line endings to ultimately differ between the frontend
and the backend, so the frontend couldn't find the lines that
the backend was claiming search results were on. Change the
backend to only look for \n line endings.

LayoutTests:

* inspector/debugger/searchInContent-linebreaks-expected.txt:
* inspector/debugger/searchInContent-linebreaks.html:
Now that the backend responds with lines that end in \n, this test changes
the number of line results. The frontend interprets this correctly.

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

4 years agoAX: Anonymous RenderMathMLOperators are not exposed to the accessibility tree
jdiggs@igalia.com [Mon, 27 Jun 2016 17:57:49 +0000 (17:57 +0000)]
AX: Anonymous RenderMathMLOperators are not exposed to the accessibility tree
https://bugs.webkit.org/show_bug.cgi?id=139582
<rdar://problem/26938849>

Reviewed by Chris Fleizach.

This is based on a patch by Frederic Wang <fwang@igalia.com>.

Source/WebCore:

WebCore assigns the generic MathElementRole AccessibilityRole to elements
which are expected to be included in the accessibility tree. This assignment
is based on the AccessibilityRenderObject's node being a MathMLElement. The
anonymous RenderMathMLOperators fail that test.

From the perspective of accessibility support, these operators function
like MathMLElements. Furthermore, both WebCore and the platforms rely
upon MathElementRole to identify accessible MathML objects. The simplest
fix is to have AccessibilityRenderObject::isMathElement() treat anonymous
MathML operators as if they were MathMLElements.

Now that these operators are being exposed, we need to handle them in
AccessibilityRenderObject::textUnderElement() which assumes that anonymous
objects either have nodes or have children with nodes. And crashes when
that fails to be the case. Making RenderMathMLOperator::textContent()
public and then using it to get the text under anonymous operators solves
this problem. We also assign StaticTextRole to these operators on the Mac
because the default platform mapping of MathElementRole is GroupRole, which
made sense when we had a child RenderText object holding the operator.

Lastly, AccessibilityRenderObject::isIgnoredElementWithinMathTree() no
longer needs to special-case anonymous operators because they now have
MathElementRole.

Tests: accessibility/math-fenced.html
       accessibility/math-foreign-content.html

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isAnonymousMathOperator):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):
(WebCore::AccessibilityRenderObject::stringValue):
(WebCore::AccessibilityRenderObject::isMathElement):
(WebCore::AccessibilityRenderObject::isAnonymousMathOperator):
(WebCore::AccessibilityRenderObject::isIgnoredElementWithinMathTree):
* accessibility/AccessibilityRenderObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper role]):
* rendering/mathml/RenderMathMLMath.h:
* rendering/mathml/RenderMathMLOperator.h:
(WebCore::RenderMathMLOperator::textContent):

LayoutTests:

One of the things making it difficult to tell that the operators were not
exposed on the Mac is the fact that the operator text is present. But the
operator text is simply a StaticTextRole object corresponding to the
RenderText descendant of the operator. Furthermore, on the Mac, accessible
math operators have subroles which are missing from the StaticTextRole
object which is exposed. In order to make issues like this more obvious,
add an option to include the subrole to dumpAccessibilityTree() and use it
in the new math-fenced.html.

This change also fixes the mfenced in mac/mathml-elements.html that was
broken after r202420. We enable it again and update the expectations of
that test because the operators are now in the accessibility tree.

We also add a new test to verify the render tree of foreign content in
MathML formulas.

* accessibility/mac/mathml-elements-expected.txt: Updated.
* accessibility/mac/mathml-elements.html: Re-enable the mfenced test.
* accessibility/math-fenced.html: Added.
* accessibility/math-foreign-content.html: Added.
* platform/gtk/accessibility/math-fenced-expected.txt: Added.
* platform/gtk/accessibility/math-foreign-content-expected.txt: Added.
* platform/mac/accessibility/math-fenced-expected.txt: Added.
* platform/mac/accessibility/math-foreign-content-expected.txt: Added.
* resources/accessibility-helper.js: Add option to include subrole in tree.
(dumpAccessibilityTree):

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

4 years agoRemove flaky expectation for imported/w3c/web-platform-tests/html/semantics/embedded...
ryanhaddad@apple.com [Mon, 27 Jun 2016 17:57:04 +0000 (17:57 +0000)]
Remove flaky expectation for imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_loadeddata.html
https://bugs.webkit.org/show_bug.cgi?id=150956

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 years agoWebRTC: Unskip RTCPeerConnection-AddRemoveStream test
adam.bergkvist@ericsson.com [Mon, 27 Jun 2016 17:53:24 +0000 (17:53 +0000)]
WebRTC: Unskip RTCPeerConnection-AddRemoveStream test
https://bugs.webkit.org/show_bug.cgi?id=159133

Reviewed by Eric Carlson.

Unskip RTCPeerConnection-AddRemoveStream test (on GTK+ port). RTCPeerConnection implements
the legacy MediaStream-based API as JS built-ins so we can run this test again.

* fast/mediastream/RTCPeerConnection-AddRemoveStream-expected.txt:
* fast/mediastream/RTCPeerConnection-AddRemoveStream.html:
* platform/gtk/TestExpectations:

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

4 years agoWebRTC: Remove unused RTCOfferAnswerOptionsPrivate.h
adam.bergkvist@ericsson.com [Mon, 27 Jun 2016 17:52:03 +0000 (17:52 +0000)]
WebRTC: Remove unused RTCOfferAnswerOptionsPrivate.h
https://bugs.webkit.org/show_bug.cgi?id=159130

Reviewed by Eric Carlson.

Remove unused RTCOfferAnswerOptionsPrivate.h file.

* platform/mediastream/RTCOfferAnswerOptionsPrivate.h: Removed.

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

4 years agoCrash in layout test /media/video-buffered-range-contains-currentTime.html
jer.noble@apple.com [Mon, 27 Jun 2016 17:50:25 +0000 (17:50 +0000)]
Crash in layout test /media/video-buffered-range-contains-currentTime.html
https://bugs.webkit.org/show_bug.cgi?id=159109
<rdar://problem/26535750>

Reviewed by Alex Christensen.

Guard against a dealloc race condition by holding a retain on the session
until the task's _resource:loadFinishedWithError: completes, including
main thread callbacks.

* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSessionDataTask _resource:loadFinishedWithError:]):

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

4 years agoWeb Inspector: CRASH in backend at Inspector::HeapFrontendDispatcher::garbageCollecte...
bburg@apple.com [Mon, 27 Jun 2016 17:50:17 +0000 (17:50 +0000)]
Web Inspector: CRASH in backend at Inspector::HeapFrontendDispatcher::garbageCollected + 552 when closing frontend/inspected page
https://bugs.webkit.org/show_bug.cgi?id=159075
<rdar://problem/26094341>

Reviewed by Timothy Hatcher.

Move the asynchronous work to a task class that can be cancelled when the
heap agent is reset, disabled or destroyed.

* inspector/agents/InspectorHeapAgent.cpp:
(Inspector::SendGarbageCollectionEventsTask::SendGarbageCollectionEventsTask):
(Inspector::SendGarbageCollectionEventsTask::addGarbageCollection):
(Inspector::SendGarbageCollectionEventsTask::reset):
(Inspector::SendGarbageCollectionEventsTask::timerFired):
Added. This holds onto GarbageCollectionData that needs to be sent asynchronously.
It uses the RunLoop variant of Timer and can queue multiple collections to be sent.
The data vector is guarded with a lock so that garbageCollected() can safely add
collection data from a non-main thread while the main thread sends out events.

(Inspector::InspectorHeapAgent::InspectorHeapAgent):
(Inspector::InspectorHeapAgent::~InspectorHeapAgent):
(Inspector::InspectorHeapAgent::disable):
Reset the task when disabling or tearing down the agent so the timer doesn't fire after destruction.

(Inspector::InspectorHeapAgent::didGarbageCollect):
Add the collection data to the task, which will dispatch an event for it asynchronously.

* inspector/agents/InspectorHeapAgent.h:

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

4 years agoUpdate TestExpectations for some dynamic MathML tests
fred.wang@free.fr [Mon, 27 Jun 2016 17:44:16 +0000 (17:44 +0000)]
Update TestExpectations for some dynamic MathML tests
https://bugs.webkit.org/show_bug.cgi?id=159142

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-27
Reviewed by Brent Fulgham.

* TestExpectations: Enable this test again after r199980.
* platform/efl/TestExpectations: This is already claimed to pass in the  platform independent TestExpectations.
* platform/gtk/TestExpectations: Ditto.
* platform/ios-simulator/TestExpectations: This test passes after the refactoring of RenderMathMLOperator.

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

4 years agoES6 Change: Unify handling of RegExp CharacterClassEscapes \w and \W and Word Asserts...
msaboff@apple.com [Mon, 27 Jun 2016 17:38:55 +0000 (17:38 +0000)]
ES6 Change: Unify handling of RegExp CharacterClassEscapes \w and \W and Word Asserts \b and \B
https://bugs.webkit.org/show_bug.cgi?id=158505

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This change makes it so that the CharacterClassEscape \w matches the inverse of
\W and vice versa for unicode, ignore case RegExp's.

Before this change, both /\w/ui and /\W/ui RegExp's would match the characters
k, K, s, S, \u017f (Latin Small Letter Long S) and \u212a (Kelvin Sign).
This was due to how the ES6 standard defined matching of character classes
specifically that the abstract operation "Canonicalize()" is called for the
character to be matched AND for the characters in the character class we are
matching against.  This change is to make \W always be the inverse of \w.
It is still the case that the characters that match against \w changes
depending on a regular expression's flags.

The only real changes occur for regular expressions with both the unicode and
ignore case flags set.  Updated the character class generator to make
nonwordUnicodeIgnoreCaseChar not include k, K, s, S, \u017f and \u212a.
Changed BytecodePattern.wordcharCharacterClass to use the correct
word character class for the flags.  Simplfied character class set up in
in the pattern to use m_pattern.wordUnicodeIgnoreCaseCharCharacterClass and
invert as appropriate when unicode and ignore case are both set.

* create_regex_tables:
* yarr/YarrInterpreter.h:
(JSC::Yarr::BytecodePattern::BytecodePattern):
* yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass):

LayoutTests:

Updated and added test cases.

* js/regexp-unicode-expected.txt:
* js/script-tests/regexp-unicode.js:

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

4 years agoSet an upper limit for the size or number of pieces of stretchy operators
fred.wang@free.fr [Mon, 27 Jun 2016 17:36:09 +0000 (17:36 +0000)]
Set an upper limit for the size or number of pieces of stretchy operators
https://bugs.webkit.org/show_bug.cgi?id=155434

Source/WebCore:

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-27
Reviewed by Brent Fulgham.

Stretchy MathML operators can currently use an arbitrary number of extension glyphs to cover
a target size. This may result in hangs if large stretch sizes are requested. This change
only allow at most the 128 first extensions to be painted by the MathOperator class, which
should really be enough for mathematical formulas used in practice.

No new tests, already tested by very-large-stretchy-operators.

* rendering/mathml/MathOperator.cpp: Add a new kMaximumExtensionCount constant.
(WebCore::MathOperator::fillWithVerticalExtensionGlyph): Limit the number of step in this loop to kMaximumExtensionCount.
(WebCore::MathOperator::fillWithHorizontalExtensionGlyph): Ditto.

LayoutTests:

Update test expectations for very-large-stretchy-operators.

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-27
Reviewed by Brent Fulgham.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:

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

4 years agoSmall refactoring MathMLInlineContainerElement::createElementRenderer
fred.wang@free.fr [Mon, 27 Jun 2016 17:33:38 +0000 (17:33 +0000)]
Small refactoring MathMLInlineContainerElement::createElementRenderer
https://bugs.webkit.org/show_bug.cgi?id=159131

Reviewed by Brent Fulgham.

Many of the MathML renderer classes have been merged during the MathML refactoring. We
simplify how instances are created in MathMLInlineContainerElement::createElementRenderer
by removing duplicate createRenderer calls.

No new tests, behavior unchanged.

* mathml/MathMLInlineContainerElement.cpp:
(WebCore::MathMLInlineContainerElement::createElementRenderer):

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

4 years agoDFGByteCodeParsing does not handle calling the Object constructor with no arguments...
keith_miller@apple.com [Mon, 27 Jun 2016 16:48:31 +0000 (16:48 +0000)]
DFGByteCodeParsing does not handle calling the Object constructor with no arguments correctly
https://bugs.webkit.org/show_bug.cgi?id=159117
<rdar://problem/26996781>

Reviewed by Saam Barati.

DFGByteCodeParsing always assumed there would be an argument to the Object constructor.
This is clearly not always the case and we should be able to handle it.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
* tests/stress/indirect-call-object-constructor-with-no-arguments.js: Added.
(let.foo.Object.test):

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

4 years agoSkip two LayoutTests that rely on mouse events on ios-simulator
ryanhaddad@apple.com [Mon, 27 Jun 2016 16:01:00 +0000 (16:01 +0000)]
Skip two LayoutTests that rely on mouse events on ios-simulator

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years ago[GTK] Unreviewed test gardening. Added Failure Test Expectations because of r194502...
jfernandez@igalia.com [Mon, 27 Jun 2016 14:47:09 +0000 (14:47 +0000)]
[GTK] Unreviewed test gardening. Added Failure Test Expectations because of r194502 and r194513.
https://bugs.webkit.org/show_bug.cgi?id=159147

* platform/gtk/TestExpectations:

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

4 years ago[GTK][EFL] Build with threaded compositor enabled is broken
commit-queue@webkit.org [Mon, 27 Jun 2016 10:57:09 +0000 (10:57 +0000)]
[GTK][EFL] Build with threaded compositor enabled is broken
https://bugs.webkit.org/show_bug.cgi?id=159138

Patch by Miguel Gomez <magomez@igalia.com> on 2016-06-27
Reviewed by Carlos Garcia Campos.

Source/WebCore:

No need to set the device scale. The compositor buffer is only used for the accelerated
canvas scenario, and the device scale is always 1 there.
This change was introduced in r202421.

Covered by existing tests.

* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBufferData::createCompositorBuffer):

Source/WebKit2:

Replace the usage of NoncopyableFunction with Function, to follow the changes in r202439.

* Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
(WebKit::CompositingRunLoop::performTask):
(WebKit::CompositingRunLoop::performTaskSync):
* Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:

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

4 years agoLayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-control-infrast...
commit-queue@webkit.org [Mon, 27 Jun 2016 09:22:08 +0000 (09:22 +0000)]
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-control-infrastructure/ is failing on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=159136

Unreviewed.

Patch by Youenn Fablet <youennf@gmail.com> on 2016-06-27

* platform/ios-simulator/imported/w3c/web-platform-tests/html/semantics/forms/form-control-infrastructure/form-expected.txt: Added.

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

4 years ago[GStreamer] top/bottom black bars added needlessly in fullscreen
philn@webkit.org [Mon, 27 Jun 2016 09:21:51 +0000 (09:21 +0000)]
[GStreamer] top/bottom black bars added needlessly in fullscreen
https://bugs.webkit.org/show_bug.cgi?id=158980

Patch by Philippe Normand <philn@igalia.com> on 2016-06-27
Reviewed by Carlos Garcia Campos.

The natural video size calculation depends on the validity of the
current sample, so whenever the first sample reached the sink it's a
good idea to reflect this on the player which will update its natural
size accordingly.

Fixes an issue where black borders were added on top and bottom of
fullscreen video.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):

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

4 years ago[Win] The test fast/events/wheel-event-outside-body.html is timing out.
pvollan@apple.com [Mon, 27 Jun 2016 09:01:57 +0000 (09:01 +0000)]
[Win] The test fast/events/wheel-event-outside-body.html is timing out.
https://bugs.webkit.org/show_bug.cgi?id=159129

Reviewed by Alex Christensen.

Implement the function mouseScrollBy in the Windows event sender.

* DumpRenderTree/win/EventSender.cpp:
(mouseScrollBy):
(mouseScrollByWithWheelAndMomentumPhasesCallback):

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

4 years agoRemove didFailRedirectCheck ThreadableLoaderClient callback
commit-queue@webkit.org [Mon, 27 Jun 2016 08:28:30 +0000 (08:28 +0000)]
Remove didFailRedirectCheck ThreadableLoaderClient callback
https://bugs.webkit.org/show_bug.cgi?id=159085

Patch by Youenn Fablet <youenn@apple.com> on 2016-06-27
Reviewed by Daniel Bates.

Source/WebCore:

Removing didFailRedirectCheck and using didFailAccessControlCheck instead.
The change in behavior is that additional error messages are outputted in the console.
These messages give additional debugging information.

Covered by rebased tests.

* Modules/fetch/FetchLoader.cpp: Removing didFailRedirectCheck.
* Modules/fetch/FetchLoader.h: Ditto.
* inspector/InspectorNetworkAgent.cpp: Ditto.
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::redirectReceived): Calling didFailAccessControlCheck with information on failing
URL.
(WebCore::DocumentThreadableLoader::loadRequest): Ditto.
* loader/ThreadableLoaderClient.h: Removing didFailRedirectCheck.
* loader/ThreadableLoaderClientWrapper.h: Ditto.
* loader/WorkerThreadableLoader.cpp: Ditto.
* loader/WorkerThreadableLoader.h: Ditto.
* page/EventSource.cpp: Ditto.
* page/EventSource.h: Ditto.
* workers/WorkerScriptLoader.cpp: Ditto.
* workers/WorkerScriptLoader.h: Ditto.
* xml/XMLHttpRequest.cpp: Ditto.
* xml/XMLHttpRequest.h: Ditto.

LayoutTests:

* http/tests/security/contentSecurityPolicy/connect-src-eventsource-redirect-to-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-redirect-to-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/worker-csp-blocks-xhr-redirect-cross-origin-expected.txt:
* http/tests/xmlhttprequest/access-control-and-redirects-async-expected.txt:
* http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:

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