WebKit-https.git
9 months agoRename ENABLE_SUBTLE_CRYPTO to ENABLE_WEB_CRYPTO
don.olmstead@sony.com [Fri, 30 Nov 2018 22:23:17 +0000 (22:23 +0000)]
Rename ENABLE_SUBTLE_CRYPTO to ENABLE_WEB_CRYPTO
https://bugs.webkit.org/show_bug.cgi?id=192197

Reviewed by Jiewen Tan.

.:

* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:
* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No new tests. No change in behavior.

* Configurations/FeatureDefines.xcconfig:
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::readTerminal):
* crypto/CommonCryptoUtilities.cpp:
* crypto/CommonCryptoUtilities.h:
* crypto/CryptoAlgorithm.cpp:
* crypto/CryptoAlgorithm.h:
* crypto/CryptoAlgorithmIdentifier.h:
* crypto/CryptoAlgorithmParameters.h:
* crypto/CryptoAlgorithmParameters.idl:
* crypto/CryptoAlgorithmRegistry.cpp:
* crypto/CryptoAlgorithmRegistry.h:
* crypto/CryptoKey.cpp:
* crypto/CryptoKey.h:
* crypto/CryptoKey.idl:
* crypto/CryptoKeyFormat.h:
* crypto/CryptoKeyPair.h:
* crypto/CryptoKeyPair.idl:
* crypto/CryptoKeyType.h:
* crypto/CryptoKeyUsage.h:
* crypto/CryptoKeyUsage.idl:
* crypto/JsonWebKey.h:
* crypto/JsonWebKey.idl:
* crypto/RsaOtherPrimesInfo.h:
* crypto/RsaOtherPrimesInfo.idl:
* crypto/SerializedCryptoKeyWrap.h:
* crypto/SubtleCrypto.cpp:
* crypto/SubtleCrypto.h:
* crypto/SubtleCrypto.idl:
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
* crypto/algorithms/CryptoAlgorithmAES_CBC.h:
* crypto/algorithms/CryptoAlgorithmAES_CFB.cpp:
* crypto/algorithms/CryptoAlgorithmAES_CFB.h:
* crypto/algorithms/CryptoAlgorithmAES_CTR.cpp:
* crypto/algorithms/CryptoAlgorithmAES_CTR.h:
* crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:
* crypto/algorithms/CryptoAlgorithmAES_GCM.h:
* crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
* crypto/algorithms/CryptoAlgorithmAES_KW.h:
* crypto/algorithms/CryptoAlgorithmECDH.cpp:
* crypto/algorithms/CryptoAlgorithmECDH.h:
* crypto/algorithms/CryptoAlgorithmECDSA.cpp:
* crypto/algorithms/CryptoAlgorithmECDSA.h:
* crypto/algorithms/CryptoAlgorithmHKDF.cpp:
* crypto/algorithms/CryptoAlgorithmHKDF.h:
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
* crypto/algorithms/CryptoAlgorithmHMAC.h:
* crypto/algorithms/CryptoAlgorithmPBKDF2.cpp:
* crypto/algorithms/CryptoAlgorithmPBKDF2.h:
* crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
* crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
* crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
* crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
* crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:
* crypto/algorithms/CryptoAlgorithmRSA_PSS.h:
* crypto/algorithms/CryptoAlgorithmSHA1.cpp:
* crypto/algorithms/CryptoAlgorithmSHA1.h:
* crypto/algorithms/CryptoAlgorithmSHA224.cpp:
* crypto/algorithms/CryptoAlgorithmSHA224.h:
* crypto/algorithms/CryptoAlgorithmSHA256.cpp:
* crypto/algorithms/CryptoAlgorithmSHA256.h:
* crypto/algorithms/CryptoAlgorithmSHA384.cpp:
* crypto/algorithms/CryptoAlgorithmSHA384.h:
* crypto/algorithms/CryptoAlgorithmSHA512.cpp:
* crypto/algorithms/CryptoAlgorithmSHA512.h:
* crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp:
* crypto/gcrypt/CryptoAlgorithmAES_CFBGCrypt.cpp:
* crypto/gcrypt/CryptoAlgorithmAES_CTRGCrypt.cpp:
* crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp:
* crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp:
* crypto/gcrypt/CryptoAlgorithmECDHGCrypt.cpp:
* crypto/gcrypt/CryptoAlgorithmECDSAGCrypt.cpp:
* crypto/gcrypt/CryptoAlgorithmHKDFGCrypt.cpp:
* crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp:
* crypto/gcrypt/CryptoAlgorithmPBKDF2GCrypt.cpp:
* crypto/gcrypt/CryptoAlgorithmRSAES_PKCS1_v1_5GCrypt.cpp:
* crypto/gcrypt/CryptoAlgorithmRSASSA_PKCS1_v1_5GCrypt.cpp:
* crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp:
* crypto/gcrypt/CryptoAlgorithmRSA_PSSGCrypt.cpp:
* crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp:
* crypto/gcrypt/CryptoKeyECGCrypt.cpp:
* crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
* crypto/gcrypt/SerializedCryptoKeyWrapGCrypt.cpp:
* crypto/keys/CryptoAesKeyAlgorithm.idl:
* crypto/keys/CryptoEcKeyAlgorithm.idl:
* crypto/keys/CryptoHmacKeyAlgorithm.idl:
* crypto/keys/CryptoKeyAES.cpp:
* crypto/keys/CryptoKeyAES.h:
* crypto/keys/CryptoKeyAlgorithm.idl:
* crypto/keys/CryptoKeyEC.cpp:
* crypto/keys/CryptoKeyEC.h:
* crypto/keys/CryptoKeyHMAC.cpp:
* crypto/keys/CryptoKeyHMAC.h:
* crypto/keys/CryptoKeyRSA.cpp:
* crypto/keys/CryptoKeyRSA.h:
* crypto/keys/CryptoKeyRSAComponents.cpp:
* crypto/keys/CryptoKeyRSAComponents.h:
* crypto/keys/CryptoKeyRaw.cpp:
* crypto/keys/CryptoKeyRaw.h:
* crypto/keys/CryptoRsaHashedKeyAlgorithm.idl:
* crypto/keys/CryptoRsaKeyAlgorithm.idl:
* crypto/mac/CommonCryptoDERUtilities.cpp:
* crypto/mac/CommonCryptoDERUtilities.h:
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
* crypto/mac/CryptoAlgorithmAES_CFBMac.cpp:
* crypto/mac/CryptoAlgorithmAES_CTRMac.cpp:
* crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
* crypto/mac/CryptoAlgorithmAES_KWMac.cpp:
* crypto/mac/CryptoAlgorithmECDHMac.cpp:
* crypto/mac/CryptoAlgorithmECDSAMac.cpp:
* crypto/mac/CryptoAlgorithmHKDFMac.cpp:
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
* crypto/mac/CryptoAlgorithmPBKDF2Mac.cpp:
* crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:
* crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
* crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:
* crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:
* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
* crypto/mac/CryptoDigestAlgorithm.h:
* crypto/mac/CryptoKeyECMac.cpp:
* crypto/mac/CryptoKeyMac.cpp:
* crypto/mac/CryptoKeyRSAMac.cpp:
* crypto/mac/SerializedCryptoKeyWrapMac.mm:
* crypto/parameters/AesCbcCfbParams.idl:
* crypto/parameters/AesCtrParams.idl:
* crypto/parameters/AesGcmParams.idl:
* crypto/parameters/AesKeyParams.idl:
* crypto/parameters/CryptoAlgorithmAesCbcCfbParams.h:
* crypto/parameters/CryptoAlgorithmAesCtrParams.h:
* crypto/parameters/CryptoAlgorithmAesGcmParams.h:
* crypto/parameters/CryptoAlgorithmAesKeyParams.h:
* crypto/parameters/CryptoAlgorithmEcKeyParams.h:
* crypto/parameters/CryptoAlgorithmEcdhKeyDeriveParams.h:
* crypto/parameters/CryptoAlgorithmEcdsaParams.h:
* crypto/parameters/CryptoAlgorithmHkdfParams.h:
* crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
* crypto/parameters/CryptoAlgorithmPbkdf2Params.h:
* crypto/parameters/CryptoAlgorithmRsaHashedImportParams.h:
* crypto/parameters/CryptoAlgorithmRsaHashedKeyGenParams.h:
* crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
* crypto/parameters/CryptoAlgorithmRsaOaepParams.h:
* crypto/parameters/CryptoAlgorithmRsaPssParams.h:
* crypto/parameters/EcKeyParams.idl:
* crypto/parameters/EcdhKeyDeriveParams.idl:
* crypto/parameters/EcdsaParams.idl:
* crypto/parameters/HkdfParams.idl:
* crypto/parameters/HmacKeyParams.idl:
* crypto/parameters/Pbkdf2Params.idl:
* crypto/parameters/RsaHashedImportParams.idl:
* crypto/parameters/RsaHashedKeyGenParams.idl:
* crypto/parameters/RsaKeyGenParams.idl:
* crypto/parameters/RsaOaepParams.idl:
* crypto/parameters/RsaPssParams.idl:
* dom/Document.cpp:
* dom/Document.h:
* dom/ScriptExecutionContext.h:
* page/ChromeClient.h:
* page/Crypto.cpp:
(WebCore::Crypto::Crypto):
* page/Crypto.h:
* page/Crypto.idl:
* platform/GCrypt.cmake:
* platform/LocalizedStrings.cpp:
* platform/LocalizedStrings.h:
* workers/WorkerGlobalScope.cpp:
* workers/WorkerGlobalScope.h:
* worklets/WorkletGlobalScope.h:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:
* pal/PlatformGTK.cmake:
* pal/PlatformWPE.cmake:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageNavigationClient):
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:

Tools:

* Scripts/webkitperl/FeatureList.pm:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

9 months agoAdd first-class support for .mjs files in jsc binary
dino@apple.com [Fri, 30 Nov 2018 21:55:12 +0000 (21:55 +0000)]
Add first-class support for .mjs files in jsc binary
https://bugs.webkit.org/show_bug.cgi?id=192190
<rdar://problem/46375715>

Reviewed by Keith Miller.

JSTests:

* stress/simple-module.mjs: Added.
* stress/simple-script.js: Added.

Source/JavaScriptCore:

Treat files with a .mjs extension as a module, regardless
of whether or not the --module-file argument was given.

* jsc.cpp:
(printUsageStatement): Update usage.
(isMJSFile): Helper to look for .mjs extensions.
(CommandLine::parseArguments): Pick the appropriate script type.

Tools:

Add .mjs files to the regexp looking for all JS files.

* Scripts/run-jsc-stress-tests:

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

9 months agoWeb Inspector: Settings: reload button needs horizontal spacing
drousso@apple.com [Fri, 30 Nov 2018 21:27:54 +0000 (21:27 +0000)]
Web Inspector: Settings: reload button needs horizontal spacing
https://bugs.webkit.org/show_bug.cgi?id=192231
<rdar://problem/46274363>

Reviewed by Matt Baker.

* UserInterface/Views/SettingsTabContentView.css:
(.content-view.settings > .settings-view > .container button):
(.content-view.settings > .settings-view > .container > .title):
(.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]):
(body[dir=ltr] .content-view.settings > .settings-view > .container > .title): Deleted.
(body[dir=rtl] .content-view.settings > .settings-view > .container > .title): Deleted.
(body[dir=ltr] .content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Deleted.
(body[dir=rtl] .content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Deleted.
Drive-by: replace `dir=*` attribute rules with `-webkit-margin-*` properties.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238752 268f45cc-cd09-0410-ab3c-d52691b4dbfc

9 months agoReplace "auto fill" with "AutoFill" in some localizable strings
wenson_hsieh@apple.com [Fri, 30 Nov 2018 21:18:13 +0000 (21:18 +0000)]
Replace "auto fill" with "AutoFill" in some localizable strings
https://bugs.webkit.org/show_bug.cgi?id=192233
<rdar://problem/46311614>

Reviewed by Chris Fleizach.

Source/WebCore:

Replace "autofill" with "AutoFill".

* en.lproj/Localizable.strings:
* platform/LocalizedStrings.cpp:
(WebCore::AXAutoFillCredentialsLabel):
(WebCore::AXAutoFillContactsLabel):
(WebCore::AXAutoFillStrongPasswordLabel):
(WebCore::AXAutoFillCreditCardLabel):

LayoutTests:

Rebaseline a test.

* accessibility/auto-fill-types-expected.txt:

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

9 months agoWeb Inspector: Uncaught Exception opening Web Inspector to Debugger Tab
joepeck@webkit.org [Fri, 30 Nov 2018 21:13:27 +0000 (21:13 +0000)]
Web Inspector: Uncaught Exception opening Web Inspector to Debugger Tab
https://bugs.webkit.org/show_bug.cgi?id=192174

Reviewed by Devin Rousso.

* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass.prototype.runAfterPendingDispatches):
Dispatch the callback with a timeout if there is no backend target yet
so it doesn't get lost.

* UserInterface/Protocol/Connection.js:
(InspectorBackend.Connection.prototype.runAfterPendingDispatches):
Change the ambiguous name "script" to the more familiar "callback".

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

9 months agowebkitpy: Use DeviceType instead of str to represent device class
jbedard@apple.com [Fri, 30 Nov 2018 20:13:16 +0000 (20:13 +0000)]
webkitpy: Use DeviceType instead of str to represent device class
https://bugs.webkit.org/show_bug.cgi?id=192160
<rdar://problem/46344845>

Rubber-stamped by Aakash Jain.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._custom_device_for_test): Use DeviceTypes instead of strings to represent device type.
(Manager._set_up_run): Do not set _options.device_class, use device_type instead of device_class.
(Manager.run): Use device_type instead of device_class.
(Manager._print_expectations_for_subset): Ditto.
(Manager.print_expectations): Ditto.
* Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
(ManagerTest.test_uses_custom_device): Use DeviceType and actual device definition.
* Scripts/webkitpy/layout_tests/views/printing.py:
(Printer.print_workers_and_shards): Outputting the device suffix doesn't really help, and means
device type needs to be passed around.
* Scripts/webkitpy/port/apple.py:
(ApplePort.setup_test_run): Use device_type instead of device_class.
* Scripts/webkitpy/port/base.py:
(Port):
(Port.setup_test_run): Use device_type instead of device_class.
* Scripts/webkitpy/port/device_port.py:
(DevicePort):
(DevicePort.setup_test_run): Receive device_type as DeviceType object.
(DevicePort._create_devices): Deleted.
* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_test_run): Use device_type instead of device_class.
* Scripts/webkitpy/port/ios.py:
(IOSPort):
* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort):
(IOSSimulatorPort.__init__): Deleted.
(IOSSimulatorPort._set_device_class): Deleted.
* Scripts/webkitpy/port/test.py:
* Scripts/webkitpy/port/watch.py:
(WatchPort):
* Scripts/webkitpy/port/watch_simulator.py:
(WatchSimulatorPort):
(WatchSimulatorPort.__init__): Deleted.
(WatchSimulatorPort._set_device_class): Deleted.
* Scripts/webkitpy/port/win.py:
(WinPort.setup_test_run): Use device_type instead of device_class.
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager._disambiguate_device_type): Using the existing devices for this is
a problem if no such device exists yet. Use the _device_identifier_to_name dictionary instead
since this should have hardware types in the device names.

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

9 months agoAdd CEReactions=NotNeeded on all the relevant IDL files
rniwa@webkit.org [Fri, 30 Nov 2018 19:59:33 +0000 (19:59 +0000)]
Add CEReactions=NotNeeded on all the relevant IDL files
https://bugs.webkit.org/show_bug.cgi?id=188368
<rdar://problem/42987753>

Rubber-stamped by Antti Koivisto.

Based on a patch written by Frederic Wang. Added CEReactions=NotNeeded to all the places
we don't need CEReactions because we don't implement customized builtins but are marked with
CEReactions in the HTML specification.

* html/HTMLAnchorElement.idl:
* html/HTMLAreaElement.idl:
* html/HTMLBRElement.idl:
* html/HTMLBaseElement.idl:
* html/HTMLBodyElement.idl:
* html/HTMLButtonElement.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLDListElement.idl:
* html/HTMLDataElement.idl:
* html/HTMLDetailsElement.idl:
* html/HTMLDirectoryElement.idl:
* html/HTMLDivElement.idl:
* html/HTMLEmbedElement.idl:
* html/HTMLFieldSetElement.idl:
* html/HTMLFontElement.idl:
* html/HTMLFormElement.idl:
* html/HTMLFrameElement.idl:
* html/HTMLFrameSetElement.idl:
* html/HTMLHRElement.idl:
* html/HTMLHeadingElement.idl:
* html/HTMLHtmlElement.idl:
* html/HTMLHyperlinkElementUtils.idl:
* html/HTMLImageElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLLIElement.idl:
* html/HTMLLabelElement.idl:
* html/HTMLLegendElement.idl:
* html/HTMLLinkElement.idl:
* html/HTMLMapElement.idl:
* html/HTMLMarqueeElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLMenuElement.idl:
* html/HTMLMetaElement.idl:
* html/HTMLMeterElement.idl:
* html/HTMLModElement.idl:
* html/HTMLOListElement.idl:
* html/HTMLObjectElement.idl:
* html/HTMLOptGroupElement.idl:
* html/HTMLOptionElement.idl:
* html/HTMLOutputElement.idl:
* html/HTMLParagraphElement.idl:
* html/HTMLParamElement.idl:
* html/HTMLPreElement.idl:
* html/HTMLProgressElement.idl:
* html/HTMLQuoteElement.idl:
* html/HTMLScriptElement.idl:
* html/HTMLSlotElement.idl:
* html/HTMLSourceElement.idl:
* html/HTMLStyleElement.idl:
* html/HTMLTableCaptionElement.idl:
* html/HTMLTableCellElement.idl:
* html/HTMLTableColElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/HTMLTimeElement.idl:
* html/HTMLTrackElement.idl:
* html/HTMLUListElement.idl:
* html/HTMLVideoElement.idl:

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

9 months agoMove USE_CFNETWORK_IGNORE_HSTS to its proper place
ap@apple.com [Fri, 30 Nov 2018 19:58:07 +0000 (19:58 +0000)]
Move USE_CFNETWORK_IGNORE_HSTS to its proper place
https://bugs.webkit.org/show_bug.cgi?id=192173

Reviewed by Tim Horton.

Source/WebCore:

* platform/network/mac/WebCoreURLResponse.mm:
(WebCore::schemeWasUpgradedDueToDynamicHSTS):

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(updateIgnoreStrictTransportSecuritySettingIfNecessary):
(-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):

Source/WTF:

* wtf/Platform.h: Also renamed it to better match other version checks.

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

9 months agoRemove unused WebProcessCreationParameters.uiProcessCookieStorageIdentifier
achristensen@apple.com [Fri, 30 Nov 2018 19:37:44 +0000 (19:37 +0000)]
Remove unused WebProcessCreationParameters.uiProcessCookieStorageIdentifier
https://bugs.webkit.org/show_bug.cgi?id=192157

Reviewed by Chris Dumez.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):

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

9 months agoRemove privateBrowsingEnabled from NetworkProcessCreationParameters
achristensen@apple.com [Fri, 30 Nov 2018 19:37:04 +0000 (19:37 +0000)]
Remove privateBrowsingEnabled from NetworkProcessCreationParameters
https://bugs.webkit.org/show_bug.cgi?id=192156

Reviewed by Chris Dumez.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):

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

9 months ago[Curl] Add API for ProtectionSpace.
basuke.suzuki@sony.com [Fri, 30 Nov 2018 19:21:27 +0000 (19:21 +0000)]
[Curl] Add API for ProtectionSpace.
https://bugs.webkit.org/show_bug.cgi?id=191648

Reviewed by Alex Christensen.

Source/WebCore:

Create a platform dependent header and implementation files for ProtectionSpace.

No new tests because there's no behavior change.

* platform/Curl.cmake:
* platform/network/ProtectionSpace.h:
* platform/network/curl/ProtectionSpaceCurl.cpp: Added.
(WebCore::ProtectionSpace::certificateInfo const):
* platform/network/curl/ProtectionSpaceCurl.h: Added.
(WebCore::ProtectionSpace::ProtectionSpace):
(WebCore::ProtectionSpace::encodingRequiresPlatformData const):
(WebCore::ProtectionSpace::platformCompare):

Source/WebKit:

Added API to get certificate information from protection space.

* PlatformWin.cmake:
* Shared/curl/WebCoreArgumentCodersCurl.cpp:
(IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
(IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData):
* UIProcess/API/C/curl/WKProtectionSpaceCurl.cpp: Added.
(WKProtectionSpaceCopyCertificateInfo):
* UIProcess/API/C/curl/WKProtectionSpaceCurl.h: Added.

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

9 months agoWeb Inspector: replace all unicode characters with the escaped character code
drousso@apple.com [Fri, 30 Nov 2018 18:55:38 +0000 (18:55 +0000)]
Web Inspector: replace all unicode characters with the escaped character code
https://bugs.webkit.org/show_bug.cgi?id=192216
<rdar://problem/46275637>

Reviewed by Brian Burg.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/BreakpointPopoverController.js:
* UserInterface/Debug/UncaughtExceptionReporter.js:
* UserInterface/Models/AuditTestCase.js:
* UserInterface/Models/Canvas.js:
* UserInterface/Models/RecordingAction.js:
* UserInterface/Models/ScriptTimelineRecord.js:
* UserInterface/Views/AuditTestCaseContentView.js:
* UserInterface/Views/AuditTestContentView.js:
* UserInterface/Views/AuditTestGroupContentView.js:
* UserInterface/Views/CallFrameView.js:
* UserInterface/Views/CanvasContentView.js:
* UserInterface/Views/CanvasOverviewContentView.css:
* UserInterface/Views/ConsoleMessageView.css:
* UserInterface/Views/ContextMenuUtilities.js:
* UserInterface/Views/DOMEventsBreakdownView.js:
* UserInterface/Views/DataGrid.css:
* UserInterface/Views/DataGrid.js:
* UserInterface/Views/DatabaseTableContentView.js:
* UserInterface/Views/DebuggerDashboardView.css:
* UserInterface/Views/DebuggerSidebarPanel.js:
* UserInterface/Views/ErrorObjectView.js:
* UserInterface/Views/EventBreakpointPopover.js:
* UserInterface/Views/InlineSwatch.js:
* UserInterface/Views/LayerTreeDataGridNode.js:
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
* UserInterface/Views/Layers3DContentView.js:
* UserInterface/Views/LayoutTimelineDataGridNode.js:
* UserInterface/Views/NetworkTableContentView.css:
* UserInterface/Views/NetworkTableContentView.js:
* UserInterface/Views/ObjectPreviewView.js:
* UserInterface/Views/ProfileDataGridNode.js:
* UserInterface/Views/ResourceTimelineDataGridNode.js:
* UserInterface/Views/ScriptDetailsTimelineView.css:
* UserInterface/Views/TextEditor.css:
* UserInterface/Views/TreeOutline.css:

LayoutTests:

* inspector/audit/data-domAttributes-expected.txt:
* inspector/audit/data-domNodes-expected.txt:
* inspector/audit/data-errors-expected.txt:

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

9 months ago-[WKProcessPool _downloadURLRequest:] should allow specifying the initiating web...
david_quesada@apple.com [Fri, 30 Nov 2018 18:50:55 +0000 (18:50 +0000)]
-[WKProcessPool _downloadURLRequest:] should allow specifying the initiating web view
https://bugs.webkit.org/show_bug.cgi?id=192212
rdar://problem/46363706

Reviewed by Alex Christensen.

Source/WebKit:

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _downloadURLRequest:originatingWebView:]):
(-[WKProcessPool _downloadURLRequest:]): Deleted.
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm:
(-[DownloadProgressTestRunner startDownload:expectedLength:]):

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

9 months ago[WebGPU] Flesh out WebGPURenderPassDescriptor to match the WebGPU IDL
justin_fan@apple.com [Fri, 30 Nov 2018 18:14:52 +0000 (18:14 +0000)]
[WebGPU] Flesh out WebGPURenderPassDescriptor to match the WebGPU IDL
https://bugs.webkit.org/show_bug.cgi?id=192213

Reviewed by Dean Jackson.

Source/WebCore:

WebGPU prototype now uses WebGPURenderPassColorAttachmentDescriptor in WebGPURenderPassDescriptor to match the WebGPU Sketch.
WebGPU developer can now also set the clearColor in WebGPURenderPassDescriptor.

No new tests. Older WebGPURenderPass* tests updated.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/webgpu/WebGPUColor.h: Added. Typedef'd to GPUColor.h.
* Modules/webgpu/WebGPUColor.idl: Added.
* Modules/webgpu/WebGPUCommandBuffer.cpp:
(WebCore::WebGPUCommandBuffer::beginRenderPass): Updated to error check and support the new structure of WebGPURenderPassDescriptor.
* Modules/webgpu/WebGPURenderPassColorAttachmentDescriptor.h: Added.
* Modules/webgpu/WebGPURenderPassColorAttachmentDescriptor.idl: Added.
* Modules/webgpu/WebGPURenderPassDescriptor.h:
* Modules/webgpu/WebGPURenderPassDescriptor.idl: Updated to match the sketch IDL.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/gpu/GPUColor.h: Added.
* platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.h: Added. Backing struct for WebGPU__.
* platform/graphics/gpu/GPURenderPassDescriptor.h: Updated to match new WebGPURenderPassDescriptor.
* platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
(WebCore::GPURenderPassEncoder::create): Now also uses clearColor set by developer.

LayoutTests:

Updating some tests to match the updated WebGPURenderPassDescriptor.

* webgpu/js/basic-webgpu-functions.js:
(render):
* webgpu/render-command-encoding.html:
* webgpu/render-passes.html:

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

9 months agoRemove invalid character in sandbox introduced in r238703.
pvollan@apple.com [Fri, 30 Nov 2018 17:41:39 +0000 (17:41 +0000)]
Remove invalid character in sandbox introduced in r238703.

Unreviewed sandbox fix.

* WebProcess/com.apple.WebProcess.sb.in:

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

9 months ago[Cocoa] Add some WKA extension points
aestes@apple.com [Fri, 30 Nov 2018 17:09:37 +0000 (17:09 +0000)]
[Cocoa] Add some WKA extension points
https://bugs.webkit.org/show_bug.cgi?id=192131
<rdar://problem/46330293>

Reviewed by Tim Horton.

Source/WebCore:

* DerivedSources.make: Added an extension point for derived sources.
* Modules/applepay/PaymentCoordinatorClient.h: Added an extension point for
PaymentCoordinatorClient.
* SourcesCocoa.txt: Added WebCoreAdditions.mm as a non-unified source.
* WebCore.xcodeproj/project.pbxproj: Added WebCoreAdditions.mm.
* bindings/js/WebCoreBuiltinNames.h: Added an extension point for built-in names.
* page/SettingsBase.h: Added an extension point for settings.
* platform/cocoa/WebCoreAdditions.mm: Added.

Source/WebKit:

* DerivedSources.make: Added an extension point for WebPreferences.yaml.
* Platform/IPC/MessageSender.h:
(IPC::MessageSender::sendWithAsyncReply): Send async messages via IPC::MessageSender.
* Platform/cocoa/WebKitAdditions.mm: A an extension point for additional WebKit sources.
* SourcesCocoa.txt: Added WebKitAdditions.mm as non-unified source.
* UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
(WebKit::WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy): Called finishConstruction.
* UIProcess/ApplePay/WebPaymentCoordinatorProxy.h: Added an extension point for
WebPaymentCoordinatorProxy.
* WebKit.xcodeproj/project.pbxproj: Added WebKitAdditions.mm.
* WebProcess/ApplePay/WebPaymentCoordinator.h: Added an extension point for
WebPaymentCoordinator.

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

9 months ago[GStreamer][EME] CDMInstance should be shipped as a GstContext to the decryptors
calvaris@igalia.com [Fri, 30 Nov 2018 16:21:35 +0000 (16:21 +0000)]
[GStreamer][EME] CDMInstance should be shipped as a GstContext to the decryptors
https://bugs.webkit.org/show_bug.cgi?id=192075

Reviewed by Philippe Normand.

So far, we were shipping the CDMInstance in an event to the
decryptors and they were requesting it with bus messages when it
was not found. Now we ship it with a GstContext that is set to the
pipeline and read from the decryptors, which is now always
available.

As a consequence of changing this flow, the attemptToDecrypt one
was affected as well because it was tied to CDMInstance
shipment. A workaround was added: when the decryptors send the
waitingForKey, an attemptToDecrypt will be performed. A FIXME was
added for this. A subconsequence is that
attemptToDecryptWithInstance is reworked to rely always in
attemptToDecryptWithLocal instance, the former becomes final and
the latter virtual.

This is a rework, no new tests needed.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceAttached):
(WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceDetached):
(WebCore::MediaPlayerPrivateGStreamerBase::attemptToDecryptWithLocalInstance):
(WebCore::MediaPlayerPrivateGStreamerBase::dispatchCDMInstance): Deleted.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
(webkit_media_common_encryption_decrypt_class_init):
(webkitMediaCommonEncryptionDecryptTransformInPlace):
(webkitMediaCommonEncryptionDecryptIsCDMInstanceAvailable):
(webkitMediaCommonEncryptionDecryptSinkEventHandler):
(webKitMediaCommonEncryptionDecryptorSetContext):
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::attemptToDecryptWithLocalInstance):
(WebCore::MediaPlayerPrivateGStreamerMSE::attemptToDecryptWithInstance): Deleted.
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:

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

9 months ago[LFC][BFC] Compute min/maxHeight margins only when they are needed.
zalan@apple.com [Fri, 30 Nov 2018 15:26:10 +0000 (15:26 +0000)]
[LFC][BFC] Compute min/maxHeight margins only when they are needed.
https://bugs.webkit.org/show_bug.cgi?id=192223

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/block/block-only/collapsed-margin-with-min-height.html

* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):

Tools:

* LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

* fast/block/block-only/collapsed-margin-with-min-height-expected.txt: Added.
* fast/block/block-only/collapsed-margin-with-min-height.html: Added.

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

9 months ago[LFC][BFC] Geometry::inFlowNonReplacedHeightAndMargin should check for empty inline...
zalan@apple.com [Fri, 30 Nov 2018 15:24:11 +0000 (15:24 +0000)]
[LFC][BFC] Geometry::inFlowNonReplacedHeightAndMargin should check for empty inline formatting context.
https://bugs.webkit.org/show_bug.cgi?id=192215

Reviewed by Antti Koivisto.

Check if the inline formatting context actually has any lines.

* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):

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

9 months ago[LFC][BFC][MarginCollapsing] Do not use computed display box values for border and...
zalan@apple.com [Fri, 30 Nov 2018 15:22:39 +0000 (15:22 +0000)]
[LFC][BFC][MarginCollapsing] Do not use computed display box values for border and padding
https://bugs.webkit.org/show_bug.cgi?id=192214

Reviewed by Antti Koivisto.

Source/WebCore:

Border and padding values are not necessarily computed yet when we try to estimate the margin top value. Estimating margin top is required
to be able to place floats (vertically) sooner than we would compute the final vertical position for a regular block box.

<body><div style="float: left"></div><div><div style="margin: 10px;"></div></div>

In the above example, to estimate a final vertical position of the floating box, we need to know whether the nested div's margin is collapsed
all the way up to the body. However in order to find it out we need to check for borders and paddings (they stop margin collapsing).
At the time when the floating box is being laied out, those <div> block boxes are still far down in the layout queue.

* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::hasBorder):
(WebCore::Layout::hasPadding):
(WebCore::Layout::hasBorderBefore):
(WebCore::Layout::hasBorderAfter):
(WebCore::Layout::hasPaddingBefore):
(WebCore::Layout::hasPaddingAfter):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginTopCollapsedWithParent):
(WebCore::Layout::isMarginBottomCollapsedThrough):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginTop):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBottom):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginBottomCollapsedWithParent):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginBottomFromLastChild):

Tools:

* LayoutReloaded/misc/LFC-passing-tests.txt:

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

9 months ago[GTK][MiniBrowser] Handle Device Info permission requests
commit-queue@webkit.org [Fri, 30 Nov 2018 14:52:43 +0000 (14:52 +0000)]
[GTK][MiniBrowser] Handle Device Info permission requests
https://bugs.webkit.org/show_bug.cgi?id=191585

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-11-30
Reviewed by Carlos Garcia Campos.

* MiniBrowser/gtk/BrowserTab.c:
(permissionRequestDataNew):
(permissionRequestDataFree):
(permissionRequestDialogResponse):
(decidePermissionRequest):
(browserTabConstructed):

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

9 months agoUnreviewed GTK+ gardening. Stop running tests without complex text enforced
carlosgc@webkit.org [Fri, 30 Nov 2018 13:25:52 +0000 (13:25 +0000)]
Unreviewed GTK+ gardening. Stop running tests without complex text enforced

Rebaseline tests. Part 3.

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

9 months ago[BigInt] Implement ValueBitXor into DFG
ticaiolima@gmail.com [Fri, 30 Nov 2018 13:24:53 +0000 (13:24 +0000)]
[BigInt] Implement ValueBitXor into DFG
https://bugs.webkit.org/show_bug.cgi?id=190264

Reviewed by Yusuke Suzuki.

JSTests:

* stress/big-int-bitwise-xor-jit.js: Added.
* stress/big-int-bitwise-xor-memory-stress.js: Added.
* stress/big-int-bitwise-xor-untyped.js: Added.

Source/JavaScriptCore:

This patch is splitting the BitXor node into ArithBitXor and
ValueBitXor. This is necessary due the introduction of
BigInt, since BitXor operations now can result into Int32 or BigInt.
In such case, we use ArithBitXor when operands are Int and fallback to
ValueBitXor when operands are anything else. In the case of
ValueBitXor, we speculate BigInt when op1 and op2 are predicted as
BigInt as well. BigInt specialization consist into call
`operationBigIntBitXor` function, that calls JSBigInt::bitXor.

* bytecode/BytecodeList.rb:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::arithProfileForPC):
* bytecode/Opcode.h:
(JSC::padOpcodeName):
* bytecompiler/BytecodeGenerator.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwo):
(JSC::DFG::BackwardsPropagationPhase::propagate):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileValueBitwiseOp):
(JSC::DFG::SpeculativeJIT::compileBitwiseOp):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::bitOp):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileValueBitXor):
(JSC::FTL::DFG::LowerDFGToB3::compileArithBitXor):
(JSC::FTL::DFG::LowerDFGToB3::compileBitXor): Deleted.
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_bitxor):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):

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

9 months agoUnreviewed GTK+ gardening. Stop running tests without complex text enforced
carlosgc@webkit.org [Fri, 30 Nov 2018 12:51:22 +0000 (12:51 +0000)]
Unreviewed GTK+ gardening. Stop running tests without complex text enforced

Rebaseline tests. Part 2.

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

9 months agoUnreviewed GTK+ gardening. Stop running tests without complex text enforced
carlosgc@webkit.org [Fri, 30 Nov 2018 12:40:18 +0000 (12:40 +0000)]
Unreviewed GTK+ gardening. Stop running tests without complex text enforced

Tools:

We have enforced complex text in GTK+ for one release cycle without noticing any major issue nor performance
regression.

* WebKitTestRunner/gtk/main.cpp:
(main):

LayoutTests:

Rebaseline tests. Part 1.

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

9 months ago[WebAuthN] Support CTAP HID authenticators on macOS
fred.wang@free.fr [Fri, 30 Nov 2018 12:28:00 +0000 (12:28 +0000)]
[WebAuthN] Support CTAP HID authenticators on macOS
https://bugs.webkit.org/show_bug.cgi?id=188623

Unreviewed build fix.

Patch by Frederic Wang <fwang@igalia.com> on 2018-11-30

* UIProcess/WebAuthentication/Cocoa/HidConnection.mm: Add missing header.

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

9 months agoREGRESSION (r238635): Dragging a text selection within WKWebView causes the selection...
wenson_hsieh@apple.com [Fri, 30 Nov 2018 07:22:00 +0000 (07:22 +0000)]
REGRESSION (r238635): Dragging a text selection within WKWebView causes the selection highlight to get into a bad state
https://bugs.webkit.org/show_bug.cgi?id=192165
<rdar://problem/46346682>

Reviewed by Daniel Bates.

Source/WebKit:

Fixes a bug in PageClientImpl::isViewFocused. Consider the following scenario:
1. WKWebView is hosted within the view hierarchy
2. First responder is *not* WKContentView
3. The active focus retain count is nonzero

Before r238635, we would return true, due to condition (3). However, after r238635, we only consider whether the
first responder is WKContentView, since the web view is in the view hierarchy. This breaks scenarios where
WebKit or UIKit attempts to retain focus and later restore the content view to be the first responder (an
example of this is dragging a text selection between editable elements in the same web view).

To fix this, simply bail early and return true if focus is being retained.

* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewFocused):

Tools:

Fixes 11 API tests that started failing or timing out after r238635. See below for more details.

* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEditActions.mm:
(TestWebKitAPI::webViewForEditActionTesting):
(TestWebKitAPI::webViewForEditActionTestingWithPageNamed):

Ensure that the web view becomes first responder before executing edit actions.

* TestWebKitAPI/Tests/WebKitCocoa/autofocus-contenteditable.html:
* TestWebKitAPI/Tests/WebKitCocoa/contenteditable-and-textarea.html:

Tweak these tests to allow selected content to overflow the width of the web view. Without this change,
ContentEditableToContentEditable and ContentEditableToTextarea will sometimes fail because the content causes
the body to scroll horizontally, so we miss the drop destination.

* TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
(loadTestPageAndEnsureInputSession):

Add a new helper to load a test page with a given name, become first responder, and wait until an input session
starts. Use this in various drag and drop tests to reduce code duplication.

* TestWebKitAPI/cocoa/DragAndDropSimulator.h:
* TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
(-[DragAndDropSimulator initWithWebView:]):
(-[DragAndDropSimulator _resetSimulatedState]):
(-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):
(-[DragAndDropSimulator _advanceProgress]):

To more accurately emulate UIKit behavior, begin focus preservation when starting a drag, and attempt to clear
the focus preservation token when the drag session ends. This allows us to simulate and test the scenario that
regressed with r238635.

(-[DragAndDropSimulator ensureInputSession]):
(-[DragAndDropSimulator _webView:didStartInputSession:]):
(-[DragAndDropSimulator waitForInputSession]): Deleted.

Refactored into -ensureInputSession. Instead of assuming that an input session has not yet been started, simply
wait for an input session to start if needed.

* TestWebKitAPI/ios/UIKitSPI.h:

Add a new SPI declaration.

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

9 months agoSeparate paint and scroll offsets for RenderLayerBacking::m_scrollingContentsLayer
commit-queue@webkit.org [Fri, 30 Nov 2018 06:35:36 +0000 (06:35 +0000)]
Separate paint and scroll offsets for RenderLayerBacking::m_scrollingContentsLayer
https://bugs.webkit.org/show_bug.cgi?id=183040

Source/WebCore:

Currently, scroll offset of RenderLayerBacking::m_scrollingContentsLayer is stored in the
GraphicsLayer::m_offsetFromRenderer member used for paint offset. This patch separates these
two concept by introducing a new GraphicsLayer::m_scrollOffset for the scroll offset. This
makes the API a little bit cleaner, the code easier to understand and might avoid unnecessary
repaints in composited scroll.

Patch by Frederic Wang <fwang@igalia.com> on 2018-11-29
Reviewed by Simon Fraser.

No new tests, already covered by existing tests.

* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::setScrollOffset): Setter function to update the scroll offset
of the content layer inside its scrolling parent layer. Ask a repaint if it has changed and
is requested by the caller.
(WebCore::GraphicsLayer::paintGraphicsLayerContents): Take into account the scroll offset
when painting.
(WebCore::GraphicsLayer::dumpProperties const): Dump the scroll offset property.
* platform/graphics/GraphicsLayer.h: Include ScrollableArea for the ScrollOffset typedef.
Add member for the scroll offset of the content layer inside its scrolling parent layer.
(WebCore::GraphicsLayer::scrollOffset const): Getter function.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry): Do not include the scroll offset in the
paint offset of m_scrollingContentsLayer since it is now taken into account in
paintGraphicsLayerContents. Update the scroll offset of m_scrollingContentsLayer separately.
Leave the paint offset of m_foregroundLayer unchanged.
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect): Take into account the scroll
offset of m_scrollingContentsLayer when calculating the dirty rect.

LayoutTests:

Patch by Frederic Wang <fwang@igalia.com> on 2018-11-29
Reviewed by Simon Fraser.

Update expectations containing layer trees of RenderLayerBacking::m_scrollingContentsLayer, to separate offsetFromRenderer and
scrollOffset. We have OLD offsetFromRenderer = NEW offsetFromRenderer - scrollOffset.

* compositing/ios/overflow-scroll-touch-tiles-expected.txt:
* fast/scrolling/ios/overflow-scroll-touch-expected.txt:
* fast/scrolling/ios/subpixel-overflow-scrolling-with-ancestor-expected.txt:
* platform/ios/compositing/overflow/scrolling-without-painting-expected.txt:
* platform/ios/compositing/overflow/textarea-scroll-touch-expected.txt:
* platform/ios/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt:
* platform/ios/fast/scrolling/ios/overflow-scrolling-ancestor-clip-expected.txt:
* platform/ios/fast/scrolling/ios/overflow-scrolling-ancestor-clip-size-expected.txt:
* platform/ios/fast/scrolling/ios/textarea-scroll-touch-expected.txt:

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

9 months agoInform clients when editable image attachment backing data changes
timothy_horton@apple.com [Fri, 30 Nov 2018 06:31:04 +0000 (06:31 +0000)]
Inform clients when editable image attachment backing data changes
https://bugs.webkit.org/show_bug.cgi?id=192206
<rdar://problem/46350277>

Reviewed by Wenson Hsieh.

Source/WebKit:

* UIProcess/API/Cocoa/APIAttachmentCocoa.mm:
(API::Attachment::invalidateGeneratedFileWrapper):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didInvalidateDataForAttachment:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/Cocoa/PageClientImplCocoa.h:
* UIProcess/Cocoa/PageClientImplCocoa.mm:
(WebKit::PageClientImplCocoa::didInvalidateDataForAttachment):
* UIProcess/PageClient.h:
(WebKit::PageClient::didInvalidateDataForAttachment):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didInvalidateDataForAttachment):
* UIProcess/WebPageProxy.h:
Plumb file-wrapper-invalidation through from APIAttachment to WKUIDelegate.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(-[AttachmentUpdateObserver init]):
(-[AttachmentUpdateObserver dataInvalidated]):
(-[AttachmentUpdateObserver _webView:didInvalidateDataForAttachment:]):
(TestWebKitAPI::ObserveAttachmentUpdatesForScope::expectAttachmentInvalidation):
(webViewForTestingAttachments):
(TestWebKitAPI::forEachViewInHierarchy):
(TestWebKitAPI::findEditableImageCanvas):
(TestWebKitAPI::drawSquareInEditableImage):
(TestWebKitAPI::TEST):
* TestWebKitAPI/ios/PencilKitTestSPI.h: Added.
Add a test ensuring that we get an invalidation callback when an editable image is changed.

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

9 months agoOverflow scrolling layers need to be self-painting
simon.fraser@apple.com [Fri, 30 Nov 2018 03:47:59 +0000 (03:47 +0000)]
Overflow scrolling layers need to be self-painting
https://bugs.webkit.org/show_bug.cgi?id=192201

Reviewed by Dean Jackson.
Source/WebCore:

Overflow scrolling layers paint their contents, so need to be self-painting in the RenderLayer sense.

Without this change, the overflow in the testcase doesn't get any compositing layers.

Test: compositing/scrolling/overflow-scrolling-layers-are-self-painting.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects const):

LayoutTests:

* compositing/scrolling/overflow-scrolling-layers-are-self-painting-expected.txt: Added.
* compositing/scrolling/overflow-scrolling-layers-are-self-painting.html: Added.

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

9 months ago[MediaStream] DeviceIdHashSaltStorage should use iframe and top level documents
eric.carlson@apple.com [Fri, 30 Nov 2018 03:15:03 +0000 (03:15 +0000)]
[MediaStream] DeviceIdHashSaltStorage should use iframe and top level documents
https://bugs.webkit.org/show_bug.cgi?id=192182

Reviewed by Youenn Fablet.

Source/WebKit:

* UIProcess/DeviceIdHashSaltStorage.cpp:
(WebKit::DeviceIdHashSaltStorage::deviceIdHashSaltForOrigin): Key off of request and top
level documents.
(WebKit::DeviceIdHashSaltStorage::deleteDeviceIdHashSaltForOrigins): Ditto.
* UIProcess/DeviceIdHashSaltStorage.h:
(WebKit::DeviceIdHashSaltStorage::HashSaltForOrigin::HashSaltForOrigin):

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Pass both documents.
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Ditto.
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Ditto.

LayoutTests:

* http/tests/media/media-stream/enumerate-devices-source-id-expected.txt:
* http/tests/media/media-stream/enumerate-devices-source-id.html:
* http/tests/media/media-stream/resources/enumerate-devices-source-id-frame.html:

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

9 months ago[Win] listDirectory in FileSystemWin.cpp should not skip all directories
chris.reid@sony.com [Fri, 30 Nov 2018 02:16:18 +0000 (02:16 +0000)]
[Win] listDirectory in FileSystemWin.cpp should not skip all directories
https://bugs.webkit.org/show_bug.cgi?id=192042

Reviewed by Fujii Hironori.

Source/WebCore:

Covered by existing tests.

listDirectory is not returning any child directories which is causing
ASSERT(diskUsage >= databaseFileSize) in SQLiteIDBBackingStore.cpp to fail.

Change listDirectory in FileSystemWin to match FileSystemPOSIX's behavior.
listDirectory should only skip the current and previous directories.

* platform/win/FileSystemWin.cpp:

LayoutTests:

Enable storage tests on WinCairo and adding initial test expectations.

* platform/wincairo/TestExpectations:

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

9 months agoUnreviewed, rolling out r238713.
ryanhaddad@apple.com [Fri, 30 Nov 2018 01:50:22 +0000 (01:50 +0000)]
Unreviewed, rolling out r238713.

Breaks internal builds.

Reverted changeset:

"[Cocoa] Add some WKA extension points"
https://bugs.webkit.org/show_bug.cgi?id=192131
https://trac.webkit.org/changeset/238713

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

9 months agoUnreviewed, rolling out r238680.
ryanhaddad@apple.com [Fri, 30 Nov 2018 01:32:17 +0000 (01:32 +0000)]
Unreviewed, rolling out r238680.

Caused existing webrtc layout tests to fail an assertion.

Reverted changeset:

"A sender created through addTransceiver and populated using
addTrack should have its source set"
https://bugs.webkit.org/show_bug.cgi?id=192136
https://trac.webkit.org/changeset/238680

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

9 months agoREGRESSION(r238445)[Buildbot] Unknown builder 'GTK Linux 32-bit Release' in scheduler...
Hironori.Fujii@sony.com [Fri, 30 Nov 2018 01:22:26 +0000 (01:22 +0000)]
REGRESSION(r238445)[Buildbot] Unknown builder 'GTK Linux 32-bit Release' in scheduler 'trunk'
https://bugs.webkit.org/show_bug.cgi?id=192143

Reviewed by Philippe Normand.

Buildbot can't start since r238445.

> Configuration Errors:
>   Unknown builder 'GTK Linux 32-bit Release' in scheduler 'trunk'
>   Unknown builder 'GTK Linux ARM Release' in scheduler 'trunk'

* BuildSlaveSupport/build.webkit.org-config/config.json: Removed deprecated builders.

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

9 months agoRemove dangling WebGPU file references from WebCore project
justin_fan@apple.com [Fri, 30 Nov 2018 01:19:02 +0000 (01:19 +0000)]
Remove dangling WebGPU file references from WebCore project
https://bugs.webkit.org/show_bug.cgi?id=192185

Unreviewed project file gardening.

No new tests.

* WebCore.xcodeproj/project.pbxproj:

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

9 months agoUnreviewed build fix.
krollin@apple.com [Fri, 30 Nov 2018 01:02:45 +0000 (01:02 +0000)]
Unreviewed build fix.

r238637 introduced some DerivedSources.make changes that could produce
some invalid .idl files, leading to IDLParser.pm error messages.

* DerivedSources.make:

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

9 months agoAdd an internal feature flag to enable async overflow scrolling
simon.fraser@apple.com [Fri, 30 Nov 2018 00:55:56 +0000 (00:55 +0000)]
Add an internal feature flag to enable async overflow scrolling
https://bugs.webkit.org/show_bug.cgi?id=192184

Reviewed by Tim Horton.

Add a new internal feature flag that will enable async overflow-scrolling for
most overflow:scroll elements. Defaults to off.
Source/WebCore:

Make the "UseAcceleratedTouchScrolling" terminology in RenderLayer etc be more generic,
and refer to async overflow scrolling.

* page/Settings.yaml:
* rendering/RenderLayer.cpp:
(WebCore::canCreateStackingContext): Remove a line which is not necessary, since -webkit-overflow-scrolling: touch
already triggers non-auto z-index via code in StyleResolver::adjustRenderStyle().
(WebCore::RenderLayer::canUseCompositedScrolling const):
(WebCore::RenderLayer::hasCompositedScrollableOverflow const):
(WebCore::RenderLayer::handleTouchEvent):
(WebCore::RenderLayer::usesAsyncScrolling const):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
(WebCore::RenderLayer::showsOverflowControls const):
(WebCore::RenderLayer::calculateClipRects const):
(WebCore::RenderLayer::canUseAcceleratedTouchScrolling const): Deleted.
(WebCore::RenderLayer::hasTouchScrollableOverflow const): Deleted.
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling const):
(WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer const):
(WebCore::RenderLayerCompositor::useCoordinatedScrollingForLayer const):

Source/WebKit:

* Shared/WebPreferences.yaml:

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

9 months ago[Cocoa] Add some WKA extension points
aestes@apple.com [Fri, 30 Nov 2018 00:50:07 +0000 (00:50 +0000)]
[Cocoa] Add some WKA extension points
https://bugs.webkit.org/show_bug.cgi?id=192131
<rdar://problem/46330293>

Reviewed by Tim Horton.

Source/WebCore:

* DerivedSources.make: Added an extension point for derived sources.
* Modules/applepay/PaymentCoordinatorClient.h: Added an extension point for
PaymentCoordinatorClient.
* SourcesCocoa.txt: Added WebCoreAdditions.mm as a non-unified source.
* WebCore.xcodeproj/project.pbxproj: Added WebCoreAdditions.mm.
* bindings/js/WebCoreBuiltinNames.h: Added an extension point for built-in names.
* page/SettingsBase.h: Added an extension point for settings.
* platform/cocoa/WebCoreAdditions.mm: Added.

Source/WebKit:

* DerivedSources.make: Added an extension point for WebPreferences.yaml.
* Platform/IPC/MessageSender.h:
(IPC::MessageSender::sendWithAsyncReply): Send async messages via IPC::MessageSender.
* Platform/cocoa/WebKitAdditions.mm: A an extension point for additional WebKit sources.
* SourcesCocoa.txt: Added WebKitAdditions.mm as non-unified source.
* UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
(WebKit::WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy): Called finishConstruction.
* UIProcess/ApplePay/WebPaymentCoordinatorProxy.h: Added an extension point for
WebPaymentCoordinatorProxy.
* WebKit.xcodeproj/project.pbxproj: Added WebKitAdditions.mm.
* WebProcess/ApplePay/WebPaymentCoordinator.h: Added an extension point for
WebPaymentCoordinator.

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

9 months agoTry to fix the build.
timothy_horton@apple.com [Fri, 30 Nov 2018 00:45:44 +0000 (00:45 +0000)]
Try to fix the build.

* Platform/spi/ios/PencilKitSPI.h:

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

9 months agoWeb Inspector: RTL: disclosure triangles should be flipped and aligned right
mattbaker@apple.com [Fri, 30 Nov 2018 00:39:02 +0000 (00:39 +0000)]
Web Inspector: RTL: disclosure triangles should be flipped and aligned right
https://bugs.webkit.org/show_bug.cgi?id=192089
<rdar://problem/46316753>

Reviewed by Devin Rousso.

* UserInterface/Views/ComputedStyleSection.css:
(.computed-style-section .computed-property-item .disclosure-button):
(body[dir=rtl] .computed-style-section .computed-property-item .disclosure-button):

* UserInterface/Views/ConsoleMessageView.css:
(.console-message.expandable .console-top-level-message::before):
(body[dir=rtl] .console-message.expandable .console-top-level-message::before):

* UserInterface/Views/ErrorObjectView.css:
(.error-object > .formatted-error::before):
(body[dir=rtl] .error-object > .formatted-error::before):
(.error-object .content):

* UserInterface/Views/LogContentView.css:
(.console-group-title::before):
(body[dir=ltr] .console-group-title::before):
(body[dir=rtl] .console-group-title::before):

* UserInterface/Views/ObjectTreeView.css:
(body[dir=rtl] .object-tree > :matches(.title, .object-preview)::before):

* UserInterface/Views/TypeTreeElement.css:
(body[dir=rtl] .item.type-tree-element.parent > .disclosure-button):

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

9 months agoAdd SPI to publish NSProgress on active downloads
david_quesada@apple.com [Fri, 30 Nov 2018 00:38:29 +0000 (00:38 +0000)]
Add SPI to publish NSProgress on active downloads
https://bugs.webkit.org/show_bug.cgi?id=192021
rdar://problem/44405661

Reviewed by Alex Christensen.

Source/WebCore/PAL:

Add an SPI header for NSProgress's publishing and unpublishing methods. In older
SDKs, these methods are explicitly unavailable on platforms other than macOS,
with underscore-prefixed versions available as SPI. In newer SDKs, the unprefixed
versions are SPI and the prefixed versions are deprecated.

* PAL.xcodeproj/project.pbxproj:
* pal/spi/cocoa/NSProgressSPI.h:

Source/WebKit:

Make it possible for clients to allow other processes to monitor the state of active
downloads. On Cocoa platforms, this can be done by creating an NSProgress, publishing
it on an appropriate file URL (potentially a different file URL than where the download
data is being written), updating properties on it as the download makes progress, and
wiring up a cancellation handler that allows it to be remotely canceled. Interested
clients can then subscribe to progress on that URL and receive a proxy to the progress
that WebKit publishes.

* NetworkProcess/Downloads/Download.cpp:
(WebKit::Download::~Download):
(WebKit::Download::platformDestroyDownload):
    Add a platform-customizable hook for destructing the Download. DownloadCocoa.mm
    will interact with its Objective-C NSProgress instance at this point.

* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::dataTaskBecameDownloadTask):
    See comments for publishDownloadProgress().
(WebKit::DownloadManager::publishDownloadProgress):
    If the provided downloadID corresponds to a non-Pending Download, hand the URL
    and a matching sandbox extension to the Download so it can create its progress.
    Otherwise, store the URL and sandbox extension on the PendingDownload to be used
    later when the full Download is created. When this happens, dataTaskBecameDownloadTask()
    will tell the PendingDownload about the Download it has become. The PendingDownload
    will then relay the progress URL and sandbox extension to the Download.

* NetworkProcess/Downloads/DownloadManager.h:
* NetworkProcess/Downloads/PendingDownload.cpp:
(WebKit::PendingDownload::publishProgress):
    Store the progress info for later use, when the proper Download is created.
(WebKit::PendingDownload::didBecomeDownload):
    If there was a progress URL provided earlier, tell the Download corresponding to this
    PendingDownload to publish its progress using that URL.

* NetworkProcess/Downloads/PendingDownload.h:
* NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
(WebKit::Download::platformDestroyDownload):
    When the Download is destroyed (i.e. when the download succeeds, fails, or is canceled),
    unpublish the progress, since there is no longer any activity to report.
(WebKit::Download::publishProgress):
    Resolve the sandbox extension, create a progress configured to reflect the progress of
    this Download's NSURLSessionDownloadTask, and publish it at the given file URL.

* NetworkProcess/Downloads/cocoa/WKDownloadProgress.h: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKDownload.h.
* NetworkProcess/Downloads/cocoa/WKDownloadProgress.mm: Added.
(-[WKDownloadProgress initWithDownloadTask:download:URL:sandboxExtension:]):
    Configure this progress, start observing properties on the download task that this
    progress will reflect, and connect the cancellation handler of the progress to cancel
    the corresponding Download.
(-[WKDownloadProgress publish]):
(-[WKDownloadProgress unpublish]):
    Override these methods to consume and revoke the sandbox extension to make sure the
    process has access to the progress file while the progress will be published.
(-[WKDownloadProgress dealloc]):
(-[WKDownloadProgress observeValueForKeyPath:ofObject:change:context:]):
    When either byte count (number received, or number expected to receive) of the download
    task changes, update this progress to reflect that.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::publishDownloadProgress):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:

* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
    Allow looking up the services that manages published NSProgresses.

* UIProcess/API/Cocoa/_WKDownload.h:
* UIProcess/API/Cocoa/_WKDownload.mm:
(-[_WKDownload publishProgressAtURL:]):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::publishProgress):
* UIProcess/Downloads/DownloadProxy.h:
* WebKit.xcodeproj/project.pbxproj:

Tools:

Add API tests to exercise the progress-publishing functionality in a variety of scenarios.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm: Added.
(+[DownloadProgressTestProtocol registerProtocolForTestRunner:]):
(+[DownloadProgressTestProtocol unregisterProtocol]):
(+[DownloadProgressTestProtocol canInitWithRequest:]):
(+[DownloadProgressTestProtocol canonicalRequestForRequest:]):
(+[DownloadProgressTestProtocol requestIsCacheEquivalent:toRequest:]):
(-[DownloadProgressTestProtocol startLoading]):
(-[DownloadProgressTestProtocol stopLoading]):
(-[DownloadProgressTestRunner init]):
(-[DownloadProgressTestRunner startLoadingWithProtocol:]):
(-[DownloadProgressTestRunner tearDown]):
(-[DownloadProgressTestRunner _didGetProgress:]):
(-[DownloadProgressTestRunner _didLoseProgress]):
(-[DownloadProgressTestRunner subscribeAndWaitForProgress]):
(-[DownloadProgressTestRunner waitToLoseProgress]):
(-[DownloadProgressTestRunner startDownload:expectedLength:]):
(-[DownloadProgressTestRunner publishProgress]):
(-[DownloadProgressTestRunner receiveData:]):
(-[DownloadProgressTestRunner finishDownloadTask]):
(-[DownloadProgressTestRunner failDownloadTask]):
(-[DownloadProgressTestRunner waitForDownloadDidCreateDestination]):
(-[DownloadProgressTestRunner waitForDownloadFinished]):
(-[DownloadProgressTestRunner waitForDownloadCanceled]):
(-[DownloadProgressTestRunner waitForDownloadFailed]):
(-[DownloadProgressTestRunner waitForUpdatedCompletedUnitCount]):
(-[DownloadProgressTestRunner observeValueForKeyPath:ofObject:change:context:]):
(-[DownloadProgressTestRunner webView:decidePolicyForNavigationResponse:decisionHandler:]):
(-[DownloadProgressTestRunner webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[DownloadProgressTestRunner _downloadDidStart:]):
(-[DownloadProgressTestRunner _download:didCreateDestination:]):
(-[DownloadProgressTestRunner _downloadDidFinish:]):
(-[DownloadProgressTestRunner _downloadDidCancel:]):
(-[DownloadProgressTestRunner _download:didFailWithError:]):
(-[DownloadProgressTestRunner _download:decideDestinationWithSuggestedFilename:completionHandler:]):
(TEST):

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

9 months agoMake drawing tools available when an editable image is focused
timothy_horton@apple.com [Fri, 30 Nov 2018 00:32:14 +0000 (00:32 +0000)]
Make drawing tools available when an editable image is focused
https://bugs.webkit.org/show_bug.cgi?id=192172
<rdar://problem/30337960>

Reviewed by Dean Jackson.

* Platform/spi/ios/PencilKitSPI.h:
Add some more SPI.

* Shared/AssistedNodeInformation.cpp:
(WebKit::AssistedNodeInformation::encode const):
(WebKit::AssistedNodeInformation::decode):
* Shared/AssistedNodeInformation.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleStylusSingleTapAtPoint):
(WebKit::isAssistableElement):
(WebKit::WebPage::getAssistedNodeInformation):
Plumb the assisted node's embedded view ID, if available.
Also add a new input type for drawings, and use it when appropriate.

* SourcesCocoa.txt:
* UIProcess/API/Cocoa/_WKFocusedElementInfo.h:
Add WKInputTypeDrawing.

* UIProcess/ios/PencilKitSoftLink.h: Added.
* UIProcess/ios/PencilKitSoftLink.mm: Added.
Pull soft-linking out into its own file, to fix unified sources.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView requiresAccessoryView]):
Install a keyboard when a drawing is focused.
Also, deduplicate one "curretUserInterfaceIdiomIsPad"; just fall through.

(-[WKContentView inputView]):
Make a WKInkPickerControl when a drawing is focused.

(-[WKContentView textInputTraits]):
(isAssistableInputType):
* UIProcess/ios/WKDrawingView.h:
* UIProcess/ios/WKDrawingView.mm:
(-[WKDrawingView initWithEmbeddedViewID:webPageProxy:]):
(-[WKDrawingView PNGRepresentation]):
(-[WKDrawingView loadDrawingFromPNGRepresentation:]):
Adopt PencilKitSoftLink.

(-[WKDrawingView canvasView]):
Expose the internal canvas view for use by WKInkPickerControl.

* UIProcess/ios/WKInkPickerControl.h: Copied from Source/WebKit/Platform/spi/ios/PencilKitSPI.h.
* UIProcess/ios/WKInkPickerControl.mm: Added.
(-[WKInkPickerView initWithFrame:drawingView:]):
(-[WKInkPickerView didPickInk]):
(-[WKInkPickerView inlineInkPickerDidToggleRuler:]):
(-[WKInkPickerView inlineInkPicker:didSelectTool:]):
(-[WKInkPickerView inlineInkPicker:didSelectColor:]):
(-[WKInkPickerView inkPickerSize]):
(-[WKInkPickerView layoutSubviews]):
(-[WKInkPickerView sizeThatFits:]):
(-[WKInkPickerView viewControllerForPopoverPresentationFromInlineInkPicker:]):
(-[WKInkPickerControl initWithDrawingView:]):
(-[WKInkPickerControl beginEditing]):
(-[WKInkPickerControl endEditing]):
(-[WKInkPickerControl assistantView]):
Install and hook up a PKInlineInkPicker.
Center it in the keyboard.
Plumb changes through to the canvas view.

* WebKit.xcodeproj/project.pbxproj:

* editing/Editor.cpp:
(WebCore::Editor::insertEditableImage):
* editing/Editor.h:
* editing/InsertEditableImageCommand.cpp:
(WebCore::InsertEditableImageCommand::insertEditableImage):
(WebCore::InsertEditableImageCommand::doApply):
* editing/InsertEditableImageCommand.h:
Add InsertEditableImageCommand::insertEditableImage, which returns the
inserted image element.

* html/HTMLImageElement.h:
Make HTMLImageElement focusable if it is editable.

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

9 months agoREGRESSION (r238090): [ MacOS WK1 ] Layout Test imported/blink/compositing/squashing...
ryanhaddad@apple.com [Fri, 30 Nov 2018 00:28:57 +0000 (00:28 +0000)]
REGRESSION (r238090): [ MacOS WK1 ] Layout Test imported/blink/compositing/squashing/squashing-into-ancestor-painted-layer.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=191639

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations: Mark test as flaky.

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

9 months agoException in bot watcher's dashboard if a hidden platform in no longer configured...
ap@apple.com [Thu, 29 Nov 2018 23:51:26 +0000 (23:51 +0000)]
Exception in bot watcher's dashboard if a hidden platform in no longer configured for display
https://bugs.webkit.org/show_bug.cgi?id=185527

Reviewed by Aakash Jain.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js:
(updateHiddenPlatforms):

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

9 months ago[macOS] Add logging for some sandbox entries.
pvollan@apple.com [Thu, 29 Nov 2018 23:28:42 +0000 (23:28 +0000)]
[macOS] Add logging for some sandbox entries.
https://bugs.webkit.org/show_bug.cgi?id=192126

Reviewed by Brent Fulgham.

Add logging for sandbox entries which are possibly not needed.

* WebProcess/com.apple.WebProcess.sb.in:

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

9 months agoFix _WKWebsiteDataStoreConfiguration. sourceApplicationBundleIdentifier and sourceApp...
achristensen@apple.com [Thu, 29 Nov 2018 23:27:20 +0000 (23:27 +0000)]
Fix _WKWebsiteDataStoreConfiguration. sourceApplicationBundleIdentifier and sourceApplicationSecondaryIdentifier SPI introduced in r235127
https://bugs.webkit.org/show_bug.cgi?id=192191

Reviewed by Andy Estes.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
When trying to adopt the new SPI and verify it worked, I found that the strings are not copied in one place where they should be.

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

9 months ago[LFC][BFC][Quirk] Body and html height stretching.
zalan@apple.com [Thu, 29 Nov 2018 23:23:47 +0000 (23:23 +0000)]
[LFC][BFC][Quirk] Body and html height stretching.
https://bugs.webkit.org/show_bug.cgi?id=192154

Reviewed by Antti Koivisto.

Source/WebCore:

This patch takes the document box's margin/border/padding into account when stretching html/body to the height of the initial containing block.

Tests: fast/block/block-only/body-height-with-auto-html-height-quirk.html
       fast/block/block-only/body-height-with-auto-html-height-quirk2.html
       fast/block/block-only/body-height-with-non-auto-html-height-quirk.html
       fast/block/block-only/body-height-with-non-auto-html-height-quirk2.html

* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::estimatedMarginBottom):
* layout/blockformatting/BlockFormattingContextQuirks.cpp:
(WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):

Tools:

* LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

* fast/block/block-only/body-height-with-auto-html-height-quirk-expected.txt: Added.
* fast/block/block-only/body-height-with-auto-html-height-quirk.html: Added.
* fast/block/block-only/body-height-with-auto-html-height-quirk2-expected.txt: Added.
* fast/block/block-only/body-height-with-auto-html-height-quirk2.html: Added.
* fast/block/block-only/body-height-with-non-auto-html-height-quirk-expected.txt: Added.
* fast/block/block-only/body-height-with-non-auto-html-height-quirk.html: Added.
* fast/block/block-only/body-height-with-non-auto-html-height-quirk2-expected.txt: Added.
* fast/block/block-only/body-height-with-non-auto-html-height-quirk2.html: Added.

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

9 months ago[WebGPU] Replace forward declare of WebGPUCommandBuffer with include
justin_fan@apple.com [Thu, 29 Nov 2018 23:18:38 +0000 (23:18 +0000)]
[WebGPU] Replace forward declare of WebGPUCommandBuffer with include
https://bugs.webkit.org/show_bug.cgi?id=192179

Unreviewed build fix.

No new tests. No behavior change.

* Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:
* Modules/webgpu/WebGPUProgrammablePassEncoder.h:

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

9 months ago[ContentObservation] Make WKSetObservedContentChange logic more explicit.
zalan@apple.com [Thu, 29 Nov 2018 23:08:21 +0000 (23:08 +0000)]
[ContentObservation] Make WKSetObservedContentChange logic more explicit.
https://bugs.webkit.org/show_bug.cgi?id=192183

Reviewed by Simon Fraser.

* platform/ios/wak/WKContentObservation.cpp:
(WKSetObservedContentChange):
(WebThreadRemoveObservedDOMTimer):

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

9 months agoCSS subresource loads should not be observable from resource timing if the stylesheet...
youenn@apple.com [Thu, 29 Nov 2018 23:06:43 +0000 (23:06 +0000)]
CSS subresource loads should not be observable from resource timing if the stylesheet is opaque
https://bugs.webkit.org/show_bug.cgi?id=192132

Reviewed by Ryosuke Niwa.

Source/WebCore:

Introduce a new ResourceLoaderOptions to determine whether a load is made from a resource that is opaque.
Make use of that option to disable exposing such loads to the web page through resource timing.
The same option might later be used to bypass service workers.

Make use of this option for CSS subresource loads.
When the CSS stylesheet is opaque for the page, set this option.

Test: http/tests/security/clean-origin-exposed-resource-timing.html
      http/tests/security/cross-origin-resource-timing.html

* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::CSSCursorImageValue):
(WebCore::CSSCursorImageValue::loadImage):
* css/CSSCursorImageValue.h:
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::cachedFont):
* css/CSSFontFaceSrcValue.h:
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::CSSImageSetValue):
(WebCore::CSSImageSetValue::loadBestFitImage):
* css/CSSImageSetValue.h:
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::CSSImageValue):
(WebCore::CSSImageValue::loadImage):
* css/CSSImageValue.h:
* css/CSSStyleSheet.h:
* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::setCSSStyleSheet):
(WebCore::StyleRuleImport::requestStyleSheet):
* css/StyleSheetContents.h:
* css/parser/CSSParserContext.h:
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeCursor):
(WebCore::consumeFontFaceSrcURI):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeImageSet):
(WebCore::CSSPropertyParserHelpers::consumeImage):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::collectStyleForPresentationAttribute):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::initializeStyleSheet):
(WebCore::HTMLLinkElement::setCSSStyleSheet):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::collectStyleForPresentationAttribute):
* html/HTMLTablePartElement.cpp:
(WebCore::HTMLTablePartElement::collectStyleForPresentationAttribute):
* loader/ResourceLoaderOptions.h:
* loader/ResourceTimingInformation.cpp:
(WebCore::ResourceTimingInformation::shouldAddResourceTiming):
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::srcValue const):

LayoutTests:

* http/tests/security/clean-origin-css-exposed-resource-timing-expected.txt: Added.
* http/tests/security/clean-origin-css-exposed-resource-timinge-timing.html: Added.
* http/tests/security/cross-origin-css-resource-timing-expected.txt: Added.
* http/tests/security/cross-origin-css-resource-timing.html: Added.
* http/tests/security/resources/loading-subresources.css: Added.
* http/tests/security/resources/imported-loading-subresources.css: Added.

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

9 months agoMove Lookup Code for better cross platform usage
megan_gardner@apple.com [Thu, 29 Nov 2018 22:59:07 +0000 (22:59 +0000)]
Move Lookup Code for better cross platform usage
https://bugs.webkit.org/show_bug.cgi?id=191732

Reviewed by Alex Christensen.

Source/WebCore:

Not currenlty testable

DictionaryLookup uses Reveal now, which is slated to be cross-platform.
That patch gates the parts of DictionaryLookup that currently do not have
an available implementation on iOS. Once Reveal is ready, this code will be
replaced or expanded upon, as appropriate.

* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
(WebCore::showPopupOrCreateAnimationController):
(WebCore::DictionaryLookup::showPopup):
(WebCore::DictionaryLookup::hidePopup):
(WebCore::DictionaryLookup::animationControllerForPopup):

Source/WebCore/PAL:

* pal/spi/mac/LookupSPI.h:
* pal/spi/mac/RevealSPI.h:

Source/WebKit:

Lookup is being replaced by Reveal. This framework should work on all platforms.
The patch moves the code that we expect will be needed for all platforms to the more
general cocoa area. This patch changes no funcationality, and should not change
anything currently. This work will be build on later when Reveal is ready to support
multiple platforms.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::performDictionaryLookupAtLocation):
(WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView _lookupGestureRecognized:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::performDictionaryLookupAtLocation): Deleted.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::performDictionaryLookupAtLocation): Deleted.
(WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection): Deleted.
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::performDictionaryLookupOfCurrentSelection):
(WebKit::WebPage::performDictionaryLookupForRange):
(WebKit::WebPage::dictionaryPopupInfoForRange):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation): Deleted.
(WebKit::WebPage::performDictionaryLookupForSelection): Deleted.
(WebKit::WebPage::performDictionaryLookupForRange): Deleted.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation): Deleted.
(WebKit::WebPage::performDictionaryLookupForSelection): Deleted.
(WebKit::WebPage::performDictionaryLookupOfCurrentSelection): Deleted.
(WebKit::WebPage::dictionaryPopupInfoForRange): Deleted.
(WebKit::WebPage::performDictionaryLookupForRange): Deleted.

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

9 months ago[Cocoa] Move ServerTimingParser.* into a better group in the Xcode project
commit-queue@webkit.org [Thu, 29 Nov 2018 22:56:04 +0000 (22:56 +0000)]
[Cocoa] Move ServerTimingParser.* into a better group in the Xcode project
https://bugs.webkit.org/show_bug.cgi?id=192180

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-11-29
Reviewed by Simon Fraser.

* WebCore.xcodeproj/project.pbxproj:

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

9 months ago[ContentObservation] DOMTimer::install should explicitly check if timer observation...
zalan@apple.com [Thu, 29 Nov 2018 22:22:15 +0000 (22:22 +0000)]
[ContentObservation] DOMTimer::install should explicitly check if timer observation is on
https://bugs.webkit.org/show_bug.cgi?id=192181

Reviewed by Simon Fraser.

* page/DOMTimer.cpp:
(WebCore::DOMTimer::install):
* platform/ios/wak/WKContentObservation.cpp:
(WKIsObservingDOMTimerScheduling):
* platform/ios/wak/WKContentObservation.h:

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

9 months agowebkitpy: Unify device creation
jbedard@apple.com [Thu, 29 Nov 2018 21:58:30 +0000 (21:58 +0000)]
webkitpy: Unify device creation
https://bugs.webkit.org/show_bug.cgi?id=192158
<rdar://problem/46344757>

Reviewed by Lucas Forschler.

* Scripts/webkitpy/port/device_port.py:
(DevicePort):
(DevicePort.setup_test_run): Use DEVICE_MANAGER to create devices based on the specified device class.
* Scripts/webkitpy/port/ios.py:
(IOSPort): Add DEFAULT_DEVICE_CLASS.
* Scripts/webkitpy/port/ios_device.py:
(IOSDevicePort):
(IOSDevicePort._create_devices): Deleted.
* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort._create_devices): Deleted.
* Scripts/webkitpy/port/watch.py:
(WatchPort): Add DEFAULT_DEVICE_CLASS.
* Scripts/webkitpy/port/watch_device.py:
(WatchDevicePort):
(WatchDevicePort._create_devices): Deleted.
* Scripts/webkitpy/port/watch_simulator.py:
(WatchSimulatorPort._create_devices): Deleted.
* Scripts/webkitpy/xcode/device_type_unittest.py:
(DeviceTypeTest.test_from_string): Test that DeviceTypes without hardware types can be constructed
from strings.

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

9 months agoExecuting "insertunorderedlist" while selecting a contenteditable element inside...
rniwa@webkit.org [Thu, 29 Nov 2018 21:50:43 +0000 (21:50 +0000)]
Executing "insertunorderedlist" while selecting a contenteditable element inside a shadow dom hangs the browser
https://bugs.webkit.org/show_bug.cgi?id=184049
<rdar://problem/38931033>

Reviewed by Antti Koivisto.

Source/WebCore:

The primary hung was caused by TextIterator::advance traversing the next node in the tree order using
NodeTraversal::next which doesn't take the composed tree into account. Fixed the bug by traversing
the composed tree while sharing code with StylizedMarkupAccumulator.

This revealed a second hang in InsertListCommand::doApply() caused by endingSelection() being null,
which was caused by CompositeEditCommand::moveParagraphs failing to restore the ending selection properly
because it was computing the text indices difference from the beginning of the document until the destination.

Fixed this second bug by computing the indices against the beginning of the root editable element.
Note that editability never crosses a shadow boundary.

Test: editing/execCommand/insert-unordered-list-in-shadow-tree.html

* dom/ComposedTreeIterator.h:
(WebCore::nextSkippingChildrenInComposedTreeIgnoringUserAgentShadow): Extracted out of nextSkippingChildren
in markup.cpp.
(WebCore::nextInComposedTreeIgnoringUserAgentShadow): Added.
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphs): Compute the index from the beginning of the root editable
element as opposed to the beginning of the document.
* editing/TextIterator.cpp:
(WebCore::nextNode): Added.
(WebCore::isDescendantOf): Added.
(WebCore::TextIterator::advance): Use the newly added functions to traverse the composed tree when the options
contains TextIteratorTraversesFlatTree.
* editing/markup.cpp:

LayoutTests:

Added a regression test for executing InsertUnorderedList inside a shadow tree.

* editing/execCommand/insert-ordered-list-in-shadow-tree-expected.txt: Added.
* editing/execCommand/insert-ordered-list-in-shadow-tree.html: Added.

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

9 months agoUpdate web-platform-tests/shadow-dom
rniwa@webkit.org [Thu, 29 Nov 2018 21:26:28 +0000 (21:26 +0000)]
Update web-platform-tests/shadow-dom
https://bugs.webkit.org/show_bug.cgi?id=192137

Reviewed by Antti Koivisto.

Re-imported the shadow DOM tests from wpt.

* resources/import-expectations.json:
* web-platform-tests/shadow-dom/ShadowRoot-interface.html:
* web-platform-tests/shadow-dom/event-dispatch-order.tentative-expected.txt: Added.
* web-platform-tests/shadow-dom/event-dispatch-order.tentative.html: Added.
* web-platform-tests/shadow-dom/input-type-radio-expected.txt: Added.
* web-platform-tests/shadow-dom/input-type-radio.html: Added.
* web-platform-tests/shadow-dom/resources/shadow-dom.js:
(dispatchEventWithLog):
(assert_event_path_equals):
* web-platform-tests/shadow-dom/slots-outside-shadow-dom-expected.txt: Added.
* web-platform-tests/shadow-dom/slots-outside-shadow-dom.html: Added.
* web-platform-tests/shadow-dom/w3c-import.log:

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

9 months ago[ContentObservation] Decouple content change and DOM timer scheduling observation
zalan@apple.com [Thu, 29 Nov 2018 21:25:29 +0000 (21:25 +0000)]
[ContentObservation] Decouple content change and DOM timer scheduling observation
https://bugs.webkit.org/show_bug.cgi?id=192170

Reviewed by Simon Fraser.

Source/WebCore:

This is in preparation for adding style recalc scheduling observation (the main goal here is to simplify the indeterminate change logic).

* page/DOMTimer.cpp:
(WebCore::DOMTimer::fired):
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::mouseMoved):
* platform/ios/wak/WKContentObservation.cpp:
(WKStartObservingContentChanges):
(WKStopObservingContentChanges):
(WKStartObservingDOMTimerSchedules):
(WKStopObservingDOMTimerSchedules):
(WKSetObservedContentChange):
(WebThreadAddObservedDOMTimer):
(WKBeginObservingContentChanges): Deleted.
* platform/ios/wak/WKContentObservation.h:

Source/WebKit:

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleSyntheticClick):

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

9 months agoMake reconcileViewportConstrainedLayerPositions start from a specified scrolling...
commit-queue@webkit.org [Thu, 29 Nov 2018 21:22:02 +0000 (21:22 +0000)]
Make reconcileViewportConstrainedLayerPositions start from a specified scrolling node
https://bugs.webkit.org/show_bug.cgi?id=180002

Patch by Frederic Wang <fwang@igalia.com> on 2018-11-29
Reviewed by Simon Fraser.

For non-programmatic scrolling of frames, AsyncScrollingCoordinator::reconcileScrollingState
currently always call reconcileViewportConstrainedLayerPositions for the main frame
since async subframe scrolling is not supported yet (bug 171667 and bug 149264). This
function in turn calls reconcileLayerPositionForViewportRect on the whole scrolling tree to
readjust position of fixed/sticky descendants. This patch refactors a bit the code so that
the operation is actually only applied to the descendants of the frame's scrolling node,
which would mean a small optimization when subframe are asynchronously scrollable. The code
is already covered by reconcile-layer-position-recursive.html.

No new tests, behavior unchanged and already covered by existing tests.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::reconcileScrollingState): Pass the frame's scrolling
node id.
(WebCore::AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions): Start
reconciliation from the specified scrolling node and log its ID.
* page/scrolling/AsyncScrollingCoordinator.h: Add ScrollingNodeID parameter.
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::reconcileViewportConstrainedLayerPositions): Ditto.

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

9 months agoRename *ObservedContentModifier(s) to *ObservedDOMTimer(s)
zalan@apple.com [Thu, 29 Nov 2018 21:13:10 +0000 (21:13 +0000)]
Rename *ObservedContentModifier(s) to *ObservedDOMTimer(s)
https://bugs.webkit.org/show_bug.cgi?id=192168

Reviewed by Simon Fraser.

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::platformSuspendOrStopActiveDOMObjects):
* page/DOMTimer.cpp:
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::fired):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::clearTimeout):
* page/Frame.cpp:
(WebCore::Frame::willDetachPage):
* platform/ios/wak/WKContentObservation.cpp:
(WKBeginObservingContentChanges):
(WKSetObservedContentChange):
(WebThreadGetObservedDOMTimers):
(WebThreadCountOfObservedDOMTimers):
(WebThreadClearObservedDOMTimers):
(WebThreadContainsObservedDOMTimer):
(WebThreadAddObservedDOMTimer):
(WebThreadRemoveObservedDOMTimer):
(WebThreadCountOfObservedContentModifiers): Deleted.
(WebThreadClearObservedContentModifiers): Deleted.
(WebThreadContainsObservedContentModifier): Deleted.
(WebThreadAddObservedContentModifier): Deleted.
(WebThreadRemoveObservedContentModifier): Deleted.
* platform/ios/wak/WKContentObservation.h:
* platform/ios/wak/WKContentObservationInternal.h:

Source/WebKitLegacy/ios:

There's only one type of content modifier (DOMTimer).

* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::clearContentChangeObservers):

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

9 months ago[iOS] Tell AirPlay picker when a file has video
eric.carlson@apple.com [Thu, 29 Nov 2018 21:11:40 +0000 (21:11 +0000)]
[iOS] Tell AirPlay picker when a file has video
https://bugs.webkit.org/show_bug.cgi?id=192155
Source/WebCore/PAL:

Reviewed by Jer Noble.

* pal/spi/ios/MediaPlayerSPI.h:

Source/WebKit:

<rdar://problem/43843865>

Reviewed by Jer Noble.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
Add hasVideo parameter.

* UIProcess/ios/forms/WKAirPlayRoutePicker.h:
* UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
(-[WKAirPlayRoutePicker showFromView:routeSharingPolicy:routingContextUID:hasVideo:]): Add
hasVideo parameter, pass info to MPMediaControlsViewController.
(-[WKAirPlayRoutePicker showFromView:routeSharingPolicy:routingContextUID:]): Deleted.

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

9 months ago[WebGPU] WebGPURenderPassEncoder::setPipeline, draw, and endPass prototypes
justin_fan@apple.com [Thu, 29 Nov 2018 21:09:08 +0000 (21:09 +0000)]
[WebGPU] WebGPURenderPassEncoder::setPipeline, draw, and endPass prototypes
https://bugs.webkit.org/show_bug.cgi?id=192134

Reviewed by Dean Jackson.

Source/WebCore:

Wrap up prototype features for WebGPURenderPassEncoder.

Test: webgpu/render-command-encoding.html

* Modules/webgpu/WebGPUCommandBuffer.cpp:
(WebCore::WebGPUCommandBuffer::beginRenderPass):
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createRenderPipeline const):
* Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:
(WebCore::WebGPUProgrammablePassEncoder::WebGPUProgrammablePassEncoder):
(WebCore::WebGPUProgrammablePassEncoder::endPass): Returns a reference to the WebGPUCommandBuffer that created this encoder.
(WebCore::WebGPUProgrammablePassEncoder::setPipeline):
* Modules/webgpu/WebGPUProgrammablePassEncoder.h: Updated to support endPass and setPipeline.
* Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
* Modules/webgpu/WebGPURenderPassEncoder.cpp:
(WebCore::WebGPURenderPassEncoder::create): Must be provided with the WebGPUCommandBuffer.
(WebCore::WebGPURenderPassEncoder::WebGPURenderPassEncoder):
(WebCore::WebGPURenderPassEncoder::draw):
* Modules/webgpu/WebGPURenderPassEncoder.h: Updated to cache a reference to the WebGPUCommandBuffer, and for draw.
* Modules/webgpu/WebGPURenderPassEncoder.idl:
* Modules/webgpu/WebGPURenderPipeline.cpp:
(WebCore::WebGPURenderPipeline::create):
(WebCore::WebGPURenderPipeline::WebGPURenderPipeline):
* Modules/webgpu/WebGPURenderPipeline.h:
(WebCore::WebGPURenderPipeline::renderPipeline):
* Modules/webgpu/WebGPUTexture.cpp:
* Modules/webgpu/WebGPUTexture.h: Replaced include with forward declaration.
* platform/graphics/gpu/GPUProgrammablePassEncoder.h: Updated to support new WebGPU_PassEncoder functionality.
* platform/graphics/gpu/GPURenderPassEncoder.h:
(WebCore::GPURenderPassEncoder::~GPURenderPassEncoder): Now ends encoding on the MTLCommandEncoder, if not already ended, before freeing it.
* platform/graphics/gpu/GPURenderPipeline.h: Now remembers the GPUPrimitiveTopology that it was created with.
(WebCore::GPURenderPipeline::primitiveTopology const):
* platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm:
(WebCore::GPUProgrammablePassEncoder::endPass): Calls endEncoding on the backing MTLCommandEncoder, if not already ended.
* platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
(WebCore::GPURenderPassEncoder::platformPassEncoder const):
(WebCore::GPURenderPassEncoder::setPipeline): Added.
(WebCore::primitiveTypeForGPUPrimitiveTopology): Added. Helper function to convert GPUPrimitiveTopology to MTLPrimitiveType.
(WebCore::GPURenderPassEncoder::draw): Added. Draws using primitive topology specified during pipeline creation.
* platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
(WebCore::setFunctionsForPipelineDescriptor):
(WebCore::GPURenderPipeline::create):
(WebCore::GPURenderPipeline::GPURenderPipeline): Now must store the GPURenderPipelineDescriptor for later reference.

LayoutTests:

Updating the basic rendering test with more commands, and a prototype WPT-based test for WebGPURenderCommandEncoder's
new functionality.

* webgpu/js/basic-webgpu-functions.js:
(render):
* webgpu/render-command-encoding-expected.txt: Added.
* webgpu/render-command-encoding.html: Added.
* webgpu/render-passes.html:

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

9 months agoCSS Painting API should pass 'this' correctly to paint callback, and repaint when...
justin_michaud@apple.com [Thu, 29 Nov 2018 21:01:15 +0000 (21:01 +0000)]
CSS Painting API should pass 'this' correctly to paint callback, and repaint when properties change.
https://bugs.webkit.org/show_bug.cgi?id=191443

Reviewed by Dean Jackson.

Source/JavaScriptCore:

Export the simpler construct() method for use in WebCore.

* runtime/ConstructData.h:

Source/WebCore:

Instantiate a new instance of the paint class, and pass it as 'this' object when the paint callback is called.
Also, this patch makes sure that custom paint elements get repainted when properties that they care about get changed.
Finally, we fix two reference cycles that caused WorkletGlobalScope to never be destroyed.

Tests: fast/css-custom-paint/animate-repaint.html
       fast/css-custom-paint/animate.html

* bindings/js/JSDOMWrapper.cpp:
* bindings/js/JSPaintWorkletGlobalScopeCustom.cpp:
(WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren):
* bindings/js/JSWorkletGlobalScopeBase.cpp:
(WebCore::toJS):
* bindings/js/ScriptState.cpp:
(WebCore::execStateFromWorkletGlobalScope):
* css/CSSPaintCallback.h:
* css/CSSPaintCallback.idl:
* css/CSSPaintImageValue.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::vm):
* platform/graphics/CustomPaintImage.cpp:
(WebCore::CustomPaintImage::CustomPaintImage):
(WebCore::CustomPaintImage::doCustomPaint):
* platform/graphics/CustomPaintImage.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::addCustomPaintWatchProperty):
(WebCore::RenderStyle::changeRequiresRepaint const):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):
* rendering/style/StyleRareNonInheritedData.h:
* testing/Internals.cpp:
(WebCore::Internals::isAnyWorkletGlobalScopeAlive const):
* testing/Internals.h:
* testing/Internals.idl:
* worklets/PaintWorkletGlobalScope.cpp:
(WebCore::PaintWorkletGlobalScope::devicePixelRatio const):
(WebCore::PaintWorkletGlobalScope::PaintDefinition::PaintDefinition):
(WebCore::PaintWorkletGlobalScope::registerPaint):
* worklets/PaintWorkletGlobalScope.h:
(WebCore::PaintWorkletGlobalScope::~PaintWorkletGlobalScope):
* worklets/WorkletGlobalScope.cpp:
(WebCore::WorkletGlobalScope::WorkletGlobalScope):
(WebCore::WorkletGlobalScope::~WorkletGlobalScope):
(WebCore::WorkletGlobalScope::prepareForDestruction):
(WebCore::WorkletGlobalScope::allWorkletGlobalScopesSet):
(WebCore::WorkletGlobalScope::isJSExecutionForbidden const):
(WebCore::WorkletGlobalScope::logExceptionToConsole):
(WebCore::WorkletGlobalScope::addConsoleMessage):
(WebCore::WorkletGlobalScope::addMessage):
* worklets/WorkletGlobalScope.h:
(WebCore::WorkletGlobalScope::script):
(WebCore::WorkletGlobalScope::responsibleDocument):
(WebCore::WorkletGlobalScope::responsibleDocument const):
(WebCore::WorkletGlobalScope::identifier const): Deleted.
(WebCore::WorkletGlobalScope::responsableDocument): Deleted.
(WebCore::WorkletGlobalScope::responsableDocument const): Deleted.
* worklets/WorkletScriptController.cpp:
(WebCore::WorkletScriptController::~WorkletScriptController):
(WebCore::WorkletScriptController::disableEval):
(WebCore::WorkletScriptController::disableWebAssembly):
(WebCore::WorkletScriptController::initScript):

LayoutTests:

* fast/css-custom-paint/animate-expected.html: Added.
* fast/css-custom-paint/animate-repaint-expected.txt: Added.
* fast/css-custom-paint/animate-repaint.html: Added.
* fast/css-custom-paint/animate.html: Added.
* fast/css-custom-paint/constructor-expected.html: Added.
* fast/css-custom-paint/constructor.html: Added.
* fast/css-custom-paint/leaks-expected.txt: Added.
* fast/css-custom-paint/leaks.html: Added.
* fast/css-custom-paint/properties.html:
* fast/css-custom-paint/resources/leaks-frame.html: Added.
* platform/mac/fast/css-custom-paint/raf-leak-expected.txt: Added.

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

9 months agoModernize the check for kCFURLRequestContentDecoderSkipURLCheck existence
ap@apple.com [Thu, 29 Nov 2018 20:52:46 +0000 (20:52 +0000)]
Modernize the check for kCFURLRequestContentDecoderSkipURLCheck existence
https://bugs.webkit.org/show_bug.cgi?id=192041

Reviewed by Tim Horton.

Source/WebCore:

* loader/ResourceLoaderOptions.h: Added a FIXME for poor naming of loader options.
There is a lot of code that needs to be cleaned up here.

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

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::applySniffingPoliciesAndBindRequestToInferfaceIfNeeded):

Source/WTF:

* wtf/Platform.h:

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

9 months agoEWS iOS-sim bots sometimes fails to shutdown simulator
jbedard@apple.com [Thu, 29 Nov 2018 20:42:58 +0000 (20:42 +0000)]
EWS iOS-sim bots sometimes fails to shutdown simulator
https://bugs.webkit.org/show_bug.cgi?id=191864

Reviewed by Aakash Jain.

* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDevice._shut_down): Increase time to wait for simulated device to
shut down, ignore exit code indicating a device is already shut down.

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

9 months agoUpdating a service worker during a navigation load sometimes makes the load fail
youenn@apple.com [Thu, 29 Nov 2018 20:10:53 +0000 (20:10 +0000)]
Updating a service worker during a navigation load sometimes makes the load fail
https://bugs.webkit.org/show_bug.cgi?id=191986
<rdar://problem/46259790>

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/service-worker/resources/trickle.py: Added.
(main):
* web-platform-tests/service-workers/service-worker/resources/update-fetch-worker.py: Added.
(main):
* web-platform-tests/service-workers/service-worker/update-on-navigation.https-expected.txt: Added.
* web-platform-tests/service-workers/service-worker/update-on-navigation.https.html: Added.

Source/WebCore:

Previously, we were registering a document as service worker client at creation of the document.
According the service worker spec, this should be done when handling the fetch event of the corresponding navigation load.
This ensures that the service worker will have a client and will not get updated in the middle of the navigation load.

At navigation load start, we do not have a document yet since it is created when receiving the first bytes.
Instead, we register a temporary document when starting the navigation load and unregister it when the real document is registered.

Test: imported/w3c/web-platform-tests/service-workers/service-worker/update-on-navigation.https.html

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::commitData):
(WebCore::DocumentLoader::registerTemporaryServiceWorkerClient):
(WebCore::DocumentLoader::unregisterTemporaryServiceWorkerClient):
(WebCore::DocumentLoader::loadMainResource):
(WebCore::DocumentLoader::clearMainResource):
* loader/DocumentLoader.h:

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

9 months agoUnreviewed, rolling out r238678.
ryanhaddad@apple.com [Thu, 29 Nov 2018 20:09:08 +0000 (20:09 +0000)]
Unreviewed, rolling out r238678.

Breaks internal builds.

Reverted changeset:

"Move Lookup Code for better cross platform usage"
https://bugs.webkit.org/show_bug.cgi?id=191732
https://trac.webkit.org/changeset/238678

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

9 months agoAddressed a FIXME by removing an unnecessary call to [NSApplication sharedApplication].
commit-queue@webkit.org [Thu, 29 Nov 2018 19:59:43 +0000 (19:59 +0000)]
Addressed a FIXME by removing an unnecessary call to [NSApplication sharedApplication].
https://bugs.webkit.org/show_bug.cgi?id=192099

Patch by Suresh Koppisetty <skoppisetty@apple.com> on 2018-11-29
Reviewed by Geoffrey Garen.

[NSApplication sharedApplication] call is no longer needed in platformInitializeWebProcess as [NSApplication _accessibilityInitialize] calls [NSApplication sharedApplication].

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

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

9 months agoA sender created through addTransceiver and populated using addTrack should have...
youenn@apple.com [Thu, 29 Nov 2018 19:54:40 +0000 (19:54 +0000)]
A sender created through addTransceiver and populated using addTrack should have its source set
https://bugs.webkit.org/show_bug.cgi?id=192136

Reviewed by Eric Carlson.

Source/WebCore:

In case libwebrtc backend is already created, we need to make sure to
set the track source to the libwebrtc sender backend that is actually
tied to the sender.

Covered by updated test.

* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::LibWebRTCPeerConnectionBackend::addTrack):
* Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:

LayoutTests:

* webrtc/video-replace-track-expected.txt:
* webrtc/video-replace-track.html:

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

9 months agoUnreviewed test gardening, skip three datalist tests that are marked as flaky crashes.
ryanhaddad@apple.com [Thu, 29 Nov 2018 19:00:55 +0000 (19:00 +0000)]
Unreviewed test gardening, skip three datalist tests that are marked as flaky crashes.

* TestExpectations:
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:

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

9 months agoMove Lookup Code for better cross platform usage
megan_gardner@apple.com [Thu, 29 Nov 2018 18:54:19 +0000 (18:54 +0000)]
Move Lookup Code for better cross platform usage
https://bugs.webkit.org/show_bug.cgi?id=191732

Reviewed by Alex Christensen.

Source/WebCore:

Not currenlty testable

DictionaryLookup uses Reveal now, which is slated to be cross-platform.
That patch gates the parts of DictionaryLookup that currently do not have
an available implementation on iOS. Once Reveal is ready, this code will be
replaced or expanded upon, as appropriate.

* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
(WebCore::showPopupOrCreateAnimationController):
(WebCore::DictionaryLookup::showPopup):
(WebCore::DictionaryLookup::hidePopup):
(WebCore::DictionaryLookup::animationControllerForPopup):

Source/WebCore/PAL:

* pal/spi/mac/LookupSPI.h:
* pal/spi/mac/RevealSPI.h:

Source/WebKit:

Lookup is being replaced by Reveal. This framework should work on all platforms.
The patch moves the code that we expect will be needed for all platforms to the more
general cocoa area. This patch changes no funcationality, and should not change
anything currently. This work will be build on later when Reveal is ready to support
multiple platforms.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::performDictionaryLookupAtLocation):
(WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView _lookupGestureRecognized:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::performDictionaryLookupAtLocation): Deleted.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::performDictionaryLookupAtLocation): Deleted.
(WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection): Deleted.
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::performDictionaryLookupOfCurrentSelection):
(WebKit::WebPage::performDictionaryLookupForRange):
(WebKit::WebPage::dictionaryPopupInfoForRange):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation): Deleted.
(WebKit::WebPage::performDictionaryLookupForSelection): Deleted.
(WebKit::WebPage::performDictionaryLookupForRange): Deleted.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation): Deleted.
(WebKit::WebPage::performDictionaryLookupForSelection): Deleted.
(WebKit::WebPage::performDictionaryLookupOfCurrentSelection): Deleted.
(WebKit::WebPage::dictionaryPopupInfoForRange): Deleted.
(WebKit::WebPage::performDictionaryLookupForRange): Deleted.

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

9 months agoIndexedDB: breaks if binary data (Uint8Array) and autoIncrement key in store
sihui_liu@apple.com [Thu, 29 Nov 2018 18:45:17 +0000 (18:45 +0000)]
IndexedDB: breaks if binary data (Uint8Array) and autoIncrement key in store
https://bugs.webkit.org/show_bug.cgi?id=185869
<rdar://problem/40453623>

Reviewed by Geoffrey Garen.

Source/WebCore:

lexicalGlobalObject is casted to JSDOMGlobalObject in CloneSerializer::dumpArrayBufferView,
so we should use JSDOMGlobalObject instead of JSGlobalObject in IDB database thread.

Covered by modified test: storage/indexeddb/objectstore-autoincrement.html

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::databaseThreadVM):
(WebCore::IDBServer::UniqueIDBDatabase::databaseThreadExecState):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::create):
* bindings/js/JSDOMGlobalObject.h:
* bindings/js/JSDOMWrapper.cpp:
(WebCore::JSDOMObject::JSDOMObject):

LayoutTests:

* storage/indexeddb/objectstore-autoincrement-expected.txt:
* storage/indexeddb/objectstore-autoincrement-private-expected.txt:
* storage/indexeddb/resources/objectstore-autoincrement.js:
(getLincolnAfterInjectedKeySuccess):
(putBobSuccess):
(getBobSuccess):
(addLincolnWithExplicitKeySuccess):
(putAbrahamSuccess):

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

9 months agoUnexpected constructor / instanceof behavior when retrieving indexedDB data in an...
sihui_liu@apple.com [Thu, 29 Nov 2018 18:41:48 +0000 (18:41 +0000)]
Unexpected constructor / instanceof  behavior when retrieving indexedDB data in an iframe
https://bugs.webkit.org/show_bug.cgi?id=185906
<rdar://problem/40583100>

Reviewed by Geoffrey Garen.

Source/WebCore:

ScriptExecutionContext::execState() returned state of main frame, so deserialization of
IDBValue in iframe used constructors of main frame, which is wrong.

Test: storage/indexeddb/instanceof-iframe.html

* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::execState):

LayoutTests:

* storage/indexeddb/instanceof-iframe-expected.txt: Added.
* storage/indexeddb/instanceof-iframe.html: Added.
* storage/indexeddb/resources/instanceof-iframe.js: Added.
(test.else.shouldBe):
(test.else.shouldBeTrue):
(test.else.shouldBeFalse):
(test.else.evalAndLog):
(test):
(callback):

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

9 months agoMake generic ScrollAnimator
don.olmstead@sony.com [Thu, 29 Nov 2018 18:36:29 +0000 (18:36 +0000)]
Make generic ScrollAnimator
https://bugs.webkit.org/show_bug.cgi?id=192128

Reviewed by Michael Catanzaro.

No new tests. No change in behavior.

Moves ScrollAnimatorGtk into ScrollAnimatorGeneric where it can be used
by other implementations. Fixed some compilation issues around using
this as a default implementation.

Removing ScrollAnimatorSmooth since it is dead code and doesn't even
compile at this time.

Fixing a compilation issue within LowPowerModeNotifierGLib
implementation that appeared due to unified sources changes.

* PlatformGTK.cmake:
* SourcesGTK.txt:
* platform/LowPowerModeNotifier.h:
* platform/PlatformWheelEvent.h:
(WebCore::PlatformWheelEvent::swipeVelocity const):
* platform/ScrollAnimatorSmooth.cpp: Removed.
* platform/ScrollAnimatorSmooth.h: Removed.
* platform/generic/ScrollAnimatorGeneric.cpp: Renamed from Source/WebCore/platform/gtk/ScrollAnimatorGtk.cpp.
(WebCore::ScrollAnimator::create):
(WebCore::ScrollAnimatorGeneric::ScrollAnimatorGeneric):
(WebCore::ScrollAnimatorGeneric::ensureSmoothScrollingAnimation):
(WebCore::ScrollAnimatorGeneric::scroll):
(WebCore::ScrollAnimatorGeneric::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimatorGeneric::computeVelocity):
(WebCore::ScrollAnimatorGeneric::handleWheelEvent):
(WebCore::ScrollAnimatorGeneric::willEndLiveResize):
(WebCore::ScrollAnimatorGeneric::updatePosition):
(WebCore::ScrollAnimatorGeneric::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorGeneric::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorGeneric::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorGeneric::willRemoveHorizontalScrollbar):
(WebCore::ScrollAnimatorGeneric::updateOverlayScrollbarsOpacity):
(WebCore::ScrollAnimatorGeneric::overlayScrollbarAnimationTimerFired):
(WebCore::ScrollAnimatorGeneric::showOverlayScrollbars):
(WebCore::ScrollAnimatorGeneric::hideOverlayScrollbars):
(WebCore::ScrollAnimatorGeneric::mouseEnteredContentArea):
(WebCore::ScrollAnimatorGeneric::mouseExitedContentArea):
(WebCore::ScrollAnimatorGeneric::mouseMovedInContentArea):
(WebCore::ScrollAnimatorGeneric::contentAreaDidShow):
(WebCore::ScrollAnimatorGeneric::contentAreaDidHide):
(WebCore::ScrollAnimatorGeneric::notifyContentAreaScrolled):
(WebCore::ScrollAnimatorGeneric::lockOverlayScrollbarStateToHidden):
* platform/generic/ScrollAnimatorGeneric.h: Renamed from Source/WebCore/platform/gtk/ScrollAnimatorGtk.h.
* platform/glib/LowPowerModeNotifierGLib.cpp:
* platform/gtk/PlatformWheelEventGtk.cpp:
(WebCore::PlatformWheelEvent::swipeVelocity const): Deleted.

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

9 months agoFactor out configuration of the file upload image picker
conrad_shultz@apple.com [Thu, 29 Nov 2018 18:26:46 +0000 (18:26 +0000)]
Factor out configuration of the file upload image picker
https://bugs.webkit.org/show_bug.cgi?id=192138
<rdar://problem/46334871>

Reviewed by Tim Horton.

By factoring configuration of the picker into its own method, it makes it easier
to apply custom configuration in subclasses in the future.

* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _showPhotoPickerWithSourceType:]):
(-[WKFileUploadPanel _configureImagePicker:]):

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

9 months ago[ES Modules] Allow .mjs content when loaded from file://
dino@apple.com [Thu, 29 Nov 2018 18:26:44 +0000 (18:26 +0000)]
[ES Modules] Allow .mjs content when loaded from file://
https://bugs.webkit.org/show_bug.cgi?id=192100
<rdar://problem/46320065>

Reviewed by Sam Weinig.

Source/WebCore:

Node JS requires ES Module files to be identified by the file
extension of ".mjs" (no relation to Maciej Stachowiak). This new
extension causes issues because it isn't recognised as a JavaScript
file. When using the script tag, the author is able to force the type
of the referenced file using an attribute, but this isn't possible
for the import() function or import statement.

Add a new entry into our table that maps file extensions to MIME types
so that when a .mjs file is loaded from a file:// reference it is
identified as JavaScript.

Test: js/dom/modules/import-mjs-module.html

* platform/network/mac/WebCoreURLResponse.mm: Add .mjs to the existing dictionary.
(WebCore::createExtensionToMIMETypeMap):
* platform/network/ios/WebCoreURLResponseIOS.mm: Add code just for .mjs.
(WebCore::createExtensionToMIMETypeMap):

Source/WebInspectorUI:

Add a mapping from .mjs to application/javascript.

* UserInterface/Base/MIMETypeUtilities.js:
(WI.mimeTypeForFileExtension):

LayoutTests:

Test for both import() function and the import statement loading
from .mjs files.

* js/dom/modules/import-mjs-module-expected.txt: Added.
* js/dom/modules/import-mjs-module.html: Added.
* js/dom/modules/resources/module-simple-A.mjs: Added.
* js/dom/modules/resources/module-simple-B.mjs: Added.
* platform/win/TestExpectations: Skip this on Windows. Just wait for Windows
  to recognise the extension.

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

9 months agowebkitpy: Unify ios_version/watchos_version code
jbedard@apple.com [Thu, 29 Nov 2018 18:00:14 +0000 (18:00 +0000)]
webkitpy: Unify ios_version/watchos_version code
https://bugs.webkit.org/show_bug.cgi?id=192153
<rdar://problem/46343642>

Reviewed by Lucas Forschler.

Treating watchOS and iOS versions differently makes it harder to share code between the similar ports.

* Scripts/webkitpy/port/device_port.py:
(DevicePort):
(DevicePort.device_version): Added.
* Scripts/webkitpy/port/ios.py:
(IOSPort.default_baseline_search_path): Use device_version() instead of ios_version().
(IOSPort.ios_version): Deleted.
* Scripts/webkitpy/port/ios_device.py:
(IOSDevicePort.device_version): Renamed from ios_version().
(IOSDevicePort.ios_version): Deleted.
* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort.device_version): Renamed from ios_version().
(IOSSimulatorPort.default_child_processes.booted_ios_devices_filter): Use device_version() instead of ios_version().
(IOSSimulatorPort._create_devices): Ditto.
(IOSSimulatorPort.check_sys_deps): Ditto.
(IOSSimulatorPort.ios_version): Deleted.
* Scripts/webkitpy/port/watch.py:
(WatchPort.default_baseline_search_path): Use device_version() instead of watchos_version().
(WatchPort.watchos_version): Deleted.
* Scripts/webkitpy/port/watch_device.py:
(WatchDevicePort.device_version): Renamed from watchos_version().
(WatchDevicePort.watchos_version): Deleted.
* Scripts/webkitpy/port/watch_simulator.py:
(WatchSimulatorPort.device_version): Renamed from watchos_version().
(WatchSimulatorPort.default_child_processes.filter_booted_watchos_devices): Use device_version() instead of watchos_version().
(WatchSimulatorPort._create_devices): Ditto.
(WatchSimulatorPort.check_sys_deps): Ditto.
(WatchSimulatorPort.watchos_version): Deleted.

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

9 months agoWeb Inspector: Elements: selecting more than one DOM node causes the scope highlight...
mattbaker@apple.com [Thu, 29 Nov 2018 17:50:21 +0000 (17:50 +0000)]
Web Inspector: Elements: selecting more than one DOM node causes the scope highlight to contrast
https://bugs.webkit.org/show_bug.cgi?id=192118
<rdar://problem/46325664>

Reviewed by Devin Rousso.

Use an alpha blended border for the "selected" DOM scope highlight,
matching the "hovered" scope highlight.

* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom li.selected + ol.children.expanded):

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

9 months agoGardening: skip test that newly times out on Armv7
guijemont@igalia.com [Thu, 29 Nov 2018 16:41:23 +0000 (16:41 +0000)]
Gardening: skip test that newly times out on Armv7

Unreviewed Test Gardening.

* js/slow-stress/script-tests/marsaglia.js: skip on arm/linux

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

9 months agoUnreviewed GTK+ gardening after r238665.
magomez@igalia.com [Thu, 29 Nov 2018 16:02:32 +0000 (16:02 +0000)]
Unreviewed GTK+ gardening after r238665.

* platform/gtk/TestExpectations:

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

9 months ago[LFC][BFC][Quirk] Width does not need stretching quirk.
zalan@apple.com [Thu, 29 Nov 2018 15:30:27 +0000 (15:30 +0000)]
[LFC][BFC][Quirk] Width does not need stretching quirk.
https://bugs.webkit.org/show_bug.cgi?id=192135

Reviewed by Antti Koivisto.

In BFC the block box's width (auto) always streches to the content width of the containing block.

* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
* layout/blockformatting/BlockFormattingContextQuirks.cpp:
(WebCore::Layout::BlockFormattingContext::Quirks::needsStretching):
(WebCore::Layout::BlockFormattingContext::Quirks::isStretchedToInitialContainingBlock): Deleted.
(WebCore::Layout::BlockFormattingContext::Quirks::stretchedWidth): Deleted.

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

9 months ago[LFC][Quirk] Move quirk functions to dedicated classes.
zalan@apple.com [Thu, 29 Nov 2018 15:28:20 +0000 (15:28 +0000)]
[LFC][Quirk] Move quirk functions to dedicated classes.
https://bugs.webkit.org/show_bug.cgi?id=192133

Reviewed by Antti Koivisto.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/FormattingContext.h:
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::computedHeightValue):
* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
(WebCore::Layout::initialContainingBlock): Deleted.
(WebCore::Layout::isStretchedToInitialContainingBlock): Deleted.
(WebCore::Layout::stretchHeightToInitialContainingBlockQuirk): Deleted.
(WebCore::Layout::stretchWidthToInitialContainingBlock): Deleted.
* layout/blockformatting/BlockFormattingState.cpp:
* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginTopCollapsedWithParent):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginTop):
(WebCore::Layout::isQuirkContainer): Deleted.
(WebCore::Layout::hasMarginTopQuirkValue): Deleted.
(WebCore::Layout::shouldIgnoreMarginTopInQuirkContext): Deleted.
(WebCore::Layout::isMarginTopCollapsedWithParent): Deleted.
* layout/inlineformatting/InlineFormattingContext.cpp:
* layout/inlineformatting/text/TextUtil.h:

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

9 months agoRemove some superfluous code in ContentSecurityPolicy::upgradeInsecureRequestIfNeeded
commit-queue@webkit.org [Thu, 29 Nov 2018 12:34:26 +0000 (12:34 +0000)]
Remove some superfluous code in ContentSecurityPolicy::upgradeInsecureRequestIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=192076

Patch by Rob Buis <rbuis@igalia.com> on 2018-11-29
Reviewed by Frédéric Wang.

Since we do an early return if the protocol is not http or ws, the if check
for ws protocol and else statement are not needed, so use an ASSERT instead.

* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::upgradeInsecureRequestIfNeeded const):

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

9 months agoAdd ParentRelativeScrollableRect to ScrollingCoordinator::ScrollingGeometry
commit-queue@webkit.org [Thu, 29 Nov 2018 11:44:50 +0000 (11:44 +0000)]
Add ParentRelativeScrollableRect to ScrollingCoordinator::ScrollingGeometry
https://bugs.webkit.org/show_bug.cgi?id=172914

Patch by Frederic Wang <fwang@igalia.com> on 2018-11-29
Reviewed by Simon Fraser.

This patch adds a ParentRelativeScrollableRect ScrollingCoordinator::ScrollingGeometry and
the corresponding set/get/dump APIs. Currently, the setter is never used so the behavior is
unchanged. In the future, this rect will be used for hit testing of subframes during
asynchronous macOS scrolling (but 172917).

No new tests, behavior unchanged.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
(WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setParentRelativeScrollableRect):
(WebCore::ScrollingStateScrollingNode::dumpProperties const):
* page/scrolling/ScrollingStateScrollingNode.h:
(WebCore::ScrollingStateScrollingNode::parentRelativeScrollableRect const):
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeScrollingNode::dumpProperties const):
* page/scrolling/ScrollingTreeScrollingNode.h:
(WebCore::ScrollingTreeScrollingNode::parentRelativeScrollableRect const):

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

9 months agoImport fetch/api/cors tests
commit-queue@webkit.org [Thu, 29 Nov 2018 10:30:29 +0000 (10:30 +0000)]
Import fetch/api/cors tests
https://bugs.webkit.org/show_bug.cgi?id=192092

Patch by Rob Buis <rbuis@igalia.com> on 2018-11-29
Reviewed by Frédéric Wang.

Import to most recent checkout since some old
tests like cors-multiple-origins.js were incorrect.

* resources/import-expectations.json:
* web-platform-tests/fetch/api/cors/cors-expose-star-worker.html: Removed.
* web-platform-tests/fetch/api/cors/cors-expose-star.html: Removed.
* web-platform-tests/fetch/api/cors/cors-expose-star.sub.any-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-expose-star-expected.txt.
* web-platform-tests/fetch/api/cors/cors-expose-star.sub.any.html: Added.
* web-platform-tests/fetch/api/cors/cors-expose-star.sub.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-expose-star.js.
(sharedHeaders.string_appeared_here.promise_test):
(string_appeared_here.promise_test):
* web-platform-tests/fetch/api/cors/cors-expose-star.sub.any.worker-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-expose-star-worker-expected.txt.
* web-platform-tests/fetch/api/cors/cors-expose-star.sub.any.worker.html: Added.
* web-platform-tests/fetch/api/cors/cors-filtering-worker.html: Removed.
* web-platform-tests/fetch/api/cors/cors-filtering.html: Removed.
* web-platform-tests/fetch/api/cors/cors-filtering.sub.any-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-filtering-expected.txt.
* web-platform-tests/fetch/api/cors/cors-filtering.sub.any.html: Added.
* web-platform-tests/fetch/api/cors/cors-filtering.sub.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-filtering.js.
(corsFilter):
(corsExposeFilter):
* web-platform-tests/fetch/api/cors/cors-filtering.sub.any.worker-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-filtering-worker-expected.txt.
* web-platform-tests/fetch/api/cors/cors-filtering.sub.any.worker.html: Added.
* web-platform-tests/fetch/api/cors/cors-multiple-origins-worker-expected.txt: Removed.
* web-platform-tests/fetch/api/cors/cors-multiple-origins-worker.html: Removed.
* web-platform-tests/fetch/api/cors/cors-multiple-origins.html: Removed.
* web-platform-tests/fetch/api/cors/cors-multiple-origins.js: Removed.
* web-platform-tests/fetch/api/cors/cors-multiple-origins.sub.any-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-multiple-origins-expected.txt.
* web-platform-tests/fetch/api/cors/cors-multiple-origins.sub.any.html: Added.
* web-platform-tests/fetch/api/cors/cors-multiple-origins.sub.any.js: Added.
(corsMultipleOrigins):
* web-platform-tests/fetch/api/cors/cors-multiple-origins.sub.any.worker-expected.txt: Added.
* web-platform-tests/fetch/api/cors/cors-multiple-origins.sub.any.worker.html: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-not-cors-safelisted.any-expected.txt: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-not-cors-safelisted.any.html: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-not-cors-safelisted.any.js: Added.
(runTests):
* web-platform-tests/fetch/api/cors/cors-preflight-not-cors-safelisted.any.worker-expected.txt: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-not-cors-safelisted.any.worker.html: Added.
* web-platform-tests/fetch/api/cors/cors-preflight.any.js:
(headerNames): Deleted.
(): Deleted.
(corsPreflight): Deleted.
* web-platform-tests/fetch/api/cors/resources/corspreflight.js: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight.any.js.
(headerNames):
(corsPreflight):
* web-platform-tests/fetch/api/cors/resources/not-cors-safelisted.json: Added.
* web-platform-tests/fetch/api/cors/resources/w3c-import.log: Added.
* web-platform-tests/fetch/api/cors/sandboxed-iframe-expected.txt: Added.
* web-platform-tests/fetch/api/cors/sandboxed-iframe.html: Added.
* web-platform-tests/fetch/api/cors/w3c-import.log:

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

9 months ago[GTK][WPE] Fix BubblewrapLauncher clang warnings
tpopela@redhat.com [Thu, 29 Nov 2018 10:19:56 +0000 (10:19 +0000)]
[GTK][WPE] Fix BubblewrapLauncher clang warnings
https://bugs.webkit.org/show_bug.cgi?id=192086

Reviewed by Michael Catanzaro.

* UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::bindPathVar): Initialize the i variable to 0.
(WebKit::setupSeccomp): Initialize the optional datum_b member.

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

9 months ago[WebDriver] Fix clang warnings in Session.cpp
tpopela@redhat.com [Thu, 29 Nov 2018 09:14:12 +0000 (09:14 +0000)]
[WebDriver] Fix clang warnings in Session.cpp
https://bugs.webkit.org/show_bug.cgi?id=192077

Reviewed by Carlos Garcia Campos.

* Session.cpp:
(WebDriver::Session::dismissAndNotifyAlert):
(WebDriver::Session::acceptAndNotifyAlert):
(WebDriver::Session::reportUnexpectedAlertOpen):
(WebDriver::Session::getCurrentURL):
(WebDriver::Session::getTitle):
(WebDriver::Session::getWindowHandle):
(WebDriver::Session::getWindowHandles):
(WebDriver::Session::getToplevelBrowsingContextRect):
(WebDriver::Session::computeElementLayout):
(WebDriver::Session::isElementSelected):
(WebDriver::Session::getElementText):
(WebDriver::Session::getElementTagName):
(WebDriver::Session::getElementRect):
(WebDriver::Session::isElementEnabled):
(WebDriver::Session::isElementDisplayed):
(WebDriver::Session::getElementAttribute):
(WebDriver::Session::getElementProperty):
(WebDriver::Session::getElementCSSValue):
(WebDriver::Session::selectOptionElement):
(WebDriver::Session::elementClick):
(WebDriver::Session::elementClear):
(WebDriver::Session::handleScriptResult):
(WebDriver::Session::performMouseInteraction):
(WebDriver::Session::performKeyboardInteractions):
(WebDriver::Session::getAllCookies):
(WebDriver::Session::getNamedCookie):
(WebDriver::Session::addCookie):
(WebDriver::Session::deleteCookie):
(WebDriver::Session::deleteAllCookies):
(WebDriver::Session::performActions):
(WebDriver::Session::releaseActions):
(WebDriver::Session::dismissAlert):
(WebDriver::Session::acceptAlert):
(WebDriver::Session::getAlertText):
(WebDriver::Session::sendAlertText):
(WebDriver::Session::takeScreenshot):
* WebDriverService.cpp:
(WebDriver::WebDriverService::deleteSession):

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

9 months ago[iOSMac] Dropping text selections from web content into editable elements crashes...
wenson_hsieh@apple.com [Thu, 29 Nov 2018 05:25:07 +0000 (05:25 +0000)]
[iOSMac] Dropping text selections from web content into editable elements crashes the web process
https://bugs.webkit.org/show_bug.cgi?id=192113
<rdar://problem/46323701>

Reviewed by Ryosuke Niwa.

Source/WebCore:

In iOSMac, registering invalid UTIs on NSItemProvider when starting a drag or handling a drop does not work.
Since iOS writes and reads only "Apple Web Archive pasteboard type" (a.k.a. `WebArchivePboardType`) during drag
and drop as well as copy and paste, we fail to read or write any web archive data, and subsequently fall back to
reading RTF or flat RTFD, both of which are not supported in iOSMac, since UIFoundation links against the
system's macOS WebKit stack.

To fix this, we add support for reading and writing com.apple.webarchive (`kUTTypeWebArchive`) on iOS, so that
WebKit-based iOSMac applications can understand web archive data from the host running macOS, and the host can
also understand web archive data written by the iOSMac app. Additionally, don't allow reading RTF and flat RTFD
as web content in iOSMac. (Note that writing RTF and flat RTFD is still safe, since it does not depend on
UIFoundation.framework but rather `WebCore::HTMLConverter`).

Test: DragAndDropTests.ModernWebArchiveType

* editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::createFragment):

Additionally make sure that we never call into UIFoundation's NSAttributedString to markup conversion codepath
by making `createFragment` an empty stub on iOSMac.

* platform/ios/PasteboardIOS.mm:
(WebCore::supportedImageTypes):
(WebCore::isTypeAllowedByReadingPolicy):
(WebCore::Pasteboard::readPasteboardWebContentDataForType):
(WebCore::Pasteboard::supportedWebContentPasteboardTypes):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::write):

Tools:

Add a test to verify that, when dropping an item with both "com.apple.webarchive" and "public.utf8-plain-text"
representations, the higher fidelity web archive data is used when handling the drop.

* TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:

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

9 months agoWeb Inspector: REGRESSION(?): all "Show *" develop menu items cause the page to crash
joepeck@webkit.org [Thu, 29 Nov 2018 04:39:45 +0000 (04:39 +0000)]
Web Inspector: REGRESSION(?): all "Show *" develop menu items cause the page to crash
https://bugs.webkit.org/show_bug.cgi?id=192016
<rdar://problem/46284417>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

* UserInterface/Base/Main.js:
(WI.loaded):
(WI.initializeBackendTarget):
(WI.contentLoaded):
(WI.whenTargetsAvailable):
Don't evaluate any InspectorFrontendAPI commands until the frontend
has initialized a main target and the user interface.

Source/WebKit:

Previously calling the Page's inspectorController.show()
would create a frontend connection on the WebProcess side.
However now the frontend connection is handed to the WebProcess
once the UIProcess creates it. So queue actions that take place
immediately after showing the inspector until we have a frontend
to send the actions to.

* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::setFrontendConnection):
(WebKit::WebInspector::closeFrontendConnection):
(WebKit::WebInspector::whenFrontendConnectionEstablished):
(WebKit::WebInspector::showConsole):
(WebKit::WebInspector::showResources):
(WebKit::WebInspector::showTimelines):
(WebKit::WebInspector::showMainResourceForFrame):
(WebKit::WebInspector::startPageProfiling):
(WebKit::WebInspector::stopPageProfiling):
(WebKit::WebInspector::startElementSelection):
(WebKit::WebInspector::stopElementSelection):

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

9 months agoConsult dummy storage for HTTPS Upgrade, Apply If Appropriate
commit-queue@webkit.org [Thu, 29 Nov 2018 04:14:02 +0000 (04:14 +0000)]
Consult dummy storage for HTTPS Upgrade, Apply If Appropriate
https://bugs.webkit.org/show_bug.cgi?id=192094
<rdar://problem/45851103> HTTPS Upgrade: Consult dummy storage for HTTPS Upgrade, Apply If Appropriate

Patch by Vivek Seth <v_seth@apple.com> on 2018-11-28
Reviewed by Chris Dumez.

For main page loads upgrade HTTP requests to HTTPS if the hostname belongs to a set of upgradable hostnames.

* NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded):
(WebKit::NetworkLoadChecker::checkRequest):
* NetworkProcess/NetworkLoadChecker.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):

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

9 months agoREGRESSION (r234980): Crash in -[WKWebView _restorePageStateToUnobscuredCenter:scale:]
simon.fraser@apple.com [Thu, 29 Nov 2018 03:54:32 +0000 (03:54 +0000)]
REGRESSION (r234980): Crash in -[WKWebView _restorePageStateToUnobscuredCenter:scale:]
https://bugs.webkit.org/show_bug.cgi?id=192127
rdar://problem/44194179

Reviewed by Tim Horton.

_restorePageStateToUnobscuredCenter: could receive an Optional<FloatRect> from the
web process, and unconditionally called .value() even though it may not be engaged.

No repro steps known, so no testcase.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):

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

9 months agoUnreviewed, rolling out r238653 and r238656.
commit-queue@webkit.org [Thu, 29 Nov 2018 02:55:59 +0000 (02:55 +0000)]
Unreviewed, rolling out r238653 and r238656.
https://bugs.webkit.org/show_bug.cgi?id=192130

Breaks iOS build (Requested by smfr on #webkit).

Reverted changesets:

"Move Lookup Code for better cross platform usage"
https://bugs.webkit.org/show_bug.cgi?id=191732
https://trac.webkit.org/changeset/238653

"Attempt to fix the iOS build by only including RevealSPI.h
when it's needed."
https://trac.webkit.org/changeset/238656

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

9 months agoAttempt to fix the iOS build by only including RevealSPI.h when it's needed.
simon.fraser@apple.com [Thu, 29 Nov 2018 02:25:16 +0000 (02:25 +0000)]
Attempt to fix the iOS build by only including RevealSPI.h when it's needed.

* editing/cocoa/DictionaryLookup.mm:

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

9 months agoModernize BlobRegistry::writeBlobsToTemporaryFiles
achristensen@apple.com [Thu, 29 Nov 2018 02:19:54 +0000 (02:19 +0000)]
Modernize BlobRegistry::writeBlobsToTemporaryFiles
https://bugs.webkit.org/show_bug.cgi?id=192117

Reviewed by Dean Jackson.

Source/WebCore:

No change in behavior.  Just use CompletionHandlers and the new sendWithAsyncReply instead of two way messaging
and manual completion handler management.

* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
* platform/network/BlobRegistry.h:
* platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::writeBlobsToTemporaryFiles):
* platform/network/BlobRegistryImpl.h:

Source/WebKit:

* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
(WebKit::NetworkBlobRegistry::writeBlobToFilePath):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::writeBlobToFilePath):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* UIProcess/ChildProcessProxy.h:
(WebKit::ChildProcessProxy::sendWithAsyncReply):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didClose):
(WebKit::NetworkProcessProxy::writeBlobToFilePath):
(WebKit::NetworkProcessProxy::didWriteBlobToFilePath): Deleted.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
* WebProcess/FileAPI/BlobRegistryProxy.h:
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didClose):
(WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles):
(WebKit::NetworkProcessConnection::didWriteBlobsToTemporaryFiles): Deleted.
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.messages.in:

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

9 months agoMove loadThrottleLatency from NetworkProcessCreationParameters to NetworkSessionCreat...
achristensen@apple.com [Thu, 29 Nov 2018 02:18:37 +0000 (02:18 +0000)]
Move loadThrottleLatency from NetworkProcessCreationParameters to NetworkSessionCreationParameters
https://bugs.webkit.org/show_bug.cgi?id=192122

Reviewed by Dean Jackson.

This is part of an effort to reduce global variables in the NetworkProcess.

* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::NetworkLoad):
(WebKit::NetworkLoad::didReceiveResponse):
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkProcess.h:
(WebKit::NetworkProcess::loadThrottleLatency const): Deleted.
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSession::loadThrottleLatency const):
* NetworkProcess/NetworkSessionCreationParameters.cpp: Added.
(WebKit::NetworkSessionCreationParameters::privateSessionParameters):
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):
* NetworkProcess/NetworkSessionCreationParameters.h:
(WebKit::NetworkSessionCreationParameters::encode const): Deleted.
(WebKit::NetworkSessionCreationParameters::decode): Deleted.
* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
* Shared/WebsiteDataStoreParameters.cpp:
(WebKit::WebsiteDataStoreParameters::privateSessionParameters):
* Sources.txt:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
* WebKit.xcodeproj/project.pbxproj:

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

9 months agoMove Lookup Code for better cross platform usage
megan_gardner@apple.com [Thu, 29 Nov 2018 01:41:15 +0000 (01:41 +0000)]
Move Lookup Code for better cross platform usage
https://bugs.webkit.org/show_bug.cgi?id=191732

Reviewed by Alex Christensen.

Source/WebCore:

Not currenlty testable

DictionaryLookup uses Reveal now, which is slated to be cross-platform.
That patch gates the parts of DictionaryLookup that currently do not have
an available implementation on iOS. Once Reveal is ready, this code will be
replaced or expanded upon, as appropriate.

* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
(WebCore::showPopupOrCreateAnimationController):
(WebCore::DictionaryLookup::showPopup):
(WebCore::DictionaryLookup::hidePopup):
(WebCore::DictionaryLookup::animationControllerForPopup):

Source/WebCore/PAL:

* pal/spi/mac/LookupSPI.h:
* pal/spi/mac/RevealSPI.h:

Source/WebKit:

Lookup is being replaced by Reveal. This framework should work on all platforms.
The patch moves the code that we expect will be needed for all platforms to the more
general cocoa area. This patch changes no funcationality, and should not change
anything currently. This work will be build on later when Reveal is ready to support
multiple platforms.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::performDictionaryLookupAtLocation):
(WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView _lookupGestureRecognized:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::performDictionaryLookupAtLocation): Deleted.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::performDictionaryLookupAtLocation): Deleted.
(WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection): Deleted.
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::performDictionaryLookupOfCurrentSelection):
(WebKit::WebPage::performDictionaryLookupForRange):
(WebKit::WebPage::dictionaryPopupInfoForRange):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation): Deleted.
(WebKit::WebPage::performDictionaryLookupForSelection): Deleted.
(WebKit::WebPage::performDictionaryLookupForRange): Deleted.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation): Deleted.
(WebKit::WebPage::performDictionaryLookupForSelection): Deleted.
(WebKit::WebPage::performDictionaryLookupOfCurrentSelection): Deleted.
(WebKit::WebPage::dictionaryPopupInfoForRange): Deleted.
(WebKit::WebPage::performDictionaryLookupForRange): Deleted.

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

9 months agoSQLiteDatabase::open is constantly printing "SQLite database failed to checkpoint...
chris.reid@sony.com [Thu, 29 Nov 2018 01:39:21 +0000 (01:39 +0000)]
SQLiteDatabase::open is constantly printing "SQLite database failed to checkpoint: database table is locked" errors
https://bugs.webkit.org/show_bug.cgi?id=192111

Reviewed by Alex Christensen.

Ensure the journal_mode=WAL statement is finalized before wal_checkpoint is executed.

* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::open):

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

9 months agoUpdating href on linearGradient and radialGradient doesn't update its rendering
commit-queue@webkit.org [Thu, 29 Nov 2018 01:29:54 +0000 (01:29 +0000)]
Updating href on linearGradient and radialGradient doesn't update its rendering
https://bugs.webkit.org/show_bug.cgi?id=191934

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-11-28
Reviewed by Ryosuke Niwa.

Source/WebCore:

Mark the gradient renderer for repaint when the value of the 'href'
attribute changes.

Tests: fast/shadow-dom/svg-linear-gradient-dynamic-update-href-in-shadow-tree.html
       fast/shadow-dom/svg-radial-gradient-dynamic-update-href-in-shadow-tree.html
       svg/dynamic-updates/SVGLinearGradientElement-svgdom-href-prop.html
       svg/dynamic-updates/SVGRadialGradientElement-svgdom-href-prop.html

* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::svgAttributeChanged):

LayoutTests:

* fast/shadow-dom/svg-linear-gradient-dynamic-update-href-in-shadow-tree-expected.html: Added.
* fast/shadow-dom/svg-linear-gradient-dynamic-update-href-in-shadow-tree.html: Added.
* fast/shadow-dom/svg-radial-gradient-dynamic-update-href-in-shadow-tree-expected.html: Added.
* fast/shadow-dom/svg-radial-gradient-dynamic-update-href-in-shadow-tree.html: Added.
* svg/dynamic-updates/SVGLinearGradientElement-svgdom-href-prop-expected.html: Added.
* svg/dynamic-updates/SVGLinearGradientElement-svgdom-href-prop.html: Added.
* svg/dynamic-updates/SVGRadialGradientElement-svgdom-href-prop-expected.html: Added.
* svg/dynamic-updates/SVGRadialGradientElement-svgdom-href-prop.html: Added.

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

9 months agoENABLE_SEPARATED_WX_HEAP needs to be defined in Platform.h.
mark.lam@apple.com [Thu, 29 Nov 2018 01:22:19 +0000 (01:22 +0000)]
ENABLE_SEPARATED_WX_HEAP needs to be defined in Platform.h.
https://bugs.webkit.org/show_bug.cgi?id=192110
<rdar://problem/46317746>

Reviewed by Saam Barati.

Source/JavaScriptCore:

* config.h:

Source/WTF:

Contrary my previous claim in r238564, ENABLE_SEPARATED_WX_HEAP needs to be
defined in Platform.h because it is also needed in WebCore for the CSS JIT.  Also
contrary to my previous claim, ENABLE(FAST_JIT_PERMISSIONS) is defined for WebCore
(and other projects) as well as JSC.  Hence, there's no reason why
ENABLE_SEPARATED_WX_HEAP cannot be defined in Platform.h.

* wtf/Platform.h:

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

9 months agoWeb Inspector: Styles: enable selection of multiple properties by default
nvasilyev@apple.com [Thu, 29 Nov 2018 01:11:10 +0000 (01:11 +0000)]
Web Inspector: Styles: enable selection of multiple properties by default
https://bugs.webkit.org/show_bug.cgi?id=192109
<rdar://problem/46323565>

Reviewed by Devin Rousso.

* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
Remove the checkbox.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.spreadsheet-style-declaration-editor .property):
(.spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing)):
(.spreadsheet-style-declaration-editor .property.selected):
(.spreadsheet-style-declaration-editor .property.selected:focus):
(.multiple-properties-selection .spreadsheet-style-declaration-editor .property): Deleted.
(.multiple-properties-selection .spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing)): Deleted.
(.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected): Deleted.
(.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected:focus): Deleted.
Remove `.multiple-properties-selection` class.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
* UserInterface/Views/SpreadsheetTextField.js:
(WI.SpreadsheetTextField):
(WI.SpreadsheetTextField.prototype._handleFocus): Deleted.

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