WebKit-https.git
2 years agoWeb Inspector: Charles Proxy errors opening har files exported from Safari (invalid...
commit-queue@webkit.org [Fri, 21 Dec 2018 00:58:45 +0000 (00:58 +0000)]
Web Inspector: Charles Proxy errors opening har files exported from Safari (invalid startedDateTime)
https://bugs.webkit.org/show_bug.cgi?id=192959
<rdar://problem/46863411>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-12-20
Reviewed by Brian Burg.

* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
(WI.NetworkTableContentView.prototype._updateExportButton):
(WI.NetworkTableContentView.prototype._canExportHAR):
Disallow HAR export if we don't have load data, such as the requestSentDate for
the main resource or sub-resources.

(WI.NetworkTableContentView.prototype._HARResources):
Only export resources that have load data.

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

2 years agoUse Optional::hasValue() instead of Optional::has_value()
cdumez@apple.com [Fri, 21 Dec 2018 00:40:09 +0000 (00:40 +0000)]
Use Optional::hasValue() instead of Optional::has_value()
https://bugs.webkit.org/show_bug.cgi?id=192948

Reviewed by Tim Horton.

Source/JavaScriptCore:

* inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py:
(CppBackendDispatcherImplementationGenerator._generate_async_dispatcher_class_for_domain):
(CppBackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command):

Source/WebCore:

* bindings/js/DOMPromiseProxy.h:
(WebCore::DOMPromiseProxy<IDLType>::isFulfilled const):
(WebCore::DOMPromiseProxy<IDLVoid>::isFulfilled const):
(WebCore::DOMPromiseProxyWithResolveCallback<IDLType>::isFulfilled const):
* dom/DataTransferItemList.h:
(WebCore::DataTransferItemList::hasItems const):
* dom/EventTarget.cpp:
(WebCore::EventTarget::addEventListener):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::captionDisplayMode):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::wouldTaintOrigin const):
* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
* platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
(webKitMediaSrcUpdatePresentationSize):
* platform/mac/NSScrollerImpDetails.mm:
(WebCore::ScrollerStyle::recommendedScrollerStyle):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::setExplicitValue):

Source/WebKit:

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::AutomationCommandError::toProtocolString):
(WebKit::WebAutomationSession::willClosePage):
* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::computeElementLayout):

Source/WTF:

* wtf/Hasher.h:
(WTF::add):
* wtf/Optional.h:

Tools:

* TestWebKitAPI/Tests/WebCore/CBORReaderTest.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/CBORWriterTest.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/FileSystem.cpp:
(TestWebKitAPI::TEST_F):

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

2 years agoAdd style script rule to check for uses of std::optional<>
cdumez@apple.com [Fri, 21 Dec 2018 00:38:25 +0000 (00:38 +0000)]
Add style script rule to check for uses of std::optional<>
https://bugs.webkit.org/show_bug.cgi?id=192931

Reviewed by Tim Horton.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_wtf_optional):
(check_style):

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

2 years agoFlicker when exiting element fullscreen.
commit-queue@webkit.org [Fri, 21 Dec 2018 00:27:50 +0000 (00:27 +0000)]
Flicker when exiting element fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=192774
rdar://problem/33088878

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-12-20
Reviewed by Jer Noble.

Fixes an issue where the web page would flicker upon exiting element fullscreen.

Replace WebView with a snapshot while the WebView is restyled and resized for inline.

* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController initWithWindow:webView:page:]):
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
(-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):

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

2 years agoMove HTTPS_UPGRADE code behind a runtime flag, off by default
cdumez@apple.com [Fri, 21 Dec 2018 00:20:21 +0000 (00:20 +0000)]
Move HTTPS_UPGRADE code behind a runtime flag, off by default
https://bugs.webkit.org/show_bug.cgi?id=192937

Reviewed by Youenn Fablet.

Move HTTPS_UPGRADE code behind a runtime flag, off by default and drop the build time flag.

Source/WebCore:

* page/Settings.yaml:

Source/WebKit:

* Configurations/WebKit.xcconfig:
* DerivedSources.make:
* NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:
* NetworkProcess/NetworkHTTPSUpgradeChecker.h:
* NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::NetworkLoadChecker):
(WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded const):
(WebKit::NetworkLoadChecker::checkRequest):
* NetworkProcess/NetworkLoadChecker.h:
* NetworkProcess/NetworkProcess.h:
(WebKit::NetworkProcess::networkHTTPSUpgradeChecker):
* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):
* NetworkProcess/NetworkResourceLoadParameters.h:
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::PingLoad):
* Shared/WebPreferences.yaml:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
* config.h:

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

2 years agoRemove custom constructors of ReadableStreamDefaultReader and ReadableStreamBYOBReader
youenn@apple.com [Fri, 21 Dec 2018 00:03:29 +0000 (00:03 +0000)]
Remove custom constructors of ReadableStreamDefaultReader and ReadableStreamBYOBReader
https://bugs.webkit.org/show_bug.cgi?id=192838

Reviewed by Chris Dumez.

Generate constructor code in case of a Private but not Public constructor.
Make sure this is correctly exposed in global objects.
Add JS built-in constructor implementations for those two objects.

Also add JS built-in constructors for controller and byob request.
To keep existing behavior, JS built-ins calling these constructors need to pass
an additional parameter that allows making the difference between a JS builtin caller or a JS caller.
In the latter case, the constructor will throw.

Covered by existing tests, no observable change of behavior.

* Modules/streams/ReadableByteStreamController.idl:
* Modules/streams/ReadableByteStreamController.js:
(initializeReadableByteStreamController):
(getter.byobRequest):
* Modules/streams/ReadableByteStreamInternals.js:
(privateInitializeReadableByteStreamController): Deleted.
(privateInitializeReadableStreamBYOBRequest): Deleted.
* Modules/streams/ReadableStream.js:
(initializeReadableStream):
* Modules/streams/ReadableStreamBYOBReader.js:
(initializeReadableStreamBYOBReader):
* Modules/streams/ReadableStreamBYOBRequest.idl:
* Modules/streams/ReadableStreamBYOBRequest.js:
(initializeReadableStreamBYOBRequest):
* Modules/streams/ReadableStreamDefaultController.idl:
* Modules/streams/ReadableStreamDefaultController.js:
(initializeReadableStreamDefaultController):
(enqueue):
* Modules/streams/ReadableStreamDefaultReader.js:
(initializeReadableStreamDefaultReader):
* Modules/streams/ReadableStreamInternals.js:
(readableStreamDefaultControllerError): Deleted.
* Sources.txt:
* UnifiedSources-input.xcfilelist:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMBuiltinConstructor.h:
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::addBuiltinGlobals):
* bindings/js/JSReadableStreamPrivateConstructors.cpp: Removed.
* bindings/js/JSReadableStreamPrivateConstructors.h: Removed.
* bindings/scripts/CodeGeneratorJS.pm:
(GeneratePropertiesHashTable):
* bindings/scripts/preprocess-idls.pl:
(shouldExposeInterface):

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

2 years ago[WebAuthN] Remove hash from Client Data
jiewen_tan@apple.com [Thu, 20 Dec 2018 23:55:48 +0000 (23:55 +0000)]
[WebAuthN] Remove hash from Client Data
https://bugs.webkit.org/show_bug.cgi?id=192727
<rdar://problem/46746673>

Reviewed by Brent Fulgham.

Source/WebCore:

The hash algorithm for hashing the client data is enforced to SHA_256 in the latest spec:
https://www.w3.org/TR/webauthn/#sec-client-data. Therefore, we should remove it.

Covered by existing tests.

* Modules/webauthn/AuthenticatorCoordinator.cpp:
(WebCore::AuthenticatorCoordinatorInternal::produceClientDataJson):

LayoutTests:

* http/wpt/webauthn/public-key-credential-create-success-hid.https.html:
* http/wpt/webauthn/public-key-credential-create-success-local.https.html:
* http/wpt/webauthn/public-key-credential-get-success-hid.https.html:
* http/wpt/webauthn/public-key-credential-get-success-local.https.html:

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

2 years ago[WebAuthN] Add a runtime flag for local authenticator
jiewen_tan@apple.com [Thu, 20 Dec 2018 23:54:48 +0000 (23:54 +0000)]
[WebAuthN] Add a runtime flag for local authenticator
https://bugs.webkit.org/show_bug.cgi?id=192792
<rdar://problem/46798738>

Reviewed by Brent Fulgham.

Source/WebCore:

No tests.

This patch adds a runtime flag for local authenticator and removes ways to
set the runtime flag for web authentication in LegacyWebKit.

* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebAuthenticationLocalAuthenticatorEnabled):
(WebCore::RuntimeEnabledFeatures::webAuthenticationLocalAuthenticatorEnabled const):

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetWebAuthenticationLocalAuthenticatorEnabled):
(WKPreferencesGetWebAuthenticationLocalAuthenticatorEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/WebAuthentication/Cocoa/LocalService.mm:
(WebKit::LocalService::isAvailable):

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences webAuthenticationEnabled]): Deleted.
(-[WebPreferences setWebAuthenticationEnabled:]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Tools:

* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
(setWebPreferencesForTestOptions):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

* platform/mac-highsierra-wk1/fast/dom/navigator-detached-no-crash-expected.txt:
* platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt:

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

2 years agoPointer lock causes abandoned documents
commit-queue@webkit.org [Thu, 20 Dec 2018 23:46:01 +0000 (23:46 +0000)]
Pointer lock causes abandoned documents
https://bugs.webkit.org/show_bug.cgi?id=188727
rdar://problem/44248197

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-12-20
Reviewed by Simon Fraser.

Fixes --world-leaks in these tests:

pointer-lock/locked-element-removed-from-dom.html
pointer-lock/mouse-event-delivery.html
fast/shadow-dom/pointerlockelement-in-slot.html

PointerLockController now uses WeakPtr instead of RefPtr because it has no need to extend the lifetime of a document.

* page/PointerLockController.cpp:
(WebCore::PointerLockController::elementRemoved):
(WebCore::PointerLockController::documentDetached):
(WebCore::PointerLockController::didAcquirePointerLock):
* page/PointerLockController.h:

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

2 years agoEnsure new styles are served on webkit.org.
joepeck@webkit.org [Thu, 20 Dec 2018 23:18:26 +0000 (23:18 +0000)]
Ensure new styles are served on webkit.org.
https://bugs.webkit.org/show_bug.cgi?id=192953

Patch by Jon Davis <jond@apple.com> on 2018-12-20
Rubber-stamped by Devin Rousso.

* tabicon.svg: Removed as vector icons are no longer preferred.
* wp-content/themes/webkit/header.php: Updated stylesheet datestamp.

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

2 years agoWeb Inspector: Autoformat doesn't work on icloud.com (javascript-packed.js)
joepeck@webkit.org [Thu, 20 Dec 2018 23:15:56 +0000 (23:15 +0000)]
Web Inspector: Autoformat doesn't work on icloud.com (javascript-packed.js)
https://bugs.webkit.org/show_bug.cgi?id=192946
<rdar://problem/42546126>

Rubber-stamped by Devin Rousso.

Source/WebInspectorUI:

* UserInterface/Base/Utilities.js:
(whitespaceRatio):
(isTextLikelyMinified):
Check the first 2500 and the last 2500 characters whitespace ratio.
If either is below 20% then treat as minified.

LayoutTests:

* inspector/formatting/is-text-likely-minified-expected.txt:
* inspector/formatting/is-text-likely-minified.html:
Add a test for a long header doc at the start but minified content at the end.

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

2 years agowebkitpy: Autoinstall package URLs have changed
jbedard@apple.com [Thu, 20 Dec 2018 21:45:12 +0000 (21:45 +0000)]
webkitpy: Autoinstall package URLs have changed
https://bugs.webkit.org/show_bug.cgi?id=192909
<rdar://problem/46860359>

Rubber-stamped by Alexey Proskuryakov.

PyPi urls have been moved around, we need to update our auto-installed packages.

We should check for Selenium before asking PyPi for the latest version.

* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook._install_mechanize): Update with new pypi url.
(AutoinstallImportHook._install_keyring): Ditto.
(AutoinstallImportHook._install_pep8): Ditto.
(AutoinstallImportHook._install_mozlog): Ditto.
(AutoinstallImportHook._install_mozprocess): Ditto.
(AutoinstallImportHook._install_pytest_timeout): Ditto.
(AutoinstallImportHook._install_pytest): Ditto.
(AutoinstallImportHook._install_pylint): Ditto.
(AutoinstallImportHook._install_buildbot): Ditto.
(AutoinstallImportHook._install_coverage): Ditto.
(AutoinstallImportHook._install_twisted_15_5_0): Ditto.
(AutoinstallImportHook._install_selenium): Update with new pypi url, only check
for new Selenium if the installed version isn't sufficient.
(AutoinstallImportHook.get_latest_pypi_url): Update with new pypi url.

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

2 years agoAdd support for globalThis
keith_miller@apple.com [Thu, 20 Dec 2018 21:39:11 +0000 (21:39 +0000)]
Add support for globalThis
https://bugs.webkit.org/show_bug.cgi?id=165171

Reviewed by Mark Lam.

JSTests:

* test262/config.yaml:

Source/JavaScriptCore:

This patch adds support for the globalThis property on the global
object. The globalThis property spec is in stage three and is
quite simple. For reference: http://tc39.github.io/proposal-global/

* runtime/JSGlobalObject.cpp:

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

2 years ago[ iOS WK2 ] Layout Test imported/w3c/web-platform-tests/service-workers/service-worke...
ryanhaddad@apple.com [Thu, 20 Dec 2018 21:18:54 +0000 (21:18 +0000)]
[ iOS WK2 ] Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/windowclient-navigate.https.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=191704

Unreviewed test gardening.

* platform/ios/TestExpectations: Mark test as flaky.

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

2 years ago[Mac] Update apache httpd.conf
ryanhaddad@apple.com [Thu, 20 Dec 2018 21:13:05 +0000 (21:13 +0000)]
[Mac] Update apache httpd.conf
https://bugs.webkit.org/show_bug.cgi?id=192942

Reviewed by Alexey Proskuryakov.

* http/conf/apache2.4-php7-httpd.conf:

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

2 years agoUse Optional::valueOr() instead of Optional::value_or()
cdumez@apple.com [Thu, 20 Dec 2018 20:23:18 +0000 (20:23 +0000)]
Use Optional::valueOr() instead of Optional::value_or()
https://bugs.webkit.org/show_bug.cgi?id=192933

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:
(Inspector::RemoteConnectionToTarget::setup):
* inspector/remote/glib/RemoteConnectionToTargetGlib.cpp:
(Inspector::RemoteConnectionToTarget::setup):
* parser/SourceCodeKey.h:
(JSC::SourceCodeKey::SourceCodeKey):
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):

Source/WebCore:

* Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::convert):
(WebCore::ApplePayPaymentHandler::didAuthorizePayment):
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::load):
* Modules/indexeddb/IDBDatabaseIdentifier.h:
(WebCore::IDBDatabaseIdentifier::hash const):
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::open):
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::applyConstraints):
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::insertDTMF):
* Modules/webdatabase/SQLTransaction.cpp:
(WebCore::SQLTransaction::executeSql):
* Modules/webvr/VRFrameData.cpp:
(WebCore::VRFrameData::update):
* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::updateCSSTransitionsForElement):
* animation/DeclarativeAnimation.cpp:
(WebCore::DeclarativeAnimation::cancel):
(WebCore::DeclarativeAnimation::invalidateDOMEvents):
* animation/KeyframeEffect.cpp:
(WebCore::computeMissingKeyframeOffsets):
(WebCore::KeyframeEffect::applyPendingAcceleratedActions):
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::runPendingPlayTask):
(WebCore::WebAnimation::runPendingPauseTask):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::write):
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::generateKey):
(WebCore::CryptoAlgorithmHMAC::importKey):
* crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp:
(WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
(WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):
* crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
(WebCore::CryptoKeyRSA::importSpki):
(WebCore::CryptoKeyRSA::importPkcs8):
* crypto/keys/CryptoKeyRSA.cpp:
(WebCore::CryptoKeyRSA::importJwk):
* crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
(WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
(WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):
* crypto/mac/CryptoKeyRSAMac.cpp:
(WebCore::CryptoKeyRSA::importSpki):
(WebCore::CryptoKeyRSA::importPkcs8):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::counterToCSSValue):
* css/CSSFontFace.cpp:
(WebCore::calculateItalicRange):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::doubleValue const):
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::addRule):
* css/DOMMatrix.cpp:
(WebCore::DOMMatrix::rotateSelf):
* css/DOMMatrixReadOnly.cpp:
(WebCore::DOMMatrixReadOnly::validateAndFixup):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueCounter):
* css/parser/MediaQueryParser.cpp:
(WebCore::MediaQueryParser::commitMediaQuery):
* dom/Document.h:
(WebCore::Document::referrerPolicy const):
* dom/Element.cpp:
(WebCore::toScrollAlignment):
* dom/EventTarget.cpp:
(WebCore::EventTarget::addEventListener):
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::observe):
* editing/cocoa/FontAttributeChangesCocoa.mm:
(WebCore::FontChanges::platformFontFamilyNameForCSS const):
* fileapi/File.cpp:
(WebCore::File::File):
* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::toggle):
* html/HTMLOListElement.h:
* html/ImageBitmap.cpp:
(WebCore::croppedSourceRectangleWithFormatting):
* html/canvas/CanvasPattern.cpp:
(WebCore::CanvasPattern::setTransform):
* html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::setTransform):
(WebCore::CanvasRenderingContext2DBase::isPointInPathInternal):
(WebCore::CanvasRenderingContext2DBase::isPointInStrokeInternal):
* html/canvas/Path2D.cpp:
(WebCore::Path2D::addPath):
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::buildAction):
* inspector/InspectorFrontendHost.cpp:
(WebCore::populateContextMenu):
* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::complicatedCases):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset):
(WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue):
(WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue):
* layout/FormattingContextQuirks.cpp:
(WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
* layout/MarginTypes.h:
(WebCore::Layout::VerticalMargin::usedValues const):
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::instrinsicWidthConstraints):
* layout/blockformatting/BlockFormattingContextQuirks.cpp:
(WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
* layout/displaytree/DisplayBox.h:
(WebCore::Display::Box::width const):
(WebCore::Display::Box::height const):
(WebCore::Display::Box::contentBoxTop const):
(WebCore::Display::Box::contentBoxLeft const):
* layout/floats/FloatingContext.cpp:
(WebCore::Layout::Iterator::set):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::appendContentToLine const):
(WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::urlSelected):
* loader/NavigationAction.cpp:
* page/FrameView.cpp:
(WebCore::FrameView::setLayoutViewportOverrideRect):
(WebCore::FrameView::documentToAbsoluteScaleFactor const):
(WebCore::FrameView::viewportSizeForCSSViewportUnits const):
* page/Page.cpp:
(WebCore::Page::setLowPowerModeEnabledOverrideForTesting):
* page/SecurityOriginData.cpp:
(WebCore::SecurityOriginData::databaseIdentifier const):
* page/SecurityOriginData.h:
(WebCore::SecurityOriginDataHash::hash):
* page/SecurityOriginHash.h:
(WebCore::SecurityOriginHash::hash):
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::setViewLayoutSize):
* page/WindowFeatures.cpp:
(WebCore::parseDialogFeatures):
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::updateStateMachine):
(WebCore::AnimationBase::fireAnimationEventsIfNeeded):
(WebCore::AnimationBase::getTimeToNextEvent const):
(WebCore::AnimationBase::freezeAtTime):
(WebCore::AnimationBase::getElapsedTime const):
* page/animation/CSSAnimationController.cpp:
(WebCore::CSSAnimationControllerPrivate::updateAnimationTimer):
* page/cocoa/ResourceUsageThreadCocoa.mm:
(WebCore::ResourceUsageThread::platformThreadBody):
* page/linux/ResourceUsageThreadLinux.cpp:
(WebCore::ResourceUsageThread::platformThreadBody):
* platform/graphics/ComplexTextController.cpp:
(WebCore::ComplexTextController::offsetForPosition):
* platform/graphics/FontCache.h:
(WebCore::FontDescriptionKey::computeHash const):
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::drawText const):
(WebCore::FontCascade::drawEmphasisMarks const):
(WebCore::FontCascade::displayListForTextRun const):
(WebCore::FontCascade::adjustSelectionRectForText const):
(WebCore::FontCascade::codePath const):
* platform/graphics/FontSelectionAlgorithm.cpp:
(WebCore::FontSelectionAlgorithm::styleDistance const):
* platform/graphics/FontSelectionAlgorithm.h:
(WebCore::operator<<):
(WebCore::FontSelectionSpecifiedCapabilities::computeWeight const):
(WebCore::FontSelectionSpecifiedCapabilities::computeWidth const):
(WebCore::FontSelectionSpecifiedCapabilities::computeSlope const):
* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::calculateLayerBoundingRect):
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
(WebCore::WebCoreAVCFResourceLoader::startLoading):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::naturalSize):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont):
* platform/graphics/filters/FETurbulence.cpp:
(WebCore::FETurbulence::fillRegion const):
* platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::initializeGStreamer):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
(WebCore::TextureMapperLayer::replicaTransform):
(WebCore::TextureMapperLayer::syncAnimations):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::transformedVisibleRect):
(WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
* platform/graphics/transforms/TransformState.cpp:
(WebCore::TransformState::mappedPoint const):
(WebCore::TransformState::mapQuad const):
(WebCore::TransformState::flattenWithTransform):
* platform/network/CacheValidation.cpp:
(WebCore::computeCurrentAge):
(WebCore::computeFreshnessLifetimeForHTTPFamily):
* platform/network/NetworkStateNotifier.cpp:
(WebCore::NetworkStateNotifier::onLine):
* rendering/FloatingObjects.cpp:
(WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom const):
(WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom const):
* rendering/GridBaselineAlignment.cpp:
(WebCore::GridBaselineAlignment::ascentForChild const):
* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrack::setGrowthLimit):
(WebCore::GridTrackSizingAlgorithm::initialBaseSize const):
(WebCore::GridTrackSizingAlgorithm::initialGrowthLimit const):
(WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem):
(WebCore::sortByGridTrackGrowthPotential):
(WebCore::GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild const):
(WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
(WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
* rendering/PaintInfo.h:
(WebCore::PaintInfo::applyTransform):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalHeight const):
* rendering/RenderCounter.cpp:
(WebCore::planCounter):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::baselinePosition const):
(WebCore::RenderFlexibleBox::marginBoxAscentForChild):
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::gridGap const):
(WebCore::RenderGrid::baselinePosition const):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerByApplyingTransform):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintItem):
(WebCore::RenderListBox::listIndexIsVisible):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::calculateMaxColumnHeight const):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::cellBaselinePosition const):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::firstLineBaseline const):
* rendering/RenderText.cpp:
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::RenderText::previousOffset const):
(WebCore::RenderText::previousOffsetForBackwardDeletion const):
(WebCore::RenderText::nextOffset const):
(WebCore::RenderText::stringView const):
* rendering/RenderView.cpp:
(WebCore::RenderView::layout):
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::baselinePosition const):
* rendering/mathml/RenderMathMLBlock.h:
(WebCore::RenderMathMLBlock::ascentForChild):
* rendering/style/GridPosition.cpp:
(WebCore::GridPosition::max):
* rendering/style/TextUnderlineOffset.h:
(WebCore::TextUnderlineOffset::lengthOr const):
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::nodeAtFloatPoint):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::nodeAtFloatPoint):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::hitTestClipContent):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::postApplyResource):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::nodeAtPoint):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::nodeAtFloatPoint):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::nodeAtFloatPoint):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::clipToImageBuffer):
* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::processGlyphElement):
(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):

Source/WebDriver:

* Session.cpp:
(WebDriver::Session::handleUnexpectedAlertOpen):
(WebDriver::Session::computeElementLayout):
(WebDriver::Session::selectOptionElement):
(WebDriver::builtAutomationCookie):
(WebDriver::Session::takeScreenshot):
* WebDriverService.cpp:
(WebDriver::WebDriverService::sendResponse const):
(WebDriver::WebDriverService::createSession):

Source/WebKit:

* Shared/API/c/WKSecurityOriginRef.cpp:
(WKSecurityOriginGetPort):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/WKSecurityOrigin.mm:
(-[WKSecurityOrigin port]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _cpuLimit]):
* UIProcess/API/glib/WebKitSecurityOrigin.cpp:
(webkit_security_origin_get_port):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseHandleWheelEvent):
* UIProcess/Automation/SimulatedInputDispatcher.cpp:
(WebKit::SimulatedInputKeyFrame::maximumDuration const):
(WebKit::SimulatedInputDispatcher::transitionInputSourceToState):
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext):
(WebKit::WebAutomationSession::performInteractionSequence):
* UIProcess/Automation/WebAutomationSessionMacros.h:
* UIProcess/ServiceWorkerProcessProxy.cpp:
(WebKit::ServiceWorkerProcessProxy::start):
* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManager::initTimeOutTimer):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::deviceScaleFactor const):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::viewportSizeForCSSViewportUnits const):
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::activateItem):
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeFormDataElement):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::convertFromPDFViewToRootView const):
(WebKit::PDFPlugin::boundsOnScreen const):
(WebKit::PDFPlugin::geometryDidChange):
* WebProcess/WebCoreSupport/SessionStateConversion.cpp:
(WebKit::toFormData):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
* WebProcess/WebPage/wpe/CompositingManager.cpp:
(WebKit::CompositingManager::releaseConnectionFd):

Source/WebKitLegacy/mac:

* WebCoreSupport/WebSecurityOrigin.mm:
(-[WebSecurityOrigin port]):

Source/WebKitLegacy/win:

* WebSecurityOrigin.cpp:
(WebSecurityOrigin::port):

Source/WTF:

* wtf/Optional.h:
(WTF::Optional<T::valueOr const):

Tools:

* TestWebKitAPI/Tests/WTF/URLParser.cpp:
(TestWebKitAPI::checkURL):
(TestWebKitAPI::checkRelativeURL):
(TestWebKitAPI::checkURLDifferences):
(TestWebKitAPI::checkRelativeURLDifferences):
* TestWebKitAPI/Tests/WebCore/URLParserTextEncoding.cpp:
(TestWebKitAPI::checkURL):

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

2 years agoITMLKit Inspector: Elements tab does not show DOM Tree
commit-queue@webkit.org [Thu, 20 Dec 2018 20:08:27 +0000 (20:08 +0000)]
ITMLKit Inspector: Elements tab does not show DOM Tree
https://bugs.webkit.org/show_bug.cgi?id=192910
<rdar://problem/46680585>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-12-20
Reviewed by Brian Burg.

Source/JavaScriptCore:

* inspector/agents/InspectorAgent.h:
* inspector/agents/InspectorAgent.cpp:
(Inspector::InspectorAgent::enable):
(Inspector::InspectorAgent::activateExtraDomain):
(Inspector::InspectorAgent::activateExtraDomains):
Send extra domains immediately instead of waiting until
the Inspector domain is enabled. This will ensure the frontend
hears about extra augmented domains before augmenting agents
get a chance to send any messages.

Source/WebInspectorUI:

* UserInterface/Protocol/Connection.js:
(InspectorBackend.Connection.prototype._dispatchEvent):
Better logging for errors.

* UserInterface/Base/Main.js:
* UserInterface/Controllers/AppController.js:
(WI.AppController.prototype.activateExtraDomains):
Let Targets get a chance to activate extra domains.
Perform a little more work in these cases.

* UserInterface/Protocol/Target.js:
(WI.Target):
(WI.Target.prototype.activateExtraDomain):
Expose agents for domains that are active.
Expose agents for extra domains when they are activated.

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

2 years agoITMLKit Inspector: Computed Style Box Model section throws exceptions
commit-queue@webkit.org [Thu, 20 Dec 2018 20:05:34 +0000 (20:05 +0000)]
ITMLKit Inspector: Computed Style Box Model section throws exceptions
https://bugs.webkit.org/show_bug.cgi?id=192911
<rdar://problem/46861112>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-12-20
Reviewed by Matt Baker.

* UserInterface/Views/BoxModelDetailsSectionRow.js:
(WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
(WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaElement):
(WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
ITMLKit doesn't always provide a display/position/width/height etc properties.
Protect against this, and just show an empty message in the box model section
if those properties do not exist.

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

2 years agoREGRESSION (r239419): heap-use-after-free in AudioSourceProviderAVFObjC::finalizeCall...
jer.noble@apple.com [Thu, 20 Dec 2018 19:48:35 +0000 (19:48 +0000)]
REGRESSION (r239419): heap-use-after-free in AudioSourceProviderAVFObjC::finalizeCallback()
https://bugs.webkit.org/show_bug.cgi?id=192941
<rdar://problem/46874096>

Reviewed by Brent Fulgham.

Don't delete the locked lock before unlocking the lock.

* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
(WebCore::AudioSourceProviderAVFObjC::finalizeCallback):

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

2 years agoImprove release-level page-load logging
krollin@apple.com [Thu, 20 Dec 2018 19:23:20 +0000 (19:23 +0000)]
Improve release-level page-load logging
https://bugs.webkit.org/show_bug.cgi?id=192872
<rdar://problem/46850309>

Reviewed by Chris Dumez.

There are a number of reported bugs that are difficult or impossible
to track down with our current level of logging. Additionally, some
software groups lower in the page-loading stack have requested logging
sufficient for tracking a user-visible error message down to the
requested resource that caused the message. Add more-comprehensive
logging to address these issues/requests.

Source/WebCore:

No new tests -- no changed functionality.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::setMainDocumentError):
(WebCore::DocumentLoader::mainReceivedError):
(WebCore::DocumentLoader::stopLoading):
(WebCore::DocumentLoader::notifyFinished):
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::continueAfterContentPolicy):
(WebCore::DocumentLoader::startLoadingMainResource):
(WebCore::DocumentLoader::loadMainResource):
(WebCore::DocumentLoader::cancelMainResourceLoad):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::urlSelected):
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::loadArchive):
(WebCore::FrameLoader::loadInSameDocument):
(WebCore::FrameLoader::loadFrameRequest):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::reloadWithOverrideEncoding):
(WebCore::FrameLoader::reload):
(WebCore::FrameLoader::setState):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
(WebCore::FrameLoader::loadDifferentDocumentItem):
* loader/ProgressTracker.cpp:
(WebCore::ProgressItem::ProgressItem):
(WebCore::ProgressTracker::reset):
(WebCore::ProgressTracker::progressStarted):
(WebCore::ProgressTracker::progressCompleted):
(WebCore::ProgressTracker::finalProgressComplete):
(WebCore::ProgressTracker::incrementProgress):
(WebCore::ProgressTracker::completeProgress):
(WebCore::ProgressTracker::isAlwaysOnLoggingAllowed const):
* loader/ProgressTracker.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::loadDataURL):
(WebCore::ResourceLoader::willSendRequestInternal):
(WebCore::ResourceLoader::didFinishLoading):
(WebCore::ResourceLoader::didFail):
(WebCore::ResourceLoader::willSendRequestAsync):
(WebCore::ResourceLoader::wasBlocked):
(WebCore::ResourceLoader::cannotShowURL):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequestInternal):
(WebCore::=):
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::didFinishLoading):
(WebCore::SubresourceLoader::didFail):
(WebCore::SubresourceLoader::willCancel):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):

Source/WebKit:

* UIProcess/WebPageProxy.cpp:
(WebKit::m_editableImageController):
(WebKit::WebPageProxy::~WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::swapToWebProcess):
(WebKit::WebPageProxy::reattachToWebProcessForReload):
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::tryClose):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadRequestWithNavigation):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadDataWithNavigation):
(WebKit::WebPageProxy::loadAlternateHTML):
(WebKit::WebPageProxy::loadWebArchiveData):
(WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick):
(WebKit::WebPageProxy::stopLoading):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::tryRestoreScrollPosition):
(WebKit::WebPageProxy::updateThrottleState):
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::restoreFromSessionState):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::willPerformClientRedirectForFrame):
(WebKit::WebPageProxy::didCancelClientRedirectForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didNavigateWithNavigationData):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::didPerformServerRedirect):
(WebKit::WebPageProxy::processDidBecomeUnresponsive):
(WebKit::WebPageProxy::processDidBecomeResponsive):
(WebKit::WebPageProxy::processDidTerminate):
(WebKit::WebPageProxy::dispatchProcessDidTerminate):
(WebKit::WebPageProxy::tryReloadAfterProcessTermination):
(WebKit::WebPageProxy::didExceedInactiveMemoryLimitWhileActive):
(WebKit::WebPageProxy::didExceedBackgroundCPULimitWhileInForeground):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::willSendRequest):
(WebKit::WebResourceLoader::didReceiveResponse):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoad):

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

2 years agoUpdate test262 configuration to not run tests dependent on ICU version.
keith_miller@apple.com [Thu, 20 Dec 2018 19:18:17 +0000 (19:18 +0000)]
Update test262 configuration to not run tests dependent on ICU version.
https://bugs.webkit.org/show_bug.cgi?id=192920

Reviewed by Saam Barati.

* test262/expectations.yaml:

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

2 years agoFix a typo in slow_path_construct_arityCheck and operationConstructArityCheck.
mark.lam@apple.com [Thu, 20 Dec 2018 18:51:49 +0000 (18:51 +0000)]
Fix a typo in slow_path_construct_arityCheck and operationConstructArityCheck.
https://bugs.webkit.org/show_bug.cgi?id=192939
<rdar://problem/46869516>

Reviewed by Keith Miller.

JSTests:

* stress/stack-overflow-frame-for-construct-arityCheck-should-use-construct-codeBlock.js: Added.

Source/JavaScriptCore:

* jit/JITOperations.cpp:
* runtime/CommonSlowPaths.cpp:

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

2 years ago[iOS] Replace "node assistance" terminology in WebKit with "focused element"
wenson_hsieh@apple.com [Thu, 20 Dec 2018 18:42:45 +0000 (18:42 +0000)]
[iOS] Replace "node assistance" terminology in WebKit with "focused element"
https://bugs.webkit.org/show_bug.cgi?id=192936

Reviewed by Tim Horton.

Renames a few methods and data structures in WebKit, to refer to "focused elements" rather than "assisted nodes";
see below for more details. No new tests, because there should be no change in behavior.

* Shared/FocusedElementInformation.cpp: Renamed from Source/WebKit/Shared/AssistedNodeInformation.cpp.
(WebKit::OptionItem::encode const):
(WebKit::OptionItem::decode):
(WebKit::FocusedElementInformation::encode const):
(WebKit::FocusedElementInformation::decode):
* Shared/FocusedElementInformation.h: Renamed from Source/WebKit/Shared/AssistedNodeInformation.h.

Rename AssistedNodeInformation to FocusedElementInformation. Additionally, introduce a named type for the
focusedElementIdentifier (which is currently just a `uint64_t`).

(WebKit::OptionItem::OptionItem):
* Shared/ios/InteractionInformationAtPosition.h:
* Shared/ios/InteractionInformationAtPosition.mm:
(WebKit::InteractionInformationAtPosition::encode const):
(WebKit::InteractionInformationAtPosition::decode):
* SourcesCocoa.txt:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _shouldUpdateKeyboardWithInfo:]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h:

Rename NodeAssistanceArguments to ElementDidFocusArguments (and also add a FIXME for removing this mechanism
eventually).

(WebKit::WebPageProxy::focusNextFocusedElement):
(WebKit::WebPageProxy::focusNextAssistedNode): Deleted.
* UIProcess/WebPageProxy.messages.in:

Rename StartAssistingNode to ElementDidFocus, and StopAssistingNode to ElementDidBlur.

* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::elementDidFocus):
(WebKit::PageClientImpl::isFocusingElement):
(WebKit::PageClientImpl::elementDidBlur):
(WebKit::PageClientImpl::startAssistingNode): Deleted.
(WebKit::PageClientImpl::isAssistingNode): Deleted.
(WebKit::PageClientImpl::stopAssistingNode): Deleted.
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView isFocusingElement]):
(-[WKContentView _didCommitLoadForMainFrame]):
(-[WKContentView isAssistingNode]): Deleted.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKFocusedElementInfo initWithFocusedElementInformation:isUserInitiated:userObject:]):
(hasFocusedElement):
(-[WKContentView cleanupInteraction]):
(-[WKContentView shouldHideSelectionWhenScrolling]):
(-[WKContentView resignFirstResponderForWebView]):
(-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView _zoomToRevealFocusedElement]):
(-[WKContentView inputView]):
(-[WKContentView _selectionClipRect]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView clearSelection]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView _isInteractingWithFocusedElement]):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
(-[WKContentView selectPositionAtPoint:completionHandler:]):
(-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]):
(-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]):
(-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
(-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]):
(-[WKContentView accessoryTab:]):
(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
(-[WKContentView accessoryClear]):
(-[WKContentView _updateAccessory]):
(-[WKContentView insertTextSuggestion:]):
(-[WKContentView setSelectedTextRange:]):
(-[WKContentView textInputTraits]):
(-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
(-[WKContentView focusedElementInformation]):
(-[WKContentView focusedSelectElementOptions]):
(rectToRevealWhenZoomingToFocusedElement):
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _elementDidBlur]):
(-[WKContentView _didReceiveEditorStateUpdateAfterFocus]):
(-[WKContentView updateCurrentFocusedElementInformation:]):
(-[WKContentView presentViewControllerForCurrentFocusedElement]):
(-[WKContentView focusedFormControlViewDidSubmit:]):
(-[WKContentView focusedFormControlViewDidCancel:]):
(-[WKContentView focusedFormControlViewDidBeginEditing:]):
(-[WKContentView rectForFocusedFormControlView:]):
(-[WKContentView nextRectForFocusedFormControlView:]):
(-[WKContentView previousRectForFocusedFormControlView:]):
(-[WKContentView actionNameForFocusedFormControlView:]):
(-[WKContentView focusedFormControlViewDidRequestNextNode:]):
(-[WKContentView focusedFormControlViewDidRequestPreviousNode:]):
(-[WKContentView hasNextNodeForFocusedFormControlView:]):
(-[WKContentView hasPreviousNodeForFocusedFormControlView:]):
(-[WKContentView selectMenu:didSelectItemAtIndex:]):
(-[WKContentView numberOfItemsInSelectMenu:]):
(-[WKContentView selectMenu:displayTextForItemAtIndex:]):
(-[WKContentView selectMenu:didCheckItemAtIndex:checked:]):
(-[WKContentView selectMenuUsesMultipleSelection:]):
(-[WKContentView selectMenu:hasSelectedOptionAtIndex:]):
(-[WKContentView _updateChangedSelection:]):
(-[WKContentView _autofillContext]):
(-[WKContentView dismissQuickboardViewControllerAndRevealFocusedFormOverlayIfNecessary:]):
(-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
(-[WKContentView inputLabelTextForViewController:]):
(-[WKContentView initialValueForViewController:]):
(-[WKContentView shouldDisplayInputContextViewForListViewController:]):
(-[WKContentView numericInputModeForListViewController:]):
(-[WKContentView textContentTypeForListViewController:]):
(-[WKContentView allowsDictationInputForListViewController:]):
(-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]): Deleted.
(hasAssistedNode): Deleted.

Replaced with hasFocusedElement.

(-[WKContentView _isInteractingWithAssistedNode]): Deleted.
(-[WKContentView assistedNodeInformation]): Deleted.
(-[WKContentView assistedNodeSelectOptions]): Deleted.
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]): Deleted.
(-[WKContentView _stopAssistingNode]): Deleted.
(-[WKContentView updateCurrentAssistedNodeInformation:]): Deleted.
(-[WKContentView presentViewControllerForCurrentAssistedNode]): Deleted.
* UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:
(-[WKDataListSuggestionsControl textAlignment]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::focusedElementInformationCallback):
(WebKit::WebPageProxy::requestFocusedElementInformation):
(WebKit::WebPageProxy::computeCustomFixedPositionRect const):
(WebKit::WebPageProxy::didCommitLayerTree):
(WebKit::WebPageProxy::selectWithGesture):
(WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
(WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
(WebKit::WebPageProxy::selectPositionAtPoint):
(WebKit::WebPageProxy::updateSelectionWithExtentPoint):
(WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
(WebKit::WebPageProxy::blurFocusedElement):
(WebKit::WebPageProxy::elementDidFocus):
(WebKit::WebPageProxy::elementDidBlur):
(WebKit::WebPageProxy::focusNextFocusedElement):
(WebKit::WebPageProxy::setFocusedElementValue):
(WebKit::WebPageProxy::setFocusedElementValueAsNumber):
(WebKit::WebPageProxy::setFocusedElementSelectedIndex):
(WebKit::WebPageProxy::assistedNodeInformationCallback): Deleted.
(WebKit::WebPageProxy::requestAssistedNodeInformation): Deleted.
(WebKit::WebPageProxy::blurAssistedNode): Deleted.
(WebKit::WebPageProxy::startAssistingNode): Deleted.
(WebKit::WebPageProxy::stopAssistingNode): Deleted.
(WebKit::WebPageProxy::focusNextAssistedNode): Deleted.
(WebKit::WebPageProxy::setAssistedNodeValue): Deleted.
(WebKit::WebPageProxy::setAssistedNodeValueAsNumber): Deleted.
(WebKit::WebPageProxy::setAssistedNodeSelectedIndex): Deleted.
* UIProcess/ios/forms/WKFormColorPicker.mm:
(-[WKColorPicker initWithView:]):
(-[WKColorPicker setControlValueFromUIColor:]):
* UIProcess/ios/forms/WKFormInputControl.mm:
(-[WKDateTimePicker initWithView:datePickerMode:]):
(-[WKDateTimePicker shouldPresentGregorianCalendar:]):
(-[WKDateTimePicker _dateChangedSetAsNumber]):
(-[WKDateTimePicker _dateChangedSetAsString]):
(-[WKDateTimePicker controlBeginEditing]):
(-[WKFormInputControl initWithView:]):
(-[WKDateTimePopover clear:]):
(-[WKDateTimePopover initWithView:datePickerMode:]):
* UIProcess/ios/forms/WKFormPopover.mm:
(-[WKRotatingPopover presentPopoverAnimated:]):
* UIProcess/ios/forms/WKFormSelectControl.h:
* UIProcess/ios/forms/WKFormSelectControl.mm:
(-[WKFormSelectControl initWithView:]):
* UIProcess/ios/forms/WKFormSelectPicker.mm:
(-[WKMultipleSelectPicker initWithView:]):
(-[WKMultipleSelectPicker pickerView:viewForRow:forComponent:reusingView:]):
(-[WKMultipleSelectPicker pickerView:numberOfRowsInComponent:]):
(-[WKMultipleSelectPicker findItemIndexAt:]):
(-[WKMultipleSelectPicker pickerView:row:column:checked:]):
(-[WKSelectSinglePicker initWithView:]):
(-[WKSelectSinglePicker controlEndEditing]):
(-[WKSelectSinglePicker pickerView:numberOfRowsInComponent:]):
(-[WKSelectSinglePicker pickerView:attributedTitleForRow:forComponent:]):
(-[WKSelectSinglePicker pickerView:didSelectRow:inComponent:]):
* UIProcess/ios/forms/WKFormSelectPopover.mm:
(-[WKSelectTableViewController initWithView:hasGroups:]):
(-[WKSelectTableViewController tableView:numberOfRowsInSection:]):
(-[WKSelectTableViewController tableView:titleForHeaderInSection:]):
(-[WKSelectTableViewController findItemIndexAt:]):
(-[WKSelectTableViewController findItemAt:]):
(-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
(-[WKSelectTableViewController tableView:didSelectRowAtIndexPath:]):
(-[WKSelectPopover initWithView:hasGroups:]):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::elementDidFocus):
(WebKit::WebChromeClient::elementDidRefocus):
(WebKit::WebChromeClient::elementDidBlur):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didStartPageTransition):
(WebKit::WebPage::setTextAsync):
(WebKit::WebPage::resetFocusedElementForFrame):
(WebKit::WebPage::elementDidRefocus):
(WebKit::WebPage::elementDidFocus):
(WebKit::WebPage::elementDidBlur):
(WebKit::WebPage::didCommitLoad):
(WebKit::WebPage::resetAssistedNodeForFrame): Deleted.
* WebProcess/WebPage/WebPage.h:

Refactor elementDid{Refocus|Focus|Blur} to take `Element&` rather than `Node*`.

* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:

Replace m_assistedNode (a `RefPtr<Node>`) with m_focusedElement (a `RefPtr<Element>`).

(WebKit::WebPage::platformEditorState const):
(WebKit::WebPage::completeSyntheticClick):
(WebKit::WebPage::requestFocusedElementInformation):
(WebKit::WebPage::blurFocusedElement):
(WebKit::WebPage::setFocusedElementValue):
(WebKit::WebPage::setFocusedElementValueAsNumber):
(WebKit::WebPage::setFocusedElementSelectedIndex):
(WebKit::innerFrameQuad):
(WebKit::constrainPoint):
(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::startAutoscrollAtPosition):
(WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
(WebKit::WebPage::selectPositionAtPoint):
(WebKit::WebPage::selectPositionAtBoundaryWithDirection):
(WebKit::WebPage::rangeForGranularityAtPoint):
(WebKit::WebPage::selectTextWithGranularityAtPoint):
(WebKit::WebPage::updateSelectionWithExtentPointAndBoundary):
(WebKit::WebPage::updateSelectionWithExtentPoint):
(WebKit::WebPage::getPositionInformation):
(WebKit::WebPage::focusNextFocusedElement):
(WebKit::WebPage::getFocusedElementInformation):
(WebKit::WebPage::autofillLoginCredentials):
(WebKit::WebPage::requestAssistedNodeInformation): Deleted.
(WebKit::WebPage::blurAssistedNode): Deleted.
(WebKit::WebPage::setAssistedNodeValue): Deleted.
(WebKit::WebPage::setAssistedNodeValueAsNumber): Deleted.
(WebKit::WebPage::setAssistedNodeSelectedIndex): Deleted.
(WebKit::WebPage::focusNextAssistedNode): Deleted.
(WebKit::WebPage::getAssistedNodeInformation): Deleted.

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

2 years agoUnreviewed, rolling out r239417.
ryanhaddad@apple.com [Thu, 20 Dec 2018 18:32:38 +0000 (18:32 +0000)]
Unreviewed, rolling out r239417.

Introduced two API test failures on macOS.

Reverted changeset:

"<rdar://problem/46194315> macOS: WebKit1 does not handle
occlusion changes"
https://bugs.webkit.org/show_bug.cgi?id=192821
https://trac.webkit.org/changeset/239417

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

2 years agoWeb Inspector: UIString should take an optional key and description to aid localization
drousso@apple.com [Thu, 20 Dec 2018 18:29:45 +0000 (18:29 +0000)]
Web Inspector: UIString should take an optional key and description to aid localization
https://bugs.webkit.org/show_bug.cgi?id=153962
<rdar://problem/24542505>

Reviewed by Brian Burg.

Source/WebInspectorUI:

* UserInterface/Base/LoadLocalizedStrings.js:
(WI.UIString):

* UserInterface/Test/Test.js:
(WI.UIString):

* UserInterface/Views/AuditTestGroupContentView.js:
(WI.AuditTestGroupContentView.prototype.initialLayout):

Tools:

* Scripts/extract-localizable-js-strings:

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

2 years agoWKWebView default UA doesn't freeze the build number
bfulgham@apple.com [Thu, 20 Dec 2018 18:27:46 +0000 (18:27 +0000)]
WKWebView default UA doesn't freeze the build number
https://bugs.webkit.org/show_bug.cgi?id=192809
<rdar://problem/44687185>

Reviewed by Andy Estes.

Always reports the frozen build number.

Source/WebKit:

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(defaultApplicationNameForUserAgent): Do not expose the actual build number through this API.

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(-[WebView _setBrowserUserAgentProductVersion:buildVersion:bundleVersion:]): Do not report the
actual build number through this method call.
(-[WebView _setUIWebViewUserAgentWithBuildVersion:]): Ditto.

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

2 years ago[iOS] Layout Test imported/w3c/web-platform-tests/service-workers/service-worker...
ryanhaddad@apple.com [Thu, 20 Dec 2018 18:25:09 +0000 (18:25 +0000)]
[iOS] Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/update-registration-with-type.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=192938

Unreviewed test gardening.

* platform/ios/TestExpectations: Mark test as flaky.

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

2 years agoWeb Inspector: Audits: don't cache default audits
drousso@apple.com [Thu, 20 Dec 2018 18:15:46 +0000 (18:15 +0000)]
Web Inspector: Audits: don't cache default audits
https://bugs.webkit.org/show_bug.cgi?id=192918
<rdar://problem/46626543>

Reviewed by Brian Burg.

Instead of adding the default audits to the "audits" `WI.ObjectStore`, which preserves them
across WebInspector sessions, load them every time WebInspector is opened (unless there are
existing audits) so that the localized strings are able to respond to locale changes.

* UserInterface/Controllers/AuditManager.js:
(WI.AuditManager.prototype.removeTest):
(WI.AuditManager.prototype.addDefaultTestsIfNeeded):

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

2 years agoAdded a dark mode color scheme.
jond@apple.com [Thu, 20 Dec 2018 18:14:52 +0000 (18:14 +0000)]
Added a dark mode color scheme.
https://bugs.webkit.org/show_bug.cgi?id=192930

Reviewed by Timothy Hatcher.

* .htaccess: Added convenience redirects for /features and /css-features
* wp-content/themes/webkit/build-archives.php: Customized dark color styles for the page.
* wp-content/themes/webkit/css-status.php: Implemented new design and dark styles support.
* wp-content/themes/webkit/front-header.php: Added dark color styles.
* wp-content/themes/webkit/functions.php: Added new feature status navigation menu.
* wp-content/themes/webkit/header.php: Specify support for light and dark color schemes.
* wp-content/themes/webkit/images/chevron-dark.svg: Added.
* wp-content/themes/webkit/images/chevron.svg: Switch to HSL color.
* wp-content/themes/webkit/images/filter.svg: Added.
* wp-content/themes/webkit/images/icons.svg: Use currentColor for dark mode.
* wp-content/themes/webkit/images/invert-lightness.svg: Added.
* wp-content/themes/webkit/images/search.svg: Added.
* wp-content/themes/webkit/sitemap.php: Customized dark color styles for the page.
* wp-content/themes/webkit/status.php: Updated design and dark styles support.
* wp-content/themes/webkit/style.css: Added dark style rules and switched to custom properties.
(:root):
(@media(prefers-color-scheme:dark)):
(body):
(a):
(a,):
(hr):
(code):
(main):
(a[name]):
(p > a[name]::before):
(a[name]:hover):
(a[name]:hover::before):
(p:hover > a[name]::before):
(input[type=text]):
(input[type=submit]):
(.screen-reader-text:focus):
(.pagination .page-numbers,):
(.pagination .menu-item a):
(.pagination .page-numbers:not(.current, .dots):hover):
(.pagination .dots,):
(.connected.pagination .menu-item):
(.connected.pagination .menu-item:hover a):
(.connected.pagination .menu-item:first-child a):
(.connected.pagination .menu-item:last-child a):
(.connected.pagination .menu-item.current-menu-item a,):
(.menu-feature-pages-container):
(.nextrouter):
(.nextrouter.previous):
(.nextrouter:hover,):
(.nextrouter a):
(.nextrouter-copy):
(.nextrouter .label):
(.nextrouter .link):
(.tiles):
(.tile):
(.tile .background-image):
(.tile .background-image svg):
(.tile.category-web-inspector svg):
(.tile.category-performance svg):
(.tile.category-javascript svg):
(.tile.category-css svg):
(.tile.category-standards svg):
(.tile.category-contributing svg):
(.tile.category-storage svg):
(.tile.category-layout svg):
(.tile.category-safari-technology-preview svg):
(.tile.category-accessibility svg):
(.tile.category-security svg):
(.tile.category-privacy svg):
(.tile .background-image.loaded):
(.tile:not(.has-post-thumbnail) .background-image,):
(.featured-tile .tile-content):
(.background-vignette):
(.tag-window .background-image):
(.tag-window .background-vignette):
(.featured-tile.tag-dark .background-vignette):
(.featured-tile.tag-dark .tile-content):
(.featured-tile.tag-dark .tile-content a):
(.icon-tile .icon):
(.icon-tile,):
(.gray-tile):
(.gray-tile a):
(.amber-tile):
(.blue-tile):
(.twitter-tile):
(.icon.twitter-icon):
(pre):
(code .keyword,):
(code .keyword.builtin,):
(code .keyword.type):
(code .preprocessor):
(code .comment):
(code .comment .doc):
(code .identifier):
(code .string,):
(code .escaped):
(code .number,):
(code .regex,):
(code .attribute.value):
(code .operator):
(code .keyword.operator):
(code .whitespace):
(code .error):
(code .doctype):
(code .property):
(code.xml .comment,):
(code.xml .preprocessor .keyword):
(code.xml .meta,):
(code.cpp .preprocessor .identifier):
(pre::-moz-selection,):
(pre::selection, pre span::selection):
(code.css .attribute,):
(code.css .keyword):
(code.css .number):
(article h1,):
(article .byline p):
(article thead, article tfoot):
(article tr):
(article blockquote):
(.post .bodycopy > p:last-child:after):
(article div.note):
(article .foreword):
(article .cliptop):
(article .clipbottom):
(article .clipright):
(article .clipleft):
(article .mattewhite):
(article .mattewhite:not(.widescreen)):
(figure.table):
(article figcaption):
(article figcaption::before):
(.table-of-contents):
(.site-logo):
(.feature-header:after,):
(header nav a,):
(header nav a:hover,):
(.sub-menu-layer):
(.sub-menu-layer:after):
(.sub-menu-layer:before):
(@media only screen and (max-width: 920px)):
(header .menu):
(header nav a):
(header .menu > .menu-item > .sub-menu):
(@media only screen and (max-width: 690px)):
(article .scrollable):
(@media only screen and (max-width: 600px)):
(.table-of-contents label:after):
(@media only screen and (max-width: 415px)):
(article .invert-brightness,):
(.preserve-color, video):
(.preserve-color:hover,):
(.nextrouter .link,):
(.search-input):
(.filters-toggle-button):
(a > code): Deleted.
(.pagination .page-numbers): Deleted.
(.nextrouter:hover): Deleted.
(.nextrouter.previous:hover): Deleted.
(.icon-tile, .icon-tile a): Deleted.
(.gray-tile, .gray-tile a): Deleted.
(code .string, code .char): Deleted.
(code .number, code .tag): Deleted.
(code .regex, code .attribute): Deleted.
(code.xml .meta, code.xml .meta .keyword): Deleted.
(code::-moz-selection, code span::-moz-selection): Deleted.
(code::selection, code span::selection): Deleted.
(article h1 a): Deleted.
(.feature-header:after): Deleted.
(.feature.opened .feature-header:after): Deleted.
* wp-content/themes/webkit/team.php: Customized dark color styles for the page.

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

2 years agoSwitch tabs before retuning PiP video to inline.
commit-queue@webkit.org [Thu, 20 Dec 2018 18:11:31 +0000 (18:11 +0000)]
Switch tabs before retuning PiP video to inline.
https://bugs.webkit.org/show_bug.cgi?id=192767
rdar://problem/46006046

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-12-20
Reviewed by Jer Noble.

No new tests because this code path only happens with a user action on system UI.

When exiting PiP, notify the fullscreen change observer so it can restore client UI state before exiting.

* platform/mac/VideoFullscreenInterfaceMac.mm:
(-[WebVideoFullscreenInterfaceMacObjC pipShouldClose:]):

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

2 years agoEnable MediaCapabilities by default.
jer.noble@apple.com [Thu, 20 Dec 2018 18:08:14 +0000 (18:08 +0000)]
Enable MediaCapabilities by default.
https://bugs.webkit.org/show_bug.cgi?id=192340
<rdar://problem/46435149>

Reviewed by Dean Jackson.

* Shared/WebPreferences.yaml:

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

2 years agoWebDriver: Session::findElements should handle user prompts
commit-queue@webkit.org [Thu, 20 Dec 2018 17:45:18 +0000 (17:45 +0000)]
WebDriver: Session::findElements should handle user prompts
https://bugs.webkit.org/show_bug.cgi?id=192928

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2018-12-20
Reviewed by Michael Catanzaro.

All user prompt tests for commands using Session::findElements are failing because of this.

* Session.cpp:
(WebDriver::Session::findElements):

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

2 years ago[GTK] WebDriver: tests in imported/w3c/webdriver/tests/element_clear/user_prompts...
commit-queue@webkit.org [Thu, 20 Dec 2018 17:44:39 +0000 (17:44 +0000)]
[GTK] WebDriver: tests in imported/w3c/webdriver/tests/element_clear/user_prompts.py are failing
https://bugs.webkit.org/show_bug.cgi?id=192927

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2018-12-20
Reviewed by Michael Catanzaro.

Source/WebDriver:

Handle user prompts in element clear command.

* Session.cpp:
(WebDriver::Session::elementClear):

Source/WebKit:

Give the focus back to the web view when a dialog is dismissed.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseContainerRemove):

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

2 years agoWeb Inspector: Dark Mode: unreadable background color for tables containing object...
drousso@apple.com [Thu, 20 Dec 2018 17:37:56 +0000 (17:37 +0000)]
Web Inspector: Dark Mode: unreadable background color for tables containing object previews
https://bugs.webkit.org/show_bug.cgi?id=192887
<rdar://problem/46855270>

Reviewed by Brian Burg.

* UserInterface/Views/LogContentView.css:
(.console-messages:focus .console-item .data-grid tr.selected td:not(:last-child)): Added.
(@media (prefers-dark-interface) .console-item .data-grid tr.selected): Added.
(@media (prefers-dark-interface) .console-messages:focus .console-item.selected .data-grid tr.selected): Added.
(@media (prefers-dark-interface) .console-messages:focus .console-item .data-grid tr.selected td:not(:last-child)): Added.

* UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
(.content-view.indexed-database-object-store > .data-grid tr.selected):
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected): Added.
(@media (prefers-dark-interface) .content-view.indexed-database-object-store > .data-grid tr.selected): Added.
(@media (prefers-dark-interface) .content-view.indexed-database-object-store > .data-grid:focus tr.selected): Added.
(@media (prefers-dark-interface) .content-view.indexed-database-object-store > .data-grid:focus tr.selected td:not(:last-child)): Added.

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

2 years agoUnparented WKWebView can't retrieve main resource data for a main frame plugin
timothy_horton@apple.com [Thu, 20 Dec 2018 17:35:17 +0000 (17:35 +0000)]
Unparented WKWebView can't retrieve main resource data for a main frame plugin
https://bugs.webkit.org/show_bug.cgi?id=192923
<rdar://problem/46859068>

Reviewed by Wenson Hsieh.

Source/WebKit:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::liveResourceData const):
If the WKWebView is unparented, we may not immediately initialize the plugin.
In that case, PluginView holds on to the backing data until the plugin
is initialized. If a WKWebView API client asks for the backing data
for the plugin during this time, we should return it, instead of bailing.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/WebKitCocoa/GetResourceData.mm:
Add a test ensuring that both parented and unparented WKWebViews can
retrieve main resource data when loading a PDF.

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

2 years ago[iOS] Focusing an editable element should scroll to reveal the selection
wenson_hsieh@apple.com [Thu, 20 Dec 2018 16:28:55 +0000 (16:28 +0000)]
[iOS] Focusing an editable element should scroll to reveal the selection
https://bugs.webkit.org/show_bug.cgi?id=192802
<rdar://problem/46781759>

Reviewed by Tim Horton.

Source/WebKit:

Currently, when tapping on an editable element, logic in -[WKWebView _zoomToFocusRect:…:] attempts to adjust the
visible viewport such that the rect containing the selection is visible. However, AssistedNodeInformation's
selectionRect is used here, which (as the FIXME in WebPage::getAssistedNodeInformation notes) is either the last
touch location, or the top left of the element if the touch location is outside of the element's bounding rect.
This leads to confusing and undesirable behavior when tapping near the bottom of a large contenteditable element
to focus it, since the actual selection will end up near the top of the element, yet we'll try to scroll to
reveal the bottom of the element, which causes the visible selection to scroll offscreen. Notably, this affects
scenarios involving editable web views embedded in apps, such as Mail compose.

Right now, we use the last touch location as an approximation for the selection rect because the selection may
have not yet been updated at the moment when focus moves into an editable element. To fix this, we defer the
process of zooming to the focused element rect until after the selection changes and the UI process is updated
with information about the new selection rects.

Test: editing/selection/ios/selection-is-visible-after-focusing-editable-area.html

* Shared/AssistedNodeInformation.cpp:
(WebKit::AssistedNodeInformation::encode const):
(WebKit::AssistedNodeInformation::decode):
* Shared/AssistedNodeInformation.h:

Rename selectionRect to elementInteractionLocation, to more accurately reflect its value and purpose. This isn't
strictly always the last touch location, since we may default to the focused element location instead if the
last touch location is outside of the element rect.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _zoomToFocusRect:selectionRect:insideFixed:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):

Tweak a constant that determines the minimum amount of margin to leave between the selection rect and the edge
of the window when scrolling to reveal the focused element. Previously, this was larger than necessary to
accomodate for the fact that the "selection rect" used when zooming to the focused element did not take the
actual selection into account at all, and was simply a 1 by 1 rect; this meant that the margin needed to be
large enough to exceed the usual height of a text caret in editable content. Since we now use the real selection
rect, we can be much less generous with this margin.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
(-[WKContentView observeValueForKeyPath:ofObject:change:context:]):

Don't additionally update the selection in the middle of triggering zooming to the focused element; on
particular versions of iOS, this now attempts to scroll the selection rect on-screen, which then conflicts with
zooming to reveal the focused element.

(-[WKContentView _zoomToRevealFocusedElement]):

Renamed from _displayFormNodeInputView to _zoomToRevealFocusedElement, to make the purpose of this function more
clear. Additionally, pull logic to update the accessory view out of this method, so that it's strictly concerned
with zooming to the focused element.

(-[WKContentView inputView]):

Add a FIXME describing the implications of zooming to the focused element in the implementation of -inputView.
See also: <https://bugs.webkit.org/show_bug.cgi?id=192878>.

(-[WKContentView accessoryTab:]):

Fix a subtle issue when keeping track of _didAccessoryTabInitiateFocus. Currently, this is set to YES in
-accessoryTab: and unset in _displayFormNodeInputView, but since _displayFormNodeInputView may be invoked
multiple times for the same focused element (see: -inputView), we might end up zooming to the focused element
with _didAccessoryTabInitiateFocus set to NO, even though we initiated focus with the previous/next buttons.

Instead, temporarily set a different ivar, _isChangingFocusUsingAccessoryTab, to YES in -accessoryTab:, and
unset it in the completion handler after the focused element has changed. Then, when we _startAssistingNode:,
set _didAccessoryTabInitiateFocus to _isChangingFocusUsingAccessoryTab. This ensures that the correctness of
_didAccessoryTabInitiateFocus isn't tied to the number of times -[WKContentView inputView] is invoked when
focusing an element.

(shouldZoomToRevealSelectionRect):
(rectToRevealWhenZoomingToFocusedElement):

Add a helper method to determine the selection rect to use when zooming to reveal the focused element. ASSERTs
that we have post-layout data in the EditorState.

(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):

When "assisting" a focused element, immediately zoom to it if we don't need selection information to compute the
rect to zoom to; otherwise, defer zooming until we receive the first editor state update in the UI process that
contains information about our selection rects.

(-[WKContentView _stopAssistingNode]):
(-[WKContentView _didReceiveEditorStateUpdateAfterFocus]):

If necessary, reveal the focused element by zooming.

(-[WKContentView _updateInitialWritingDirectionIfNecessary]):

Pull this initial writing direction update logic out into a separate helper method.

(-[WKContentView _displayFormNodeInputView]): Deleted.

Replaced by _zoomToRevealFocusedElement.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::elementDidRefocus):

This currently calls WebChromeClient::elementDidFocus; instead, call the new WebPage::elementDidRefocus;
additionally, make this available on all PLATFORM(COCOA), rather than just IOS_FAMILY.

* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::elementDidRefocus): Deleted.

Replaced by the PLATFORM(COCOA) version.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::elementDidRefocus):

When refocusing an element, ensure that post-layout editor state data is sent to the UI process by including a
full EditorState in the next layer tree transaction.

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

Call elementDidRefocus instead of elementDidFocus, in the case where the existing focused element is clicked.

(WebKit::WebPage::getAssistedNodeInformation):

Adjust for the change from selectionRect to elementInteractionLocation.

LayoutTests:

Adds a new layout test to verify that tapping near the bottom of a tall editable element to focus it doesn't
cause the page to scroll up (and, as a result, leave the selection caret obscured).

* editing/selection/ios/selection-is-visible-after-focusing-editable-area-expected.txt: Added.
* editing/selection/ios/selection-is-visible-after-focusing-editable-area.html: Added.

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

2 years ago[GTK][WPE] Grant the sandbox read access to XDG_DATA_HOME/prgname
commit-queue@webkit.org [Thu, 20 Dec 2018 16:18:26 +0000 (16:18 +0000)]
[GTK][WPE] Grant the sandbox read access to XDG_DATA_HOME/prgname
https://bugs.webkit.org/show_bug.cgi?id=192929

Patch by Patrick Griffis <pgriffis@igalia.com> on 2018-12-20
Reviewed by Michael Catanzaro.

* UIProcess/API/glib/WebKitWebContext.cpp:
* UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::bubblewrapSpawn):

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

2 years agoJSTests:
tzagallo@apple.com [Thu, 20 Dec 2018 16:06:44 +0000 (16:06 +0000)]
JSTests:
WTF::String and StringImpl overflow MaxLength
https://bugs.webkit.org/show_bug.cgi?id=192853
<rdar://problem/45726906>

Reviewed by Mark Lam.

* stress/string-16bit-repeat-overflow.js: Added.
(catch):

Source/WTF:
Consistently use MaxLength for all WTF strings
https://bugs.webkit.org/show_bug.cgi?id=192853
<rdar://problem/45726906>

Reviewed by Mark Lam.

MaxLength was introduced to be INT_MAX for WTF::String and StringImpl,
but all the assertions were still done using UINT_MAX. Change it to
use MaxLength for all checks.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createUninitializedInternalNonEmpty):
(WTF::StringImpl::reallocateInternal):
(WTF::StringImpl::create):
(WTF::StringImpl::convertToLowercaseWithoutLocale):
(WTF::StringImpl::convertToUppercaseWithoutLocale):
(WTF::StringImpl::convertToLowercaseWithLocale):
(WTF::StringImpl::convertToUppercaseWithLocale):
(WTF::StringImpl::foldCase):
(WTF::StringImpl::find):
(WTF::StringImpl::replace):
(WTF::StringImpl::utf8ForCharacters):
(WTF::StringImpl::tryGetUtf8ForRange const):
* wtf/text/StringImpl.h:
(WTF::lengthOfNullTerminatedString):
(WTF::StringImpl::tryCreateUninitialized):
(WTF::StringImpl::adopt):
(WTF::StringImpl::maxInternalLength):
* wtf/text/WTFString.cpp:
(WTF::String::append):
(WTF::String::insert):
(WTF::String::fromUTF8):
* wtf/text/WTFString.h:
(WTF::String::reverseFind const):

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

2 years ago[BigInt] We should enable CSE into arithmetic operations that speculate BigIntUse
ticaiolima@gmail.com [Thu, 20 Dec 2018 11:59:05 +0000 (11:59 +0000)]
[BigInt] We should enable CSE into arithmetic operations that speculate BigIntUse
https://bugs.webkit.org/show_bug.cgi?id=192723

Reviewed by Yusuke Suzuki.

PerformanceTests:

* BigIntBench/big-int-cse.js: Added.
* BigIntBench/big-int-global-cse.js: Added.
* BigIntBench/big-int-licm.js: Added.

Source/JavaScriptCore:

This patch is adjusting clobberize rules into ValueOp nodes to enable
more optimizations when we speculate BigIntUse. In such case, DFG now
is able to apply CSE, LICM and commutativity on nodes like
ValueAdd(BigInt, BigInt), ValueSub(BigInt, BigInt), etc.

Here are the numbers we can observe with some microbenchmarks:

                          baseline                 changes

big-int-cse           108.2733+-0.8445    ^    80.9897+-4.9781   ^ definitely 1.3369x faster
big-int-licm          75.6641+-0.3477     ^    57.8144+-1.6043   ^ definitely 1.3087x faster
big-int-global-cse    145.3557+-1.0552    ^    86.5866+-0.3025   ^ definitely 1.6787x faster

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):

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

2 years ago[PSON] SuspendedPageProxy fails to release its process assertion if the WebPage fails...
cdumez@apple.com [Thu, 20 Dec 2018 09:12:27 +0000 (09:12 +0000)]
[PSON] SuspendedPageProxy fails to release its process assertion if the WebPage fails to enter PageCache
https://bugs.webkit.org/show_bug.cgi?id=192873

Reviewed by Antti Koivisto.

SuspendedPageProxy fails to release its process assertion if the WebPage fails to enter PageCache, preventing
the process from suspending on iOS.

* UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::didProcessRequestToSuspend):
(WebKit::SuspendedPageProxy::didReceiveMessage):
(WebKit::SuspendedPageProxy::didSuspend): Deleted.
(WebKit::SuspendedPageProxy::didFailToSuspend): Deleted.
* UIProcess/SuspendedPageProxy.h:

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

2 years ago[GTK][WPE] Bump webkitgtk-test-fonts to 0.0.8
commit-queue@webkit.org [Thu, 20 Dec 2018 08:45:22 +0000 (08:45 +0000)]
[GTK][WPE] Bump webkitgtk-test-fonts to 0.0.8
https://bugs.webkit.org/show_bug.cgi?id=192852

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2018-12-20
Reviewed by Michael Catanzaro.

EmojiOne font was replaced by Noto Color Emoji.

* WebKitTestRunner/gtk/fonts/fonts.conf: Use Noto Color Emoji when Apple Color Emoji font family is used in tests.
* gtk/jhbuild.modules:
* wpe/jhbuild.modules:

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

2 years agoUnreviewed, rolling out r239377.
commit-queue@webkit.org [Thu, 20 Dec 2018 07:36:00 +0000 (07:36 +0000)]
Unreviewed, rolling out r239377.
https://bugs.webkit.org/show_bug.cgi?id=192921

broke 32-bit JSC tests (Requested by keith_miller on #webkit).

Reverted changeset:

"[BigInt] We should enable CSE into arithmetic operations that
speculate BigIntUse"
https://bugs.webkit.org/show_bug.cgi?id=192723
https://trac.webkit.org/changeset/239377

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

2 years agoWeb Inspector: Audit: fix descriptions for default tests
drousso@apple.com [Thu, 20 Dec 2018 06:48:32 +0000 (06:48 +0000)]
Web Inspector: Audit: fix descriptions for default tests
https://bugs.webkit.org/show_bug.cgi?id=192764
<rdar://problem/46729437>

Reviewed by Matt Baker.

* UserInterface/Controllers/AuditManager.js:
(WI.AuditManager.prototype.addDefaultTestsIfNeeded):

* Localizations/en.lproj/localizedStrings.js:

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

2 years agoWeb Inspector: "E" icon on debugger dashboard is too close to current function name
nvasilyev@apple.com [Thu, 20 Dec 2018 06:39:19 +0000 (06:39 +0000)]
Web Inspector: "E" icon on debugger dashboard is too close to current function name
https://bugs.webkit.org/show_bug.cgi?id=192915

Reviewed by Matt Baker.

* UserInterface/Views/DebuggerDashboardView.css:
(.dashboard.debugger > .location):
(body[dir=ltr] .dashboard.debugger > .location :matches(.function-icon, .event-listener-icon)):
(body[dir=rtl] .dashboard.debugger > .location :matches(.function-icon, .event-listener-icon)):
(.dashboard.debugger > .location .function-icon): Deleted.
(body[dir=ltr] .dashboard.debugger > .location .function-icon): Deleted.
(body[dir=rtl] .dashboard.debugger > .location .function-icon): Deleted.

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

2 years agoUnreviewed follow-up to r192914.
ross.kirsling@sony.com [Thu, 20 Dec 2018 06:24:05 +0000 (06:24 +0000)]
Unreviewed follow-up to r192914.

* test262/expectations.yaml:
Add the last 20 missing expectations.

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

2 years agoWeb Inspector: Dark Mode: ThreadTreeElement status icon is hard to see when hovered
nvasilyev@apple.com [Thu, 20 Dec 2018 06:21:06 +0000 (06:21 +0000)]
Web Inspector: Dark Mode: ThreadTreeElement status icon is hard to see when hovered
https://bugs.webkit.org/show_bug.cgi?id=192097
<rdar://problem/46318421>

Reviewed by Matt Baker.

* UserInterface/Views/ThreadTreeElement.css:
(.tree-outline > .item.thread .status-button.resume):
(.tree-outline > .item.thread .status-button.resume:active):

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

2 years agoFix test262 expectations
keith_miller@apple.com [Thu, 20 Dec 2018 05:00:30 +0000 (05:00 +0000)]
Fix test262 expectations
https://bugs.webkit.org/show_bug.cgi?id=192914

Unreviewed, when I imported the latest round of test262 tests I must have failed to update the test expectations.

* test262/expectations.yaml:

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

2 years agoUnreviewed, fix GTK build after r239410
mcatanzaro@igalia.com [Thu, 20 Dec 2018 04:46:27 +0000 (04:46 +0000)]
Unreviewed, fix GTK build after r239410

It added a new file to the build, breaking the unified sources magic that obscured a bug in
URLSoup.h. It forward-declares URL, but this never worked unless the URL.h header was
included via another source file in the unified source bundle.

* platform/network/soup/URLSoup.h:

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

2 years agowtf/Optional.h: move-constructor and move-assignment operator should disengage the...
cdumez@apple.com [Thu, 20 Dec 2018 04:41:11 +0000 (04:41 +0000)]
wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from
https://bugs.webkit.org/show_bug.cgi?id=192728
<rdar://problem/46746779>

Reviewed by Geoff Garen.

Source/JavaScriptCore:

* API/*:
* Scripts/*:
* assembler/*:
* b3/*:
* bytecode/*:
* bytecompiler/*:
* debugger/*:
* dfg/*:
* ftl/*:
* heap/*:
* inspector/*:
* jit/*:
* llint/*:
* parser/*:
* runtime/*:
* tools/*:
* wasm/*:
* yarr/*:

Source/WebCore:

* Modules/*:
* animation/*:
* bindings/*:
* crypto/*:
* css/*:
* dom/*:
* editing/*:
* fileapi/*:
* html/*:
* inspector/*:
* layout/*:
* loader/*:
* mathml/*:
* page/*:
* platform/*:
* plugins/*:
* rendering/*:
* testing/*:
* workers/*:
* xml/*:

Source/WebCore/PAL:

* pal/*:

Source/WebDriver:

* :

Source/WebKit:

* NetworkProcess/*:
* Platform/*:
* Scripts/*:
* Shared/*:
* UIProcess/*:
* WebProcess/*:

Source/WebKitLegacy/mac:

* DOM/*:
* Plugins/*:
* WebCoreSupport/*:
* WebView/*:

Source/WebKitLegacy/win:

* Plugins/*:
* WebCoreSupport/*:

Source/WTF:

Update optional's move-constructor and move-assignment operator to disengage the value being moved from.
Rename to optional to Optional, make_optional() to makeOptional(), and move class from std to WTF namespace.

Based on patch by David Kilzer.

* wtf/*:

Tools:

* DumpRenderTree/*:
* MiniBrowser/*:
* TestRunnerShared/*:
* TestWebKitAPI/*:
* WebGPUAPIStructure/*:
* WebKitTestRunner/*:

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

2 years agoUnreviewed, silence -Wpragmas warning
mcatanzaro@igalia.com [Thu, 20 Dec 2018 04:26:57 +0000 (04:26 +0000)]
Unreviewed, silence -Wpragmas warning

* WebProcess/WebCoreSupport/WebAlternativeTextClient.h:

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

2 years agoUpdate test262 tests.
keith_miller@apple.com [Thu, 20 Dec 2018 04:17:37 +0000 (04:17 +0000)]
Update test262 tests.
https://bugs.webkit.org/show_bug.cgi?id=192907

Rubber stamped by Mark Lam.

* test262/*: Omitted because prepare-changelog crashes.

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

2 years ago[WinCairo] Unreviewed test gardening.
ross.kirsling@sony.com [Thu, 20 Dec 2018 04:11:15 +0000 (04:11 +0000)]
[WinCairo] Unreviewed test gardening.

* platform/wincairo/TestExpectations:

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

2 years agoHTTPS Upgrade: Use full sqlite upgrade list
commit-queue@webkit.org [Thu, 20 Dec 2018 04:04:06 +0000 (04:04 +0000)]
HTTPS Upgrade: Use full sqlite upgrade list
https://bugs.webkit.org/show_bug.cgi?id=192736
<rdar://problem/45851427>

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

* NetworkProcess/NetworkHTTPSUpgradeChecker.cpp: Added.
(WebKit::NetworkHTTPSUpgradeCheckerDatabasePath):
(WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker):
(WebKit::NetworkHTTPSUpgradeChecker::~NetworkHTTPSUpgradeChecker):
(WebKit::NetworkHTTPSUpgradeChecker::query):
(WebKit::NetworkHTTPSUpgradeChecker::isAlwaysOnLoggingAllowed const):
* NetworkProcess/NetworkHTTPSUpgradeChecker.h: Added.
(WebKit::NetworkHTTPSUpgradeChecker::didSetupCompleteSuccessfully const):
* NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded const):
(WebKit::NetworkLoadChecker::checkRequest):
* NetworkProcess/NetworkLoadChecker.h:
* NetworkProcess/NetworkProcess.h:
(WebKit::NetworkProcess::networkHTTPSUpgradeChecker):
* Sources.txt:
* WebKit.xcodeproj/project.pbxproj:

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

2 years agoWeb Inspector: Uncaught Exception: TypeError: null is not an object (evaluating ...
drousso@apple.com [Thu, 20 Dec 2018 04:00:01 +0000 (04:00 +0000)]
Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'effectiveDOMNode.enabledPseudoClasses')
https://bugs.webkit.org/show_bug.cgi?id=192783

Reviewed by Joseph Pecoraro.

* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype._forcedPseudoClassCheckboxChanged):
(WI.GeneralStyleDetailsSidebarPanel.prototype._updatePseudoClassCheckboxes):

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

2 years agoWeb Inspector: REGRESSION (r237195): Timelines: selecting a rendering frame row moves...
drousso@apple.com [Thu, 20 Dec 2018 03:57:10 +0000 (03:57 +0000)]
Web Inspector: REGRESSION (r237195): Timelines: selecting a rendering frame row moves the time selection
https://bugs.webkit.org/show_bug.cgi?id=192773
<rdar://problem/46782446>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/TimelineOverview.js:
(WI.TimelineOverview.prototype._recordSelected):
The Frames timeline uses `frameIndex` instead of `startTime`/`endTime`, so when trying to
ensure that the selected record is within the filtered range, use `frameIndex` instead.
The associated `WI.TimelineRuler` will already be using an index-based approach for
selection, so this will match.

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

2 years agoWeb Inspector: Canvas: the recording auto-capture input shouldn't start focused
drousso@apple.com [Thu, 20 Dec 2018 03:56:27 +0000 (03:56 +0000)]
Web Inspector: Canvas: the recording auto-capture input shouldn't start focused
https://bugs.webkit.org/show_bug.cgi?id=192454

Reviewed by Joseph Pecoraro.

* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel):
(WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged):

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

2 years agoLeak of MTAudioProcessingTap (304 bytes) in com.apple.WebKit.WebContent running WebKi...
jer.noble@apple.com [Thu, 20 Dec 2018 03:24:28 +0000 (03:24 +0000)]
Leak of MTAudioProcessingTap (304 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
https://bugs.webkit.org/show_bug.cgi?id=192896
<rdar://46732186>

Reviewed by Eric Carlson.

* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
(WebCore::AudioSourceProviderAVFObjC::initCallback):

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

2 years agoRefresh usrsctplib to M72
youenn@apple.com [Thu, 20 Dec 2018 01:45:29 +0000 (01:45 +0000)]
Refresh usrsctplib to M72
https://bugs.webkit.org/show_bug.cgi?id=192863

Reviewed by Alex Christensen.

* Source/third_party/usrsctp/: Resynced to Chrome M72 branch.

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

2 years ago<rdar://problem/46194315> macOS: WebKit1 does not handle occlusion changes
benjamin@webkit.org [Thu, 20 Dec 2018 01:41:35 +0000 (01:41 +0000)]
<rdar://problem/46194315> macOS: WebKit1 does not handle occlusion changes
https://bugs.webkit.org/show_bug.cgi?id=192821

Reviewed by Chris Dumez.

Source/WebKitLegacy/mac:

When a window becomes occluded, the window server informs the application.
This should be used to suspend any work that is not visible by the user.

WebKit2 handles it just fine, but WebKit1 did not handle the notification.
In some cases, that lead to performance impact (see radar).

This patch adds an observer for the occlusion notification. I tried to stick
with the same names used by WebKit2.

* WebView/WebView.mm:
(-[WebView _isViewVisible]):
(-[WebView addWindowObserversForWindow:]):
(-[WebView removeWindowObservers]):
(-[WebView _windowDidChangeOcclusionState:]):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(createWebViewAndOffscreenWindow):

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

2 years ago[GTK][WPE] Unreviewed test gardening.
aboya@igalia.com [Thu, 20 Dec 2018 01:40:11 +0000 (01:40 +0000)]
[GTK][WPE] Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=192904

* platform/gtk/TestExpectations:
* platform/gtk/animations/lineheight-animation-expected.txt: Copied from LayoutTests/platform/wpe/legacy-animation-engine/animations/lineheight-animation-expected.txt.
* platform/gtk/animations/simultaneous-start-transform-expected.txt: Copied from LayoutTests/platform/wpe/legacy-animation-engine/animations/simultaneous-start-transform-expected.txt.
* platform/gtk/animations/width-using-ems-expected.txt: Copied from LayoutTests/platform/wpe/legacy-animation-engine/animations/width-using-ems-expected.txt.
* platform/gtk/css1/font_properties/font-expected.txt:
* platform/gtk/css1/pseudo/multiple_pseudo_elements-expected.txt:
* platform/gtk/css2.1/t1508-c527-font-00-b-expected.txt:
* platform/gtk/css2.1/t1508-c527-font-06-b-expected.txt:
* platform/gtk/css2.1/t1508-c527-font-10-c-expected.txt:
* platform/gtk/fast/inline/inline-content-with-image-simple-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/eventsource/format-mime-bogus-expected.txt: Removed.
* platform/gtk/legacy-animation-engine/animations/lineheight-animation-expected.txt: Added.
* platform/gtk/legacy-animation-engine/animations/simultaneous-start-transform-expected.txt: Copied from LayoutTests/platform/wpe/legacy-animation-engine/animations/simultaneous-start-transform-expected.txt.
* platform/gtk/legacy-animation-engine/animations/width-using-ems-expected.txt: Copied from LayoutTests/platform/wpe/legacy-animation-engine/animations/width-using-ems-expected.txt.
* platform/wpe/TestExpectations:
* platform/wpe/css1/font_properties/font-expected.txt:
* platform/wpe/css1/pseudo/multiple_pseudo_elements-expected.txt:
* platform/wpe/css2.1/t1508-c527-font-00-b-expected.txt:
* platform/wpe/css2.1/t1508-c527-font-06-b-expected.txt:
* platform/wpe/css2.1/t1508-c527-font-10-c-expected.txt:
* platform/wpe/fast/inline/inline-content-with-image-simple-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/eventsource/format-mime-bogus-expected.txt: Removed.
* platform/wpe/legacy-animation-engine/animations/lineheight-animation-expected.txt:
* platform/wpe/legacy-animation-engine/animations/simultaneous-start-transform-expected.txt:
* platform/wpe/legacy-animation-engine/animations/width-using-ems-expected.txt:

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

2 years agoRefresh libyuv to M72
youenn@apple.com [Thu, 20 Dec 2018 01:37:30 +0000 (01:37 +0000)]
Refresh libyuv to M72
https://bugs.webkit.org/show_bug.cgi?id=192864

Reviewed by Alex Christensen.

* Source/third_party/libyuv: Resynced.

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

2 years agoREGRESSION (r232991): Switching to dark mode in Mail does not update the message...
timothy@apple.com [Thu, 20 Dec 2018 01:28:06 +0000 (01:28 +0000)]
REGRESSION (r232991): Switching to dark mode in Mail does not update the message view to be transparent
https://bugs.webkit.org/show_bug.cgi?id=188891
rdar://problem/42344352

Reviewed by Simon Fraser.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
Don't return early when m_layerForOverhangAreas is null to avoid skipping
setRootLayerConfigurationNeedsUpdate() and scheduleCompositingLayerUpdate().

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

2 years agoWeb Inspector: Styles: shift-clicking a color-swatch to change formats starts editing...
nvasilyev@apple.com [Thu, 20 Dec 2018 01:22:39 +0000 (01:22 +0000)]
Web Inspector: Styles: shift-clicking a color-swatch to change formats starts editing the color
https://bugs.webkit.org/show_bug.cgi?id=192784
<rdar://problem/46801028>

Reviewed by Devin Rousso.

* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):

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

2 years agoUse delegate instead of drawingDelegate in WKDrawingView
timothy_horton@apple.com [Thu, 20 Dec 2018 01:09:57 +0000 (01:09 +0000)]
Use delegate instead of drawingDelegate in WKDrawingView
https://bugs.webkit.org/show_bug.cgi?id=192899
<rdar://problem/46733339>

Reviewed by Wenson Hsieh.

* UIProcess/ios/WKDrawingView.mm:
(-[WKDrawingView initWithEmbeddedViewID:webPageProxy:]):
Do the dance.

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

2 years ago[WebGPU] Add stubs for WebGPUPipelineLayout/Descriptor and device::createPipelineLayout
justin_fan@apple.com [Thu, 20 Dec 2018 00:59:13 +0000 (00:59 +0000)]
[WebGPU] Add stubs for WebGPUPipelineLayout/Descriptor and device::createPipelineLayout
https://bugs.webkit.org/show_bug.cgi?id=192843
<rdar://problem/46820395>

Reviewed by Myles Maxfield.

Source/WebCore:

Test: webgpu/pipeline-layouts.html

Implement the emtpy WebGPUPipelineLayout interface, and enable creation via WebGPUDevice::createPipelineLayout:
* Modules/webgpu/WebGPUBindGroupLayout.cpp:
(WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
* Modules/webgpu/WebGPUBindGroupLayout.h:
(WebCore::WebGPUBindGroupLayout::bindGroupLayout const): Added getter.
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createPipelineLayout const): Added.
* Modules/webgpu/WebGPUDevice.h:
* Modules/webgpu/WebGPUDevice.idl: Enable createPipelineLayout.
* Modules/webgpu/WebGPUPipelineLayout.cpp: Added.
(WebCore::WebGPUPipelineLayout::create):
(WebCore::WebGPUPipelineLayout::WebGPUPipelineLayout):
* Modules/webgpu/WebGPUPipelineLayout.h: Added.
* Modules/webgpu/WebGPUPipelineLayout.idl: Added.
* Modules/webgpu/WebGPUPipelineLayoutDescriptor.h: Added.
* Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl: Added.
* platform/graphics/gpu/GPUDevice.cpp:
(WebCore::GPUDevice::createPipelineLayout const): Added.
* platform/graphics/gpu/GPUDevice.h:
* platform/graphics/gpu/GPUPipelineLayout.cpp: Added.
(WebCore::GPUPipelineLayout::create):
(WebCore::GPUPipelineLayout::GPUPipelineLayout):
* platform/graphics/gpu/GPUPipelineLayout.h: Added.
* platform/graphics/gpu/GPUPipelineLayoutDescriptor.h: Added.

Add files and symbols to project:
* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:

Add missing include:
* Modules/webgpu/WebGPUQueue.h:

LayoutTests:

Update bind-group-layouts and rename to match new PipelineLayout functionality.

* webgpu/bind-group-layouts-expected.txt: Removed.
* webgpu/pipeline-layouts-expected.txt: Added.
* webgpu/pipeline-layouts.html: Renamed from LayoutTests/webgpu/bind-group-layouts.html.

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

2 years agoNavigations away from the SafeBrowsing interstitial show a flash of old content
achristensen@apple.com [Thu, 20 Dec 2018 00:55:10 +0000 (00:55 +0000)]
Navigations away from the SafeBrowsing interstitial show a flash of old content
https://bugs.webkit.org/show_bug.cgi?id=192676

Reviewed by Chris Dumez.

Source/WebKit:

When a user clicks through a safe browsing warning, do not remove the warning until content is drawn for the destination.
Otherwise, the user will confusingly see the page before the warning while the navigation happens.
We can only do this for warnings caused by main frame navigations, though.  Other warnings (such as those caused by iframes)
need to be cleared immediately, and we still need to clear the warning immediately if the user has said to go back.

This change is reflected in an updated API test.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _showSafeBrowsingWarning:completionHandler:]):
* UIProcess/Cocoa/SafeBrowsingWarningCocoa.mm:
(WebKit::SafeBrowsingWarning::SafeBrowsingWarning):
* UIProcess/Cocoa/WKSafeBrowsingWarning.h:
* UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
(-[WKSafeBrowsingWarning forMainFrameNavigation]):
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::beginSafeBrowsingCheck):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::showSafeBrowsingWarning):
(WebKit::WebViewImpl::clearSafeBrowsingWarningIfForMainFrameNavigation):
* UIProcess/PageClient.h:
(WebKit::PageClient::clearSafeBrowsingWarningIfForMainFrameNavigation):
* UIProcess/SafeBrowsingWarning.h:
(WebKit::SafeBrowsingWarning::create):
(WebKit::SafeBrowsingWarning::forMainFrameNavigation const):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReachLayoutMilestone):
(WebKit::WebPageProxy::beginSafeBrowsingCheck):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/mac/PageClientImplMac.h:
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::clearSafeBrowsingWarningIfForMainFrameNavigation):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
(safeBrowsingView):
(TEST):
(-[SafeBrowsingHelper webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): Deleted.

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

2 years agoREGRESSION: [ iOS Sim ] Layout Test imported/w3c/web-platform-tests/service-workers...
ryanhaddad@apple.com [Thu, 20 Dec 2018 00:54:10 +0000 (00:54 +0000)]
REGRESSION: [ iOS Sim ] Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/update-missing-import-scripts.https.html is failing
https://bugs.webkit.org/show_bug.cgi?id=192250

Unreviewed test gardening.

* platform/ios/TestExpectations: Mark test as flaky.

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

2 years agoREGRESSION: imported/w3c/web-platform-tests/service-workers/service-worker/register...
ryanhaddad@apple.com [Thu, 20 Dec 2018 00:54:09 +0000 (00:54 +0000)]
REGRESSION: imported/w3c/web-platform-tests/service-workers/service-worker/register-closed-window.https.html is very flaky on iOS
https://bugs.webkit.org/show_bug.cgi?id=192279

Unreviewed test gardening.

* platform/ios/TestExpectations: Mark test as flaky.

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

2 years agoWeb Inspector: Elements tab: arrow key after undoing a DOM node delete selects the...
mattbaker@apple.com [Thu, 20 Dec 2018 00:46:10 +0000 (00:46 +0000)]
Web Inspector: Elements tab: arrow key after undoing a DOM node delete selects the wrong element
https://bugs.webkit.org/show_bug.cgi?id=192871
<rdar://problem/46849060>

Reviewed by Devin Rousso.

Undoing a DOM node removal reinserts the node into the DOMTreeOutline.
When the reinserted node precedes the selected node in the tree, the
SelectionController should update `_lastSelectedIndex`.

* UserInterface/Controllers/SelectionController.js:
(WI.SelectionController.prototype.didInsertItem):

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

2 years agoWeb Inspector: Audit: provide localization support for % pass display
drousso@apple.com [Thu, 20 Dec 2018 00:31:27 +0000 (00:31 +0000)]
Web Inspector: Audit: provide localization support for % pass display
https://bugs.webkit.org/show_bug.cgi?id=192870
<rdar://problem/46779245>

Reviewed by Brian Burg.

* UserInterface/Views/AuditTestGroupContentView.js:
(WI.AuditTestGroupContentView.prototype.initialLayout):
(WI.AuditTestGroupContentView.prototype.layout):
* UserInterface/Views/AuditTestGroupContentView.css:
(.content-view.audit-test-group > header > .percentage-pass):
(.content-view.audit-test-group > header > .percentage-pass > span): Added.
(@media (prefers-dark-interface) .content-view.audit-test-group > header > .percentage-pass): Added.
(@media (prefers-dark-interface) .content-view.audit-test-group > header > .percentage-pass > span): Added.
(.content-view.audit-test-group > header > .percentage-pass:not(:empty)::after): Deleted.

* Localizations/en.lproj/localizedStrings.js:

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

2 years agoSVGUseElement::findTarget should return nullptr when there is a cycle
rniwa@webkit.org [Wed, 19 Dec 2018 23:51:03 +0000 (23:51 +0000)]
SVGUseElement::findTarget should return nullptr when there is a cycle
https://bugs.webkit.org/show_bug.cgi?id=192840

Reviewed by Tim Horton.

r233366 added an early return to updateShadowTree() when there is a cycle between an use element and its target.
Consolidate this cycle detection code with the one in SVGUseElement::findTarget which detected cycles when
the SVG use element itself had a corresponding element.

No new tests since there should be no behavioral change.

* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::updateShadowTree):
(WebCore::SVGUseElement::findTarget const):

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

2 years ago[GTK][WPE] Unify TestController::platformRunUntil() and honor condition flag
aperez@igalia.com [Wed, 19 Dec 2018 23:44:48 +0000 (23:44 +0000)]
[GTK][WPE] Unify TestController::platformRunUntil() and honor condition flag
https://bugs.webkit.org/show_bug.cgi?id=192855

Reviewed by Michael Catanzaro.

* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::notifyDone): Use the WPE implementation.
(WTR::TestController::platformRunUntil): Use the WPE implementation.
* WebKitTestRunner/wpe/TestControllerWPE.cpp:
(WTR::TestController::platformRunUntil): Honor the condition flag.

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

2 years agoUI process crash when focusing an editable image
timothy_horton@apple.com [Wed, 19 Dec 2018 23:37:02 +0000 (23:37 +0000)]
UI process crash when focusing an editable image
https://bugs.webkit.org/show_bug.cgi?id=192839
<rdar://problem/46786670>

Reviewed by Wenson Hsieh.

Source/WebKit:

* SourcesCocoa.txt:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView inputView]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _stopAssistingNode]):
(-[WKContentView _installInkPickerForDrawingViewWithID:]):
(-[WKContentView _uninstallInkPicker]):
* UIProcess/ios/WKInkPickerView.h: Renamed from Source/WebKit/UIProcess/ios/WKInkPickerControl.h.
* UIProcess/ios/WKInkPickerView.mm: Renamed from Source/WebKit/UIProcess/ios/WKInkPickerControl.mm.
(-[WKInkPickerView initWithDrawingView:]):
(-[WKInkPickerView didPickInk]):
(-[WKInkPickerView inlineInkPickerDidToggleRuler:]):
(-[WKInkPickerView inlineInkPicker:didSelectTool:]):
(-[WKInkPickerView inlineInkPicker:didSelectColor:]):
(-[WKInkPickerView inkPickerSize]):
(-[WKInkPickerView layoutSubviews]):
(-[WKInkPickerView sizeThatFits:]):
(-[WKInkPickerView viewControllerForPopoverPresentationFromInlineInkPicker:]):
* WebKit.xcodeproj/project.pbxproj:
Make WKInkPickerView a WKWebView subview instead of an inputView.
Also, don't force the keyboard to be visible when an editable image is focused.

LayoutTests:

* editing/images/basic-editable-image-with-gesture.html: Added.
* editing/images/basic-editable-image-with-gesture-expected.txt: Added.
* resources/ui-helper.js:
(window.UIHelper.stylusTapAt.return.new.Promise):
(window.UIHelper.stylusTapAt):
Add a test that ensures that adding an editable image from a gesture
doesn't crash, and can be drawn on.

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

2 years agoWeb Inspector: Computed: make UI more usable when the panel is narrow
nvasilyev@apple.com [Wed, 19 Dec 2018 23:28:58 +0000 (23:28 +0000)]
Web Inspector: Computed: make UI more usable when the panel is narrow
https://bugs.webkit.org/show_bug.cgi?id=192578
<rdar://problem/46615753>

Reviewed by Devin Rousso.

* UserInterface/Views/ComputedStyleSection.css:
(.computed-style-section .computed-property-item .property-traces):
(.computed-style-section .computed-property-item.expanded .disclosure-button):
(.computed-style-section .computed-property-item .property-trace-item):
(.computed-style-section .computed-property-item .property-trace-item::before):
(.computed-style-section .computed-property-item .property):
(.computed-style-section .computed-property-item .property-trace-item .selector):
Allow CSS property values and selectors to take more than one line.

(.computed-style-section .property-trace-item .property .name,):
* UserInterface/Views/ComputedStyleSection.js:
(WI.ComputedStyleSection.prototype._createTrace):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.update):

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

2 years ago[WHLSL] Add a handwritten lexer
mmaxfield@apple.com [Wed, 19 Dec 2018 23:27:45 +0000 (23:27 +0000)]
[WHLSL] Add a handwritten lexer
https://bugs.webkit.org/show_bug.cgi?id=192294

Reviewed by Jon Lee.

This is infrastructure necessary for https://bugs.webkit.org/show_bug.cgi?id=192355. The
implementation matches the lexing rules in the spec (specifically, the rules that start
with an uppercase letter). The spec is at
https://github.com/gpuweb/WHLSL/blob/master/Spec/WHLSL.g4.

This patch also modifies the lexer according to https://github.com/gpuweb/WHLSL/pull/283.

No new tests because the lexer isn't hooked up yet; there are tests in the parser,
once that gets committed.

* Modules/webgpu/WHLSL/WHLSLLexer.cpp: Added.
(WebCore::WHLSL::Lexer::Token::typeName):
(WebCore::WHLSL::Lexer::recognizeKeyword):
(WebCore::WHLSL::Lexer::consumeTokenFromStream):
(WebCore::WHLSL::Lexer::skipWhitespaceAndComments):
(WebCore::WHLSL::isWhitespace):
(WebCore::WHLSL::isNewline):
(WebCore::WHLSL::Lexer::skipWhitespace):
(WebCore::WHLSL::Lexer::skipLineComment):
(WebCore::WHLSL::Lexer::skipLongComment):
(WebCore::WHLSL::Lexer::coreDecimalIntLiteral const):
(WebCore::WHLSL::Lexer::decimalIntLiteral const):
(WebCore::WHLSL::Lexer::decimalUintLiteral const):
(WebCore::WHLSL::isHexadecimalCharacter):
(WebCore::WHLSL::Lexer::coreHexadecimalIntLiteral const):
(WebCore::WHLSL::Lexer::hexadecimalIntLiteral const):
(WebCore::WHLSL::Lexer::hexadecimalUintLiteral const):
(WebCore::WHLSL::Lexer::intLiteral const):
(WebCore::WHLSL::Lexer::uintLiteral const):
(WebCore::WHLSL::Lexer::digit const):
(WebCore::WHLSL::Lexer::digitStar const):
(WebCore::WHLSL::Lexer::character const):
(WebCore::WHLSL::Lexer::coreFloatLiteralType1 const):
(WebCore::WHLSL::Lexer::coreFloatLiteral const):
(WebCore::WHLSL::Lexer::floatLiteral const):
(WebCore::WHLSL::Lexer::validIdentifier const):
(WebCore::WHLSL::Lexer::identifier const):
(WebCore::WHLSL::Lexer::operatorName const):
* Modules/webgpu/WHLSL/WHLSLLexer.h: Added.
(WebCore::WHLSL::Lexer::Lexer):
(WebCore::WHLSL::Lexer::consumeToken):
(WebCore::WHLSL::Lexer::unconsumeToken):
(WebCore::WHLSL::Lexer::state const):
(WebCore::WHLSL::Lexer::setState):
(WebCore::WHLSL::Lexer::isFullyConsumed const):
(WebCore::WHLSL::Lexer::errorString):
(WebCore::WHLSL::Lexer::string const):
(WebCore::WHLSL::Lexer::anyCharacter const):
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

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

2 years agoWeb Inspector: Timelines: correctly label Intersection Observer callbacks
simon.fraser@apple.com [Wed, 19 Dec 2018 23:17:31 +0000 (23:17 +0000)]
Web Inspector: Timelines: correctly label Intersection Observer callbacks
https://bugs.webkit.org/show_bug.cgi?id=192669
<rdar://problem/46702490>

Reviewed by Joseph Pecoraro.

Add InspectorInstrumentation::willFireObserverCallback() and use it to wrap calls
to Intersection Observer, Performance Observer and Mutation Observer callbacks so
that they get correctly labeled in the Inspector timeline.

Source/JavaScriptCore:

* inspector/protocol/Timeline.json:

Source/WebCore:

* dom/MutationObserver.cpp:
(WebCore::MutationObserver::deliver):
* en.lproj/Localizable.strings:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willFireObserverCallbackImpl):
(WebCore::InspectorInstrumentation::didFireObserverCallbackImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willFireObserverCallback):
(WebCore::InspectorInstrumentation::didFireObserverCallback):
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createObserverCallbackData):
* inspector/TimelineRecordFactory.h:
* inspector/agents/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willFireObserverCallback):
(WebCore::InspectorTimelineAgent::didFireObserverCallback):
(WebCore::toProtocol):
* inspector/agents/InspectorTimelineAgent.h:
* page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::notify):
* page/PerformanceObserver.cpp:
(WebCore::PerformanceObserver::deliver):

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype._processRecord):
* UserInterface/Models/ScriptTimelineRecord.js:
(WI.ScriptTimelineRecord.EventType.displayName):
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView.iconClassNameForRecord):

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

2 years agoResync libwebrtc with M72 branch
youenn@apple.com [Wed, 19 Dec 2018 22:45:12 +0000 (22:45 +0000)]
Resync libwebrtc with M72 branch
https://bugs.webkit.org/show_bug.cgi?id=192858

Reviewed by Eric Carlson.

Merge changes made upstream.
Some of these changes improve support of unified plan and backward compatiblity.

* Source/webrtc/api/candidate.cc:
* Source/webrtc/api/candidate.h:
* Source/webrtc/api/rtpreceiverinterface.h:
* Source/webrtc/api/umametrics.h:
* Source/webrtc/media/engine/webrtcvideoengine.cc:
* Source/webrtc/media/engine/webrtcvideoengine_unittest.cc:
* Source/webrtc/modules/audio_processing/agc2/agc2_common.h:
* Source/webrtc/modules/desktop_capture/desktop_and_cursor_composer.cc:
* Source/webrtc/modules/video_coding/BUILD.gn:
* Source/webrtc/modules/video_coding/codecs/vp9/svc_config.cc:
* Source/webrtc/modules/video_coding/codecs/vp9/svc_rate_allocator.cc:
* Source/webrtc/modules/video_coding/codecs/vp9/svc_rate_allocator.h:
* Source/webrtc/modules/video_coding/codecs/vp9/svc_rate_allocator_unittest.cc:
* Source/webrtc/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc:
* Source/webrtc/modules/video_coding/codecs/vp9/vp9.cc:
* Source/webrtc/modules/video_coding/video_codec_initializer.cc:
* Source/webrtc/modules/video_coding/video_codec_initializer_unittest.cc:
* Source/webrtc/p2p/base/p2ptransportchannel_unittest.cc:
* Source/webrtc/p2p/base/port.cc:
* Source/webrtc/p2p/base/port.h:
* Source/webrtc/p2p/base/portallocator.cc:
* Source/webrtc/p2p/client/basicportallocator.cc:
* Source/webrtc/p2p/client/basicportallocator_unittest.cc:
* Source/webrtc/pc/peerconnection.cc:
* Source/webrtc/pc/peerconnection.h:
* Source/webrtc/pc/peerconnection_integrationtest.cc:
* Source/webrtc/pc/peerconnectioninternal.h:
* Source/webrtc/pc/statscollector.cc:
* Source/webrtc/pc/statscollector.h:
* Source/webrtc/pc/test/fakepeerconnectionbase.h:
* Source/webrtc/pc/test/fakepeerconnectionforstats.h:
* Source/webrtc/pc/test/mockpeerconnectionobservers.h:
(webrtc::MockStatsObserver::OnComplete):
(webrtc::MockStatsObserver::TrackIds const):
* Source/webrtc/pc/webrtcsdp_unittest.cc:
* Source/webrtc/rtc_base/fake_mdns_responder.h:
(webrtc::FakeMdnsResponder::GetMappedAddressForName const):
* Source/webrtc/rtc_base/fakenetwork.h:
(rtc::FakeNetworkManager::CreateMdnsResponder):
(rtc::FakeNetworkManager::GetMdnsResponderForTesting const):
* Source/webrtc/video/video_send_stream_impl.cc:
* Source/webrtc/video/video_stream_encoder.cc:

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

2 years agoContentExtensions: DFANode.cpp:66:44: error: narrowing conversion of '-1' from 'int...
csaavedra@igalia.com [Wed, 19 Dec 2018 22:24:04 +0000 (22:24 +0000)]
ContentExtensions: DFANode.cpp:66:44: error: narrowing conversion of '-1' from 'int' to 'char' inside { }
https://bugs.webkit.org/show_bug.cgi?id=192854

Reviewed by Alex Christensen.

* contentextensions/DFANode.h: Define CharRange's chars as signed

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

2 years agoWeb Inspector: Audit: "Clear Filters" button gets clipped when window is vertically...
drousso@apple.com [Wed, 19 Dec 2018 22:09:22 +0000 (22:09 +0000)]
Web Inspector: Audit: "Clear Filters" button gets clipped when window is vertically small
https://bugs.webkit.org/show_bug.cgi?id=192868
<rdar://problem/46780400>

Reviewed by Matt Baker.

* UserInterface/Views/Main.css:
(.message-text-view):

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

2 years agoJSPropertyNameEnumerator should cache the iterated object's structure only after...
mark.lam@apple.com [Wed, 19 Dec 2018 22:00:43 +0000 (22:00 +0000)]
JSPropertyNameEnumerator should cache the iterated object's structure only after getting its property names.
https://bugs.webkit.org/show_bug.cgi?id=192464
<rdar://problem/46519455>

Reviewed by Saam Barati.

JSTests:

This patch is about a 10% speed up on the new for-in-on-object-with-lazily-materialized-properties.js
microbenchmark.

* microbenchmarks/for-in-on-object-with-lazily-materialized-properties.js: Added.
* stress/property-name-enumerator-should-cache-structure-after-getting-property-names.js: Added.

Source/JavaScriptCore:

This is because the process of getting its property names may cause some lazy
properties to be reified, and the structure will change.  This is needed in order
for get_direct_pname to work correctly.

* runtime/JSPropertyNameEnumerator.h:
(JSC::propertyNameEnumerator):

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

2 years agoRemove RTCRtpTransceiver.setDirection
youenn@apple.com [Wed, 19 Dec 2018 22:00:22 +0000 (22:00 +0000)]
Remove RTCRtpTransceiver.setDirection
https://bugs.webkit.org/show_bug.cgi?id=192869

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/historical-expected.txt:

Source/WebCore:

Covered by rebased test.

* Modules/mediastream/RTCRtpTransceiver.idl:

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

2 years ago[ MacOS iOS ] Layout Test webrtc/no-port-zero-in-upd-candidates.html is flaky timeout
youenn@apple.com [Wed, 19 Dec 2018 22:00:16 +0000 (22:00 +0000)]
[ MacOS iOS ] Layout Test webrtc/no-port-zero-in-upd-candidates.html is flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=192866

Reviewed by Alex Christensen.

* webrtc/no-port-zero-in-upd-candidates.html:
Add some more logging in the test in case of time out.

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

2 years ago[MediaStream] Force system camera/microphone TCC prompt if necessary
eric.carlson@apple.com [Wed, 19 Dec 2018 21:25:29 +0000 (21:25 +0000)]
[MediaStream] Force system camera/microphone TCC prompt if necessary
https://bugs.webkit.org/show_bug.cgi?id=192820
<rdar://problem/42680098>

Reviewed by Jer Noble.

Source/WebKit:

* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): Enable TCC check
and prompt on Mojave.

Source/WTF:

* wtf/Platform.h: Define HAVE_AUTHORIZATION_STATUS_FOR_MEDIA_TYPE.

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

2 years agoForce synchronous decode in WebCoreDecompressionSession::decodeSampleSync()
jer.noble@apple.com [Wed, 19 Dec 2018 21:11:12 +0000 (21:11 +0000)]
Force synchronous decode in WebCoreDecompressionSession::decodeSampleSync()
https://bugs.webkit.org/show_bug.cgi?id=192856
<rdar://problem/46843245>

Reviewed by Alex Christensen.

Some decoders exposed through VideoToolbox will decode asynchronously even when
kVTDecodeInfo_Asynchronous is not set. Force synchronous behavior with a Semaphore.

* platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::decodeSampleSync):

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

2 years agoWeb Inspector: Dark Mode: selected text is too light when Inspector window is inactive
nvasilyev@apple.com [Wed, 19 Dec 2018 21:09:43 +0000 (21:09 +0000)]
Web Inspector: Dark Mode: selected text is too light when Inspector window is inactive
https://bugs.webkit.org/show_bug.cgi?id=190542
<rdar://problem/45238712>

Reviewed by Devin Rousso.

* UserInterface/Views/CodeMirrorOverrides.css:
(.CodeMirror .CodeMirror-selected):

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

2 years agoWeb Inspector: column sort controls in Layers tab sidebar don't render correctly...
nvasilyev@apple.com [Wed, 19 Dec 2018 21:08:53 +0000 (21:08 +0000)]
Web Inspector: column sort controls in Layers tab sidebar don't render correctly in dark mode
https://bugs.webkit.org/show_bug.cgi?id=192845

Reviewed by Devin Rousso.

* UserInterface/Views/DataGrid.css:
(@media (prefers-dark-interface)):
(.data-grid th.sortable:active):
Drive-by: replace obnoxiously light background of the pressed header with a more subtle gray.
(.data-grid th.sort-ascending > div:first-child::after, .data-grid th.sort-descending > div:first-child::after):
Invert colors of the arrow glyph.

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

2 years agoAllow clients to set the navigator platform
megan_gardner@apple.com [Wed, 19 Dec 2018 20:21:31 +0000 (20:21 +0000)]
Allow clients to set the navigator platform
https://bugs.webkit.org/show_bug.cgi?id=192735

Reviewed by Tim Horton.

Source/WebCore:

Expanded TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm.

Lots of piping to allow the setting of a custom navigator platform.

* loader/DocumentLoader.h:
(WebCore::DocumentLoader::setCustomNavigatorPlatform):
(WebCore::DocumentLoader::customNavigatorPlatform const):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::navigatorPlatform const):
* loader/FrameLoader.h:
* page/Navigator.cpp:
(WebCore::Navigator::platform const):
* page/Navigator.h:
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::platform const):
(WebCore::NavigatorBase::platform): Deleted.
* page/NavigatorBase.h:

Source/WebKit:

Add private API to allow clients to override the default navigator
platform. Some websites check for the platform, which
interfears with our request desktop site feature. This should
help more sites function as expected.

* Shared/WebsitePoliciesData.cpp:
(WebKit::WebsitePoliciesData::encode const):
(WebKit::WebsitePoliciesData::decode):
(WebKit::WebsitePoliciesData::applyToDocumentLoader):
* Shared/WebsitePoliciesData.h:
* UIProcess/API/APIWebsitePolicies.cpp:
(API::WebsitePolicies::data):
* UIProcess/API/APIWebsitePolicies.h:
* UIProcess/API/Cocoa/_WKWebsitePolicies.h:
* UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
(-[_WKWebsitePolicies setCustomNavigatorPlatform:]):
(-[_WKWebsitePolicies customNavigatorPlatform]):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):

Source/WebKitLegacy/mac:

Add stubs to fill out the added functionality in FrameLoaderClient.

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::navigatorPlatform):

Tools:

Add a test for setting a custom navigator platform.

* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[CustomNavigatorPlatformDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[CustomNavigatorPlatformDelegate webView:didFinishNavigation:]):

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

2 years ago[GTK] Cannot build with CMake <3.7
aperez@igalia.com [Wed, 19 Dec 2018 19:58:21 +0000 (19:58 +0000)]
[GTK] Cannot build with CMake <3.7
https://bugs.webkit.org/show_bug.cgi?id=192865

Reviewed by Michael Catanzaro.

* Source/cmake/OptionsGTK.cmake: Convert usage of VERSION_GREATER_EQUAL to a
combination of VERSION_GREATER + STREQUAL.

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

2 years agoREGRESSION (r234940): [ MacOS ] Layout Test imported/w3c/web-platform-tests/media...
ryanhaddad@apple.com [Wed, 19 Dec 2018 19:26:24 +0000 (19:26 +0000)]
REGRESSION (r234940): [ MacOS ] Layout Test imported/w3c/web-platform-tests/media-source/mediasource-changetype-play.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=190976

Unreviewed test gardening.

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

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

2 years agoUnreviewed, rolling out r239347.
ryanhaddad@apple.com [Wed, 19 Dec 2018 19:11:06 +0000 (19:11 +0000)]
Unreviewed, rolling out r239347.

Caused the leaks bot to hit an exception and the new test
crashes on certain configurations.

Reverted changeset:

"Synchronous media query evaluation could destroy current
Frame/FrameView."
https://bugs.webkit.org/show_bug.cgi?id=192781
https://trac.webkit.org/changeset/239347

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

2 years agoUnreviewed, rolling out r239358.
tsavell@apple.com [Wed, 19 Dec 2018 18:57:09 +0000 (18:57 +0000)]
Unreviewed, rolling out r239358.

Revision caused imported/w3c/web-platform-tests/IndexedDB/ to
crash on Debug bots

Reverted changeset:

"Clean up IndexedDB files between tests"
https://bugs.webkit.org/show_bug.cgi?id=192796
https://trac.webkit.org/changeset/239358

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

2 years agoSync some include directories in WebCore
don.olmstead@sony.com [Wed, 19 Dec 2018 18:23:36 +0000 (18:23 +0000)]
Sync some include directories in WebCore
https://bugs.webkit.org/show_bug.cgi?id=192819

Reviewed by Michael Catanzaro.

Added missing include directories around features that have only been enabled on
Apple ports. Removes obsolete directories from list and moves harfbuzz directories
into the freetype cmake file.

* CMakeLists.txt:
* platform/FreeType.cmake:

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

2 years agoFix build on 64bit ARM with arm64 SYSTEM_PROCESSOR
commit-queue@webkit.org [Wed, 19 Dec 2018 15:37:50 +0000 (15:37 +0000)]
Fix build on 64bit ARM with arm64 SYSTEM_PROCESSOR
https://bugs.webkit.org/show_bug.cgi?id=192497

Patch by Lucas Stach <l.stach@pengutronix.de> on 2018-12-19
Reviewed by Philippe Normand.

Android and some embedded Linux build systems use arm64 instead of
aarch64 as the CMAKE_HOST_PROCESSOR. Fix the JIT build for this scenario.

* CMakeLists.txt:

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

2 years ago[BigInt] We should enable CSE into arithmetic operations that speculate BigIntUse
ticaiolima@gmail.com [Wed, 19 Dec 2018 12:12:37 +0000 (12:12 +0000)]
[BigInt] We should enable CSE into arithmetic operations that speculate BigIntUse
https://bugs.webkit.org/show_bug.cgi?id=192723

Reviewed by Saam Barati.

PerformanceTests:

* BigIntBench/big-int-cse.js: Added.
* BigIntBench/big-int-global-cse.js: Added.
* BigIntBench/big-int-licm.js: Added.

Source/JavaScriptCore:

This patch is adjusting clobberize rules into ValueOp nodes to enable
more optimizations when we speculate BigIntUse. In such case, DFG now
is able to apply CSE, LICM and commutativity on nodes like
ValueAdd(BigInt, BigInt), ValueSub(BigInt, BigInt), etc.

Here are the numbers we can observe with some microbenchmarks:

                          baseline                 changes

big-int-cse           108.2733+-0.8445    ^    80.9897+-4.9781   ^ definitely 1.3369x faster
big-int-licm          75.6641+-0.3477     ^    57.8144+-1.6043   ^ definitely 1.3087x faster
big-int-global-cse    145.3557+-1.0552    ^    86.5866+-0.3025   ^ definitely 1.6787x faster

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):

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

2 years ago[MSE] Remove unused method: stopAskingForMoreSamples()
aboya@igalia.com [Wed, 19 Dec 2018 11:37:39 +0000 (11:37 +0000)]
[MSE] Remove unused method: stopAskingForMoreSamples()
https://bugs.webkit.org/show_bug.cgi?id=192754

Reviewed by Xabier Rodriguez-Calvar.

The stopAskingForMoreSamples() method from SourceBufferPrivate is not
being used by anyone. SourceBuffer is not calling it and no
SourceBufferPrivate is implementing it. Let's remove that noise.

* platform/graphics/SourceBufferPrivate.h:
(WebCore::SourceBufferPrivate::setActive):
(WebCore::SourceBufferPrivate::stopAskingForMoreSamples): Deleted.
* platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::stopAskingForMoreSamples): Deleted.
* platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:

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

2 years agoString overflow in JSC::createError results in ASSERT in WTF::makeString
tzagallo@apple.com [Wed, 19 Dec 2018 11:33:12 +0000 (11:33 +0000)]
String overflow in JSC::createError results in ASSERT in WTF::makeString
https://bugs.webkit.org/show_bug.cgi?id=192833
<rdar://problem/45706868>

Reviewed by Mark Lam.

JSTests:

* stress/string-overflow-createError.js: Added.

Source/JavaScriptCore:

JSC::createError was calling WTF::makeString which would result in an
assertion failure when the string was too big. Change it to call
WTF::tryMakeString instead and return an OutOfMemory error if we fail
to create the error string.

* runtime/ExceptionHelpers.cpp:
(JSC::createError):

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

2 years ago[MSE] Remove dead code: sourceBufferPrivateSeekToTime()
aboya@igalia.com [Wed, 19 Dec 2018 11:20:16 +0000 (11:20 +0000)]
[MSE] Remove dead code: sourceBufferPrivateSeekToTime()
https://bugs.webkit.org/show_bug.cgi?id=192827

Reviewed by Xabier Rodriguez-Calvar.

This patch makes two dead code removal changes in
SourceBufferPrivateClient:

First, sourceBufferPrivateFastSeekTimeForMediaTime() is made pure
virtual in SourceBufferPrivateClient. Since SourceBufferPrivateClient
is only inherited by SourceBuffer, it makes no sense to have default
implementations there (they will never be used), moreso it being a
client interface.

Second, sourceBufferPrivateSeekToTime() is removed entirely. It used
to had an empty implementation, which SourceBuffer did not overwrite,
therefore making any calls to it useless.

All calls to sourceBufferPrivateSeekToTime() have been removed:

SourceBufferPrivateAVFObjC::seekToTime(), which was also dead code
itself, used to call this method. This patch deletes it completely.

MockSourceBufferPrivate::seekToTime(), which only called this empty
method, has also been removed along with its only usage in
MockMediaSourcePrivate::seekToTime().

* platform/graphics/SourceBufferPrivateClient.h:
(WebCore::SourceBufferPrivateClient::sourceBufferPrivateFastSeekTimeForMediaTime): Deleted.
(WebCore::SourceBufferPrivateClient::sourceBufferPrivateSeekToTime): Deleted.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::seekToTime): Deleted.
* platform/mock/mediasource/MockMediaSourcePrivate.cpp:
(WebCore::MockMediaSourcePrivate::seekToTime):
* platform/mock/mediasource/MockSourceBufferPrivate.cpp:
(WebCore::MockSourceBufferPrivate::seekToTime): Deleted.
* platform/mock/mediasource/MockSourceBufferPrivate.h:

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

2 years ago[EME] MediaKeySystemConfiguration distinctiveIdentifier and persistentState should...
calvaris@igalia.com [Wed, 19 Dec 2018 08:55:54 +0000 (08:55 +0000)]
[EME] MediaKeySystemConfiguration distinctiveIdentifier and persistentState should default to optional
https://bugs.webkit.org/show_bug.cgi?id=192815

Reviewed by Jer Noble.

https://www.w3.org/TR/encrypted-media/#dom-mediakeysystemconfiguration
says that distinctiveIdentifier and persistentState default to
optional. Our implementation does not define a default leaving it
to the first option of the enum, which currently is Required.

* platform/encryptedmedia/CDMKeySystemConfiguration.h:

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

2 years agoMerge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
commit-queue@webkit.org [Wed, 19 Dec 2018 08:00:27 +0000 (08:00 +0000)]
Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
https://bugs.webkit.org/show_bug.cgi?id=192288

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

Prefer return value to out parameter for parseAccessControlAllowList.

* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::parse):
* platform/network/HTTPParsers.h:
(WebCore::parseAccessControlAllowList):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::filter):
(WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):

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

2 years agoREGRESSION(r235165): [GTK][WPE] Garbled rendering on GitLab
zandobersek@gmail.com [Wed, 19 Dec 2018 07:41:19 +0000 (07:41 +0000)]
REGRESSION(r235165): [GTK][WPE] Garbled rendering on GitLab
https://bugs.webkit.org/show_bug.cgi?id=192230

Reviewed by Carlos Garcia Campos.

Single tile can after r235165 be assigned multiple content updates
without a commit occurring between each update, whereas before these
commits were done for each update.

To avoid repeating updates for a single tile purging information about
the previous update, these updates are now accumulated inside a Vector
and then iterated over during the commit phase.

* platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
(WebCore::CoordinatedBackingStoreTile::addUpdate):
(WebCore::CoordinatedBackingStoreTile::swapBuffers):
(WebCore::CoordinatedBackingStore::updateTile):
(WebCore::CoordinatedBackingStoreTile::setBackBuffer): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
(WebCore::CoordinatedBackingStoreTile::scale const):

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