WebKit-https.git
2 years ago[WPE] The run-minibrowser script should allow to execute also a WPE launcher
clopez@igalia.com [Thu, 15 Jun 2017 18:44:42 +0000 (18:44 +0000)]
[WPE] The run-minibrowser script should allow to execute also a WPE launcher
https://bugs.webkit.org/show_bug.cgi?id=173061

Reviewed by Žan Doberšek.

Launch dyz <https://github.com/Igalia/dyz> with the script
run-minibrowser for the wpe port. It is now built as part of the
WPE dependencies with JHBuild.

* Scripts/run-minibrowser:
* Scripts/webkitdirs.pm:
(launcherPath):
(launcherName):
* wpe/install-dependencies: Luajit is needed for building dyz.
* wpe/jhbuild.modules: Add dyz and update the revision for WPEBackend-mesa.

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

2 years agoUsing -[WebItemProviderPasteboard setItemProviders:] to swap out item providers befor...
wenson_hsieh@apple.com [Thu, 15 Jun 2017 18:11:52 +0000 (18:11 +0000)]
Using -[WebItemProviderPasteboard setItemProviders:] to swap out item providers before a drop breaks item provider loading
https://bugs.webkit.org/show_bug.cgi?id=173338
<rdar://problem/32777720>

Reviewed by Tim Horton.

Source/WebCore:

Currently, replacing the list of UIItemProviders right before a drop is handled results in
WebItemProviderPasteboard failing to load non-"public.content"-conformant items. This is because DragController
computes and sends to the UI process a list of UTIs to load (preferredTypeIdentifiers: one type identifier for
each item provider in WebItemProviderPasteboard). However, if the list of item providers changes immediately
before a drop is performed, WebItemProviderPasteboard will get into an inconsistent state where it has a
different number of preferred type identifiers to load than available item providers. This causes
WebItemProviderPasteboard to fail when choosing what type identifiers to load from each item provider.

To fix this, we instead have the web process propagate a list of supported type identifiers to the UI process,
which is a property of only the drop destination rather than both the destination and item providers. When
performing a drop, we then use the current item providers on WebItemProviderPasteboard to consult this list of
supported type identifiers to resolve our list of preferred type identifiers to load.

Globally renames updatePreferredTypeIdentifiers to updateSupportedTypeIdentifiers.

Tests:
DataInteractionTests.ExternalSourceOverrideDropFileUpload
DataInteractionTests.ExternalSourceOverrideDropInsertURL

* page/DragController.cpp:
(WebCore::DragController::dragEnteredOrUpdated):
(WebCore::DragController::updateSupportedTypeIdentifiersForDragHandlingMethod):
(WebCore::DragController::updatePreferredTypeIdentifiersForDragHandlingMethod): Deleted.
* page/DragController.h:
* page/mac/DragControllerMac.mm:
(WebCore::DragController::updateSupportedTypeIdentifiersForDragHandlingMethod):
(WebCore::DragController::updatePreferredTypeIdentifiersForDragHandlingMethod): Deleted.
* platform/DragData.h:
* platform/PasteboardStrategy.h:
* platform/PlatformPasteboard.h:
* platform/ios/AbstractPasteboard.h:
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::updateSupportedTypeIdentifiers):
(WebCore::PlatformPasteboard::updatePreferredTypeIdentifiers): Deleted.
* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderPasteboard init]):
(-[WebItemProviderPasteboard updateSupportedTypeIdentifiers:]):
(-[WebItemProviderPasteboard setItemProviders:]):
(-[WebItemProviderPasteboard typeIsAppropriateForSupportedTypes:]):
(-[WebItemProviderPasteboard typeIdentifierToLoadForRegisteredTypeIdentfiers:]):

Add logic to resolve preferred type identifiers from an item providers list of registered type identifiers.
This formerly existed on DragData.

(-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:synchronousTimeout:]):
(-[WebItemProviderPasteboard updatePreferredTypeIdentifiers:]): Deleted.
* platform/mac/DragDataMac.mm:

Remove preferred type identifier resolution logic from DragData.

(WebCore::typeIsAppropriateForSupportedTypes): Deleted.
(WebCore::DragData::updatePreferredTypeIdentifiers): Deleted.

Source/WebKit/mac:

Rename updatePreferredTypeIdentifiers to updateSupportedTypeIdentifiers.

* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::updateSupportedTypeIdentifiers):
(WebPlatformStrategies::updatePreferredTypeIdentifiers): Deleted.

Source/WebKit2:

Rename updatePreferredTypeIdentifiers to updateSupportedTypeIdentifiers. Also, introduce
_webView:willPerformDropWithSession: as SPI on WKUIDelegate.

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::updateSupportedTypeIdentifiers):
(WebKit::WebPasteboardProxy::updatePreferredTypeIdentifiers): Deleted.
* UIProcess/WebPasteboardProxy.h:
* UIProcess/WebPasteboardProxy.messages.in:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::updateSupportedTypeIdentifiers):
(WebKit::WebPlatformStrategies::updatePreferredTypeIdentifiers): Deleted.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Tools:

Adds new unit tests to ensure that -_webView:willPerformDropWithSession: can be used to filter out drag items
used by WebKit when handling a drop. These tests ensure that WebItemProviderPasteboard is still able to handle
these remaining items on drop.

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/ios/DataInteractionSimulator.h:
* TestWebKitAPI/ios/DataInteractionSimulator.mm:

Add -overridePerformDropBlock, which can be set to provide custom handling of dropped items.

(-[DataInteractionSimulator _webView:willPerformDropWithSession:]):

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

2 years ago[WebIDL] Replace general inclusion of JSDOMConvert.h with inclusion of individual...
commit-queue@webkit.org [Thu, 15 Jun 2017 17:49:50 +0000 (17:49 +0000)]
[WebIDL] Replace general inclusion of JSDOMConvert.h with inclusion of individual converter files to reduce unnecessary inclusion
https://bugs.webkit.org/show_bug.cgi?id=173392

Patch by Sam Weinig <sam@webkit.org> on 2017-06-15
Reviewed by Tim Horton.

Stop including the umbrella header JSDOMConvert.h in every generated bindings and
instead only include the specific converter needed. Then, go around and add all the
now missing includes that used to be obtained transitively.

* Modules/indexeddb/IDBRequest.cpp:
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
* Modules/plugins/QuickTimePluginReplacement.mm:
* bindings/js/IDBBindingUtilities.cpp:
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
* bindings/js/JSCustomElementInterface.cpp:
* bindings/js/JSCustomElementRegistryCustom.cpp:
* bindings/js/JSDOMConvertBase.h:
* bindings/js/JSDOMConvertInterface.h:
* bindings/js/JSDOMConvertRecord.h:
* bindings/js/JSDOMConvertSequences.h:
* bindings/js/JSDOMConvertUnion.h:
* bindings/js/JSDOMGlobalObject.h:
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/js/JSDOMWindowProperties.cpp:
* bindings/js/JSDocumentCustom.cpp:
* bindings/js/JSErrorHandler.cpp:
* bindings/js/JSEventListener.cpp:
* bindings/js/JSHTMLCanvasElementCustom.cpp:
* bindings/js/JSHTMLDocumentCustom.cpp:
* bindings/js/JSHistoryCustom.cpp:
* bindings/js/JSMessageEventCustom.cpp:
(WebCore::JSMessageEvent::data):
* bindings/js/JSMockContentFilterSettingsCustom.cpp:
* bindings/js/JSMutationCallback.cpp:
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::retrieveResponse):
* bindings/js/ScriptGlobalObject.cpp:
* bindings/js/SerializedScriptValue.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(AddToIncludesForIDLType):
(GetJSCAttributesForAttribute):
(GenerateEnumerationHeader):
(GenerateEnumerationImplementation):
(GenerateEnumerationImplementationContent):
(GenerateEnumerationsImplementationContent):
(GenerateEnumerationHeaderContent):
(GenerateEnumerationsHeaderContent):
(GenerateDictionaryHeaderContent):
(GenerateDictionariesHeaderContent):
(GenerateDictionaryImplementationContent):
(GenerateDictionariesImplementationContent):
(GenerateHeader):
(GeneratePropertiesHashTable):
(GenerateOverloadDispatcher):
(GenerateImplementation):
(GenerateAttributeGetterDefinition):
(GenerateSerializerDefinition):
(GenerateDictionaryHeader):
(JSValueToNative):
(NativeToJSValueUsingReferences):
(NativeToJSValueUsingPointers):
(IsValidContextForNativeToJSValue):
(NativeToJSValue):
(GenerateConstructorDefinition):
(ComputeFunctionSpecial):
* bindings/scripts/test/JS/JSMapLike.cpp:
* bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCEReactions.cpp:
* bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
* bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
* bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp:
* bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
* bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
* bindings/scripts/test/JS/JSTestCallbackInterface.h:
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
* bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestNode.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
* bindings/scripts/test/JS/JSTestPromiseRejectionEvent.h:
* bindings/scripts/test/JS/JSTestSerialization.cpp:
* bindings/scripts/test/JS/JSTestSerialization.h:
* bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
* bindings/scripts/test/JS/JSTestSerializationInherit.h:
* bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
* bindings/scripts/test/JS/JSTestSerializationInheritFinal.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
* bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
* bindings/scripts/test/JS/JSTestStandaloneEnumeration.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:
* dom/MouseEvent.cpp:
* html/HTMLPlugInImageElement.cpp:

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

2 years ago[iOS] Generate a simulated crash when the WebThread starts in MobileSafari
ddkilzer@apple.com [Thu, 15 Jun 2017 17:05:04 +0000 (17:05 +0000)]
[iOS] Generate a simulated crash when the WebThread starts in MobileSafari
<https://webkit.org/b/173386>
<rdar://problem/32776426>

Reviewed by Andy Estes.

* WebCore.xcodeproj/project.pbxproj: Add new files to project.
* platform/ios/CrashReporterSupportSoftLink.h: Add.  The using
statement is so that we don't have to write
WebCore::SimulateCrash() in WebCoreThread.mm since it's
functions are not defined inside a WebCore namespace.  I also
kept the 'pid' argument despite the style checker warning
because it matches the internal method definition.
* platform/ios/CrashReporterSupportSoftLink.mm: Add.
* platform/ios/wak/WebCoreThread.mm: Sort headers.  Soft link to
CrashReporterSupport.framework.
(WebThreadEnable): Generate a simulated crash log if the
WebThread ever starts in MobileSafari.
* platform/spi/ios/CrashReporterSupportSPI.h: Add.  The header
isn't safe to include in C++ source, so wrap the import in
extern "C" macros.

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

2 years ago[Win] Crash in accessibility layout test.
pvollan@apple.com [Thu, 15 Jun 2017 17:01:26 +0000 (17:01 +0000)]
[Win] Crash in accessibility layout test.
https://bugs.webkit.org/show_bug.cgi?id=173401

Reviewed by Brent Fulgham.

We should not manually release the punkVal IUnknown member in a _variant_t object, since the punkVal
member will be automatically released when the _variant_t object goes out of scope if the vt member
does not equal VT_UNKNOWN | VT_BYREF.
See https://msdn.microsoft.com/en-us/library/windows/desktop/ms221165(v=vs.85).aspx.

* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::titleUIElement):

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

2 years agoBuild WebKit with High Sierra (Seed 1)
jbedard@apple.com [Thu, 15 Jun 2017 16:57:17 +0000 (16:57 +0000)]
Build WebKit with High Sierra (Seed 1)
https://bugs.webkit.org/show_bug.cgi?id=173371

Reviewed by Andy Estes.

* crypto/CommonCryptoUtilities.h: Added ccRSAPSSPadding to CCAsymmetricPading enum.
* platform/spi/cocoa/AVKitSPI.h: Declare AVKit SPI used by WebKit in High Sierra.
(-[AVTouchBarPlaybackControlsControlling NS_ENUM]): Added AVTouchBarMediaSelectionOptionType
SPI used in WebPlaybackControlManager in High Sierra.
* platform/spi/cocoa/PassKitSPI.h: Declare PassKit SPI used by WebKit in High Sierra.
(NS_ERROR_ENUM): Added PKPaymentErrorCode used in WebPayment in High Sierra.

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

2 years agoRTCPeerConnection returns RTCSessionDescription where RTCSessionDescriptionInit would...
commit-queue@webkit.org [Thu, 15 Jun 2017 16:24:20 +0000 (16:24 +0000)]
RTCPeerConnection returns RTCSessionDescription where RTCSessionDescriptionInit would be appropriate
https://bugs.webkit.org/show_bug.cgi?id=173118
<rdar://problem/32746761>

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-15
Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/RTCPeerConnection-createOffer-expected.txt:

Source/WebCore:

Test: webrtc/createOfferAnswer.html

Making the promise return a RTCSessionDescription::Init instead of a RTCSessionDescription.
This aligns with the spec and is more optimal.

* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::createOfferSucceeded):
(WebCore::PeerConnectionBackend::createAnswerSucceeded):
* Modules/mediastream/PeerConnectionBackend.h:
* Modules/mediastream/RTCSessionDescription.idl:

LayoutTests:

* fast/mediastream/RTCPeerConnection-setLocalDescription-offer-expected.txt:
* fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt:
* webrtc/createOfferAnswer-expected.txt: Added.
* webrtc/createOfferAnswer.html: Added.

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

2 years agoMarked imported/w3c/web-platform-tests/dom/nodes/Document-constructor-svg.svg as...
jlewis3@apple.com [Thu, 15 Jun 2017 16:19:57 +0000 (16:19 +0000)]
Marked imported/w3c/web-platform-tests/dom/nodes/Document-constructor-svg.svg as skip.
https://bugs.webkit.org/show_bug.cgi?id=173333

Unreviewed test gardening.

* TestExpectations:

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

2 years agoImplement FALLTHROUGH macro for compilers other than Clang
annulen@yandex.ru [Thu, 15 Jun 2017 16:14:21 +0000 (16:14 +0000)]
Implement FALLTHROUGH macro for compilers other than Clang
https://bugs.webkit.org/show_bug.cgi?id=173385

Reviewed by Alex Christensen.

FALLTHROUGH should be able to use [[gnu::fallthrough]] attribute of
GCC, and [[fallthrough]] from C++17, whichever is available.

* wtf/Compiler.h:

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

2 years ago[GTK] Cleanup headers includes in GTK+ API files
carlosgc@webkit.org [Thu, 15 Jun 2017 15:40:20 +0000 (15:40 +0000)]
[GTK] Cleanup headers includes in GTK+ API files
https://bugs.webkit.org/show_bug.cgi?id=173415

Reviewed by Michael Catanzaro.

- Remove WTFGType.h from WebKitPrivate.h and include it in all other files instead of WebKitPrivate if needed.
- Stop including WebKitPrivate.h in all other private headers.
- Remove all C API includes.

* UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
* UIProcess/API/gtk/WebKitAuthenticationRequest.cpp:
* UIProcess/API/gtk/WebKitAuthenticationRequestPrivate.h:
* UIProcess/API/gtk/WebKitAutomationSession.cpp:
* UIProcess/API/gtk/WebKitBackForwardList.cpp:
* UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
* UIProcess/API/gtk/WebKitColorChooser.h:
* UIProcess/API/gtk/WebKitColorChooserRequest.cpp:
* UIProcess/API/gtk/WebKitContextMenu.cpp:
* UIProcess/API/gtk/WebKitContextMenuItem.cpp:
* UIProcess/API/gtk/WebKitContextMenuItemPrivate.h:
* UIProcess/API/gtk/WebKitContextMenuPrivate.h:
* UIProcess/API/gtk/WebKitCookieManager.cpp:
* UIProcess/API/gtk/WebKitCookieManagerPrivate.h:
* UIProcess/API/gtk/WebKitCredentialPrivate.h:
* UIProcess/API/gtk/WebKitDownload.cpp:
* UIProcess/API/gtk/WebKitDownloadClient.cpp:
* UIProcess/API/gtk/WebKitDownloadPrivate.h:
* UIProcess/API/gtk/WebKitEditorState.cpp:
* UIProcess/API/gtk/WebKitEditorStatePrivate.h:
* UIProcess/API/gtk/WebKitError.cpp:
* UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
* UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
* UIProcess/API/gtk/WebKitFileChooserRequestPrivate.h:
* UIProcess/API/gtk/WebKitFindController.cpp:
* UIProcess/API/gtk/WebKitFormClient.cpp:
* UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:
* UIProcess/API/gtk/WebKitFormSubmissionRequestPrivate.h:
* UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp:
* UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h:
* UIProcess/API/gtk/WebKitHitTestResult.cpp:
* UIProcess/API/gtk/WebKitHitTestResultPrivate.h:
* UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.cpp:
* UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequestPrivate.h:
* UIProcess/API/gtk/WebKitJavascriptResult.cpp:
* UIProcess/API/gtk/WebKitJavascriptResultPrivate.h:
* UIProcess/API/gtk/WebKitMimeInfoPrivate.h:
* UIProcess/API/gtk/WebKitNavigationActionPrivate.h:
* UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
* UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h:
* UIProcess/API/gtk/WebKitNetworkProxySettings.cpp:
* UIProcess/API/gtk/WebKitNetworkProxySettingsPrivate.h:
* UIProcess/API/gtk/WebKitNotification.cpp:
* UIProcess/API/gtk/WebKitNotificationPermissionRequest.cpp:
* UIProcess/API/gtk/WebKitNotificationPermissionRequestPrivate.h:
* UIProcess/API/gtk/WebKitNotificationPrivate.h:
* UIProcess/API/gtk/WebKitOptionMenu.cpp:
* UIProcess/API/gtk/WebKitPlugin.cpp:
* UIProcess/API/gtk/WebKitPluginPrivate.h:
* UIProcess/API/gtk/WebKitPolicyDecision.cpp:
* UIProcess/API/gtk/WebKitPolicyDecisionPrivate.h:
* UIProcess/API/gtk/WebKitPrintCustomWidget.cpp:
* UIProcess/API/gtk/WebKitPrintCustomWidgetPrivate.h:
* UIProcess/API/gtk/WebKitPrintOperation.cpp:
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
* UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h:
* UIProcess/API/gtk/WebKitSecurityManager.cpp:
* UIProcess/API/gtk/WebKitSecurityOrigin.cpp:
* UIProcess/API/gtk/WebKitSecurityOriginPrivate.h:
* UIProcess/API/gtk/WebKitSettings.cpp:
* UIProcess/API/gtk/WebKitUIClient.cpp:
* UIProcess/API/gtk/WebKitURIRequest.cpp:
* UIProcess/API/gtk/WebKitURIResponse.cpp:
* UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
* UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h:
* UIProcess/API/gtk/WebKitUserContent.cpp:
* UIProcess/API/gtk/WebKitUserContentManager.cpp:
* UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
* UIProcess/API/gtk/WebKitUserMediaPermissionRequestPrivate.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
* UIProcess/API/gtk/WebKitWebContextPrivate.h:
* UIProcess/API/gtk/WebKitWebInspector.cpp:
* UIProcess/API/gtk/WebKitWebInspectorPrivate.h:
* UIProcess/API/gtk/WebKitWebResource.cpp:
* UIProcess/API/gtk/WebKitWebResourcePrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
* UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp:
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
* UIProcess/API/gtk/WebKitWebsiteDataManagerPrivate.h:
* UIProcess/API/gtk/WebKitWebsiteDataPrivate.h:
* UIProcess/API/gtk/WebKitWindowProperties.cpp:
* UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h:
* WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp:
* WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp:
* WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.cpp:
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
* WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp:
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:

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

2 years ago[GTK] Do not use the C API in WebGtkExtensionManager
carlosgc@webkit.org [Thu, 15 Jun 2017 15:37:31 +0000 (15:37 +0000)]
[GTK] Do not use the C API in WebGtkExtensionManager
https://bugs.webkit.org/show_bug.cgi?id=173408

Reviewed by Michael Catanzaro.

.:

Update exported symbol signature.

* Source/cmake/gtksymbols.filter:

Source/WebKit2:

Use the C++ API instead.

* WebProcess/gtk/WebGtkExtensionManager.cpp:
(WebKit::parseUserData):
(WebKit::WebGtkExtensionManager::initialize):
* WebProcess/gtk/WebGtkExtensionManager.h:
* WebProcess/gtk/WebGtkInjectedBundleMain.cpp:
(WKBundleInitialize):

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

2 years ago[GTK] Stop using GtkAction in WebPopupMenuProxyGtk
aperez@igalia.com [Thu, 15 Jun 2017 14:03:03 +0000 (14:03 +0000)]
[GTK] Stop using GtkAction in WebPopupMenuProxyGtk
https://bugs.webkit.org/show_bug.cgi?id=173417

Reviewed by Carlos Garcia Campos.

This gets rid of GtkAction in WebPopupMenuProxyGtk, which was deprecated in GTK+ 3.10
and will not be available in GTK+ 4.0. Using GtkMenuItem directly makes populating
long menus slightly faster, which can be noticeable in lower-end machines.

* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::populatePopupMenu):
(WebKit::WebPopupMenuProxyGtk::menuItemActivated):
(WebKit::WebPopupMenuProxyGtk::createGtkActionForMenuItem): Deleted.
* UIProcess/gtk/WebPopupMenuProxyGtk.h:
(WebKit::WebPopupMenuProxyGtk::setCurrentlySelectedMenuItem):
Instantiate GtkMenuItem objects directly when populating the menu.

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

2 years agoUnreviewed GTK+ gardening. Update expectations of several tests failing after r218320.
magomez@igalia.com [Thu, 15 Jun 2017 12:56:28 +0000 (12:56 +0000)]
Unreviewed GTK+ gardening. Update expectations of several tests failing after r218320.

* platform/gtk/TestExpectations:

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

2 years ago[WPE] dom storage gardening
csaavedra@igalia.com [Thu, 15 Jun 2017 09:58:43 +0000 (09:58 +0000)]
[WPE] dom storage gardening

Unreviewed gardening.

Two dom storage tests marked as failing have been passing always,
so remove them.
* platform/wpe/TestExpectations:

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

2 years agoUnreviewed. Fix copy-paste error in GTK+ WEBKIT_JAVASCRIPT_ERROR definition.
carlosgc@webkit.org [Thu, 15 Jun 2017 09:49:18 +0000 (09:49 +0000)]
Unreviewed. Fix copy-paste error in GTK+ WEBKIT_JAVASCRIPT_ERROR definition.

The print one was copied there.

* UIProcess/API/gtk/WebKitError.h:

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

2 years ago[GTK] Add API to allow overriding popup menus
carlosgc@webkit.org [Thu, 15 Jun 2017 09:41:27 +0000 (09:41 +0000)]
[GTK] Add API to allow overriding popup menus
https://bugs.webkit.org/show_bug.cgi?id=172905

Reviewed by Michael Catanzaro.

Source/WebKit2:

The GTK+ API uses GTK+ for the default implementation of several UI elements like the file chooser, print dialog,
color picker, context menu, etc. but in all those cases it allows to override the default implementation. It's
not possible to override the popup menu used for select elements. This patch adds WebKitOptionMenu to represent
a select dropdown menu. It's passed as an argument of the new signal WebKitWebView::show-option-menu, and
contains WebKitOptionMenuItem elements representing the items to be displayed.

* PlatformGTK.cmake:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createPopupMenuProxy): Create a WebKitPopupMenu.
* UIProcess/API/gtk/WebKitOptionMenu.cpp: Added.
(webkitOptionMenuCreate):
(webkit_option_menu_get_n_items):
(webkit_option_menu_get_item):
(webkit_option_menu_select_item):
(webkit_option_menu_activate_item):
(webkit_option_menu_close):
* UIProcess/API/gtk/WebKitOptionMenu.h: Added.
* UIProcess/API/gtk/WebKitOptionMenuItem.cpp: Added.
(webkit_option_menu_item_copy):
(webkit_option_menu_item_free):
(webkit_option_menu_item_get_label):
(webkit_option_menu_item_get_tooltip):
(webkit_option_menu_item_is_group_label):
(webkit_option_menu_item_is_group_child):
(webkit_option_menu_item_is_enabled):
(webkit_option_menu_item_is_selected):
* UIProcess/API/gtk/WebKitOptionMenuItem.h: Added.
* UIProcess/API/gtk/WebKitOptionMenuItemPrivate.h: Added.
(_WebKitOptionMenuItem::_WebKitOptionMenuItem):
* UIProcess/API/gtk/WebKitOptionMenuPrivate.h: Added.
* UIProcess/API/gtk/WebKitPopupMenu.cpp: Added.
(WebKit::WebKitPopupMenu::WebKitPopupMenu):
(WebKit::menuCloseCallback):
(WebKit::WebKitPopupMenu::showPopupMenu): Call webkitWebViewShowOptionMenu() falling back to default
implementation if the user didn't handle the signal.
(WebKit::WebKitPopupMenu::hidePopupMenu):
(WebKit::WebKitPopupMenu::cancelTracking):
(WebKit::WebKitPopupMenu::selectItem):
(WebKit::WebKitPopupMenu::activateItem):
* UIProcess/API/gtk/WebKitPopupMenu.h: Added.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init):
(webkitWebViewShowOptionMenu): Emit WebKitWebView::show-option-menu.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Add new get_type functions.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new sections.
* UIProcess/API/gtk/webkit2.h: Add new public headers.
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk): Do not create the GtkMenu in constructor.
(WebKit::WebPopupMenuProxyGtk::showPopupMenu): Create the GtkMenu and connect to the signals here.
(WebKit::WebPopupMenuProxyGtk::hidePopupMenu): Return early if the Gtk hasn't been shown.
* UIProcess/gtk/WebPopupMenuProxyGtk.h: Make constructor and webview protected.

Tools:

Add a unit test to check the new API.

* TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt:
* TestWebKitAPI/Tests/WebKit2Gtk/TestOptionMenu.cpp: Added.
(OptionMenuTest::OptionMenuTest):
(OptionMenuTest::~OptionMenuTest):
(OptionMenuTest::destroyMenu):
(OptionMenuTest::showOptionMenuCallback):
(OptionMenuTest::menuCloseCallback):
(OptionMenuTest::showOptionMenu):
(OptionMenuTest::clickAtPositionAndWaitUntilOptionMenuShown):
(OptionMenuTest::close):
(OptionMenuTest::activateItem):
(OptionMenuTest::selectItem):
(testOptionMenuSimple):
(testOptionMenuGroups):
(testOptionMenuActivate):
(testOptionMenuSelect):
(beforeAll):
(afterAll):

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

2 years ago[GTK] Use API::InjectedBundle::ResourceLoadClient in WebKitWebPage
carlosgc@webkit.org [Thu, 15 Jun 2017 09:19:50 +0000 (09:19 +0000)]
[GTK] Use API::InjectedBundle::ResourceLoadClient in WebKitWebPage
https://bugs.webkit.org/show_bug.cgi?id=173364

Reviewed by Michael Catanzaro.

Instead of the C API.

* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkitWebPageCreate):
(didInitiateLoadForResource): Deleted.
(willSendRequestForFrame): Deleted.
(didReceiveResponseForResource): Deleted.
(didReceiveContentLengthForResource): Deleted.
(didFinishLoadForResource): Deleted.
(didFailLoadForResource): Deleted.

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

2 years ago[GTK] Use API::InjectedBundle::Client in WebKitWebExtension
carlosgc@webkit.org [Thu, 15 Jun 2017 09:10:09 +0000 (09:10 +0000)]
[GTK] Use API::InjectedBundle::Client in WebKitWebExtension
https://bugs.webkit.org/show_bug.cgi?id=173358

Reviewed by Michael Catanzaro.

Instead of the C API.

* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
(webkitWebExtensionCreate):
(webkitWebExtensionPageCreated): Deleted.
(webkitWebExtensionPageDestroy): Deleted.
(webkitWebExtensionDidReceiveMessage): Deleted.
(didCreatePage): Deleted.
(willDestroyPage): Deleted.
(didReceiveMessage): Deleted.
(didReceiveMessageToPage): Deleted.

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

2 years ago[GTK] Use API::NotificationProvider
carlosgc@webkit.org [Thu, 15 Jun 2017 08:31:58 +0000 (08:31 +0000)]
[GTK] Use API::NotificationProvider
https://bugs.webkit.org/show_bug.cgi?id=173312

Reviewed by Žan Doberšek.

Also cleanup a bit the WebKitNotificationProvider implementation, it doesn't need to be refcounted.

* UIProcess/API/gtk/WebKitNotificationProvider.cpp:
(WebKitNotificationProvider::WebKitNotificationProvider):
(WebKitNotificationProvider::~WebKitNotificationProvider):
(WebKitNotificationProvider::show):
(WebKitNotificationProvider::clearNotifications):
(WebKitNotificationProvider::notificationPermissions):
(WebKitNotificationProvider::setNotificationPermissions):
* UIProcess/API/gtk/WebKitNotificationProvider.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextConstructed):
(addOriginToMap):
(webkit_web_context_initialize_notification_permissions):

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

2 years agoAdd API::InjectedBundle::ResourceLoadClient
carlosgc@webkit.org [Thu, 15 Jun 2017 08:20:34 +0000 (08:20 +0000)]
Add API::InjectedBundle::ResourceLoadClient
https://bugs.webkit.org/show_bug.cgi?id=173362

Reviewed by Alex Christensen.

It will be used by the GTK+ port instead of the C API.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/APIInjectedBundlePageResourceLoadClient.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h.
(API::InjectedBundle::ResourceLoadClient::didInitiateLoadForResource):
(API::InjectedBundle::ResourceLoadClient::willSendRequestForFrame):
(API::InjectedBundle::ResourceLoadClient::didReceiveResponseForResource):
(API::InjectedBundle::ResourceLoadClient::didReceiveContentLengthForResource):
(API::InjectedBundle::ResourceLoadClient::didFinishLoadForResource):
(API::InjectedBundle::ResourceLoadClient::didFailLoadForResource):
(API::InjectedBundle::ResourceLoadClient::shouldCacheResponse):
(API::InjectedBundle::ResourceLoadClient::shouldUseCredentialStorage):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetResourceLoadClient):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(setUpResourceLoadClient):
(-[WKWebProcessPlugInBrowserContextController setLoadDelegate:]):
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
(WebKit::InjectedBundlePageResourceLoadClient::InjectedBundlePageResourceLoadClient):
(WebKit::InjectedBundlePageResourceLoadClient::didInitiateLoadForResource):
(WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
(WebKit::InjectedBundlePageResourceLoadClient::didReceiveResponseForResource):
(WebKit::InjectedBundlePageResourceLoadClient::didReceiveContentLengthForResource):
(WebKit::InjectedBundlePageResourceLoadClient::didFinishLoadForResource):
(WebKit::InjectedBundlePageResourceLoadClient::didFailLoadForResource):
(WebKit::InjectedBundlePageResourceLoadClient::shouldCacheResponse):
(WebKit::InjectedBundlePageResourceLoadClient::shouldUseCredentialStorage):
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest):
(WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
(WebKit::WebFrameLoaderClient::shouldUseCredentialStorage):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveResponse):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoading):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoading):
(WebKit::WebFrameLoaderClient::willCacheResponse):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setInjectedBundleResourceLoadClient):
(WebKit::WebPage::close):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::injectedBundleResourceLoadClient):

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

2 years ago[WinCairo] DumpRenderTree.cpp: error C3861: 'CFURLCacheCreate': identifier not found
commit-queue@webkit.org [Thu, 15 Jun 2017 07:18:32 +0000 (07:18 +0000)]
[WinCairo] DumpRenderTree.cpp: error C3861: 'CFURLCacheCreate': identifier not found
https://bugs.webkit.org/show_bug.cgi?id=173399

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-06-15
Reviewed by Per Arne Vollan.

OpenCFLite doesn't have CFURLCacheCreate and CFURLCacheSetSharedURLCache.
Curl port needs to do nothing because libcurl doesn't have disk cache.

* DumpRenderTree/win/DumpRenderTree.cpp:
(prepareConsistentTestingEnvironment): Call CFURLCacheCreate() and
CFURLCacheSetSharedURLCache() only if USE(CFURLCONNECTION).

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

2 years agoAdd API::InjectedBundle::Client
carlosgc@webkit.org [Thu, 15 Jun 2017 07:02:38 +0000 (07:02 +0000)]
Add API::InjectedBundle::Client
https://bugs.webkit.org/show_bug.cgi?id=173357

Reviewed by Alex Christensen.

It will be used by the GTK+ port instead of the C API.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/APIInjectedBundleBundleClient.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleClient.h.
(API::InjectedBundle::Client::didCreatePage):
(API::InjectedBundle::Client::willDestroyPage):
(API::InjectedBundle::Client::didInitializePageGroup):
(API::InjectedBundle::Client::didReceiveMessage):
(API::InjectedBundle::Client::didReceiveMessageToPage):
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetClient):
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
(webkitWebExtensionPageCreated): Deleted.
(webkitWebExtensionPageDestroy): Deleted.
(webkitWebExtensionDidReceiveMessage): Deleted.
(didCreatePage): Deleted.
(willDestroyPage): Deleted.
(didReceiveMessage): Deleted.
(didReceiveMessageToPage): Deleted.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setClient):
(WebKit::InjectedBundle::didCreatePage):
(WebKit::InjectedBundle::willDestroyPage):
(WebKit::InjectedBundle::didInitializePageGroup):
(WebKit::InjectedBundle::didReceiveMessage):
(WebKit::InjectedBundle::didReceiveMessageToPage):
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/InjectedBundleClient.cpp:
(WebKit::InjectedBundleClient::InjectedBundleClient):
(WebKit::InjectedBundleClient::didCreatePage):
(WebKit::InjectedBundleClient::willDestroyPage):
(WebKit::InjectedBundleClient::didInitializePageGroup):
(WebKit::InjectedBundleClient::didReceiveMessage):
(WebKit::InjectedBundleClient::didReceiveMessageToPage):
* WebProcess/InjectedBundle/InjectedBundleClient.h:

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

2 years agoDon't always recalc the style of display: contents elements.
commit-queue@webkit.org [Thu, 15 Jun 2017 06:58:02 +0000 (06:58 +0000)]
Don't always recalc the style of display: contents elements.
https://bugs.webkit.org/show_bug.cgi?id=172753

Patch by Emilio Cobos Álvarez <ecobos@igalia.com> on 2017-06-15
Reviewed by Antti Koivisto.

No new tests (no functionality change). This only removes an
inefficiency.

* dom/Element.cpp:
(WebCore::Element::existingComputedStyle):
* dom/Element.h:
* style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateRenderTree):
(WebCore::RenderTreeUpdater::updateElementRenderer):
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
(WebCore::Style::shouldResolveElement):
(WebCore::Style::TreeResolver::resolveComposedTree):

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

2 years agoREGRESSION: trac.webkit.org/export returns Content-Type application/xhtml+xml for...
ap@apple.com [Thu, 15 Jun 2017 06:23:19 +0000 (06:23 +0000)]
REGRESSION: trac.webkit.org/export returns Content-Type application/xhtml+xml for .html files
https://bugs.webkit.org/show_bug.cgi?id=173191

Add a MIME type to one test to check if this changes the behavior.

* http/tests/security/contentSecurityPolicy/allow-favicon.html: Added property svn:mime-type.

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

2 years ago[Cocoa] Objective-C class whose name begins with an underscore can’t be exported...
mitz@apple.com [Thu, 15 Jun 2017 05:57:27 +0000 (05:57 +0000)]
[Cocoa] Objective-C class whose name begins with an underscore can’t be exported to JavaScript
https://bugs.webkit.org/show_bug.cgi?id=168578

Reviewed by Geoff Garen.

* API/JSWrapperMap.mm:
(allocateConstructorForCustomClass): Updated for change to forEachProtocolImplementingProtocol.
(-[JSObjCClassInfo allocateConstructorAndPrototype]): Ditto.
(-[JSWrapperMap classInfoForClass:]): If the class name begins with an underscore, check if
  it defines conformance to a JSExport-derived protocol and if so, avoid using the
  superclass as a substitute as we’d normally do.

* API/ObjcRuntimeExtras.h:
(forEachProtocolImplementingProtocol): Added a "stop" argument to the block to let callers
  bail out.

* API/tests/JSExportTests.mm:
(+[JSExportTests classNamePrefixedWithUnderscoreTest]): New test for this.
(runJSExportTests): Run new test.

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

2 years agoWKErrorGetErrorCode should not return the API::Error enum values directly
carlosgc@webkit.org [Thu, 15 Jun 2017 05:38:50 +0000 (05:38 +0000)]
WKErrorGetErrorCode should not return the API::Error enum values directly
https://bugs.webkit.org/show_bug.cgi?id=173367

Reviewed by Alex Christensen.

Even if the values are the same, we should use a switch to ensure we return the C API values, and not all
API::Error enum values are exposed in the C API.

* Shared/API/c/WKErrorRef.cpp:
(WKErrorGetErrorCode):

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

2 years ago[GTK] integer expression expected if running Tools/gtk/install-dependencies
tpopela@redhat.com [Thu, 15 Jun 2017 04:01:08 +0000 (04:01 +0000)]
[GTK] integer expression expected if running Tools/gtk/install-dependencies
https://bugs.webkit.org/show_bug.cgi?id=173356

Reviewed by Michael Catanzaro.

Use the correct operator to compare the strings.

* gtk/install-dependencies:

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

2 years agoRebaseline media/modern-media-controls/media-documents
commit-queue@webkit.org [Thu, 15 Jun 2017 03:36:06 +0000 (03:36 +0000)]
Rebaseline media/modern-media-controls/media-documents
https://bugs.webkit.org/show_bug.cgi?id=173394

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

Source/WebCore:

We found two issues related to media documents while rebaselining the dedicated tests.

First, we needed to expose the --inline-controls-bar-height CSS variable to <video>
elements in media documents that are actually showing an audio UI. Previously we would
only expose the variable to <audio> elements.

Also, due to webkit.org/b/173387, we would fail to identify certain media documents as
video because the videoTracks weren't set yet when the "loadedmetadata" event would be
triggered. So now we also look at the videoWidth and videoHeight properties, which should
provide accurate information in the "loadedmetadata" event handler.

* Modules/modern-media-controls/controls/media-controls.css:
(:host(audio), :host(video.media-document.audio), *):
(:host(audio), *): Deleted.
* Modules/modern-media-controls/media/media-controller.js:
(MediaController.prototype.get isAudio):

LayoutTests:

* media/modern-media-controls/media-documents/click-on-video-should-not-pause-expected.txt:
* media/modern-media-controls/media-documents/click-on-video-should-not-pause.html:
* media/modern-media-controls/media-documents/media-document-audio-mac-sizing-expected.txt:
* media/modern-media-controls/media-documents/media-document-audio-mac-sizing.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

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

2 years agoUnreviewed, suppress invalid register alloation validation assertion in 32 bit part 2
utatane.tea@gmail.com [Thu, 15 Jun 2017 03:31:35 +0000 (03:31 +0000)]
Unreviewed, suppress invalid register alloation validation assertion in 32 bit part 2
https://bugs.webkit.org/show_bug.cgi?id=172421

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArrayIndexOf):

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

2 years agoanimations-paused-in-background-page.html and animated-svg-image-removed-from-documen...
zalan@apple.com [Thu, 15 Jun 2017 02:36:36 +0000 (02:36 +0000)]
animations-paused-in-background-page.html and animated-svg-image-removed-from-document-paused.html fail after r218284
https://bugs.webkit.org/show_bug.cgi?id=173393

Reviewed by Simon Fraser.

Testing cares really about whether the animation has initiated.

* platform/graphics/Image.h:
(WebCore::Image::animationPending):
* testing/Internals.cpp:
(WebCore::Internals::isImageAnimating):

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

2 years agoWeb Inspector: Pretty print / type info / code coverage buttons disappear after switc...
nvasilyev@apple.com [Thu, 15 Jun 2017 01:44:40 +0000 (01:44 +0000)]
Web Inspector: Pretty print / type info / code coverage buttons disappear after switching tabs
https://bugs.webkit.org/show_bug.cgi?id=162515
<rdar://problem/28455322>

Reviewed by Joseph Pecoraro.

Each ContentView owns a list of NavigationItems. When the ContentView moves across
Tabs (ContentBrowsers) it removes its NavigationItems from the old Tab's NavigationBar
and adds them to the new Tab's NavigationBar. When switching back to the original tab
the ContentView is restored, but its NavigationItems are not carried back.

* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
Add a forceUpdate parameter that is needed when navigationItems are unchanged but navigationBar is
different.

(WebInspector.ContentBrowser.prototype._removeAllNavigationItems):
Remove navigation items even when their navigationBar is no longer a current navigationBar,
e.g. a navigationBar of the previous tab.

(WebInspector.ContentBrowser.prototype._contentViewNavigationItemsDidChange):
* UserInterface/Views/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype._takeOwnershipOfContentView):

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

2 years agoRestrict filtered painting across cross-origin boundaries with transforms
dino@apple.com [Thu, 15 Jun 2017 01:01:08 +0000 (01:01 +0000)]
Restrict filtered painting across cross-origin boundaries with transforms
https://bugs.webkit.org/show_bug.cgi?id=173388
<rdar://problem/27362159>

Reviewed by Simon Fraser.

Source/WebCore:

Make sure all cases of LayerPaintingInfo maintain the security
flag. In this case there was only one new place, and since
everything is scalar, there was no need for a real copy constructor.

Test: http/tests/css/filters-on-iframes-transform.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerByApplyingTransform): Make sure the cross
origin flag is used in the call to paint the layer children.
* rendering/RenderLayer.h: Fix some typos.

LayoutTests:

New test that checks painting across a origin boundary when in
a transformed container. Also clean up the existing test
to make it smfr-compliant (green is good, red is bad).

* http/tests/css/filters-on-iframes-expected.html:
* http/tests/css/filters-on-iframes-transform-expected.html: Added.
* http/tests/css/filters-on-iframes-transform.html: Added.
* http/tests/css/filters-on-iframes.html:
* http/tests/css/resources/references-external-green.html: Copied from LayoutTests/http/tests/css/resources/references-external.html.
* http/tests/css/resources/references-external-red.html: Renamed from LayoutTests/http/tests/css/resources/references-external.html.
* http/tests/css/resources/solid-green.html: Added.

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

2 years agoUnreviewed, rolling out r218285.
commit-queue@webkit.org [Thu, 15 Jun 2017 00:39:21 +0000 (00:39 +0000)]
Unreviewed, rolling out r218285.
https://bugs.webkit.org/show_bug.cgi?id=173391

API test fails on iOS (Requested by alexchristensen on
#webkit).

Reverted changeset:

"Add SPI for immediate injection of user scripts"
https://bugs.webkit.org/show_bug.cgi?id=173342
http://trac.webkit.org/changeset/218285

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

2 years agoWeb Inspector: REGRESSION: SVG files and favicon don't display properly
drousso@apple.com [Thu, 15 Jun 2017 00:36:46 +0000 (00:36 +0000)]
Web Inspector: REGRESSION: SVG files and favicon don't display properly
https://bugs.webkit.org/show_bug.cgi?id=173389
<rdar://problem/32774281>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/ImageResourceContentView.css:
(.content-view.resource.image img):
Don't set a `min-width` as it has odd interactions with flexbox.

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

2 years agoUnreviewed, rolling out r218267.
commit-queue@webkit.org [Thu, 15 Jun 2017 00:24:11 +0000 (00:24 +0000)]
Unreviewed, rolling out r218267.
https://bugs.webkit.org/show_bug.cgi?id=173390

"The previous rollout of r218263, r218265, and r218266 by
mlewis13 on bug 173383 missed r218267 and broke the GTK+
build" (Requested by clopez_ on #webkit).

Reverted changeset:

"[GTK] Use API::InjectedBundle::ResourceLoadClient in
WebKitWebPage"
https://bugs.webkit.org/show_bug.cgi?id=173364
http://trac.webkit.org/changeset/218267

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

2 years agoVersioning.
matthew_hanson@apple.com [Wed, 14 Jun 2017 23:39:30 +0000 (23:39 +0000)]
Versioning.

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

2 years agoWebKit falsely reports that a web process is unresponsive if you close a page shortly...
cdumez@apple.com [Wed, 14 Jun 2017 22:49:42 +0000 (22:49 +0000)]
WebKit falsely reports that a web process is unresponsive if you close a page shortly after stopping a load
https://bugs.webkit.org/show_bug.cgi?id=173384
<rdar://problem/32723779>

Reviewed by Dan Bernstein.

Source/WebKit2:

WebKit falsely reports that a web process is unresponsive if you close a page shortly after stopping a load.
This is because WebPageProxy::stopLoad() starts the responsiveness timer and expects a StopResponsinessTimer
IPC from the WebProcess to stop the timer so we don't report the process as unresponsive. However, if
WebPageProxy::close() is called before the StopResponsinessTimer IPC has been received, the page will remove
itself from the message receiver map and we would no longer be able to receive the StopResponsinessTimer
IPC and stop the timer, even if the WebProcess sent it to the UIProcess.

To address the issue, we now send the IPC Message to the WebProcessProxy instead of the WebPageProxy, so we
can stop the responsiveness timer, even after the WebPageProxy has been called.

* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::stopResponsivenessTimer):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::SendStopResponsivenessTimer::~SendStopResponsivenessTimer):
(WebKit::WebPage::tryClose):
(WebKit::WebPage::loadRequest):
(WebKit::WebPage::loadDataImpl):
(WebKit::WebPage::stopLoading):
(WebKit::WebPage::reload):
(WebKit::WebPage::goForward):
(WebKit::WebPage::goBack):
(WebKit::WebPage::goToBackForwardItem):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/ResponsivenessTimer.cpp: Added.
Add API test coverage.

* TestWebKitAPI/cocoa/UtilitiesCocoa.mm:
(TestWebKitAPI::Util::sleep):
Update implementation of Util::sleep() so that we actually run the run loop.
Otherwise, we don't process events while sleeping.

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

2 years agoUnreviewed, rolling out r218263, r218265, and r218266.
commit-queue@webkit.org [Wed, 14 Jun 2017 22:19:49 +0000 (22:19 +0000)]
Unreviewed, rolling out r218263, r218265, and r218266.
https://bugs.webkit.org/show_bug.cgi?id=173383

"These revisions caused multiple API test to Time out on
macOS" (Requested by mlewis13 on #webkit).

Reverted changesets:

"Add API::InjectedBundle::Client"
https://bugs.webkit.org/show_bug.cgi?id=173357
http://trac.webkit.org/changeset/218263

"[GTK] Use API::InjectedBundle::Client in WebKitWebExtension"
https://bugs.webkit.org/show_bug.cgi?id=173358
http://trac.webkit.org/changeset/218265

"Add API::InjectedBundle::ResourceLoadClient"
https://bugs.webkit.org/show_bug.cgi?id=173362
http://trac.webkit.org/changeset/218266

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

2 years ago[WK2][iOS] Remove dead-code "import "removed-dev-nodes.sb” from sandboxes (173378)
bfulgham@apple.com [Wed, 14 Jun 2017 21:06:39 +0000 (21:06 +0000)]
[WK2][iOS] Remove dead-code "import "removed-dev-nodes.sb” from sandboxes (173378)
https://bugs.webkit.org/show_bug.cgi?id=173378
<rdar://problem/32773230>

Reviewed by Alexey Proskuryakov.

Clean up the sandboxes to remove a couple of dead functions (and imports):
1. Remove the import "removed-dev-nodes.sb" from the sandbox, since this file is now empty.
2. Also remove the call to "instruments-support" as this is a no-op function in modern iOS.

* Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

2 years agoVideo flashes black when switching back to a tab https://www.apple.com/homepod/
jer.noble@apple.com [Wed, 14 Jun 2017 20:47:01 +0000 (20:47 +0000)]
Video flashes black when switching back to a tab https://apple.com/homepod/
https://bugs.webkit.org/show_bug.cgi?id=173377

Reviewed by Eric Carlson.

Previously, we had set the background color of the video layer to black in order to make the rect
occupied by the HTMLMediaElement fully opaque. This worked around a graphics corruption bug. Since
then, the code in RenderVideo::foregroundIsKnownToBeOpaqueInRect(...) has been fixed to fully account
for whether the HTMLMediaElement has a valid frame to display, making the black layer background
unnecessary.

Remove all the instances where we were setting the background color of the video layer to black.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm:
(WebCore::VideoFullscreenLayerManager::setVideoLayer):
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer):

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

2 years agoWebAssembly: remove empty test files
jfbastien@apple.com [Wed, 14 Jun 2017 20:15:47 +0000 (20:15 +0000)]
WebAssembly: remove empty test files

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

2 years agoUnreviewed, rolling out r218161.
jlewis3@apple.com [Wed, 14 Jun 2017 20:01:13 +0000 (20:01 +0000)]
Unreviewed, rolling out r218161.

Introduced bot API test failures and Layout Test Failures.

Reverted changeset:

"[Cocoa] Expand system-ui to include every item in the Core
Text cascade list"
https://bugs.webkit.org/show_bug.cgi?id=173043
http://trac.webkit.org/changeset/218161

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

2 years agoAdd SPI for immediate injection of user scripts
commit-queue@webkit.org [Wed, 14 Jun 2017 19:51:00 +0000 (19:51 +0000)]
Add SPI for immediate injection of user scripts
https://bugs.webkit.org/show_bug.cgi?id=173342
<rdar://problem/29202285>

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

Source/WebCore:

The new SPI is WKUserContentController._addUserScriptImmediately.
It is covered by new API tests.

* page/Frame.cpp:
(WebCore::Frame::injectUserScripts):
(WebCore::Frame::injectUserScriptImmediately):
Move injection functionality to allow us to call it directly from the new SPI.
* page/Frame.h:
* page/Page.cpp:
(WebCore::Page::forEachPage):
* page/Page.h:

Source/WebKit2:

* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupAddUserScript):
* UIProcess/API/C/WKUserContentControllerRef.cpp:
(WKUserContentControllerAddUserScript):
* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController addUserScript:]):
(-[WKUserContentController _addUserScriptImmediately:]):
* UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::addUserScript):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::addUserScripts):
(WebKit::WebUserContentController::addUserScriptInternal):
If we are to inject the script internally, inject it into the appropriate pages.
If we're injecting into the top frame only, there's no need to traverse the frame tree.
(WebKit::WebUserContentController::addUserScript):
* WebProcess/UserContent/WebUserContentController.h:
* WebProcess/UserContent/WebUserContentController.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_cpuLimit):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/UserContentController.mm:
(waitForMessage):
(TEST):

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

2 years agoCrash in WebCore::RenderStyle::colorIncludingFallback.
zalan@apple.com [Wed, 14 Jun 2017 19:36:45 +0000 (19:36 +0000)]
Crash in WebCore::RenderStyle::colorIncludingFallback.
https://bugs.webkit.org/show_bug.cgi?id=173347
<rdar://problem/32675317>

Reviewed by Chris Dumez.

Source/WebCore:

Starting an SVG image animation synchronously might trigger recursive style recalc.
We should kick off the animation on a zero timer to reduce callstack complexity.

Test: svg/as-image/svg-css-animation.html

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::didAddClient):
* platform/graphics/Image.cpp:
(WebCore::Image::Image):
(WebCore::Image::startAnimationAsynchronously):
* platform/graphics/Image.h:

LayoutTests:

* svg/animations/animated-svg-image-removed-from-document-paused.html: animations are not started synchronously anymore.
* svg/as-image/svg-css-animation-expected.txt: Added.
* svg/as-image/svg-css-animation.html: Added.

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

2 years agoAdd WPE to the flakiness dashboard
csaavedra@igalia.com [Wed, 14 Jun 2017 19:21:24 +0000 (19:21 +0000)]
Add WPE to the flakiness dashboard
https://bugs.webkit.org/show_bug.cgi?id=173365

Reviewed by Carlos Alberto Lopez Perez.

* TestResultServer/static-dashboards/builders.jsonp:
* TestResultServer/static-dashboards/flakiness_dashboard.js:
* TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
(resetGlobals):
* TestResultServer/static-dashboards/loader_unittests.js:

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

2 years agoFixed typo error for re-baselined editing/execCommand/strikethrough-uses-strike-tag...
jlewis3@apple.com [Wed, 14 Jun 2017 19:20:01 +0000 (19:20 +0000)]
Fixed typo error for re-baselined editing/execCommand/strikethrough-uses-strike-tag.html.
https://bugs.webkit.org/show_bug.cgi?id=173375

Unreviewed test gardening.

* platform/mac-wk1/editing/execCommand/strikethrough-uses-strike-tag-expected.txt: Renamed from LayoutTests/platform/mac-wk1/editing/exeCommand/strikethrough-uses-strike-tag-expected.txt.
* platform/win/editing/execCommand/strikethrough-uses-strike-tag-expected.txt: Renamed from LayoutTests/platform/win/editing/exeCommand/strikethrough-uses-strike-tag-expected.txt.

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

2 years agoWKIconLoadingDelegate never gets asked about the default favicon if touch/touch-preco...
beidson@apple.com [Wed, 14 Jun 2017 19:17:22 +0000 (19:17 +0000)]
WKIconLoadingDelegate never gets asked about the default favicon if touch/touch-precomposed icons are in the <head>
<rdar://problem/32614328> and https://bugs.webkit.org/show_bug.cgi?id=173376

Reviewed by Alex Christensen.

Source/WebCore:

Covered by new API test

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startIconLoading): Previously we applied the default favicon if the set of LinkIcons was empty.
  Now, apply the default favicon if the set of LinkIcons contains no explicit favicon.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/IconLoadingDelegate.mm: Added.
(-[IconLoadingDelegate webView:shouldLoadIconWithParameters:completionHandler:]):
(-[IconLoadingSchemeHandler initWithData:mimeType:]):
(-[IconLoadingSchemeHandler webView:startURLSchemeTask:]):
(-[IconLoadingSchemeHandler webView:stopURLSchemeTask:]):
(TEST):

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

2 years agotransitions/created-while-suspended.html is slow and flaky
cdumez@apple.com [Wed, 14 Jun 2017 18:42:15 +0000 (18:42 +0000)]
transitions/created-while-suspended.html is slow and flaky
https://bugs.webkit.org/show_bug.cgi?id=173370

Reviewed by Zalan Bujtas.

The test was waiting 8 seconds at the end, unnecessarily.
Instead, end the test as soon as the transition ends, after resuming
the animations.

* TestExpectations:
* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:
* transitions/created-while-suspended-expected.txt:
* transitions/created-while-suspended.html:

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

2 years agoWKContentViewEditingActions API test always fails
timothy_horton@apple.com [Wed, 14 Jun 2017 18:22:39 +0000 (18:22 +0000)]
WKContentViewEditingActions API test always fails
https://bugs.webkit.org/show_bug.cgi?id=173374

Reviewed by Wenson Hsieh.

* TestWebKitAPI/Tests/WebKit2Cocoa/WKContentViewEditingActions.mm:
(TEST):
selectAll isn't working, because canPerformAction for selectAll returns NO
if selectionIsNone (which is true in the non-contenteditable case).
Instead, make use of r218180's test page, which knows how to select itself.
Also, reset the pasteboard at the beginning of the test to reduce confusion
(I landed the test broken because my simulator had the correct text
stuck in its pasteboard).

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

2 years agoConfigure screen scale for running layout tests on plus devices
jbedard@apple.com [Wed, 14 Jun 2017 18:15:50 +0000 (18:15 +0000)]
Configure screen scale for running layout tests on plus devices
https://bugs.webkit.org/show_bug.cgi?id=173319

Reviewed by Tim Horton.

Source/WebKit2:

* Platform/spi/ios/UIKitSPI.h: Both this and UIKitTestSPI.h define UIKeyboard. Use
a define guard to prevent re-definition.

Tools:

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Include UIKitTestSPI.h in project.
* DumpRenderTree/mac/DumpRenderTree.mm:
(dumpRenderTree): Set screen scale to 2.0.
* TestRunnerShared/spi/UIKitTestSPI.h: Copied from Tools/WebKitTestRunner/ios/UIKitSPI.h,
add _setScale for UIScreen.
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Include UIKitTestSPI.h in project.
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: Import UIKitTestSPI.h instead of UIKitSPI.h.
* WebKitTestRunner/ios/HIDEventGenerator.h: Ditto.
* WebKitTestRunner/ios/HIDEventGenerator.mm: Ditto.
* WebKitTestRunner/ios/PlatformWebViewIOS.mm: Ditto.
* WebKitTestRunner/ios/TestControllerIOS.mm: Ditto.
(WTR::TestController::platformInitialize): Set screen scale to 2.0.
* WebKitTestRunner/ios/UIKitSPI.h: Moved to TestRunnerShared/spi/UIKitTestSPI.h.
* WebKitTestRunner/ios/UIScriptControllerIOS.mm: Import UIKitTestSPI.h instead of UIKitSPI.h.
* WebKitTestRunner/ios/mainIOS.mm: Ditto.

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

2 years agoLayout Test media/modern-media-controls/placard-support/placard-support-pip.html...
commit-queue@webkit.org [Wed, 14 Jun 2017 18:14:51 +0000 (18:14 +0000)]
Layout Test media/modern-media-controls/placard-support/placard-support-pip.html is failing
https://bugs.webkit.org/show_bug.cgi?id=173373

Patch by Antoine Quint <graouts@apple.com> on 2017-06-14
Reviewed by Antoine Quint.

* platform/mac/TestExpectations:

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

2 years agoRebaselined editing/execCommand/strikethrough-uses-strike-tag.html.
jlewis3@apple.com [Wed, 14 Jun 2017 18:12:06 +0000 (18:12 +0000)]
Rebaselined editing/execCommand/strikethrough-uses-strike-tag.html.
https://bugs.webkit.org/show_bug.cgi?id=173375

Unreviewed test gardening.

* platform/mac-wk1/editing/exeCommand/strikethrough-uses-strike-tag-expected.txt: Added.
* platform/win/editing/exeCommand/strikethrough-uses-strike-tag-expected.txt: Added.

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

2 years agoREGRESSION: 15 new jsc failures in WPE and GTK+
csaavedra@igalia.com [Wed, 14 Jun 2017 18:09:36 +0000 (18:09 +0000)]
REGRESSION: 15 new jsc failures in WPE and GTK+
https://bugs.webkit.org/show_bug.cgi?id=173349

Reviewed by JF Bastien.

Recent changes to generateWasm.py are not accounted for from
CMake, which leads to WasmOps.h not being regenerated in partial
builds. Make generateWasm.py an additional dependency.
* CMakeLists.txt:

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

2 years agoAdd iOS 11 support to the bot watcher's dashboard
ap@apple.com [Wed, 14 Jun 2017 18:07:27 +0000 (18:07 +0000)]
Add iOS 11 support to the bot watcher's dashboard
https://bugs.webkit.org/show_bug.cgi?id=173369

Reviewed by Lucas Forschler.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS11.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS11@2x.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS11Simulator.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS11Simulator@2x.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:

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

2 years ago[GTK][WPE] Raise the timeout values for layout tests
clopez@igalia.com [Wed, 14 Jun 2017 17:58:57 +0000 (17:58 +0000)]
[GTK][WPE] Raise the timeout values for layout tests
https://bugs.webkit.org/show_bug.cgi?id=173368

Reviewed by Carlos Garcia Campos.

Raise the values to 15 seconds in Release builds and 30 seconds (2x) in Debug builds.
When running under valgrind a 10x multiplier is applied.

* Scripts/webkitpy/port/gtk.py:
(GtkPort.default_timeout_ms):
* Scripts/webkitpy/port/gtk_unittest.py:
(GtkPortTest.test_default_timeout_ms):
* Scripts/webkitpy/port/wpe.py:
(WPEPort.default_timeout_ms):
* Scripts/webkitpy/port/wpe_unittest.py: Copied from Tools/Scripts/webkitpy/port/gtk_unittest.py.
(WPEPortTest):
(WPEPortTest.make_port):
(WPEPortTest.test_default_timeout_ms):
(WPEPortTest.test_get_crash_log):

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

2 years agoTest persistent WKHTTPCookieStorages on iOS.
achristensen@apple.com [Wed, 14 Jun 2017 17:56:17 +0000 (17:56 +0000)]
Test persistent WKHTTPCookieStorages on iOS.
https://bugs.webkit.org/show_bug.cgi?id=173284

* TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:
(TEST):
Make the bots green again for now. There's still a problem, and I'll investigate and fix.

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

2 years agoFlaky Test: media/media-source/media-source-unnecessary-seek-seeked.html
jer.noble@apple.com [Wed, 14 Jun 2017 17:32:48 +0000 (17:32 +0000)]
Flaky Test: media/media-source/media-source-unnecessary-seek-seeked.html
https://bugs.webkit.org/show_bug.cgi?id=173344

Reviewed by Eric Carlson.

Separate the concept of "the page has asked us to seek" from "we have asked the
media player to seek". When the media engine tells us its ready state has changed
after the page has requested a seek, but before the media element has asked its
player to perform the seek, we were previously firing a seeked event. Now we'll
check this new ivar and see that we aren't expecting a seek to finish yet.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::finishSeek):
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
* html/HTMLMediaElement.h:

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

2 years ago[GTK] Use API::InjectedBundle::ResourceLoadClient in WebKitWebPage
carlosgc@webkit.org [Wed, 14 Jun 2017 17:22:42 +0000 (17:22 +0000)]
[GTK] Use API::InjectedBundle::ResourceLoadClient in WebKitWebPage
https://bugs.webkit.org/show_bug.cgi?id=173364

Reviewed by Michael Catanzaro.

Instead of the C API.

* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkitWebPageCreate):
(didInitiateLoadForResource): Deleted.
(willSendRequestForFrame): Deleted.
(didReceiveResponseForResource): Deleted.
(didReceiveContentLengthForResource): Deleted.
(didFinishLoadForResource): Deleted.
(didFailLoadForResource): Deleted.

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

2 years agoAdd API::InjectedBundle::ResourceLoadClient
carlosgc@webkit.org [Wed, 14 Jun 2017 17:10:28 +0000 (17:10 +0000)]
Add API::InjectedBundle::ResourceLoadClient
https://bugs.webkit.org/show_bug.cgi?id=173362

Reviewed by Alex Christensen.

It will be used by the GTK+ port instead of the C API.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/APIInjectedBundlePageResourceLoadClient.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h.
(API::InjectedBundle::ResourceLoadClient::didInitiateLoadForResource):
(API::InjectedBundle::ResourceLoadClient::willSendRequestForFrame):
(API::InjectedBundle::ResourceLoadClient::didReceiveResponseForResource):
(API::InjectedBundle::ResourceLoadClient::didReceiveContentLengthForResource):
(API::InjectedBundle::ResourceLoadClient::didFinishLoadForResource):
(API::InjectedBundle::ResourceLoadClient::didFailLoadForResource):
(API::InjectedBundle::ResourceLoadClient::shouldCacheResponse):
(API::InjectedBundle::ResourceLoadClient::shouldUseCredentialStorage):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetResourceLoadClient):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(setUpResourceLoadClient):
(-[WKWebProcessPlugInBrowserContextController setLoadDelegate:]):
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
(WebKit::InjectedBundlePageResourceLoadClient::InjectedBundlePageResourceLoadClient):
(WebKit::InjectedBundlePageResourceLoadClient::didInitiateLoadForResource):
(WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
(WebKit::InjectedBundlePageResourceLoadClient::didReceiveResponseForResource):
(WebKit::InjectedBundlePageResourceLoadClient::didReceiveContentLengthForResource):
(WebKit::InjectedBundlePageResourceLoadClient::didFinishLoadForResource):
(WebKit::InjectedBundlePageResourceLoadClient::didFailLoadForResource):
(WebKit::InjectedBundlePageResourceLoadClient::shouldCacheResponse):
(WebKit::InjectedBundlePageResourceLoadClient::shouldUseCredentialStorage):
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest):
(WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
(WebKit::WebFrameLoaderClient::shouldUseCredentialStorage):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveResponse):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoading):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoading):
(WebKit::WebFrameLoaderClient::willCacheResponse):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setInjectedBundleResourceLoadClient):
(WebKit::WebPage::close):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::injectedBundleResourceLoadClient):

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

2 years ago[GTK] Use API::InjectedBundle::Client in WebKitWebExtension
carlosgc@webkit.org [Wed, 14 Jun 2017 16:45:59 +0000 (16:45 +0000)]
[GTK] Use API::InjectedBundle::Client in WebKitWebExtension
https://bugs.webkit.org/show_bug.cgi?id=173358

Reviewed by Michael Catanzaro.

Instead of the C API.

* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
(webkitWebExtensionCreate):
(webkitWebExtensionPageCreated): Deleted.
(webkitWebExtensionPageDestroy): Deleted.
(webkitWebExtensionDidReceiveMessage): Deleted.
(didCreatePage): Deleted.
(willDestroyPage): Deleted.
(didReceiveMessage): Deleted.
(didReceiveMessageToPage): Deleted.

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

2 years agoUnreviewed, rolling out r218157.
jlewis3@apple.com [Wed, 14 Jun 2017 16:40:27 +0000 (16:40 +0000)]
Unreviewed, rolling out r218157.

This patch caused multiple API failures on iOS Simulator.

Reverted changeset:

"@font-face rules with invalid primary fonts never download
their secondary fonts"
https://bugs.webkit.org/show_bug.cgi?id=173138
http://trac.webkit.org/changeset/218157

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

2 years agoAdd API::InjectedBundle::Client
carlosgc@webkit.org [Wed, 14 Jun 2017 16:37:18 +0000 (16:37 +0000)]
Add API::InjectedBundle::Client
https://bugs.webkit.org/show_bug.cgi?id=173357

Reviewed by Alex Christensen.

It will be used by the GTK+ port instead of the C API.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/APIInjectedBundleBundleClient.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleClient.h.
(API::InjectedBundle::Client::didCreatePage):
(API::InjectedBundle::Client::willDestroyPage):
(API::InjectedBundle::Client::didInitializePageGroup):
(API::InjectedBundle::Client::didReceiveMessage):
(API::InjectedBundle::Client::didReceiveMessageToPage):
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetClient):
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
(webkitWebExtensionPageCreated): Deleted.
(webkitWebExtensionPageDestroy): Deleted.
(webkitWebExtensionDidReceiveMessage): Deleted.
(didCreatePage): Deleted.
(willDestroyPage): Deleted.
(didReceiveMessage): Deleted.
(didReceiveMessageToPage): Deleted.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setClient):
(WebKit::InjectedBundle::didCreatePage):
(WebKit::InjectedBundle::willDestroyPage):
(WebKit::InjectedBundle::didInitializePageGroup):
(WebKit::InjectedBundle::didReceiveMessage):
(WebKit::InjectedBundle::didReceiveMessageToPage):
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/InjectedBundleClient.cpp:
(WebKit::InjectedBundleClient::InjectedBundleClient):
(WebKit::InjectedBundleClient::didCreatePage):
(WebKit::InjectedBundleClient::willDestroyPage):
(WebKit::InjectedBundleClient::didInitializePageGroup):
(WebKit::InjectedBundleClient::didReceiveMessage):
(WebKit::InjectedBundleClient::didReceiveMessageToPage):
* WebProcess/InjectedBundle/InjectedBundleClient.h:

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

2 years ago[GTK] Use API::InjectedBundleClient in WebKitInjectedBundleClient
carlosgc@webkit.org [Wed, 14 Jun 2017 16:24:32 +0000 (16:24 +0000)]
[GTK] Use API::InjectedBundleClient in WebKitInjectedBundleClient
https://bugs.webkit.org/show_bug.cgi?id=173351

Reviewed by Michael Catanzaro.

Instead of the C API.

* UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
(attachInjectedBundleClientToContext):
(didReceiveWebViewMessageFromInjectedBundle): Deleted.
(didReceiveMessageFromInjectedBundle): Deleted.
(getInjectedBundleInitializationUserData): Deleted.

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

2 years agoAdd API::InjectedBundleClient
carlosgc@webkit.org [Wed, 14 Jun 2017 16:21:28 +0000 (16:21 +0000)]
Add API::InjectedBundleClient
https://bugs.webkit.org/show_bug.cgi?id=173350

Reviewed by Alex Christensen.

It will be used by the GTK+ port instead of the C API.

* UIProcess/API/APIInjectedBundleClient.h: Copied from Source/WebKit2/UIProcess/WebContextInjectedBundleClient.h.
(API::InjectedBundleClient::didReceiveMessageFromInjectedBundle):
(API::InjectedBundleClient::didReceiveSynchronousMessageFromInjectedBundle):
(API::InjectedBundleClient::getInjectedBundleInitializationUserData):
* UIProcess/API/C/WKContext.cpp:
(WKContextSetInjectedBundleClient):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextDispose):
* UIProcess/WebContextInjectedBundleClient.cpp:
(WebKit::WebContextInjectedBundleClient::WebContextInjectedBundleClient):
(WebKit::WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle):
(WebKit::WebContextInjectedBundleClient::didReceiveSynchronousMessageFromInjectedBundle):
(WebKit::WebContextInjectedBundleClient::getInjectedBundleInitializationUserData):
* UIProcess/WebContextInjectedBundleClient.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::setInjectedBundleClient):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::handleMessage):
(WebKit::WebProcessPool::handleSynchronousMessage):
* UIProcess/WebProcessPool.h:
* WebKit2.xcodeproj/project.pbxproj:

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

2 years agoAdd API::NotificationProvider
carlosgc@webkit.org [Wed, 14 Jun 2017 16:17:57 +0000 (16:17 +0000)]
Add API::NotificationProvider
https://bugs.webkit.org/show_bug.cgi?id=173309

Reviewed by Alex Christensen.

It will be used by the GTK+ port instead of the C API.

* UIProcess/API/APINotificationProvider.h: Copied from Source/WebKit2/UIProcess/Notifications/WebNotificationProvider.h.
(API::NotificationProvider::show):
(API::NotificationProvider::cancel):
(API::NotificationProvider::didDestroyNotification):
(API::NotificationProvider::clearNotifications):
(API::NotificationProvider::addNotificationManager):
(API::NotificationProvider::removeNotificationManager):
(API::NotificationProvider::notificationPermissions):
* UIProcess/API/C/WKNotificationManager.cpp:
(WKNotificationManagerSetProvider):
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy):
(WebKit::WebNotificationManagerProxy::setProvider):
(WebKit::WebNotificationManagerProxy::processPoolDestroyed):
(WebKit::WebNotificationManagerProxy::notificationPermissions):
(WebKit::WebNotificationManagerProxy::show):
(WebKit::WebNotificationManagerProxy::cancel):
(WebKit::WebNotificationManagerProxy::didDestroyNotification):
(WebKit::WebNotificationManagerProxy::clearNotifications):
* UIProcess/Notifications/WebNotificationManagerProxy.h:
* UIProcess/Notifications/WebNotificationProvider.cpp:
(WebKit::WebNotificationProvider::WebNotificationProvider):
(WebKit::WebNotificationProvider::show):
(WebKit::WebNotificationProvider::cancel):
(WebKit::WebNotificationProvider::didDestroyNotification):
(WebKit::WebNotificationProvider::addNotificationManager):
(WebKit::WebNotificationProvider::removeNotificationManager):
(WebKit::WebNotificationProvider::notificationPermissions):
* UIProcess/Notifications/WebNotificationProvider.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
* WebKit2.xcodeproj/project.pbxproj:

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

2 years agoAPI clients should not be passed by value to the setters
carlosgc@webkit.org [Wed, 14 Jun 2017 16:13:19 +0000 (16:13 +0000)]
API clients should not be passed by value to the setters
https://bugs.webkit.org/show_bug.cgi?id=173266

Reviewed by Alex Christensen.

By using a rvalue reference we make it more explicit that the ownership is transferred and we avoid the
parameter construction.

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::setClient):
* UIProcess/Automation/WebAutomationSession.h:
* UIProcess/WebGeolocationManagerProxy.cpp:
(WebKit::WebGeolocationManagerProxy::setProvider):
* UIProcess/WebGeolocationManagerProxy.h:
* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::setClient):
* UIProcess/WebIconDatabase.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setHistoryClient):
(WebKit::WebPageProxy::setNavigationClient):
(WebKit::WebPageProxy::setLoaderClient):
(WebKit::WebPageProxy::setPolicyClient):
(WebKit::WebPageProxy::setFormClient):
(WebKit::WebPageProxy::setUIClient):
(WebKit::WebPageProxy::setIconLoadingClient):
(WebKit::WebPageProxy::setFindClient):
(WebKit::WebPageProxy::setFindMatchesClient):
(WebKit::WebPageProxy::setDiagnosticLoggingClient):
(WebKit::WebPageProxy::setContextMenuClient):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::setFullscreenClient):
(WebKit::WebPageProxy::getLoadDecisionForIcon):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::setHistoryClient):
(WebKit::WebProcessPool::setDownloadClient):
(WebKit::WebProcessPool::setAutomationClient):
* UIProcess/WebProcessPool.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setInjectedBundleContextMenuClient):
(WebKit::WebPage::setInjectedBundleEditorClient):
(WebKit::WebPage::setInjectedBundleFormClient):
(WebKit::WebPage::setInjectedBundlePageLoaderClient):
(WebKit::WebPage::setInjectedBundleUIClient):
* WebProcess/WebPage/WebPage.h:

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

2 years ago[Win64] Fails to build Asm.lib (PaintHooks.asm) since Bug 173132
commit-queue@webkit.org [Wed, 14 Jun 2017 16:01:56 +0000 (16:01 +0000)]
[Win64] Fails to build Asm.lib (PaintHooks.asm) since Bug 173132
https://bugs.webkit.org/show_bug.cgi?id=173308

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-06-14
Reviewed by Alex Christensen.

Use the same method to process asm file as well as JSC does (Bug 170833).

* PlatformWin.cmake: Use add_custom_command to assemble PaintHooks.asm.

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

2 years agoREGRESSION (r217997): mint.com header renders incorrectly when initially loaded
cdumez@apple.com [Wed, 14 Jun 2017 15:40:51 +0000 (15:40 +0000)]
REGRESSION (r217997): mint.com header renders incorrectly when initially loaded
https://bugs.webkit.org/show_bug.cgi?id=173302
<rdar://problem/32731747>

Reviewed by Darin Adler.

Source/WebCore:

r217997 updated ImplicitAnimation::reset() to not call updateStateMachine(AnimationStateInput::RestartAnimation)
if the compositeAnimation is suspended. If the compositeAnimation is suspended, we would call
updateStateMachine(AnimationStateInput::AnimationStateInput::PlayStatePaused), which was expected to be a no-op.
This was needed because otherwise, changing the style of the animated element would restart the animation
even though it was supposed to be suspended. One thing I did not realize is that calling
updateStateMachine(AnimationStateInput::AnimationStateInput::PlayStatePaused) on an animation that is already
in PausedNew state, will cause it to move to PausedWaitResponse state. This is an issue because upon resuming
we would call AnimationBase::updatePlayState(AnimPlayStatePlaying) which would return early because
AnimationBase::paused() would return false. To address the issue, we no longer call updateStateMachine(PlayStatePaused)
in ImplicitAnimation::reset() when the compositeAnimation is suspended, so that the animation stays in
PausedNew state until we resume. When we resume, AnimationBase::paused() returns false and we actually resume
the animation.

Tests:
fast/animation/css-animation-resuming-when-visible-with-style-change.html
fast/animation/css-animation-resuming-when-visible-with-style-change2.html

* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::reset):

LayoutTests:

Add layout test coverage. We change the style of the animated element while the animation is paused,
and then we resume the animations.

* fast/animation/css-animation-resuming-when-visible-with-style-change-expected.txt: Added.
* fast/animation/css-animation-resuming-when-visible-with-style-change.html: Added.
* fast/animation/css-animation-resuming-when-visible-with-style-change2-expected.txt: Added.
* fast/animation/css-animation-resuming-when-visible-with-style-change2.html: Added.

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

2 years ago[Win] WebKit fails to paint the bottom lines of the window at 125% scale.
pvollan@apple.com [Wed, 14 Jun 2017 15:15:23 +0000 (15:15 +0000)]
[Win] WebKit fails to paint the bottom lines of the window at 125% scale.
https://bugs.webkit.org/show_bug.cgi?id=173318

Reviewed by Darin Adler.

The logical frame size is currently calculated by scaling the frame size in pixels,
and rounding the coordinates to the nearest integers. The computed logical frame
size will in some cases be smaller than the scaled frame size in pixels, since it is
represented as an IntSize. In these cases, the bottom line will not be painted.
Instead of calculating the logical frame size by rounding the scaled frame in
pixels, find the enclosing rectangle of the scaled frame rectangle in pixels.

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::transitionToCommittedForNewPage):

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

2 years ago[Win] DRT should not use disk cache.
pvollan@apple.com [Wed, 14 Jun 2017 14:56:43 +0000 (14:56 +0000)]
[Win] DRT should not use disk cache.
https://bugs.webkit.org/show_bug.cgi?id=173361

Reviewed by Darin Adler.

Like on macOS/iOS, DRT on Windows should only use memory cache.

* DumpRenderTree/win/DumpRenderTree.cpp:
(setDefaultsToConsistentValuesForTesting):
(prepareConsistentTestingEnvironment):

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

2 years ago[Win] Update expectations for layout tests.
pvollan@apple.com [Wed, 14 Jun 2017 12:58:00 +0000 (12:58 +0000)]
[Win] Update expectations for layout tests.
https://bugs.webkit.org/show_bug.cgi?id=172437

Unreviewed test gardening, update test expectations for failing tests.

* platform/win/TestExpectations:

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

2 years agoREGRESSION(r216901): ImageDecoders: rendering of large images is broken since r216901
magomez@igalia.com [Wed, 14 Jun 2017 11:23:25 +0000 (11:23 +0000)]
REGRESSION(r216901): ImageDecoders: rendering of large images is broken since r216901
https://bugs.webkit.org/show_bug.cgi?id=172502

Reviewed by Carlos Garcia Campos.

When using GTK and WPE image decoders, the decoded frames are stored inside a Vector of
ImageFrames inside the decoders. These ImageFrames have and ImageBackingStore with the
pixels. When a NativeImagePtr is requested, a cairo surface is created from the data
in those ImageBackingStores, but the data keeps being owned by the backing stores. Due
to this, if the decoder that created the image gets destroyed, the backing stores for
the decoded frames get destroyed as well, causing the cairo surfaces that were using
that data to contain garbage (and potentially cause a crash).

To fix this, we change ImageBackingStore so the pixels are stored in a SharedBuffer. The
buffer will be reffed everytime a cairo surface is created with it, and the cairo surfaces
will unref the buffer when they are destroyed. This way, the pixel data won't be freed
while there are cairo surfaces using it.

No new tests, no behaviour change.

* platform/graphics/ImageBackingStore.h:
(WebCore::ImageBackingStore::setSize):
(WebCore::ImageBackingStore::ImageBackingStore):
* platform/image-decoders/cairo/ImageBackingStoreCairo.cpp:
(WebCore::ImageBackingStore::image):

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

2 years ago[WPE] IndexedDB gardening
csaavedra@igalia.com [Wed, 14 Jun 2017 11:12:31 +0000 (11:12 +0000)]
[WPE] IndexedDB gardening

Unreviewed gardening.

Mark a few expected crashers. We don't use IndexedDB in workers,
storage/indexeddb/modern/worker-getall.html is expected to fail.
storage/indexeddb/modern/idbkey-array-equality.html is now passing.

* platform/wpe/TestExpectations:

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

2 years ago[GTK] Use API::InjectedBundle::EditorClient in WebKitWebEditor
carlosgc@webkit.org [Wed, 14 Jun 2017 10:49:18 +0000 (10:49 +0000)]
[GTK] Use API::InjectedBundle::EditorClient in WebKitWebEditor
https://bugs.webkit.org/show_bug.cgi?id=173355

Reviewed by Žan Doberšek.

Instead of the C API.

* WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.cpp:
(webkitWebEditorCreate):
(didChangeSelection): Deleted.

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

2 years agoUnreviewed. Fix GTK+ build with GCC 4.9 after r218244.
carlosgc@webkit.org [Wed, 14 Jun 2017 10:41:33 +0000 (10:41 +0000)]
Unreviewed. Fix GTK+ build with GCC 4.9 after r218244.

It seems that GCC 4.9 gets confused by enum named General and value of Print enum named General too. This
renames the Print enum value as Generic.

* Shared/API/APIError.h:
* Shared/gtk/WebErrorsGtk.cpp:
(WebKit::printError):
* UIProcess/API/gtk/WebKitPrivate.cpp:
(toWebKitError):
(toWebCoreError):

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

2 years ago[WPE] Rebaseline imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-request...
csaavedra@igalia.com [Wed, 14 Jun 2017 10:06:35 +0000 (10:06 +0000)]
[WPE] Rebaseline imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-requestmediakeysystemaccess.html

Unreviewed gardening.

* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-requestmediakeysystemaccess-expected.txt:

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

2 years ago[GStreamer] Align GstBus signal watch priorities with RunLoop dispatches
zandobersek@gmail.com [Wed, 14 Jun 2017 08:56:49 +0000 (08:56 +0000)]
[GStreamer] Align GstBus signal watch priorities with RunLoop dispatches
https://bugs.webkit.org/show_bug.cgi?id=173348

Reviewed by Carlos Garcia Campos.

When adding GstBus signal watches, use the gst_bus_add_signal_watch_full()
function to also specify the GLib priority that's used for the underlying
GSource object.

RunLoopSourcePriority::RunLoopDispatcher should be a good priority value
to use here, matching the RunLoop::dispatch() priority that's e.g. used
in the MainThreadNotifier class.

* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::AppendPipeline):

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

2 years agoMediaSource duration attribute should not be equal to Infinity when set to a value...
nael.ouedraogo@crf.canon.fr [Wed, 14 Jun 2017 08:44:29 +0000 (08:44 +0000)]
MediaSource duration attribute should not be equal to Infinity when set to a value greater than 2^64
https://bugs.webkit.org/show_bug.cgi?id=171668

Reviewed by Jer Noble.

MediaSource duration attribute is a double represented in MediaSource by a MediaTime instance created with
MediaTime::CreateWithDouble(). This method implements an overflow control mechanism which sets MediaTime to
Infinity when the double value passed as argument is greater than 2^64.

This patch removes the overflow control mechanism when time value is represented as a double. This patch also
modifies the behavior of mathematical operations between a double MediaTime and rational MediaTime: the rational
MediaTime is converted to a double before applying the operation. Double MediaTime precision is the same as for
double. Overflow mechanisms still apply to the conversion of a double MediaTime to rational with setTimescale()
method. No behavior change for rational MediaTime.

LayoutTests/imported/w3c:

Update test expectations.

* web-platform-tests/media-source/mediasource-duration-boundaryconditions-expected.txt:

Source/WTF:

* wtf/MediaTime.cpp:
(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):
(WTF::MediaTime::operator+):
(WTF::MediaTime::operator-):

Tools:

* TestWebKitAPI/Tests/WTF/MediaTime.cpp: Add tests to check operation results between double and rational MediaTime.
(TestWebKitAPI::TEST):

LayoutTests:

Update test expectations.

* media/media-source/media-source-timeoffset-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-duration-boundaryconditions-expected.txt:
* platform/mac-elcapitan/imported/w3c/web-platform-tests/media-source/mediasource-duration-boundaryconditions-expected.txt:

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

2 years ago[MediaStream iOS] Back camera view rendered upside down when in portrait mode
eric.carlson@apple.com [Wed, 14 Jun 2017 07:04:06 +0000 (07:04 +0000)]
[MediaStream iOS] Back camera view rendered upside down when in portrait mode
https://bugs.webkit.org/show_bug.cgi?id=173346
<rdar://problem/32713675>

Reviewed by Youenn Fablet.

* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::computeSampleRotation): Use different rotations for front and
back cameras when device is in portrait orientation.

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

2 years ago[GTK][WPE] Use CMAKE_THREAD_LIBS_INIT in WTF platform CMake files
zandobersek@gmail.com [Wed, 14 Jun 2017 06:59:52 +0000 (06:59 +0000)]
[GTK][WPE] Use CMAKE_THREAD_LIBS_INIT in WTF platform CMake files
https://bugs.webkit.org/show_bug.cgi?id=173310

Reviewed by Xabier Rodriguez-Calvar.

In the WTF platform CMake files for the GTK+ and WPE ports, use the
CMAKE_THREAD_LIBS_INIT variable to specify the threading library we
should be linking against. On some platforms this variable will be
empty because the given compiler will automatically handle the -pthread
compiler flag and sort out linking on its own.

The same approach is already used for the JSCOnly configuration.

* wtf/PlatformGTK.cmake:
* wtf/PlatformWPE.cmake:

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

2 years agoDo not mix C and C++ API error constants
carlosgc@webkit.org [Wed, 14 Jun 2017 06:31:11 +0000 (06:31 +0000)]
Do not mix C and C++ API error constants
https://bugs.webkit.org/show_bug.cgi?id=173311

Reviewed by Alex Christensen.

In r214934 I added error constants to API::Error, but not for all errors exposed in the C API. Because of this
we are mixing both constants in WebErrors and in GTk+ WebKitPrivate.

* Shared/API/APIError.h:
* Shared/WebErrors.cpp:
(WebKit::blockedError):
(WebKit::blockedByContentBlockerError):
(WebKit::cannotShowURLError):
(WebKit::interruptedForPolicyChangeError):
(WebKit::blockedByContentFilterError):
(WebKit::cannotShowMIMETypeError):
(WebKit::pluginWillHandleLoadError):
(WebKit::internalError):
* UIProcess/API/gtk/WebKitPrivate.cpp:
(toWebKitError):
(toWebCoreError):

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

2 years agoWeb Inspector: Console: Message icons overlay source location
nvasilyev@apple.com [Wed, 14 Jun 2017 04:55:04 +0000 (04:55 +0000)]
Web Inspector: Console: Message icons overlay source location
https://bugs.webkit.org/show_bug.cgi?id=173291

Reviewed by Matt Baker.

* UserInterface/Views/ConsoleMessageView.css:
(.console-message-location.call-frame):
This should be a safe change since a method name and a source link already have
max-width set to 20vw and 30vw respectively.

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

2 years agoEvent handlers should not be called in frameless documents
cdumez@apple.com [Wed, 14 Jun 2017 03:48:23 +0000 (03:48 +0000)]
Event handlers should not be called in frameless documents
https://bugs.webkit.org/show_bug.cgi?id=173233

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline W3C test now that it is passing.

* web-platform-tests/html/webappapis/scripting/events/uncompiled_event_handler_with_scripting_disabled-expected.txt:

Source/WebCore:

As per the HTML specification [1], for event handlers on elements, we should use the
element's document to check if scripting is disabled [2]. Scripting is considered to
be disabled if the document has no browsing context (i.e. a frame in WebKit terms).

In JSLazyEventListener::initializeJSFunction(), instead of using the element's
document to do the checks, we would use the script execution context. In most cases,
a node's document and its script execution context are the same so this is not an
issue. However, if the node's document is a document created via JS, its nodes'
script execution context will be the document's context document (i.e the one that
created the document, see implementation of Node::scriptExecutionContext()). In those
cases, using the wrong document is an issue because the document's context document
(aka script execution context) may allow scripting but we still do not want to call
the event handler because its document is frameless.

This impacts documents created by JS, using the following APIs:
- DOMParser.parseFromHTML
- new Document()
- DOMImplementation.createDocument / createHTMLDocument
- XHRs whose responseType is Document.

[1] https://html.spec.whatwg.org/multipage/webappapis.html#getting-the-current-value-of-the-event-handler (step 1.1.)
[2] https://html.spec.whatwg.org/multipage/webappapis.html#concept-n-noscript

Tests: fast/events/event-handler-detached-document-dispatchEvent.html
       fast/events/event-handler-detached-document.html

* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::initializeJSFunction):

LayoutTests:

Extend layout test coverage.

* fast/events/event-handler-detached-document-dispatchEvent-expected.txt: Added.
* fast/events/event-handler-detached-document-dispatchEvent.html: Added.
* fast/events/event-handler-detached-document-expected.txt: Added.
* fast/events/event-handler-detached-document.html: Added.

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

2 years agoRebaseline media/modern-media-controls/placard-support
graouts@webkit.org [Wed, 14 Jun 2017 02:44:08 +0000 (02:44 +0000)]
Rebaseline media/modern-media-controls/placard-support
https://bugs.webkit.org/show_bug.cgi?id=173340

Reviewed by Dean Jackson.

Source/WebCore:

We make a source change to use a "placard" getter/setter to show or hide a placard, making it
more convenient to test whether a placard has been set.

* Modules/modern-media-controls/controls/inline-media-controls.js:
(InlineMediaControls.prototype.get placard):
(InlineMediaControls.prototype.set placard):
(InlineMediaControls.prototype.showPlacard): Deleted.
(InlineMediaControls.prototype.hidePlacard): Deleted.
* Modules/modern-media-controls/media/placard-support.js:
(PlacardSupport.prototype._updatePlacard):
(PlacardSupport):

LayoutTests:

We update tests to use the new "placard" property rather than "showsPlacard" which this patch removes.

* media/modern-media-controls/placard-support/placard-support-airplay-expected.txt:
* media/modern-media-controls/placard-support/placard-support-airplay.html:
* media/modern-media-controls/placard-support/placard-support-error-expected.txt:
* media/modern-media-controls/placard-support/placard-support-error-recover-expected.txt:
* media/modern-media-controls/placard-support/placard-support-error-recover.html:
* media/modern-media-controls/placard-support/placard-support-error.html:
* media/modern-media-controls/placard-support/placard-support-pip-expected.txt:
* media/modern-media-controls/placard-support/placard-support-pip.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

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

2 years agoRebaseline media/modern-media-controls/mute-support
graouts@webkit.org [Wed, 14 Jun 2017 02:39:02 +0000 (02:39 +0000)]
Rebaseline media/modern-media-controls/mute-support
https://bugs.webkit.org/show_bug.cgi?id=173345

Reviewed by Dean Jackson.

* media/modern-media-controls/mute-support/mute-support-press-on-button-expected.txt: Renamed from LayoutTests/media/modern-media-controls/mute-support/mute-support-button-click-expected.txt.
* media/modern-media-controls/mute-support/mute-support-press-on-button.html: Renamed from LayoutTests/media/modern-media-controls/mute-support/mute-support-button-click.html.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

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

2 years agoRebaseline media/modern-media-controls/tracks-button
graouts@webkit.org [Wed, 14 Jun 2017 01:30:11 +0000 (01:30 +0000)]
Rebaseline media/modern-media-controls/tracks-button
https://bugs.webkit.org/show_bug.cgi?id=173220

Reviewed by Dean Jackson.

Use SVG assets.

* media/modern-media-controls/tracks-button/tracks-button-expected.txt:
* media/modern-media-controls/tracks-button/tracks-button.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

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

2 years agoRebaseline media/modern-media-controls/time-control
graouts@webkit.org [Wed, 14 Jun 2017 01:23:55 +0000 (01:23 +0000)]
Rebaseline media/modern-media-controls/time-control
https://bugs.webkit.org/show_bug.cgi?id=173218

Reviewed by Dean Jackson.

There no longer is a Scrubber class and the useSixDigitsForTimeLabels property no longer exists.

* media/modern-media-controls/time-control/time-control-expected.txt:
* media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels-expected.txt: Removed.
* media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels.html: Removed.
* media/modern-media-controls/time-control/time-control.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

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

2 years agoRebaseline media/modern-media-controls/status-label
graouts@webkit.org [Wed, 14 Jun 2017 01:22:23 +0000 (01:22 +0000)]
Rebaseline media/modern-media-controls/status-label
https://bugs.webkit.org/show_bug.cgi?id=173217

Reviewed by Dean Jackson.

There is no need for macOS and iOS-specific tests, they share the same styles.

* media/modern-media-controls/status-label/status-label-expected.txt:
* media/modern-media-controls/status-label/status-label-in-controls-expected.txt: Renamed from LayoutTests/media/modern-media-controls/status-label/status-label-macos-expected.txt.
* media/modern-media-controls/status-label/status-label-in-controls.html: Renamed from LayoutTests/media/modern-media-controls/status-label/status-label-macos.html.
* media/modern-media-controls/status-label/status-label-ios-expected.txt: Removed.
* media/modern-media-controls/status-label/status-label-ios.html: Removed.
* media/modern-media-controls/status-label/status-label.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

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

2 years agoRemove media/modern-media-controls/start-button
graouts@webkit.org [Wed, 14 Jun 2017 01:19:57 +0000 (01:19 +0000)]
Remove media/modern-media-controls/start-button
https://bugs.webkit.org/show_bug.cgi?id=173216

Reviewed by Dean Jackson.

The StartButton class was removed.

* media/modern-media-controls/start-button/start-button-expected.txt: Removed.
* media/modern-media-controls/start-button/start-button-styles-expected.txt: Removed.
* media/modern-media-controls/start-button/start-button-styles.html: Removed.
* media/modern-media-controls/start-button/start-button.html: Removed.

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

2 years agoRebaseline media/modern-media-controls/slider
graouts@webkit.org [Wed, 14 Jun 2017 01:18:06 +0000 (01:18 +0000)]
Rebaseline media/modern-media-controls/slider
https://bugs.webkit.org/show_bug.cgi?id=173215

Reviewed by Dean Jackson.

* media/modern-media-controls/slider/slider-constructor-expected.txt:
* media/modern-media-controls/slider/slider-constructor.html:
* media/modern-media-controls/slider/slider-styles-expected.txt:
* media/modern-media-controls/slider/slider-styles.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

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

2 years agoRebaseline media/modern-media-controls/skip-back-button
graouts@webkit.org [Wed, 14 Jun 2017 01:16:38 +0000 (01:16 +0000)]
Rebaseline media/modern-media-controls/skip-back-button
https://bugs.webkit.org/show_bug.cgi?id=173213

Reviewed by Dean Jackson.

Use SVG assets.

* media/modern-media-controls/skip-back-button/skip-back-button-expected.txt:
* media/modern-media-controls/skip-back-button/skip-back-button.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

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

2 years agoTest persistent WKHTTPCookieStorages on iOS
achristensen@apple.com [Wed, 14 Jun 2017 01:12:11 +0000 (01:12 +0000)]
Test persistent WKHTTPCookieStorages on iOS
https://bugs.webkit.org/show_bug.cgi?id=173284
<rdar://problem/32260156>

* TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:
(TEST):

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

2 years agoRebaseline media/modern-media-controls/time-label
graouts@webkit.org [Wed, 14 Jun 2017 01:04:17 +0000 (01:04 +0000)]
Rebaseline media/modern-media-controls/time-label
https://bugs.webkit.org/show_bug.cgi?id=173219

Reviewed by Dean Jackson.

We update the content of the time-label.html test to be relevant to its new API.

* media/modern-media-controls/time-label/time-label-expected.txt:
* media/modern-media-controls/time-label/time-label.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

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

2 years agoRebaseline media/modern-media-controls/fullscreen-support
graouts@webkit.org [Wed, 14 Jun 2017 01:03:31 +0000 (01:03 +0000)]
Rebaseline media/modern-media-controls/fullscreen-support
https://bugs.webkit.org/show_bug.cgi?id=173199

Reviewed by Simon Fraser.

Source/WebCore:

Test: media/modern-media-controls/fullscreen-support/fullscreen-support-press.html

We no longer need to track the "error" event for FullscreenSupport since we don't actually
enable or disable the fullscreen button when an error happens, instead the media controls
code will simply not present it since we'll be showing a placard instead.

* Modules/modern-media-controls/media/fullscreen-support.js:
(FullscreenSupport.prototype.get mediaEvents):

LayoutTests:

We no longer need to test the "error" event for FullscreenSupport since we don't actually
enable or disable the fullscreen button when an error happens, instead the media controls
code will simply not present it since we'll be showing a placard instead.

We also remove the iPad-specific test since the fullscreen button is now accessible on an
iPhone as well, so it no longer needs a special iPad test.

* media/modern-media-controls/fullscreen-support/fullscreen-support-enabled-expected.txt:
* media/modern-media-controls/fullscreen-support/fullscreen-support-enabled.html:
* media/modern-media-controls/fullscreen-support/fullscreen-support-press-expected.txt: Renamed from LayoutTests/media/modern-media-controls/fullscreen-support/fullscreen-support-click-expected.txt.
* media/modern-media-controls/fullscreen-support/fullscreen-support-press.html: Renamed from LayoutTests/media/modern-media-controls/fullscreen-support/fullscreen-support-click.html.
* media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap-expected.txt: Removed.
* media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap.html: Removed.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

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

2 years ago[GTK] Fix linter warnings on the GTK Debug TestExpectation file and update some expec...
clopez@igalia.com [Wed, 14 Jun 2017 00:36:29 +0000 (00:36 +0000)]
[GTK] Fix linter warnings on the GTK Debug TestExpectation file and update some expectations for Debug.

Unreviewed test gardening.

* TestExpectations: Merge expectations for imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.worker.html
* platform/gtk/TestExpectations: Mark observed timeouts on Debug and fix linter warnings related to tests renamed or deleted.
* platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker-expected.txt: Removed.

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

2 years agoWebsitePolicies: let clients select specific autoplay quirks
mrajca@apple.com [Wed, 14 Jun 2017 00:32:21 +0000 (00:32 +0000)]
WebsitePolicies: let clients select specific autoplay quirks
https://bugs.webkit.org/show_bug.cgi?id=173343

Reviewed by Alex Christensen.
Source/WebCore:

Tests: Updated API tests accordingly to use new values.

Replace the 'allowsAutoplayQuirks' bool with an OptionSet so clients can selectively
pick auto-play quirks.

* dom/Document.cpp:
(WebCore::Document::processingUserGestureForMedia):
* html/HTMLMediaElement.cpp:
(WebCore::needsAutoplayPlayPauseEventsQuirk):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::allowedAutoplayQuirks):
(WebCore::DocumentLoader::setAllowedAutoplayQuirks):
(WebCore::DocumentLoader::allowsAutoplayQuirks): Deleted.
(WebCore::DocumentLoader::setAllowsAutoplayQuirks): Deleted.

Source/WebKit2:

Replace the 'allowsAutoplayQuirks' bool with an OptionSet so clients can selectively
pick auto-play quirks.

* Shared/WebsitePolicies.h:
(WebKit::WebsitePolicies::encode):
(WebKit::WebsitePolicies::decode):
* UIProcess/API/APIWebsitePolicies.h:
* UIProcess/API/C/WKWebsitePolicies.cpp:
(WKWebsitePoliciesSetAllowedAutoplayQuirks):
(WKWebsitePoliciesGetAllowedAutoplayQuirks):
(WKWebsitePoliciesSetAllowsAutoplayQuirks): Deleted.
(WKWebsitePoliciesGetAllowsAutoplayQuirks): Deleted.
* UIProcess/API/C/WKWebsitePolicies.h:
* UIProcess/API/Cocoa/_WKWebsitePolicies.h:
* UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
(-[_WKWebsitePolicies setAllowedAutoplayQuirks:]):
(-[_WKWebsitePolicies allowedAutoplayQuirks]):
(-[_WKWebsitePolicies setAllowsAutoplayQuirks:]): Deleted.
(-[_WKWebsitePolicies allowsAutoplayQuirks]): Deleted.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updateWebsitePolicies):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm:
(-[AutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
(TEST): Updated tests.

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

2 years agoSynchronous media query callbacks on nested frames could produced a detached FrameView.
zalan@apple.com [Wed, 14 Jun 2017 00:19:21 +0000 (00:19 +0000)]
Synchronous media query callbacks on nested frames could produced a detached FrameView.
https://bugs.webkit.org/show_bug.cgi?id=173330

Reviewed by Simon Fraser.

Source/WebCore:

This patch fixes the crash when the nested frame's media query callback triggers navigation on the mainframe.
webkit.org/b/173329 is to track whether we should allow synchronous callback firing from FrameView::layout().

Covered by show-modal-dialog-during-execCommand.html.

* page/FrameView.cpp:
(WebCore::FrameView::layout):

LayoutTests:

* TestExpectations: ASSERT(frame()->view() == this) still fires due to the unexpected navigation, but we clearly
manage to recover from it. Unskip it (debug) when webkit.org/b/173329 is resolved.

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

2 years agoAX[macOS]: Expose Inline property as an accessibility attribute
cfleizach@apple.com [Wed, 14 Jun 2017 00:12:29 +0000 (00:12 +0000)]
AX[macOS]: Expose Inline property as an accessibility attribute
https://bugs.webkit.org/show_bug.cgi?id=173131
<rdar://problem/32667686>

Reviewed by Joanmarie Diggs.

Source/WebCore:

Expose whether a renderer is inline so that VoiceOver can make better use of that data when deciding what to output.

Test: accessibility/mac/inline-text-attribute.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

LayoutTests:

* accessibility/mac/inline-text-attribute.html: Added.
* accessibility/mac/inline-text-attribute-expected.txt: Added.

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

2 years agoAdd missing availability declarations to SPI in WKUIDelegatePrivate.h
wenson_hsieh@apple.com [Wed, 14 Jun 2017 00:10:06 +0000 (00:10 +0000)]
Add missing availability declarations to SPI in WKUIDelegatePrivate.h
https://bugs.webkit.org/show_bug.cgi?id=173336

Reviewed by Tim Horton.

Add missing availability macros to two recently-introduced SPI delegate methods.
No change in behavior.

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:

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

2 years agoDebugger has unexpected effect on program correctness
commit-queue@webkit.org [Tue, 13 Jun 2017 23:57:55 +0000 (23:57 +0000)]
Debugger has unexpected effect on program correctness
https://bugs.webkit.org/show_bug.cgi?id=172683

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-06-13
Reviewed by Saam Barati.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
(InjectedScript.RemoteObject.prototype._appendPropertyPreviews):
(InjectedScript.RemoteObject.prototype._isPreviewableObjectInternal):
(BasicCommandLineAPI):
Eliminate for..of use with Arrays from InjectedScriptSource as it can be observable.
We still use it for Set / Map iteration which we can eliminate when moving to builtins.

LayoutTests:

* inspector/injected-script/observable-expected.txt: Added.
* inspector/injected-script/observable.html: Added.

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