WebKit-https.git
4 months agoAdd a testing target to make that is release + assertions
keith_miller@apple.com [Wed, 8 Jan 2020 01:55:21 +0000 (01:55 +0000)]
Add a testing target to make that is release + assertions
https://bugs.webkit.org/show_bug.cgi?id=205895

Reviewed by Mark Lam.

* Makefile:
.:

* Makefile.shared:
* Source/Makefile:

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

4 months agoCreate a mechanism for 'safe by default' web views
katherine_cheney@apple.com [Wed, 8 Jan 2020 01:44:06 +0000 (01:44 +0000)]
Create a mechanism for 'safe by default' web views
https://bugs.webkit.org/show_bug.cgi?id=205407
<rdar://problem/58053071>

Reviewed by Alex Christensen.

Source/WebKit:

Adds common cases to be used as the basis for 'safe by default' web views.
The cases are in the form of an NS_ENUM _WKWebViewCategory and
its equivalent C++ enum WebViewCategory. The conversion between
these happens in WKWebViewConfiguration.mm.

* Shared/WebViewCategory.h: Added.
* UIProcess/API/APIPageConfiguration.cpp:
(API::PageConfiguration::copy const):
* UIProcess/API/APIPageConfiguration.h:
(API::PageConfiguration::webViewCategory const):
(API::PageConfiguration::setWebViewCategory):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(convertToAPIWebViewCategory):
(convertFromAPIWebViewCategory):
(-[WKWebViewConfiguration _webViewCategory]):
(-[WKWebViewConfiguration _setWebViewCategory:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* WebKit.xcodeproj/project.pbxproj:

Tools:

Test the default WebView category is correct and that the setter works
properly.

* TestWebKitAPI/Tests/WebKitCocoa/Configuration.mm:
(TEST):

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

4 months agoReformat FrameLoader logging
krollin@apple.com [Wed, 8 Jan 2020 01:31:20 +0000 (01:31 +0000)]
Reformat FrameLoader logging
https://bugs.webkit.org/show_bug.cgi?id=205884
<rdar://problem/58387123>

Reviewed by Brent Fulgham.

Update the format used by FrameLoader in its RELEASE_LOG logging. Use
the format used by WebPageProxy and NetworkResourceLoader, which is
generally of the form:

    <object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values>

So, for example:

    0x4aa2df000 - FrameLoader::allAllLoaders: Clearing provisional document loader (frame = 0x4a8ad3550, main = 0 m_provisionalDocumentLoader=0x0)

becomes:

    0x465fb61a0 - [frame=0x465c98a20, main=0] FrameLoader::stopAllLoaders: Clearing provisional document loader (m_provisionalDocumentLoader=0x0)

No new tests -- no new or changed functionality.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::urlSelected):
(WebCore::FrameLoader::finishedParsing):
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::loadArchive):
(WebCore::FrameLoader::loadInSameDocument):
(WebCore::FrameLoader::prepareForLoadStart):
(WebCore::FrameLoader::setupForReplace):
(WebCore::FrameLoader::loadFrameRequest):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::clearProvisionalLoadForPolicyCheck):
(WebCore::FrameLoader::reloadWithOverrideEncoding):
(WebCore::FrameLoader::reload):
(WebCore::FrameLoader::stopAllLoaders):
(WebCore::FrameLoader::stopForBackForwardCache):
(WebCore::FrameLoader::setProvisionalDocumentLoader):
(WebCore::FrameLoader::setState):
(WebCore::FrameLoader::clearProvisionalLoad):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::transitionToCommitted):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
(WebCore::FrameLoader::loadDifferentDocumentItem):
(WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):

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

4 months agoUsing Web Share API preceded by an AJAX call
cdumez@apple.com [Wed, 8 Jan 2020 01:07:25 +0000 (01:07 +0000)]
Using Web Share API preceded by an AJAX call
https://bugs.webkit.org/show_bug.cgi?id=197779
<rdar://problem/50708309>

Reviewed by Dean Jackson.

Source/WebCore:

As per the Web Share specification, navigator.share() is supposed to reject the promise with a
"NotAllowedError" DOMException if the relevant global object of this does not have transient
activation [1]. However, our implementation was stricter and would reject the promise if we
are not currently processing a user-gesture. This behavior did not match Chrome and does not
appear to be Web compatible.

To address the issue, this patch introduces the concept of transient activation [2] in WebKit
and uses it in navigator.share() to match the specification more closely. Note that we are
still a bit stricter than the specification because calling navigator.share() will currently
"consume the activation" [3] to prevent the JS from presenting the share sheet more than once
based on a single activation. However, our new behavior is still more permissive and more aligned
with Chrome.

[1] https://w3c.github.io/web-share/#dom-navigator-share
[2] https://html.spec.whatwg.org/multipage/interaction.html#transient-activation
[3] https://html.spec.whatwg.org/multipage/interaction.html#consume-user-activation

Tests: fast/web-share/share-transient-activation-expired.html
       fast/web-share/share-transient-activation.html

* dom/UserGestureIndicator.cpp:
* dom/UserGestureIndicator.h:
(WebCore::UserGestureToken::startTime const):
* page/DOMWindow.cpp:
(WebCore::transientActivationDurationOverrideForTesting):
(WebCore::transientActivationDuration):
(WebCore::DOMWindow::origin const):
(WebCore::DOMWindow::securityOrigin const):
(WebCore::DOMWindow::overrideTransientActivationDurationForTesting):
(WebCore::DOMWindow::hasTransientActivation const):
(WebCore::DOMWindow::consumeTransientActivation):
(WebCore::DOMWindow::notifyActivated):
* page/DOMWindow.h:
* page/Navigator.cpp:
(WebCore::Navigator::share):
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setTransientActivationDuration):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Add layout test coverage.

* fast/web-share/share-transient-activation-expected.txt: Added.
* fast/web-share/share-transient-activation-expired-expected.txt: Added.
* fast/web-share/share-transient-activation-expired.html: Added.
* fast/web-share/share-transient-activation.html: Added.

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

4 months agoAdd some more Animations logging
simon.fraser@apple.com [Wed, 8 Jan 2020 00:54:30 +0000 (00:54 +0000)]
Add some more Animations logging
https://bugs.webkit.org/show_bug.cgi?id=205890

Reviewed by Dean Jackson.

Source/WebCore:

Add Animations logging to various WebAnimations entry points.

* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::getAnimatedStyle):
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::silentlySetCurrentTime):
(WebCore::WebAnimation::setCurrentTime):
(WebCore::WebAnimation::cancel):
(WebCore::WebAnimation::finish):
(WebCore::WebAnimation::play):
(WebCore::WebAnimation::runPendingPlayTask):
(WebCore::WebAnimation::pause):
(WebCore::WebAnimation::reverse):
(WebCore::WebAnimation::runPendingPauseTask):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::seekAnimation):

Source/WTF:

Make Seconds TextStream-loggable, and make Markable<> loggable.

* wtf/Seconds.cpp:
(WTF::operator<<):
* wtf/Seconds.h:
* wtf/text/TextStream.h:
(WTF::operator<<):

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

4 months agoUnreviewed, rolling out r254165.
tsavell@apple.com [Wed, 8 Jan 2020 00:41:35 +0000 (00:41 +0000)]
Unreviewed, rolling out r254165.

Caused 500+ missing results on Mac

Reverted changeset:

"run-webkit-tests: clobber-old-results should remove the
entire results folder"
https://bugs.webkit.org/show_bug.cgi?id=205875
https://trac.webkit.org/changeset/254165

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

4 months agoNetwork process sandboxes should not include 'common.sb' or 'system.sb'
bfulgham@apple.com [Wed, 8 Jan 2020 00:38:10 +0000 (00:38 +0000)]
Network process sandboxes should not include 'common.sb' or 'system.sb'
https://bugs.webkit.org/show_bug.cgi?id=205521
<rdar://problem/58095870>

Reviewed by Per Arne Vollan.

This patch replaces the 'include' with a copy/paste of the contents of the relevant
sandbox include file. I removed definitions that were not referenced in the existing
Network sandbox, but did not otherwise edit the contents. There are duplicates and
redundancies after this patch, which I will remove as a follow-up step once we confirm
that this has no regressions.

I also updated the sandbox to generate telemetry for some mach connections that we think
are unneeded, or that should be targeted for removal.

No new tests. There should be no change in behavior.

* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:

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

4 months agoREGRESSION (r248734): different threads write m_storageMap of StorageAreaImpl at...
sihui_liu@apple.com [Wed, 8 Jan 2020 00:17:34 +0000 (00:17 +0000)]
REGRESSION (r248734): different threads write m_storageMap of StorageAreaImpl at the same time
https://bugs.webkit.org/show_bug.cgi?id=205764
<rdar://problem/58179425>

Reviewed by Maciej Stachowiak.

In StorageAreaImpl, we avoid modifying m_storageMap from different threads at the same time by blocking main
thread access to it until the writes(importing items) of storage thread is done.

In r248734 we introduced a new case where the main thread could modify m_storageMap for session change, but we
didn't add the wait there.

* Storage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::importItems):
(WebKit::StorageAreaImpl::sessionChanged):

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

4 months agoFix up layout tests results following r254160
dbates@webkit.org [Wed, 8 Jan 2020 00:08:42 +0000 (00:08 +0000)]
Fix up layout tests results following r254160
<rdar://problem/58383099>

Revert some results back to pre-r254091. These results were changed because I made
an accident (corrected in r254160) that made me mistakenly think the new results
were legitimate. They weren't.

* fast/dom/Range/getClientRects-expected.txt:
* fast/dom/Range/getClientRects.html:
* fast/repaint/text-selection-overflow-hidden-expected.txt:

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

4 months agoUnreviewed restabilization of non-unified build.
ross.kirsling@sony.com [Wed, 8 Jan 2020 00:01:55 +0000 (00:01 +0000)]
Unreviewed restabilization of non-unified build.

Source/JavaScriptCore:

* bytecode/MethodOfGettingAValueProfile.h:
* dfg/DFGVariableEvent.h:
* dfg/DFGVariableEventStream.cpp:
* interpreter/CheckpointOSRExitSideState.h:

Source/WebCore:

* html/HTMLDialogElement.cpp:
* platform/graphics/cairo/ImageBufferCairo.cpp:
* style/StyleAdjuster.h:
* style/UserAgentStyle.cpp:
* workers/service/SWClientConnection.cpp:
* workers/service/context/ServiceWorkerThread.h:
* workers/service/context/ServiceWorkerThreadProxy.cpp:

Source/WebKit:

* NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
* NetworkProcess/IndexedDB/WebIDBServer.cpp:
(WebKit::WebIDBServer::create):
(WebKit::WebIDBServer::WebIDBServer):
(WebKit::WebIDBServer::closeAndDeleteDatabasesForOrigins):
(WebKit::WebIDBServer::suspend):
(WebKit::WebIDBServer::didFireVersionChangeEvent):
* UIProcess/WebContextClient.h:

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

4 months agorun-webkit-tests: clobber-old-results should remove the entire results folder
jbedard@apple.com [Tue, 7 Jan 2020 23:54:34 +0000 (23:54 +0000)]
run-webkit-tests: clobber-old-results should remove the entire results folder
https://bugs.webkit.org/show_bug.cgi?id=205875
<rdar://problem/58236117>

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._clobber_old_results): Remove entire results folder.
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_retrying_and_flaky_tests): clobber-old-results now removes the
entire results directory.

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

4 months agoWebKit rejects changes between similar unprefixed & prefixed gradient syntax
simon.fraser@apple.com [Tue, 7 Jan 2020 23:17:33 +0000 (23:17 +0000)]
WebKit rejects changes between similar unprefixed & prefixed gradient syntax
https://bugs.webkit.org/show_bug.cgi?id=171015

Reviewed by Dean Jackson.
Source/WebCore:

equals() needs to test m_gradientType.

Test: fast/css/gradient-prefixed-unprefixed-toggle.html

* css/CSSGradientValue.cpp:
(WebCore::CSSLinearGradientValue::equals const):
(WebCore::CSSRadialGradientValue::equals const):

LayoutTests:

* fast/css/gradient-prefixed-unprefixed-toggle-expected.html: Added.
* fast/css/gradient-prefixed-unprefixed-toggle.html: Added.

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

4 months agoFix failing tests following r254091
dbates@webkit.org [Tue, 7 Jan 2020 22:39:50 +0000 (22:39 +0000)]
Fix failing tests following r254091
<rdar://problem/58383099>

Use LayoutUnit for the logical width instead of "auto" as the original code did before r254091
to fix layout test failures, e.g. editing/selection/ios/fixed-selection-after-scroll.html
This avoids accidental integer truncation that can occur if "snappedSelectionRect.maxX() > logicalRight"
evaluates to true.

* rendering/InlineTextBox.cpp:
(WebCore::snappedSelectionRect):

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

4 months agoRename start/endPosition to start/endOffset in SelectionRangeData for clarity
megan_gardner@apple.com [Tue, 7 Jan 2020 22:33:34 +0000 (22:33 +0000)]
Rename start/endPosition to start/endOffset in SelectionRangeData for clarity
https://bugs.webkit.org/show_bug.cgi?id=205838

Reviewed by Megan Gardner.

Offset is a more correct term for this variable, as it is just an unsigned.

No behavior change.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::verifySelectionState const):
(WebCore::InlineTextBox::selectionStartEnd const):
(WebCore::InlineTextBox::highlightStartEnd const):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::isSelected const):
* rendering/RenderText.cpp:
(WebCore::RenderText::collectSelectionRectsForLineBoxes):
* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::setSelectionState):
* rendering/SelectionRangeData.cpp:
(WebCore::rendererAfterOffset):
(WebCore::collect):
(WebCore::SelectionRangeData::selectionStateForRenderer):
(WebCore::SelectionRangeData::repaint const):
(WebCore::SelectionRangeData::collectBounds const):
(WebCore::SelectionRangeData::apply):
(WebCore::rendererAfterPosition): Deleted.
* rendering/SelectionRangeData.h:
(WebCore::SelectionRangeData::Context::Context):
(WebCore::SelectionRangeData::Context::startOffset const):
(WebCore::SelectionRangeData::Context::endOffset const):
(WebCore::SelectionRangeData::Context::operator== const):
(WebCore::SelectionRangeData::startOffset const):
(WebCore::SelectionRangeData::endOffset const):
(WebCore::SelectionRangeData::Context::startPosition const): Deleted.
(WebCore::SelectionRangeData::Context::endPosition const): Deleted.
(WebCore::SelectionRangeData::startPosition const): Deleted.
(WebCore::SelectionRangeData::endPosition const): Deleted.

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

4 months agoAXIsolatedObject support for lists (l, ul, ol, dl).
andresg_22@apple.com [Tue, 7 Jan 2020 22:28:52 +0000 (22:28 +0000)]
AXIsolatedObject support for lists (l, ul, ol, dl).
https://bugs.webkit.org/show_bug.cgi?id=205874

Reviewed by Chris Fleizach.

- AXIsolatedObject implementation of isUnordered/Ordered/descriptionList.
- Client code doesn't downcast to AccessibilityList any longer,
but instead uses these methods that are exposed through AXCoreObject.

* accessibility/AccessibilityList.h:
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityObjectInterface.h:
* accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData):
* accessibility/isolatedtree/AXIsolatedTreeNode.h:
* accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::rolePlatformDescription const):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper subrole]):

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

4 months agoREGRESSION: [ Mac wk2 ] http/wpt/service-workers/persistent-importScripts.html is...
tsavell@apple.com [Tue, 7 Jan 2020 22:27:56 +0000 (22:27 +0000)]
REGRESSION: [ Mac wk2 ] http/wpt/service-workers/persistent-importScripts.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=205886

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 months ago[EWS] Limit pre-existing JSC tests failures to display in buildbot summary
aakash_jain@apple.com [Tue, 7 Jan 2020 22:14:12 +0000 (22:14 +0000)]
[EWS] Limit pre-existing JSC tests failures to display in buildbot summary
https://bugs.webkit.org/show_bug.cgi?id=205878

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(AnalyzeJSCTestsResults.start): Limit the number of failures to display.

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

4 months agoAdd a move constructor to IDBResultData
sihui_liu@apple.com [Tue, 7 Jan 2020 22:07:43 +0000 (22:07 +0000)]
Add a move constructor to IDBResultData
https://bugs.webkit.org/show_bug.cgi?id=205833
<rdar://problem/58146233>

Reviewed by Youenn Fablet.

* Modules/indexeddb/shared/IDBResultData.h:

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

4 months agoRe-sync web-platform-tests/xhr from upstream
psaavedra@igalia.com [Tue, 7 Jan 2020 21:58:34 +0000 (21:58 +0000)]
Re-sync web-platform-tests/xhr from upstream
https://bugs.webkit.org/show_bug.cgi?id=205641

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* web-platform-tests/xhr/FormData-append-expected.txt:
* web-platform-tests/xhr/FormData-append.html:
* web-platform-tests/xhr/META.yml:
* web-platform-tests/xhr/abort-after-receive.htm: Removed.
* web-platform-tests/xhr/abort-after-send.htm: Removed.
* web-platform-tests/xhr/abort-after-stop.htm: Removed.
* web-platform-tests/xhr/abort-after-timeout.htm: Removed.
* web-platform-tests/xhr/abort-during-done.htm: Removed.
* web-platform-tests/xhr/abort-during-headers-received.htm: Removed.
* web-platform-tests/xhr/abort-during-loading.htm: Removed.
* web-platform-tests/xhr/abort-during-unsent.htm: Removed.
* web-platform-tests/xhr/abort-during-upload.htm: Removed.
* web-platform-tests/xhr/abort-event-abort.htm: Removed.
* web-platform-tests/xhr/abort-event-listeners.htm: Removed.
* web-platform-tests/xhr/abort-event-loadend.htm: Removed.
* web-platform-tests/xhr/abort-upload-event-abort.htm: Removed.
* web-platform-tests/xhr/abort-upload-event-loadend.htm: Removed.
* web-platform-tests/xhr/access-control-and-redirects-async-same-origin.htm: Removed.
* web-platform-tests/xhr/access-control-and-redirects-async.htm: Removed.
* web-platform-tests/xhr/access-control-and-redirects.htm: Removed.
* web-platform-tests/xhr/access-control-basic-allow-access-control-origin-header.htm: Removed.
* web-platform-tests/xhr/access-control-basic-allow-async.htm: Removed.
* web-platform-tests/xhr/access-control-basic-allow-non-cors-safelisted-method-async.htm: Removed.
* web-platform-tests/xhr/access-control-basic-allow-non-cors-safelisted-method.htm: Removed.
* web-platform-tests/xhr/access-control-basic-allow-preflight-cache-invalidation-by-header.htm: Removed.
* web-platform-tests/xhr/access-control-basic-allow-preflight-cache-invalidation-by-method.htm: Removed.
* web-platform-tests/xhr/access-control-basic-allow-preflight-cache-timeout.htm: Removed.
* web-platform-tests/xhr/access-control-basic-allow-preflight-cache.htm: Removed.
* web-platform-tests/xhr/access-control-basic-allow-star.htm: Removed.
* web-platform-tests/xhr/access-control-basic-allow.htm: Removed.
* web-platform-tests/xhr/access-control-basic-cors-safelisted-request-headers-expected.txt:
* web-platform-tests/xhr/access-control-basic-cors-safelisted-request-headers.htm:
* web-platform-tests/xhr/event-abort.htm: Removed.
* web-platform-tests/xhr/event-error.sub.html: Removed.
* web-platform-tests/xhr/event-load.htm: Removed.
* web-platform-tests/xhr/event-loadend.htm: Removed.
* web-platform-tests/xhr/event-loadstart-upload.htm: Removed.
* web-platform-tests/xhr/event-loadstart.htm: Removed.
* web-platform-tests/xhr/event-progress.htm: Removed.
* web-platform-tests/xhr/event-readystate-sync-open.htm: Removed.
* web-platform-tests/xhr/event-readystatechange-loaded.htm: Removed.
* web-platform-tests/xhr/event-timeout-order.htm: Removed.
* web-platform-tests/xhr/event-timeout.htm: Removed.
* web-platform-tests/xhr/event-upload-progress-crossorigin.htm: Removed.
* web-platform-tests/xhr/event-upload-progress.htm: Removed.
* web-platform-tests/xhr/formdata-expected.txt:
* web-platform-tests/xhr/formdata-set-expected.txt:
* web-platform-tests/xhr/formdata-set.htm:
* web-platform-tests/xhr/formdata.htm:
* web-platform-tests/xhr/getallresponseheaders-expected.txt:
* web-platform-tests/xhr/getallresponseheaders.htm:
* web-platform-tests/xhr/idlharness.any.js:
* web-platform-tests/xhr/open-during-abort-processing-expected.txt:
* web-platform-tests/xhr/open-during-abort-processing.htm:
* web-platform-tests/xhr/overridemimetype-blob.html:
* web-platform-tests/xhr/overridemimetype-unsent-state-force-shiftjis.htm: Removed.
* web-platform-tests/xhr/resources/access-control-basic-options-not-supported.py:
(main):
* web-platform-tests/xhr/resources/authentication.py:
(main):
* web-platform-tests/xhr/resources/echo-method.py:
(main):
* web-platform-tests/xhr/resources/headers.asis:
* web-platform-tests/xhr/response-data-progress.htm:
* web-platform-tests/xhr/responsexml-document-properties-expected.txt:
* web-platform-tests/xhr/responsexml-document-properties.htm:
* web-platform-tests/xhr/send-authentication-basic-cors-not-enabled-expected.txt:
* web-platform-tests/xhr/send-authentication-basic-cors-not-enabled.htm:
* web-platform-tests/xhr/send-authentication-basic-repeat-no-args.htm:
* web-platform-tests/xhr/send-content-type-charset.htm:
* web-platform-tests/xhr/send-data-arraybuffer.htm: Removed.
* web-platform-tests/xhr/send-data-arraybufferview.htm: Removed.
* web-platform-tests/xhr/send-data-es-object.htm: Removed.
* web-platform-tests/xhr/send-data-formdata.htm: Removed.
* web-platform-tests/xhr/send-redirect-bogus-sync-expected.txt:
* web-platform-tests/xhr/send-redirect-bogus-sync.htm:
* web-platform-tests/xhr/send-redirect-bogus.htm:
* web-platform-tests/xhr/send-redirect-post-upload.htm:
* web-platform-tests/xhr/setrequestheader-content-type.htm:
* web-platform-tests/xhr/sync-no-progress.any.js:
* web-platform-tests/xhr/timeout-cors-async.htm:
* web-platform-tests/xhr/w3c-import.log:

LayoutTests:

* TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator-wk2/TestExpectations:
* platform/ios/imported/w3c/web-platform-tests/xhr/getallresponseheaders-expected.txt:
* platform/mac-wk1/TestExpectations:
* tests-options.json:

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

4 months agoFirst character in each word-wrapped line has incorrect character rect when requested...
dbates@webkit.org [Tue, 7 Jan 2020 21:26:54 +0000 (21:26 +0000)]
First character in each word-wrapped line has incorrect character rect when requested range spans multiple lines
https://bugs.webkit.org/show_bug.cgi?id=205842
<rdar://problem/56884325>

Reviewed by Zalan Bujtas.

Source/WebCore:

Adds a new BoundingRectBehavior enumarator, IgnoreEmptyTextSelections, to ignore line boxes
that are not selected by the specified range when computing the bounding box for it via Range::absoluteBoundingBox().

A line box is said to be selected if there is at least one character in the specified character
range. So, a range whose start position coincides with the edge of a line box does not select the
box. However such ranges are considered to select such boxes when passed to web-exposed APIs
{Element, Range}.getClientRects() and {Element, Range}.getBoundingClientRect(). These ranges
produce empty client rectangles and these empty rectangles effect the computation of the bounding
client rect. This is all speced behavior.

When computing the glpyh bounding box for a document context request, these empty rectangles are
not meaningful and cause weird results: the empty rect is unioned with the rect for the next selected
character producing a rectangle that overlaps two lines. Ignoring them makes things behave more like
NSLayoutManager.

* dom/Range.cpp:
(WebCore::Range::absoluteBoundingBox const):
(WebCore::Range::absoluteRectsForRangeInText const):
(WebCore::Range::absoluteTextQuads const):
* dom/Range.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::absoluteQuadsForRange const):
* rendering/RenderText.h:
* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::absoluteQuadsForRange const):
Pass an option to ignore empty text selections through. By default Range::absoluteBoundingBox() takes
an empty set of BoundingRectBehavior enumerators to keep its current behavior.

(WebCore::RenderTextLineBoxes::absoluteRectsForRange const): Added a boolean as to whether to
ignore empty selections. If enabled, skip all boxes that are not selected by the specified
character range.
* rendering/RenderTextLineBoxes.h:
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::collectAbsoluteQuadsForRange): Ditto.
* rendering/SimpleLineLayoutFunctions.h:

Source/WebKit:

Pass BoundingRectBehavior::IgnoreEmptyTextSelections to Range::absoluteBoundingBox() to compute
the glyph bounding box ignoring empty text selections that would typically occur if the start of
the range coincide with the edge of a line box. This makes the behavior more consistent with
the behavior of NSLayoutManager.

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

Tools:

Add a new test.

* TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:
(TEST):

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

4 months ago[JSC] Remove vm accessor in JSVirtualMachine to reduce binary size
ysuzuki@apple.com [Tue, 7 Jan 2020 21:13:23 +0000 (21:13 +0000)]
[JSC] Remove vm accessor in JSVirtualMachine to reduce binary size
https://bugs.webkit.org/show_bug.cgi?id=205880

Reviewed by Mark Lam.

Objective-C has reflection mechanism. This means that fields, methods, and their types
need to hold its string representations in binary even if we are using release build.
While typical Objective-C class does not have large size of type names, C++ struct / class
has very large one, and putting them in Objective-C method names, parameter types, or fields
makes binary size very large.

By analyzing JavaScriptCore binary, I found that Objective-C method type symbols are taking 200~KB
binary size. (Section __objc_methtype: 235081 (addr 0x105e9a3 offset 17164707)). And it is due to
JSC::VM type included in `[JSVirtualMachine vm]` accessor.

This patch removes this accessor and gets 200KB binary size reduction.

* API/JSScript.mm:
(-[JSScript readCache]):
(-[JSScript sourceCode]):
(-[JSScript jsSourceCode]):
(-[JSScript writeCache:]):
* API/JSVirtualMachine.mm:
(-[JSVirtualMachine JSContextGroupRef]):
(-[JSVirtualMachine isWebThreadAware]):
(-[JSVirtualMachine vm]): Deleted.
* API/JSVirtualMachineInternal.h:

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

4 months agoUnreviewed, rolling out r254144.
ryanhaddad@apple.com [Tue, 7 Jan 2020 21:10:15 +0000 (21:10 +0000)]
Unreviewed, rolling out r254144.

Broke the iOS build.

Reverted changeset:

"First character in each word-wrapped line has incorrect
character rect when requested range spans multiple lines"
https://bugs.webkit.org/show_bug.cgi?id=205842
https://trac.webkit.org/changeset/254144

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

4 months agoMark webexposed/css-properties-behind-flags.html as flaky
ap@apple.com [Tue, 7 Jan 2020 20:58:35 +0000 (20:58 +0000)]
Mark webexposed/css-properties-behind-flags.html as flaky
https://bugs.webkit.org/show_bug.cgi?id=197204

* platform/mac/TestExpectations:

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

4 months agoresults.webkit.org: Handle case where processing data is undefined
jbedard@apple.com [Tue, 7 Jan 2020 20:54:36 +0000 (20:54 +0000)]
results.webkit.org: Handle case where processing data is undefined
https://bugs.webkit.org/show_bug.cgi?id=205870

Rubber-stamped by Aakash Jain.

* resultsdbpy/resultsdbpy/model/upload_context.py:
(UploadContext._do_job_for_key): If the job content is undefined, mark the job as
finished.

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

4 months ago[WebGL] Fill in missing WebGL2 entry points
dino@apple.com [Tue, 7 Jan 2020 20:47:45 +0000 (20:47 +0000)]
[WebGL] Fill in missing WebGL2 entry points
https://bugs.webkit.org/show_bug.cgi?id=205689
<rdar://problem/58280920>

Reviewed by Simon Fraser.

Fill in the bits of the WebGL2 API that were missing.

The specification splits into Base and Implementation
interfaces, but I put everything in one place since
we already have to check that we don't have function
signature clashes.

I also fixed some situations where we were not
allowing for an Exception to be returned.

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::texImage2D):
(WebCore::WebGL2RenderingContext::texImage3D):
(WebCore::WebGL2RenderingContext::texSubImage2D):
(WebCore::WebGL2RenderingContext::texSubImage3D):
(WebCore::WebGL2RenderingContext::compressedTexImage2D):
(WebCore::WebGL2RenderingContext::compressedTexSubImage2D):
(WebCore::WebGL2RenderingContext::uniform1fv):
(WebCore::WebGL2RenderingContext::uniform2fv):
(WebCore::WebGL2RenderingContext::uniform3fv):
(WebCore::WebGL2RenderingContext::uniform4fv):
(WebCore::WebGL2RenderingContext::uniform1iv):
(WebCore::WebGL2RenderingContext::uniform2iv):
(WebCore::WebGL2RenderingContext::uniform3iv):
(WebCore::WebGL2RenderingContext::uniform4iv):
(WebCore::WebGL2RenderingContext::uniformMatrix2fv):
(WebCore::WebGL2RenderingContext::uniformMatrix3fv):
(WebCore::WebGL2RenderingContext::uniformMatrix4fv):
(WebCore::WebGL2RenderingContext::readPixels):
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGL2RenderingContext.idl:
* html/canvas/WebGLRenderingContext.idl:
* html/canvas/WebGLRenderingContextBase.idl:

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

4 months agoReformat WebFrameLoaderClient logging
krollin@apple.com [Tue, 7 Jan 2020 20:38:48 +0000 (20:38 +0000)]
Reformat WebFrameLoaderClient logging
https://bugs.webkit.org/show_bug.cgi?id=205869
<rdar://problem/58379240>

Reviewed by Brent Fulgham.

Update the format used by WebFrameLoaderClient in its RELEASE_LOG
logging. Use the format used by WebPageProxy and
NetworkResourceLoader, which is generally of the form:

    <object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values>

So, for example:

    0x4a1d7c310 - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition, page = 0x7f83ba009208

becomes:

    0x4a1d7c310 - [webFrame=0x7ff703f03b68, webFrameID=3, webPage=0x7ff704831808, webPageID=15] WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition

No new tests - no added or changed functionality.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
(WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):

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

4 months agotransitions/default-timing-function.html is failing
commit-queue@webkit.org [Tue, 7 Jan 2020 20:38:43 +0000 (20:38 +0000)]
transitions/default-timing-function.html is failing
https://bugs.webkit.org/show_bug.cgi?id=205804
<rdar://problem/58343509>

Patch by Antoine Quint <graouts@apple.com> on 2020-01-07
Reviewed by Simon Fraser.

To pause a Web Animation at a given time, we need to call `pause()` first and set `currentTime` after. Otherwise, the animation's hold
time will not be set to the provided value and the time may progress between the moment pause() was called and the moment the pending
pause task it creates is performed.

The reason the behavior changed for this test is because in r254042 we added a call to updateRendering() which updates the timeline time
which otherwise wouldn't have been updated.

* animations/resources/animation-test-helpers.js:
* transitions/resources/transition-test-helpers.js:

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

4 months agoREGRESSION: [ Mac Debug ] inspector/page/setBootstrapScript-main-frame.html is a...
drousso@apple.com [Tue, 7 Jan 2020 20:17:41 +0000 (20:17 +0000)]
REGRESSION: [ Mac Debug ] inspector/page/setBootstrapScript-main-frame.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=205807
<rdar://problem/58344669>

Reviewed by Dean Jackson.

Source/WebInspectorUI:

* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.async createBootstrapScript):
(WI.NetworkManager.prototype._handleBootstrapScriptContentDidChange):
Ensure that `Page.setBootstrapScript` is called when restoring the bootstrap script from the
IndexedDB storage. Otherwise, in situations like when Web Inspector is first opened, we will
show the Inspector Bootstrap Script in the UI, but not actually set it on the inspected page.

LayoutTests:

* inspector/page/setBootstrapScript-main-frame.html:
In addition to waiting for `Page.reload`, we should also wait for the page to actually load.
Set the content of the bootstrap script during its creation instead of as a two step process.
Avoid an assertion by setting the enabled state after the bootstrap script is initalized.

* platform/mac/TestExpectations:
Remove expectation added in r254059.

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

4 months agoFirst character in each word-wrapped line has incorrect character rect when requested...
dbates@webkit.org [Tue, 7 Jan 2020 20:03:06 +0000 (20:03 +0000)]
First character in each word-wrapped line has incorrect character rect when requested range spans multiple lines
https://bugs.webkit.org/show_bug.cgi?id=205842
<rdar://problem/56884325>

Reviewed by Zalan Bujtas.

Source/WebCore:

Adds a new BoundingRectBehavior enumarator, IgnoreEmptyTextSelections, to ignore line boxes
that are not selected by the specified range when computing the bounding box for it via Range::absoluteBoundingBox().

A line box is said to be selected if there is at least one character in the specified character
range. So, a range whose start position coincides with the edge of a line box does not select the
box. However such ranges are considered to select such boxes when passed to web-exposed APIs
{Element, Range}.getClientRects() and {Element, Range}.getBoundingClientRect(). These ranges
produce empty client rectangles and these empty rectangles effect the computation of the bounding
client rect. This is all speced behavior.

When computing the glpyh bounding box for a document context request, these empty rectangles are
not meaningful and cause weird results: the empty rect is unioned with the rect for the next selected
character producing a rectangle that overlaps two lines. Ignoring them makes things behave more like
NSLayoutManager.

* dom/Range.cpp:
(WebCore::Range::absoluteBoundingBox const):
(WebCore::Range::absoluteRectsForRangeInText const):
(WebCore::Range::absoluteTextQuads const):
* dom/Range.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::absoluteQuadsForRange const):
* rendering/RenderText.h:
* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::absoluteQuadsForRange const):
Pass an option to ignore empty text selections through. By default Range::absoluteBoundingBox() takes
an empty set of BoundingRectBehavior enumerators to keep its current behavior.

(WebCore::RenderTextLineBoxes::absoluteRectsForRange const): Added a boolean as to whether to
ignore empty selections. If enabled, skip all boxes that are not selected by the specified
character range.
* rendering/RenderTextLineBoxes.h:
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::collectAbsoluteQuadsForRange): Ditto.
* rendering/SimpleLineLayoutFunctions.h:

Source/WebKit:

Pass BoundingRectBehavior::IgnoreEmptyTextSelections to Range::absoluteBoundingBox() to compute
the glyph bounding box ignoring empty text selections that would typically occur if the start of
the range coincide with the edge of a line box. This makes the behavior more consistent with
the behavior of NSLayoutManager.

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

Tools:

Add a new test.

* TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:
(TEST):

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

4 months agoUnreviewed non-arm64e build fix.
keith_miller@apple.com [Tue, 7 Jan 2020 19:58:27 +0000 (19:58 +0000)]
Unreviewed non-arm64e build fix.

* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::reifyInlinedCallFrames):

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

4 months agoBytecode checkpoint fixes for arm64(e)
keith_miller@apple.com [Tue, 7 Jan 2020 19:43:50 +0000 (19:43 +0000)]
Bytecode checkpoint fixes for arm64(e)
https://bugs.webkit.org/show_bug.cgi?id=205871

Reviewed by Michael Saboff.

The original bytecode checkpoint patch had a couple of bugs on
arm64(e). For arm64 generally, when osr exiting to an inline
varargs frame we didn't set the return value of callee before
moving the call frame register into a0 for the slow path
call. This meant we clobber the return value on arm64 as a0 == r0.

On arm64e the osr exit compiler set the tag for the return pc for
an inline frame to JSEntryTag but the code expected
NoTag. Additionally, in the stack unwinder, we were using the
JSEntryTag but we should have been stripping the tag from the
stack value.

* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::callerReturnPC):
(JSC::DFG::reifyInlinedCallFrames):
* dfg/DFGOSRExitCompilerCommon.h:
* interpreter/Interpreter.cpp:
(JSC::UnwindFunctor::operator() const):
* llint/LowLevelInterpreter.asm:

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

4 months agoFlaky API Test: TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS
jer.noble@apple.com [Tue, 7 Jan 2020 19:27:11 +0000 (19:27 +0000)]
Flaky API Test: TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS
https://bugs.webkit.org/show_bug.cgi?id=194340
<rdar://problem/50507254>

Reviewed by Eric Carlson.

Workaround for AVFoundation crash for OS versions prior to platform fix. This crash occurrs infrequently
while triggering KVO due to an internal @property change. Work around the crash by disabling KVO for that
property at runtime, by injecting a new class method +automaticallyNotifiesObserversOfSuppressesVideoLayers
immediately after soft linking the AVFoundation library.

* pal/cocoa/AVFoundationSoftLink.mm:
(PAL::justReturnsNO):
(PAL::AVFoundationLibrary):

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

4 months agocheck-webkit-style: bmalloc doesn't use config.h
basuke.suzuki@sony.com [Tue, 7 Jan 2020 19:04:01 +0000 (19:04 +0000)]
check-webkit-style: bmalloc doesn't use config.h
https://bugs.webkit.org/show_bug.cgi?id=205840

Reviewed by Jonathan Bedard.

* Scripts/webkitpy/style/checkers/cpp.py:
(_IncludeState.check_next_include_order):
(check_include_line):
(check_has_config_header):

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

4 months agoCorrect some conflicting expectations for fast/text/emoji-gender- tests
tsavell@apple.com [Tue, 7 Jan 2020 18:55:55 +0000 (18:55 +0000)]
Correct some conflicting expectations for fast/text/emoji-gender- tests
https://bugs.webkit.org/show_bug.cgi?id=204820

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 months agoCorrect expectations made in r254134, r254135, and r254136
tsavell@apple.com [Tue, 7 Jan 2020 18:39:11 +0000 (18:39 +0000)]
Correct expectations made in r254134, r254135, and r254136
https://bugs.webkit.org/show_bug.cgi?id=205862
https://bugs.webkit.org/show_bug.cgi?id=205865
https://bugs.webkit.org/show_bug.cgi?id=205867

Unreviewed test gardneing.

* platform/mac/TestExpectations:

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

4 months agoUnreviewed, rolling out r254132.
commit-queue@webkit.org [Tue, 7 Jan 2020 18:35:27 +0000 (18:35 +0000)]
Unreviewed, rolling out r254132.
https://bugs.webkit.org/show_bug.cgi?id=205868

It is breaking WinCairo build and internal builds. (Requested
by youenn on #webkit).

Reverted changeset:

"Implement MediaRecorder backend in GPUProcess"
https://bugs.webkit.org/show_bug.cgi?id=205802
https://trac.webkit.org/changeset/254132

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

4 months agoREGRESSION: [ Mojave+ wk2 ] webgpu/draw-indexed-triangles.html is a flaky failure
tsavell@apple.com [Tue, 7 Jan 2020 17:59:02 +0000 (17:59 +0000)]
REGRESSION: [ Mojave+ wk2 ] webgpu/draw-indexed-triangles.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=205867

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 months agoREGRESSION: [ Mojave+ wk2 ] webgpu/whlsl/ensure-proper-variable-lifetime-2.html is...
tsavell@apple.com [Tue, 7 Jan 2020 17:57:21 +0000 (17:57 +0000)]
REGRESSION: [ Mojave+ wk2 ] webgpu/whlsl/ensure-proper-variable-lifetime-2.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=205865

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 months agoREGRESSION: [ Mojave+ wk2 ] webgpu/whlsl/while-loop-break.html is a flaky failure
tsavell@apple.com [Tue, 7 Jan 2020 17:55:35 +0000 (17:55 +0000)]
REGRESSION: [ Mojave+ wk2 ] webgpu/whlsl/while-loop-break.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=205862

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 months agoRe-sync web-platform-tests/content-security-policy from upstream
psaavedra@igalia.com [Tue, 7 Jan 2020 17:23:59 +0000 (17:23 +0000)]
Re-sync web-platform-tests/content-security-policy from upstream
https://bugs.webkit.org/show_bug.cgi?id=205639

Reviewed by Carlos Alberto Lopez Perez.

LayoutTests/imported/w3c:

* resources/resource-files.json:
* web-platform-tests/content-security-policy/README.html:
* web-platform-tests/content-security-policy/connect-src/connect-src-beacon-allowed.sub.html:
* web-platform-tests/content-security-policy/connect-src/connect-src-beacon-blocked.sub.html:
* web-platform-tests/content-security-policy/connect-src/connect-src-beacon-redirect-to-blocked.sub.html:
* web-platform-tests/content-security-policy/embedded-enforcement/support/echo-required-csp.py:
(main):
* web-platform-tests/content-security-policy/font-src/font-none-blocked.sub.html:
* web-platform-tests/content-security-policy/frame-ancestors/frame-ancestors-from-serviceworker.https-expected.txt: Added.
* web-platform-tests/content-security-policy/frame-ancestors/frame-ancestors-from-serviceworker.https.html: Added.
* web-platform-tests/content-security-policy/frame-ancestors/frame-ancestors-nested-cross-in-same-none-block-expected.txt:
* web-platform-tests/content-security-policy/frame-ancestors/frame-ancestors-nested-cross-in-same-self-block-expected.txt:
* web-platform-tests/content-security-policy/frame-ancestors/frame-ancestors-nested-cross-in-same-star-allow-expected.txt:
* web-platform-tests/content-security-policy/frame-ancestors/frame-ancestors-nested-cross-in-same-url-allow-expected.txt:
* web-platform-tests/content-security-policy/frame-ancestors/frame-ancestors-nested-cross-in-same-url-block-expected.txt:
* web-platform-tests/content-security-policy/frame-ancestors/frame-ancestors-nested-cross-in-sandboxed-cross-url-block.html:
* web-platform-tests/content-security-policy/frame-ancestors/frame-ancestors-nested-same-in-same-none-block-expected.txt:
* web-platform-tests/content-security-policy/frame-ancestors/frame-ancestors-nested-same-in-same-url-block-expected.txt:
* web-platform-tests/content-security-policy/frame-ancestors/frame-ancestors-none-block-expected.txt:
* web-platform-tests/content-security-policy/frame-ancestors/report-blocked-frame.sub-expected.txt: Added.
* web-platform-tests/content-security-policy/frame-ancestors/report-blocked-frame.sub.html: Added.
* web-platform-tests/content-security-policy/frame-ancestors/report-only-frame.sub-expected.txt: Added.
* web-platform-tests/content-security-policy/frame-ancestors/report-only-frame.sub.html: Added.
* web-platform-tests/content-security-policy/frame-ancestors/support/content-security-policy-report-only.sub.html: Added.
* web-platform-tests/content-security-policy/frame-ancestors/support/content-security-policy-report-only.sub.html.sub.headers: Added.
* web-platform-tests/content-security-policy/frame-ancestors/support/content-security-policy.sub.html: Added.
* web-platform-tests/content-security-policy/frame-ancestors/support/content-security-policy.sub.html.sub.headers: Added.
* web-platform-tests/content-security-policy/frame-ancestors/support/frame-ancestors-test.sub.js:
(iframeLoaded):
* web-platform-tests/content-security-policy/frame-ancestors/support/service-worker.js: Added.
(self.onfetch.e.e.respondWith):
* web-platform-tests/content-security-policy/frame-ancestors/support/w3c-import.log:
* web-platform-tests/content-security-policy/frame-ancestors/w3c-import.log:
* web-platform-tests/content-security-policy/frame-src/frame-src-same-document-expected.txt: Added.
* web-platform-tests/content-security-policy/frame-src/frame-src-same-document-meta-expected.txt: Added.
* web-platform-tests/content-security-policy/frame-src/frame-src-same-document-meta.html: Added.
* web-platform-tests/content-security-policy/frame-src/frame-src-same-document.html: Added.
* web-platform-tests/content-security-policy/frame-src/frame-src-same-document.html.headers: Added.
* web-platform-tests/content-security-policy/frame-src/w3c-import.log:
* web-platform-tests/content-security-policy/generic/generic-0_1-script-src.html:
* web-platform-tests/content-security-policy/generic/generic-0_10.sub-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/content-security-policy/generic/generic-0_9.sub-expected.txt.
* web-platform-tests/content-security-policy/generic/generic-0_10.sub.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/content-security-policy/generic/generic-0_10.html.
* web-platform-tests/content-security-policy/generic/generic-0_2-expected.txt:
* web-platform-tests/content-security-policy/generic/generic-0_2.html:
* web-platform-tests/content-security-policy/generic/generic-0_8.sub-expected.txt:
* web-platform-tests/content-security-policy/generic/generic-0_8.sub.html:
* web-platform-tests/content-security-policy/generic/generic-0_8_1.sub.html:
* web-platform-tests/content-security-policy/generic/generic-0_9.sub-expected.txt:
* web-platform-tests/content-security-policy/generic/generic-0_9.sub.html:
* web-platform-tests/content-security-policy/generic/no-default-src.sub-expected.txt:
* web-platform-tests/content-security-policy/generic/no-default-src.sub.html:
* web-platform-tests/content-security-policy/generic/positiveTest.js:
(onload): Deleted.
* web-platform-tests/content-security-policy/generic/w3c-import.log:
* web-platform-tests/content-security-policy/img-src/img-src-4_1.sub-expected.txt:
* web-platform-tests/content-security-policy/img-src/img-src-4_1.sub.html:
* web-platform-tests/content-security-policy/img-src/img-src-host-partial-wildcard-allowed.sub-expected.txt:
* web-platform-tests/content-security-policy/img-src/img-src-host-partial-wildcard-allowed.sub.html:
* web-platform-tests/content-security-policy/img-src/img-src-port-wildcard-allowed.sub-expected.txt:
* web-platform-tests/content-security-policy/img-src/img-src-port-wildcard-allowed.sub.html:
* web-platform-tests/content-security-policy/inside-worker/support/connect-src-allow.sub.js:
* web-platform-tests/content-security-policy/inside-worker/support/connect-src-self.sub.js:
(promise_test.t.return.new.Promise):
(async_test.t.Promise.all.new.Promise): Deleted.
* web-platform-tests/content-security-policy/inside-worker/support/script-src-allow.sub.js:
* web-platform-tests/content-security-policy/inside-worker/support/script-src-self.sub.js:
* web-platform-tests/content-security-policy/media-src/media-src-7_3.sub.html:
* web-platform-tests/content-security-policy/media-src/media-src-7_3_2.sub.html:
* web-platform-tests/content-security-policy/meta/sandbox-iframe-expected.txt: Added.
* web-platform-tests/content-security-policy/meta/sandbox-iframe.html: Added.
* web-platform-tests/content-security-policy/meta/w3c-import.log:
* web-platform-tests/content-security-policy/reporting/report-cross-origin-no-cookies.sub.html:
* web-platform-tests/content-security-policy/reporting/report-only-in-meta.sub.html:
* web-platform-tests/content-security-policy/reporting/report-only-unsafe-eval-expected.txt: Added.
* web-platform-tests/content-security-policy/reporting/report-only-unsafe-eval.html: Added.
* web-platform-tests/content-security-policy/reporting/report-only-unsafe-eval.html.sub.headers: Added.
* web-platform-tests/content-security-policy/reporting/report-uri-from-child-frame-expected.txt:
* web-platform-tests/content-security-policy/reporting/report-uri-from-child-frame.html:
* web-platform-tests/content-security-policy/reporting/w3c-import.log:
* web-platform-tests/content-security-policy/script-src/script-src-sri_hash.sub-expected.txt:
* web-platform-tests/content-security-policy/script-src/script-src-sri_hash.sub.html:
* web-platform-tests/content-security-policy/script-src/scripthash-basic-blocked-error-event-expected.txt: Added.
* web-platform-tests/content-security-policy/script-src/scripthash-basic-blocked-error-event.html: Added.
* web-platform-tests/content-security-policy/script-src/scripthash-changed-1-expected.txt: Added.
* web-platform-tests/content-security-policy/script-src/scripthash-changed-1.html: Added.
* web-platform-tests/content-security-policy/script-src/scripthash-changed-2-expected.txt: Added.
* web-platform-tests/content-security-policy/script-src/scripthash-changed-2.html: Added.
* web-platform-tests/content-security-policy/script-src/scripthash-unicode-normalization.sub.html:
* web-platform-tests/content-security-policy/script-src/scriptnonce-changed-1-expected.txt: Added.
* web-platform-tests/content-security-policy/script-src/scriptnonce-changed-1.html: Added.
* web-platform-tests/content-security-policy/script-src/scriptnonce-changed-2-expected.txt: Added.
* web-platform-tests/content-security-policy/script-src/scriptnonce-changed-2.html: Added.
* web-platform-tests/content-security-policy/script-src/support/change-scripthash-before-execute.js: Added.
(document.getElementById):
* web-platform-tests/content-security-policy/script-src/support/change-scriptnonce-before-execute.js: Added.
(document.getElementById):
* web-platform-tests/content-security-policy/script-src/support/empty.css: Added.
* web-platform-tests/content-security-policy/script-src/support/inline-script-should-be-blocked.js: Added.
(async_test.t.s.onerror.t.step_func):
(async_test.t.s.onload.t.step_func):
* web-platform-tests/content-security-policy/script-src/support/w3c-import.log:
* web-platform-tests/content-security-policy/script-src/support/worker-importscripts.js:
* web-platform-tests/content-security-policy/script-src/w3c-import.log:
* web-platform-tests/content-security-policy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-from-script.sub.html:
* web-platform-tests/content-security-policy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image.sub.html:
* web-platform-tests/content-security-policy/securitypolicyviolation/securitypolicyviolation-block-image-from-script.sub.html:
* web-platform-tests/content-security-policy/securitypolicyviolation/securitypolicyviolation-block-image.sub.html:
* web-platform-tests/content-security-policy/securitypolicyviolation/support/inside-worker.sub.js:
* web-platform-tests/content-security-policy/style-src/inline-style-allowed-while-cloning-objects.sub.html:
* web-platform-tests/content-security-policy/style-src/style-src-stylesheet-nonce-allowed.html:
* web-platform-tests/content-security-policy/style-src/style-src-stylesheet-nonce-blocked.html:
* web-platform-tests/content-security-policy/support/inject-image.sub.js:
* web-platform-tests/content-security-policy/svg/object-in-svg-foreignobject.sub.html:

LayoutTests:

* platform/mac-wk2/imported/w3c/web-platform-tests/content-security-policy/frame-ancestors/frame-ancestors-from-serviceworker.https-expected.txt: Added.
* platform/mac-wk2/imported/w3c/web-platform-tests/content-security-policy/frame-src/frame-src-same-document-meta-expected.txt: Added.
* platform/mac-wk2/imported/w3c/web-platform-tests/content-security-policy/reporting/report-only-in-meta.sub-expected.txt: Added.
* tests-options.json:

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

4 months agoImplement MediaRecorder backend in GPUProcess
youenn@apple.com [Tue, 7 Jan 2020 17:08:02 +0000 (17:08 +0000)]
Implement MediaRecorder backend in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=205802

Reviewed by Eric Carlson.

Source/WebCore:

Add a page provider to create MediaRecorderPrivate implementations.
This is used by WebKit layer to implement this in GPUProcess.

Update MediaRecorderPrivate by adding an error callback that is used to surface errors as MediaRecorder error events.

Covered by existing tests as MediaRecorder implementation in WebKitTestRunner will use GPUProcess.

* Headers.cmake:
* Modules/mediarecorder/MediaRecorder.cpp:
(WebCore::MediaRecorder::create):
(WebCore::MediaRecorder::createMediaRecorderPrivate):
* Modules/mediarecorder/MediaRecorder.h:
* Modules/mediarecorder/MediaRecorderProvider.cpp: Added.
(WebCore::MediaRecorderProvider::createMediaRecorderPrivate):
* Modules/mediarecorder/MediaRecorderProvider.h: Added.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.cpp:
(WebCore::pageConfigurationWithEmptyClients):
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(WebCore::Page::mediaRecorderProvider):
* page/PageConfiguration.cpp:
(WebCore::PageConfiguration::PageConfiguration):
* page/PageConfiguration.h:
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
(WebCore::MediaRecorderPrivateWriter::create):
* platform/mediastream/MediaStreamPrivate.h:
* platform/mediastream/MediaStreamTrackPrivate.h:
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setUseGPUProcessForWebRTC):

Source/WebKit:

Add support for sending audio/video tracks to record from WebProcess to GPUProcess.
Add a MediaRecorderPrivate implementation that supports sending one audio track and/or one video track to GPUProcess
and stopping/fetching data from the remote recorder in GPUProcess.

In GPUProcess, implement the remote recorder using the existing WebCore recorder writer.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::userMediaCaptureManagerProxy):
(WebKit::GPUConnectionToWebProcess::mediaRecorderManager):
(WebKit::GPUConnectionToWebProcess::didReceiveMessage):
* GPUProcess/GPUConnectionToWebProcess.h:
* GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
* GPUProcess/webrtc/RemoteMediaRecorder.cpp: Added.
(WebKit::RemoteMediaRecorder::create):
(WebKit::RemoteMediaRecorder::RemoteMediaRecorder):
(WebKit::RemoteMediaRecorder::~RemoteMediaRecorder):
(WebKit::RemoteMediaRecorder::storage):
(WebKit::RemoteMediaRecorder::audioSamplesStorageChanged):
(WebKit::RemoteMediaRecorder::audioSamplesAvailable):
(WebKit::RemoteMediaRecorder::videoSampleAvailable):
(WebKit::RemoteMediaRecorder::fetchData):
(WebKit::RemoteMediaRecorder::stopRecording):
* GPUProcess/webrtc/RemoteMediaRecorder.h: Added.
* GPUProcess/webrtc/RemoteMediaRecorder.messages.in: Added.
* GPUProcess/webrtc/RemoteMediaRecorderManager.cpp: Added.
(WebKit::RemoteMediaRecorderManager::RemoteMediaRecorderManager):
(WebKit::RemoteMediaRecorderManager::~RemoteMediaRecorderManager):
(WebKit::RemoteMediaRecorderManager::didReceiveRemoteMediaRecorderMessage):
(WebKit::RemoteMediaRecorderManager::createRecorder):
(WebKit::RemoteMediaRecorderManager::releaseRecorder):
* GPUProcess/webrtc/RemoteMediaRecorderManager.h: Added.
(WebKit::RemoteMediaRecorderManager::didReceiveMessageFromWebProcess):
* GPUProcess/webrtc/RemoteMediaRecorderManager.messages.in: Added.
* Scripts/webkit/messages.py:
* Sources.txt:
* SourcesCocoa.txt:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/GPU/media/MediaRecorderProvider.cpp: Added.
(WebCore::MediaRecorderProvider::createMediaRecorderPrivate):
* WebProcess/GPU/media/MediaRecorderProvider.h: Added.
* WebProcess/GPU/webrtc/MediaRecorderIdentifier.h: Added.
* WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp: Added.
(WebKit::MediaRecorderPrivate::MediaRecorderPrivate):
(WebKit::MediaRecorderPrivate::~MediaRecorderPrivate):
(WebKit::MediaRecorderPrivate::sampleBufferUpdated):
(WebKit::MediaRecorderPrivate::audioSamplesAvailable):
(WebKit::MediaRecorderPrivate::storageChanged):
(WebKit::MediaRecorderPrivate::fetchData):
(WebKit::MediaRecorderPrivate::stopRecording):
* WebProcess/GPU/webrtc/MediaRecorderPrivate.h: Added.
* WebProcess/GPU/webrtc/MediaRecorderProvider.cpp: Added.
(WebKit::MediaRecorderProvider::createMediaRecorderPrivate):
* WebProcess/GPU/webrtc/MediaRecorderProvider.h: Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_overriddenMediaType):

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKitLegacy/win:

* WebView.cpp:
(WebView::initWithFrame):

LayoutTests:

* http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html:
Do not use GPUProcess for this test until canvas buffers are IOSurfaces.

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

4 months ago[GTK][EME] ClearKey encrypted media gardening
commit-queue@webkit.org [Tue, 7 Jan 2020 17:06:51 +0000 (17:06 +0000)]
[GTK][EME] ClearKey encrypted media gardening
https://bugs.webkit.org/show_bug.cgi?id=205857

Unreviewed gardening.

Patch by Charlie Turner <mail@charles.plus> on 2020-01-07

* platform/gtk/TestExpectations: Skip
mock-MediaKeySession-{generateRequest,remove}.html and update some
no longer timing out test-cases.

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

4 months agoAdd an option to make video capture in GPUProcess
youenn@apple.com [Tue, 7 Jan 2020 16:49:06 +0000 (16:49 +0000)]
Add an option to make video capture in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=205853

Reviewed by Eric Carlson.

Source/WebKit:

Add an option to make video capture in GPU process.
Pass this option at creation of the web page so that the process can be updated after launch time.
Apply the same principle to other audio/video capture parameters.
Add SPI to update this preference.
Fix bug in the passing of preference to process pool for the video capture in UIProcess parameter, which is now an experimental flag and not an internal one.

Test: fast/mediastream/captureInGPUProcess.html

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* Shared/WebPreferences.yaml:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetCaptureVideoInGPUProcessEnabled):
(WKPreferencesGetCaptureVideoInGPUProcessEnabled):
* UIProcess/API/C/WKPreferencesRef.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::updateBoolValueForInternalDebugFeatureKey):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::initializeNewWebProcess):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_overriddenMediaType):
* WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::setupCaptureProcesses):
(WebKit::UserMediaCaptureManager::VideoFactory::createVideoCaptureSource):
* WebProcess/cocoa/UserMediaCaptureManager.h:
(WebKit::UserMediaCaptureManager::VideoFactory::setShouldCaptureInGPUProcess):

Tools:

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

* fast/mediastream/captureInGPUProcess-expected.txt: Renamed from LayoutTests/fast/mediastream/captureAudioInGPUProcess-expected.txt.
* fast/mediastream/captureInGPUProcess.html: Renamed from LayoutTests/fast/mediastream/captureAudioInGPUProcess.html.

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

4 months agoRe-sync web-platform-tests/css/cssom-view from upstream
shvaikalesh@gmail.com [Tue, 7 Jan 2020 16:43:47 +0000 (16:43 +0000)]
Re-sync web-platform-tests/css/cssom-view from upstream
https://bugs.webkit.org/show_bug.cgi?id=204649

Reviewed by Chris Dumez.

Re-sync web-platform-tests/css/cssom-view from upstream 106e0bdf02a1.

LayoutTests/imported/w3c:

* web-platform-tests/css/cssom-view/*: Updated.

LayoutTests:

* TestExpectations:
* tests-options.json:

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

4 months agoRe-sync web-platform-tests/domparsing from upstream
psaavedra@igalia.com [Tue, 7 Jan 2020 16:31:09 +0000 (16:31 +0000)]
Re-sync web-platform-tests/domparsing from upstream
https://bugs.webkit.org/show_bug.cgi?id=205638

Reviewed by Chris Dumez.

* resources/import-expectations.json:

Remove not longer needed domparsing skip instructions in the
import-expectations.json file

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

4 months agoLayout Test storage/indexeddb/IDBTransaction-page-cache.html is flaky
pvollan@apple.com [Tue, 7 Jan 2020 15:34:23 +0000 (15:34 +0000)]
Layout Test storage/indexeddb/IDBTransaction-page-cache.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=205856

Unreviewed test gardening.

* platform/win/TestExpectations:

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

4 months agoLayout Test http/wpt/css/css-highlight-api/highlight-text-across-elements.html is...
pvollan@apple.com [Tue, 7 Jan 2020 15:29:45 +0000 (15:29 +0000)]
Layout Test http/wpt/css/css-highlight-api/highlight-text-across-elements.html is failing
https://bugs.webkit.org/show_bug.cgi?id=205855

Unreviewed test gardening.

* platform/win/TestExpectations:

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

4 months agoFix non GPUProcess build issue in UserMediaCaptureManager
youenn@apple.com [Tue, 7 Jan 2020 14:49:43 +0000 (14:49 +0000)]
Fix non GPUProcess build issue in UserMediaCaptureManager
https://bugs.webkit.org/show_bug.cgi?id=205851

Reviewed by Eric Carlson.

Build fix, no change of behavior.

* WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::Source::connection):

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

4 months agoRemove loader/win
commit-queue@webkit.org [Tue, 7 Jan 2020 14:12:43 +0000 (14:12 +0000)]
Remove loader/win
https://bugs.webkit.org/show_bug.cgi?id=205852

Patch by Rob Buis <rbuis@igalia.com> on 2020-01-07
Reviewed by Youenn Fablet.

Remove loader/win since it is not used anymore.

* loader/win/DocumentLoaderWin.cpp: Removed.
* loader/win/FrameLoaderWin.cpp: Removed.

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

4 months agoImplementation of containsText for AXIsolatedObjects.
andresg_22@apple.com [Tue, 7 Jan 2020 13:15:42 +0000 (13:15 +0000)]
Implementation of containsText for AXIsolatedObjects.
https://bugs.webkit.org/show_bug.cgi?id=205847

Reviewed by Chris Fleizach.

No new tests, no new functionality.

- Moved implementation of containsText from AccessibilityObject to
AXCoreObject to be re-used by AXIsolatedObject.
- Implemented AXIsolatedObject::stringValue.
- AXIsolatedObject::isTable must return false because it is used in the
SPECIALIZE_TYPE_TRAITS_ACCESSIBILITY macro.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::containsText const): Moved to AXCoreObject.
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityObjectInterface.h:
(WebCore::AXCoreObject::containsText const):
* accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::containsText const): Implementation in base class AXCoreObject.
(WebCore::AXIsolatedObject::stringValue const): Deleted.
* accessibility/isolatedtree/AXIsolatedTreeNode.h:

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

4 months ago[GTK][WPE] Add API to retrieve and delete surrounding text for input methods
carlosgc@webkit.org [Tue, 7 Jan 2020 10:59:57 +0000 (10:59 +0000)]
[GTK][WPE] Add API to retrieve and delete surrounding text for input methods
https://bugs.webkit.org/show_bug.cgi?id=205716

Reviewed by Žan Doberšek.

Source/WebKit:

Extend WebKitInputMethodContext to be able to retrieve and delete surrounding text.

* Shared/EditorState.cpp:
(WebKit::EditorState::PostLayoutData::encode const): Encode paragraphContext and paragraphContextCursorPosition.
(WebKit::EditorState::PostLayoutData::decode): Decode paragraphContext and paragraphContextCursorPosition.
* Shared/EditorState.h: Add paragraphContext and paragraphContextCursorPosition.
* UIProcess/API/glib/InputMethodFilter.cpp:
(WebKit::InputMethodFilter::deleteSurroundingCallback): Callback to handle
WebKitInputMethodContext::delete-surrounding signal.
(WebKit::InputMethodFilter::setContext): Connect to WebKitInputMethodContext::delete-surrounding signal.
(WebKit::InputMethodFilter::notifySurrounding): Save the new surrounding text and position and call
webkit_input_method_context_notify_surrounding().
(WebKit::InputMethodFilter::deleteSurrounding): Ask WebKitWebView to delete the surrounding text.
* UIProcess/API/glib/InputMethodFilter.h:
* UIProcess/API/glib/WebKitInputMethodContext.cpp:
(webkit_input_method_context_class_init): Add delete-surrounding signal.
(webkit_input_method_context_notify_surrounding): Call the virtual method notify_surrounding if implemented.
* UIProcess/API/glib/WebKitWebView.cpp:
(webkitWebViewDeleteSurrounding): Call WebPageProxy::deleteSurrounding().
* UIProcess/API/glib/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/WebKitInputMethodContext.h:
* UIProcess/API/gtk/WebKitInputMethodContextImplGtk.cpp:
(contextRetrieveSurrounding): Call gtk_im_context_set_surrounding() with the current surrounding text and position.
(webkitInputMethodContextImplGtkConstructed): Connect to GtkIMContext::retrieve-surrounding signal.
(webkitInputMethodContextImplGtkNotifySurrounding): Save the new surrounding text and position.
(webkit_input_method_context_impl_gtk_class_init): Add implementation for notify_surrounding vfunc.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseUpdateTextInputState): Also notify the context about surrounding text and position.
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
* UIProcess/API/wpe/WPEView.cpp:
(WKWPE::View::selectionDidChange): Ditto.
* UIProcess/API/wpe/WebKitInputMethodContext.h:
* UIProcess/API/wpe/docs/wpe-1.0-sections.txt:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::deleteSurrounding): Send DeleteSurrounding message to web process.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::deleteSurrounding): Delete the given range.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Add DeleteSurrounding message.
* WebProcess/WebPage/glib/WebPageGLib.cpp:
(WebKit::WebPage::platformEditorState const): Moved from GTK and WPE here and also added paragraphContext and
paragraphContextCursorPosition initialization.
* WebProcess/WebPage/gtk/WebPageGtk.cpp: Remove platformEditorState().
* WebProcess/WebPage/wpe/WebPageWPE.cpp: Ditto.

Tools:

Add new test case for the new API.

* TestWebKitAPI/Tests/WebKitGLib/TestInputMethodContext.cpp:
(webkitInputMethodContextMockFinalize):
(webkitInputMethodContextMockNotifySurrounding):
(webkitInputMethodContextMockReset):
(webkit_input_method_context_mock_class_init):
(testWebKitInputMethodContextSurrounding):
(beforeAll):

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

4 months ago[GTK][WPE] Add API to set purpose and hints of active editable element to input methods
carlosgc@webkit.org [Tue, 7 Jan 2020 10:48:45 +0000 (10:48 +0000)]
[GTK][WPE] Add API to set purpose and hints of active editable element to input methods
https://bugs.webkit.org/show_bug.cgi?id=205605

Reviewed by Žan Doberšek.

.:

Add ENABLE_AUTOCAPITALIZE build flag. It's private and disabled by default, enabled in GTK and WPE ports.

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

PerformanceTests:

Split ENABLE_IOS_AUTOCORRECT_AND_AUTOCAPITALIZE and remove the IOS prefix.

* StitchMarker/wtf/FeatureDefines.h:

Source/WebCore:

Use ENABLE(AUTOCAPITALIZE) and ENABLE(AUTOCORRECT) instead of ENABLE(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).

* Sources.txt: Add Autocapitalize.cpp to the build.
* html/Autocapitalize.cpp: Add ENABLE(AUTOCAPITALIZE) guards.
* html/Autocapitalize.h: Ditto.
* html/HTMLElement.cpp:
* html/HTMLElement.h:
* html/HTMLElement.idl:
* html/HTMLFormControlElement.cpp:
* html/HTMLFormControlElement.h:
* html/HTMLFormElement.cpp:
* html/HTMLFormElement.h:
* loader/EmptyClients.cpp: Update to new API of EditorClient::setInputMethodState
* page/EditorClient.h: The focused element or nullptr is now received by setInputMethodState() instead of enabled/disabled boolean.
* page/FocusController.cpp:
(WebCore::FocusController::setFocusedElement): Pass the focused element or nullptr to setInputMethodState().

Source/WebKit:

Add input-purpose and input-hints properties to WebKitInputMethodContext. The message SetInputMethodState now
receives an optional InputMethodState struct with information about the purpose and hints of the active editable
element.

* Scripts/webkit/messages.py: Only include InputMethodState.h for GTK and WPE.
* Shared/glib/InputMethodState.cpp: Added.
(WebKit::InputMethodState::setPurposeOrHintForInputMode):
(WebKit::inputElementHasDigitsPattern):
(WebKit::InputMethodState::setPurposeForInputElement):
(WebKit::InputMethodState::addHintsForAutocapitalizeType):
(WebKit::InputMethodState::encode const):
(WebKit::InputMethodState::decode):
* Shared/glib/InputMethodState.h: Added.
(WebKit::operator==):
* SourcesGTK.txt:
* SourcesWPE.txt:
* UIProcess/API/glib/InputMethodFilter.cpp:
(WebKit::InputMethodFilter::setContext): Use isEnabled() instead of m_enabled.
(WebKit::InputMethodFilter::setState): Now receives an optional InputMethodState struct.
(WebKit::InputMethodFilter::filterKeyEvent): Use isEnabled() instead of m_enabled.
(WebKit::InputMethodFilter::isViewFocused const): Ditto.
(WebKit::toWebKitPurpose): Helper to convert InputMethodState::Purpose to WebKitInputPurpose.
(WebKit::toWebKitHints): Helper to convert InputMethodState::Hint to WebKitInputHints.
(WebKit::InputMethodFilter::notifyFocusedIn): Set the purpose and hints to the context.
(WebKit::InputMethodFilter::notifyFocusedOut): Use isEnabled() instead of m_enabled.
(WebKit::InputMethodFilter::notifyCursorRect): Ditto.
(WebKit::InputMethodFilter::preeditStarted): Ditto.
(WebKit::InputMethodFilter::preeditChanged): Ditto.
(WebKit::InputMethodFilter::preeditFinished): Ditto.
(WebKit::InputMethodFilter::committed): Ditto.
* UIProcess/API/glib/InputMethodFilter.h:
(WebKit::InputMethodFilter::isEnabled const): Return true if we have a state.
* UIProcess/API/glib/WebKitInputMethodContext.cpp:
(webkitInputMethodContextSetProperty): Properties setter.
(webkitInputMethodContextGetProperty): Properties getter.
(webkit_input_method_context_class_init): Add implementation for properties getter and setter.
(webkit_input_method_context_get_input_purpose):
(webkit_input_method_context_set_input_purpose):
(webkit_input_method_context_get_input_hints):
(webkit_input_method_context_set_input_hints):
* UIProcess/API/gtk/WebKitInputMethodContext.h:
* UIProcess/API/gtk/WebKitInputMethodContextImplGtk.cpp:
(toGtkInputPurpose): Helper to convert WebKitInputPurpose to GtkInputPurpose.
(toGtkInputHints): Helper to convert WebKitInputHints to GtkInputHints.
(inputPurposeChangedCallback): Set the purpose on GtkIMContext.
(inputHintsChangedCallback): Set the hints on GtkIMContext.
(webkitInputMethodContextImplGtkConstructed): Connect to notify signal for input-purpose and input-hints
properties of the context.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseSetInputMethodState):
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
* UIProcess/API/wpe/PageClientImpl.cpp:
(WebKit::PageClientImpl::setInputMethodState):
* UIProcess/API/wpe/PageClientImpl.h:
* UIProcess/API/wpe/WPEView.cpp:
(WKWPE::View::setInputMethodState):
* UIProcess/API/wpe/WPEView.h:
* UIProcess/API/wpe/WebKitInputMethodContext.h:
* UIProcess/API/wpe/docs/wpe-1.0-sections.txt:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::setInputMethodState):
* UIProcess/wpe/WebPageProxyWPE.cpp:
(WebKit::WebPageProxy::setInputMethodState):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::setInputMethodState):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/glib/WebPageGLib.cpp:
(WebKit::inputMethodSateForElement): Build an InputMethodState for the given element.
(WebKit::WebPage::setInputMethodState):

Source/WebKitLegacy/mac:

* DOM/DOMHTMLElement.mm: Use ENABLE(AUTOCORRECT) and ENABLE(AUTOCAPITALIZE).
* WebCoreSupport/WebEditorClient.h: Update tom the new API to WebEditorClient::setInputMethodState.
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::setInputMethodState): Ditto.

Source/WebKitLegacy/win:

Update to the new API of WebEditorClient::setInputMethodState.

* WebCoreSupport/WebEditorClient.cpp:
(WebEditorClient::setInputMethodState):
* WebCoreSupport/WebEditorClient.h:

Source/WTF:

Split ENABLE_IOS_AUTOCORRECT_AND_AUTOCAPITALIZE and remove the IOS prefix.

* wtf/FeatureDefines.h:

Tools:

Add new test case to check the purpose and hints API.

* TestWebKitAPI/Tests/WebKitGLib/TestInputMethodContext.cpp:
(testWebKitInputMethodContextContentType):
(beforeAll):

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

4 months agoWebDriver: several w3c collections tests added in r230953 are failing
carlosgc@webkit.org [Tue, 7 Jan 2020 10:45:32 +0000 (10:45 +0000)]
WebDriver: several w3c collections tests added in r230953 are failing
https://bugs.webkit.org/show_bug.cgi?id=184966

Reviewed by Brian Burg.

Source/WebKit:

This is because JSON.stringify() is not enough, we need to first clone the value using the internal JSON clone
algorithm explained in the spec. See https://w3c.github.io/webdriver/#dfn-internal-json-clone-algorithm.

Fixes: imported/w3c/webdriver/tests/execute_script/collections.py::test_arguments
       imported/w3c/webdriver/tests/execute_script/collections.py::test_file_list
       imported/w3c/webdriver/tests/execute_script/collections.py::test_html_all_collection
       imported/w3c/webdriver/tests/execute_async_script/collections.py::test_arguments
       imported/w3c/webdriver/tests/execute_async_script/collections.py::test_file_list
       imported/w3c/webdriver/tests/execute_async_script/collections.py::test_html_all_collection

* WebProcess/Automation/WebAutomationSessionProxy.js:
(WebKitAutomation.AutomationSessionProxy.prototype._jsonStringify): Call JSON.stringify(), but without the
replacer and passing the result of _jsonClone().
(WebKitAutomation.AutomationSessionProxy.prototype._isCollection): Helper to check if the value is a collection.
(WebKitAutomation.AutomationSessionProxy.prototype._checkCyclic): Throw an error if the value is a cyclic structure.
(WebKitAutomation.AutomationSessionProxy.prototype._jsonClone): Implement the internal JSON clone algorithm.
(WebKitAutomation.AutomationSessionProxy.prototype._createNodeHandle): Trhow an error if the node is stale.

WebDriverTests:

Remove expectations for tests that are now passing.

* TestExpectations.json:

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

4 months ago[SOUP] HSTS Support causes page loading to fail with "Operation was cancelled"
carlosgc@webkit.org [Tue, 7 Jan 2020 09:58:00 +0000 (09:58 +0000)]
[SOUP] HSTS Support causes page loading to fail with "Operation was cancelled"
https://bugs.webkit.org/show_bug.cgi?id=203620

Reviewed by Michael Catanzaro.

The problem is that we are assuming that request cancellation happens synchronously, but it can happen that the
async ready callback for the previous request is called after the new one has started.

* NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::sendRequestCallback): Return early if this is a previous request already cancelled.

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

4 months agoWebDriver: handle no such element errors
carlosgc@webkit.org [Tue, 7 Jan 2020 09:55:38 +0000 (09:55 +0000)]
WebDriver: handle no such element errors
https://bugs.webkit.org/show_bug.cgi?id=204684

Reviewed by Brian Burg.

Source/WebDriver:

Handle InvalidNodeIdentifier errors.

Fixes: imported/w3c/webdriver/tests/get_element_tag_name/get.py::test_element_not_found
       imported/w3c/webdriver/tests/get_element_property/get.py::test_element_not_found
       imported/w3c/webdriver/tests/get_element_attribute/get.py::test_element_not_found

* CommandResult.cpp:
(WebDriver::CommandResult::CommandResult):

Source/WebKit:

Add InvalidNodeIdentifier to be generated when the elementID provided by WebDriver is not a valid node identifier.

* UIProcess/Automation/Automation.json: Add InvalidNodeIdentifier error.
* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::isValidNodeHandle): Helper function to check the given node handle is valid.
(WebKit::isValidNodeIdentifier): JavaScript callback function to check the node identifier is valid.
(WebKit::WebAutomationSessionProxy::scriptObjectForFrame): Add isValidNodeIdentifier function.
(WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Handle InvalidNodeIdentifier errors.
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle): Call isValidNodeHandle() and generate
InvalidNodeIdentifier error if it fails.
(WebKit::WebAutomationSessionProxy::computeElementLayout): Ditto.
(WebKit::WebAutomationSessionProxy::selectOptionElement): Ditto.
(WebKit::WebAutomationSessionProxy::takeScreenshot): Ditto.
* WebProcess/Automation/WebAutomationSessionProxy.js:
(let.AutomationSessionProxy.prototype._nodeForIdentifier): Call isValidNodeIdentifier() and throw
InvalidNodeIdentifier if it fails.

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

4 months agoWebDriver: several tests in imported/w3c/webdriver/tests/state/get_element_attribute...
carlosgc@webkit.org [Tue, 7 Jan 2020 09:52:54 +0000 (09:52 +0000)]
WebDriver: several tests in imported/w3c/webdriver/tests/state/get_element_attribute.py are failing
https://bugs.webkit.org/show_bug.cgi?id=180415

Reviewed by Brian Burg.

Source/WebKit:

Update the ElementAttribute atom to properly handle boolean attributes, following what the selenium original
atom does.

* UIProcess/Automation/atoms/ElementAttribute.js:
(getAttribute):
(tagName.string_appeared_here.lowercaseAttributeName.string_appeared_here):
(isBooleanAttribute):

WebDriverTests:

Remove expectations for tests that are now passing.

* TestExpectations.json:

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

4 months ago[GStreamer] mediastreamsrc ref sinked triggers critical warning in gst 1.17
philn@webkit.org [Tue, 7 Jan 2020 09:43:24 +0000 (09:43 +0000)]
[GStreamer] mediastreamsrc ref sinked triggers critical warning in gst 1.17
https://bugs.webkit.org/show_bug.cgi?id=205777

Reviewed by Carlos Garcia Campos.

* platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
Use a raw pointer to keep track of the src element in the track
observer, similarily to the other observer implementation. Using
GRefPtr here would have the side effect of removing the floating
reference on the element and trigger a critical warning in GStreamer.

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

4 months agoAX: Enable ACCESSIBILITY_ISOLATED_TREE
cfleizach@apple.com [Tue, 7 Jan 2020 08:14:48 +0000 (08:14 +0000)]
AX: Enable ACCESSIBILITY_ISOLATED_TREE
https://bugs.webkit.org/show_bug.cgi?id=205535
<rdar://problem/58131075>

Reviewed by Zalan Bujtas.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Enable compilation of the accessibility isolated tree and make it a runtime feature.

* Configurations/FeatureDefines.xcconfig:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::clientSupportsIsolatedTree):
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setIsAccessibilityIsolatedTreeEnabled):
(WebCore::RuntimeEnabledFeatures::isAccessibilityIsolatedTreeEnabled const):
* page/Settings.yaml:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:
* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetIsAccessibilityIsolatedTreeEnabled):
(WKPreferencesGetIsAccessibilityIsolatedTreeEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

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

5 months agoComplexTextController::offsetForPosition returns a wrong offset for a glyph boundary...
Hironori.Fujii@sony.com [Tue, 7 Jan 2020 07:49:12 +0000 (07:49 +0000)]
ComplexTextController::offsetForPosition returns a wrong offset for a glyph boundary in a RTL text
https://bugs.webkit.org/show_bug.cgi?id=205486

Reviewed by Ross Kirsling.

Source/WebCore:

ComplexTextController::offsetForPosition had the following code:

> unsigned hitIndex = hitGlyphStart + (hitGlyphEnd - hitGlyphStart) * (m_run.ltr() ? x / adjustedAdvance : 1 - x / adjustedAdvance);

If m_run.ltr() was false and x == 0, hitIndex would become hitGlyphEnd.
This is not expected. It expects hitIndex < hitGlyphEnd if hitGlyphStart ≠ hitGlyphEnd.
Let hitIndex be hitGlyphStart-1 in the such condition.

Above change makes fast/text/ellipsis-text-rtl.html starting to
fail because offsetForPosition returns the character offset of the
next glyph if the argument 'h' is in a glyph boundary. In RTL
text, offsetForPosition should return a character offset of the
previous glyph in case of a glyph boundary. Use '<=' instead of '<'
for RTL text in order to select previous glyphs for glyph
boundaries.

Test: fast/dom/Document/CaretRangeFromPoint/rtl.html

* platform/graphics/ComplexTextController.cpp:
(WebCore::ComplexTextController::offsetForPosition): Compute correct hitGlyphEnd for RTL.

LayoutTests:

* fast/dom/Document/CaretRangeFromPoint/rtl-expected.txt: Added.
* fast/dom/Document/CaretRangeFromPoint/rtl.html: Added.
* platform/gtk/TestExpectations: Unmarked imported/blink/editing/selection/offset-from-point-complex-scripts.html.

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

5 months ago[LFC] Start using the UsedHorizontalValues::Constraints values in ::layoutInFlowContent
zalan@apple.com [Tue, 7 Jan 2020 05:48:41 +0000 (05:48 +0000)]
[LFC] Start using the UsedHorizontalValues::Constraints values in ::layoutInFlowContent
https://bugs.webkit.org/show_bug.cgi?id=205831
<rdar://problem/58353565>

Reviewed by Antti Koivisto.

Use the incoming horizontal constraint value instead of querying the root's geometry (which is technically outside of the current formatting context).

* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):

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

5 months ago[LFC] computeBorderAndPadding/computeWidthAndMargin/computeStaticPosition functions...
zalan@apple.com [Tue, 7 Jan 2020 04:51:46 +0000 (04:51 +0000)]
[LFC] computeBorderAndPadding/computeWidthAndMargin/computeStaticPosition functions should take UsedHorizontalValues::Constraints
https://bugs.webkit.org/show_bug.cgi?id=205825
<rdar://problem/58351397>

Reviewed by Antti Koivisto.

Let's pass in the horizontal constraints so that the compute* functions don't need to
access containing block's geometry.

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeBorderAndPadding):
(WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
* layout/FormattingContext.h:
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
(WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
(WebCore::Layout::BlockFormattingContext::computeStaticPosition):
(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
* layout/blockformatting/BlockFormattingContext.h:
(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin): Deleted.
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
(WebCore::Layout::InlineFormattingContext::computeHorizontalAndVerticalGeometry):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
(WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox):
* layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::layoutTableCellBox):

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

5 months agoREGRESSION: [ Mac wk2 ] http/tests/inspector/target/provisional-load-cancels-previous...
yurys@chromium.org [Tue, 7 Jan 2020 04:42:34 +0000 (04:42 +0000)]
REGRESSION: [ Mac wk2 ] http/tests/inspector/target/provisional-load-cancels-previous-load.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=205473
<rdar://problem/58093690>

Source/WebInspectorUI:

The failure was due to attempts to add output to the test page which could be not fully
loaded after navigation. To make it deterministic it is now possible to keep provisional
navigation paused and to defer output until the test page is ready.

Reviewed by Brian Burg.

* UserInterface/Protocol/Target.js:
(WI.Target.prototype.initialize):
(WI.Target.prototype._resumeIfPaused): extracted resume logic in a method that
can be overridden in the tests.

* UserInterface/Test/FrontendTestHarness.js:
(FrontendTestHarness.prototype.deferOutputUntilTestPageIsReloaded): allow to pause
output when navigation is started via protocol commands rather than the test harness.

LayoutTests:

Reviewed by Brian Burg.

Keep provisional page paused until second navigation replaces it and also
defer output until test page is fully initialized after navigation.

* http/tests/inspector/target/provisional-load-cancels-previous-load.html:

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

5 months agoUnreviewed build fix since r254064.
changseok@webkit.org [Tue, 7 Jan 2020 04:40:20 +0000 (04:40 +0000)]
Unreviewed build fix since r254064.

* CMakeLists.txt: GraphicsContext3D was renamed GraphicsContextGLOpenGL, not GraphicsContextGLOpenGLBase.

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

5 months agoUnreviewed test gardening for WinCairo port after r253326 and r250849.
Hironori.Fujii@sony.com [Tue, 7 Jan 2020 04:36:25 +0000 (04:36 +0000)]
Unreviewed test gardening for WinCairo port after r253326 and r250849.

* platform/wincairo/fast/css/invalidation-errors-2-expected.txt:
* platform/wincairo/fast/css/invalidation-errors-expected.txt:
* platform/wincairo/fast/text/international/bidi-layout-across-linebreak-expected.txt:

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

5 months ago[PlayStation] Update port cmake
yoshiaki.jitsukawa@sony.com [Tue, 7 Jan 2020 04:36:02 +0000 (04:36 +0000)]
[PlayStation] Update port cmake
https://bugs.webkit.org/show_bug.cgi?id=205846

Reviewed by Don Olmstead.

.:

Define C/CXX macro BPLATFORM_PLAYSTATION.

Find HarfBuzz::ICU component to fix cmake errors.

Make the WebCore and WebKit builds optional.

* Source/cmake/OptionsPlayStation.cmake:

Source/JavaScriptCore:

* PlatformPlayStation.cmake:
Workaround of compilation errors with VisualStudio generator, which gives -std=c++* options to C sources.

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

5 months ago[LFC] Remove redundant UsedVerticalValues::Constraints(Display::Box)
zalan@apple.com [Tue, 7 Jan 2020 04:18:39 +0000 (04:18 +0000)]
[LFC] Remove redundant UsedVerticalValues::Constraints(Display::Box)
https://bugs.webkit.org/show_bug.cgi?id=205813
<rdar://problem/58346993>

Reviewed by Antti Koivisto.

Let's call the other c'tor instead.

* layout/LayoutUnits.cpp:
(WebCore::Layout::UsedVerticalValues::Constraints::Constraints): Deleted.
* layout/LayoutUnits.h:
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):

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

5 months agoUnreviewed test gardening for WinCairo port after r252598.
Hironori.Fujii@sony.com [Tue, 7 Jan 2020 03:58:15 +0000 (03:58 +0000)]
Unreviewed test gardening for WinCairo port after r252598.

* platform/wincairo/fast/box-shadow/inset-box-shadow-radius-expected.txt:
* platform/wincairo/fast/css/hsl-color-expected.txt:
* platform/wincairo/fast/css/hsla-color-expected.txt:
* platform/wincairo/fast/css/percentage-non-integer-expected.txt:
* platform/wincairo/fast/css/shadow-multiple-expected.txt:
* platform/wincairo/fast/css/viewport-units-dynamic-expected.txt:

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

5 months agoUnreviewed test gardening for WinCairo port after r254044.
Hironori.Fujii@sony.com [Tue, 7 Jan 2020 03:44:46 +0000 (03:44 +0000)]
Unreviewed test gardening for WinCairo port after r254044.

* platform/wincairo/css1/basic/containment-expected.txt:
* platform/wincairo/css1/basic/contextual_selectors-expected.txt:
* platform/wincairo/css1/basic/grouping-expected.txt:
* platform/wincairo/css1/basic/id_as_selector-expected.txt:
* platform/wincairo/css1/basic/inheritance-expected.txt:
* platform/wincairo/css1/box_properties/border-expected.txt:
* platform/wincairo/css1/box_properties/border_bottom-expected.txt:
* platform/wincairo/css1/box_properties/border_bottom_inline-expected.txt:
* platform/wincairo/css1/box_properties/border_bottom_width-expected.txt:
* platform/wincairo/css1/box_properties/border_bottom_width_inline-expected.txt:
* platform/wincairo/css1/box_properties/border_color-expected.txt:
* platform/wincairo/css1/box_properties/border_color_inline-expected.txt:
* platform/wincairo/css1/box_properties/border_inline-expected.txt:
* platform/wincairo/css1/box_properties/border_left-expected.txt:
* platform/wincairo/css1/box_properties/border_left_inline-expected.txt:
* platform/wincairo/css1/box_properties/border_left_width-expected.txt:
* platform/wincairo/css1/box_properties/border_left_width_inline-expected.txt:
* platform/wincairo/css1/box_properties/border_right-expected.txt:
* platform/wincairo/css1/box_properties/border_right_inline-expected.txt:
* platform/wincairo/css1/box_properties/border_right_width-expected.txt:
* platform/wincairo/css1/box_properties/border_right_width_inline-expected.txt:
* platform/wincairo/css1/box_properties/border_style-expected.txt:
* platform/wincairo/css1/box_properties/border_style_inline-expected.txt:
* platform/wincairo/css1/box_properties/border_top-expected.txt:
* platform/wincairo/css1/box_properties/border_top_inline-expected.txt:
* platform/wincairo/css1/box_properties/border_top_width-expected.txt:
* platform/wincairo/css1/box_properties/border_top_width_inline-expected.txt:
* platform/wincairo/css1/box_properties/border_width-expected.txt:
* platform/wincairo/css1/box_properties/border_width_inline-expected.txt:
* platform/wincairo/css1/box_properties/clear-expected.txt:
* platform/wincairo/css1/box_properties/clear_float-expected.txt:
* platform/wincairo/css1/box_properties/float-expected.txt:
* platform/wincairo/css1/box_properties/float_elements_in_series-expected.txt:
* platform/wincairo/css1/box_properties/float_margin-expected.txt:
* platform/wincairo/css1/box_properties/height-expected.txt:
* platform/wincairo/css1/box_properties/margin-expected.txt:
* platform/wincairo/css1/box_properties/margin_bottom-expected.txt:
* platform/wincairo/css1/box_properties/margin_bottom_inline-expected.txt:
* platform/wincairo/css1/box_properties/margin_inline-expected.txt:
* platform/wincairo/css1/box_properties/margin_left-expected.txt:
* platform/wincairo/css1/box_properties/margin_left_inline-expected.txt:
* platform/wincairo/css1/box_properties/margin_right-expected.txt:
* platform/wincairo/css1/box_properties/margin_right_inline-expected.txt:
* platform/wincairo/css1/box_properties/margin_top-expected.txt:
* platform/wincairo/css1/box_properties/margin_top_inline-expected.txt:
* platform/wincairo/css1/box_properties/padding-expected.txt:
* platform/wincairo/css1/box_properties/padding_bottom-expected.txt:
* platform/wincairo/css1/box_properties/padding_bottom_inline-expected.txt:
* platform/wincairo/css1/box_properties/padding_inline-expected.txt:
* platform/wincairo/css1/box_properties/padding_left-expected.txt:
* platform/wincairo/css1/box_properties/padding_left_inline-expected.txt:
* platform/wincairo/css1/box_properties/padding_right-expected.txt:
* platform/wincairo/css1/box_properties/padding_right_inline-expected.txt:
* platform/wincairo/css1/box_properties/padding_top-expected.txt:
* platform/wincairo/css1/box_properties/padding_top_inline-expected.txt:
* platform/wincairo/css1/box_properties/width-expected.txt:
* platform/wincairo/css1/cascade/cascade_order-expected.txt:
* platform/wincairo/css1/cascade/important-expected.txt:
* platform/wincairo/css1/classification/display-expected.txt:
* platform/wincairo/css1/classification/list_style-expected.txt:
* platform/wincairo/css1/classification/list_style_image-expected.txt:
* platform/wincairo/css1/classification/list_style_position-expected.txt:
* platform/wincairo/css1/classification/list_style_type-expected.txt:
* platform/wincairo/css1/classification/white_space-expected.txt:
* platform/wincairo/css1/color_and_background/background-expected.txt:
* platform/wincairo/css1/color_and_background/background_attachment-expected.txt:
* platform/wincairo/css1/color_and_background/background_color-expected.txt:
* platform/wincairo/css1/color_and_background/background_image-expected.txt:
* platform/wincairo/css1/color_and_background/background_position-expected.txt:
* platform/wincairo/css1/color_and_background/background_repeat-expected.txt:
* platform/wincairo/css1/color_and_background/color-expected.txt:
* platform/wincairo/css1/conformance/forward_compatible_parsing-expected.txt:
* platform/wincairo/css1/font_properties/font-expected.txt:
* platform/wincairo/css1/font_properties/font_size-expected.txt:
* platform/wincairo/css1/font_properties/font_style-expected.txt:
* platform/wincairo/css1/font_properties/font_variant-expected.txt:
* platform/wincairo/css1/font_properties/font_weight-expected.txt:
* platform/wincairo/css1/formatting_model/canvas-expected.txt:
* platform/wincairo/css1/formatting_model/floating_elements-expected.txt:
* platform/wincairo/css1/formatting_model/height_of_lines-expected.txt:
* platform/wincairo/css1/formatting_model/inline_elements-expected.txt:
* platform/wincairo/css1/formatting_model/replaced_elements-expected.txt:
* platform/wincairo/css1/formatting_model/vertical_formatting-expected.txt:
* platform/wincairo/css1/pseudo/anchor-expected.txt:
* platform/wincairo/css1/pseudo/firstletter-expected.txt:
* platform/wincairo/css1/pseudo/firstline-expected.txt:
* platform/wincairo/css1/pseudo/multiple_pseudo_elements-expected.txt:
* platform/wincairo/css1/pseudo/pseudo_elements_in_selectors-expected.txt:
* platform/wincairo/css1/text_properties/letter_spacing-expected.txt:
* platform/wincairo/css1/text_properties/line_height-expected.txt:
* platform/wincairo/css1/text_properties/text_align-expected.txt:
* platform/wincairo/css1/text_properties/text_decoration-expected.txt:
* platform/wincairo/css1/text_properties/text_indent-expected.txt:
* platform/wincairo/css1/text_properties/text_transform-expected.txt:
* platform/wincairo/css1/text_properties/vertical_align-expected.txt:
* platform/wincairo/css1/text_properties/word_spacing-expected.txt:
* platform/wincairo/css1/units/color_units-expected.txt:
* platform/wincairo/css1/units/length_units-expected.txt:
* platform/wincairo/css1/units/percentage_units-expected.txt:
* platform/wincairo/css1/units/urls-expected.txt:
* platform/wincairo/css2.1/t100801-c548-ln-ht-00-c-a-expected.txt:
* platform/wincairo/css2.1/t1606-c562-white-sp-00-b-ag-expected.txt:
* platform/wincairo/editing/selection/designmode-no-caret-expected.txt:
* platform/wincairo/fast/css/empty-pseudo-class-expected.txt:
* platform/wincairo/fast/css/first-child-pseudo-class-expected.txt:
* platform/wincairo/fast/css/last-child-pseudo-class-expected.txt:
* platform/wincairo/fast/css/only-child-pseudo-class-expected.txt:
* platform/wincairo/fast/html/listing-expected.txt:
* platform/wincairo/fast/text/whitespace/024-expected.txt:
* platform/wincairo/fast/text/whitespace/030-expected.txt:
* platform/wincairo/fast/text/word-break-expected.txt:

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

5 months ago[LFC] FormattingContext::layoutInFlowContent should take UsedHorizontalValues::Constr...
zalan@apple.com [Tue, 7 Jan 2020 03:15:36 +0000 (03:15 +0000)]
[LFC] FormattingContext::layoutInFlowContent should take UsedHorizontalValues::Constraints
https://bugs.webkit.org/show_bug.cgi?id=205809
<rdar://problem/58345856>

Reviewed by Antti Koivisto.

This patch is in preparation for using the incoming horizontal constraint instead of
accessing the formatting context root's geometry.
(e.g. <div style="width: 100px;">text content</div>. The IFC should not need to query the div's display box
for the horizontal available space (100px))

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
* layout/FormattingContext.h:
* layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
* layout/blockformatting/BlockFormattingContext.h:
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
* layout/inlineformatting/InlineFormattingContext.h:
* layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::layoutInFlowContent):
(WebCore::Layout::TableFormattingContext::layoutTableCellBox):
* layout/tableformatting/TableFormattingContext.h:

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

5 months agoRename GraphicsContext3D to GraphicsContextGL
don.olmstead@sony.com [Tue, 7 Jan 2020 02:52:26 +0000 (02:52 +0000)]
Rename GraphicsContext3D to GraphicsContextGL
https://bugs.webkit.org/show_bug.cgi?id=205778
<rdar://problem/58327597>

Reviewed by Ross Kirsling.

.:

Fix the build after r254064 on Windows and PlayStation.

Add USE_OPENGL_ES_3 to Windows and WPE builds to simplify the Platform checks
for GL functions available in OpenGL ES 3.0+. Expose additional USE macros for
Windows builds to remove Platform.h entries around ENABLE(WEBGL).

* Source/cmake/OptionsFTW.cmake:
* Source/cmake/OptionsWPE.cmake:
* Source/cmake/OptionsWinCairo.cmake:

Source/WebCore:

Use ENABLE(GRAPHICS_CONTEXT_GL) instead of ENABLE(WEBGL) for relevant files.
This was causing the build breakage.

Move methods wrapping OpenGL[ES] 3.0+ functions into GraphicsContextGLOpenGLCommon.cpp
and remove them from GraphicsContextGLTextureMapper.cpp. Add a check for OpenGL[ES]
versions rather than depending on a particular platform.

* platform/graphics/ANGLEWebKitBridge.h:
* platform/graphics/GraphicsContextGL.cpp:
* platform/graphics/GraphicsContextGL.h:
* platform/graphics/GraphicsContextGLAttributes.h:
* platform/graphics/angle/GraphicsContextGLANGLE.cpp:
* platform/graphics/opengl/GraphicsContextGLOpenGL.h:
* platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
(WebCore::GraphicsContextGLOpenGL::mapBufferRange):
(WebCore::GraphicsContextGLOpenGL::unmapBuffer):
(WebCore::GraphicsContextGLOpenGL::copyBufferSubData):
(WebCore::GraphicsContextGLOpenGL::getInternalformativ):
(WebCore::GraphicsContextGLOpenGL::renderbufferStorageMultisample):
(WebCore::GraphicsContextGLOpenGL::texStorage2D):
(WebCore::GraphicsContextGLOpenGL::texStorage3D):
(WebCore::GraphicsContextGLOpenGL::getActiveUniforms):
* platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
(WebCore::GraphicsContextGLOpenGL::mapBufferRange): Deleted.
(WebCore::GraphicsContextGLOpenGL::unmapBuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::copyBufferSubData): Deleted.
(WebCore::GraphicsContextGLOpenGL::getInternalformativ): Deleted.
(WebCore::GraphicsContextGLOpenGL::renderbufferStorageMultisample): Deleted.
(WebCore::GraphicsContextGLOpenGL::texStorage2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::texStorage3D): Deleted.
(WebCore::GraphicsContextGLOpenGL::getActiveUniforms): Deleted.

Source/WTF:

Define USE_OPENGL_3 for Mac and USE_OPENGL_ES_3 for iOS. Use CMake config for
Windows and WebGL.

* wtf/Platform.h:

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

5 months ago[LFC] UsedHorizontalValues::Constraints should not take Display::Box
zalan@apple.com [Tue, 7 Jan 2020 01:10:29 +0000 (01:10 +0000)]
[LFC] UsedHorizontalValues::Constraints should not take Display::Box
https://bugs.webkit.org/show_bug.cgi?id=205811
<rdar://problem/58346356>

Reviewed by Antti Koivisto.

Passing in only the actual rect values (content/padding box left/width) to UsedHorizontalValues::Constraints makes the
constraint logic look clear.

* layout/FormattingContext.cpp:
(WebCore::Layout::outOfFlowHorizontalConstraints):
(WebCore::Layout::FormattingContext::computeBorderAndPadding):
* layout/FormattingContextQuirks.cpp:
(WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
* layout/LayoutUnits.cpp:
(WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
* layout/LayoutUnits.h:
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
(WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
* layout/blockformatting/BlockFormattingContextQuirks.cpp:
(WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues const):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):

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

5 months ago[iOS] Get display level in the UI process for all iOS platforms
pvollan@apple.com [Tue, 7 Jan 2020 01:06:34 +0000 (01:06 +0000)]
[iOS] Get display level in the UI process for all iOS platforms
https://bugs.webkit.org/show_bug.cgi?id=205835
<rdar://problem/58116883>

Reviewed by Brent Fulgham.

This was previously only done for iOS, but should be done for all iOS platforms.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::registerNotificationObservers):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::initializeNewWebProcess):
* UIProcess/WebProcessPool.h:
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/cocoa/WebProcessCocoa.mm:

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

5 months agoresults.webkit.org: Tweak processing constants
jbedard@apple.com [Tue, 7 Jan 2020 00:52:56 +0000 (00:52 +0000)]
results.webkit.org: Tweak processing constants
https://bugs.webkit.org/show_bug.cgi?id=205828
<rdar://problem/58146698>

Rubber-stamped by Aakash Jain.

* resultsdbpy/resultsdbpy/model/upload_context.py:
(UploadContext):
Increase process timeout to 1 week.
Allow 5 retries instead of 3.
Retry stuck tasks after 10 minutes instead of 5.
Include more tasks so that a scan is always greater than the number of workers.

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

5 months ago[iOS] Only prewarm fonts with valid font names
pvollan@apple.com [Tue, 7 Jan 2020 00:49:32 +0000 (00:49 +0000)]
[iOS] Only prewarm fonts with valid font names
https://bugs.webkit.org/show_bug.cgi?id=205822

Reviewed by Brent Fulgham.

The font names ".SF NS Text" and ".SF NS Display" are not valid on iOS, and should not be prewarmed.

No new tests, no behavior change.

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::prewarmGlobally):

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

5 months agoAdd some of the remote media player messages needed for video playback
eric.carlson@apple.com [Tue, 7 Jan 2020 00:34:53 +0000 (00:34 +0000)]
Add some of the remote media player messages needed for video playback
https://bugs.webkit.org/show_bug.cgi?id=205812
<rdar://problem/58346531>

Reviewed by Jer Noble.

No new tests, it isn't possible to play video yet.

* GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:
(WebKit::RemoteMediaPlayerManagerProxy::prepareForRendering):
(WebKit::RemoteMediaPlayerManagerProxy::setSize):
(WebKit::RemoteMediaPlayerManagerProxy::setVisible):
(WebKit::RemoteMediaPlayerManagerProxy::setShouldMaintainAspectRatio):
(WebKit::RemoteMediaPlayerManagerProxy::setVideoFullscreenFrame):
(WebKit::RemoteMediaPlayerManagerProxy::setVideoFullscreenGravity):
(WebKit::RemoteMediaPlayerManagerProxy::acceleratedRenderingStateChanged):
(WebKit::RemoteMediaPlayerManagerProxy::setShouldDisableSleep):
(WebKit::RemoteMediaPlayerManagerProxy::setRate):
* GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
* GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in:
* GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::getConfiguration):
(WebKit::RemoteMediaPlayerProxy::prepareForRendering):
(WebKit::RemoteMediaPlayerProxy::setSize):
(WebKit::RemoteMediaPlayerProxy::setVisible):
(WebKit::RemoteMediaPlayerProxy::setShouldMaintainAspectRatio):
(WebKit::RemoteMediaPlayerProxy::setVideoFullscreenFrame):
(WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity):
(WebKit::RemoteMediaPlayerProxy::acceleratedRenderingStateChanged):
(WebKit::RemoteMediaPlayerProxy::setShouldDisableSleep):
(WebKit::RemoteMediaPlayerProxy::setRate):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerReadyStateChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerRenderingCanBeAccelerated):
* GPUProcess/media/RemoteMediaPlayerProxy.h:
* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::sizeChanged):
(WebKit::MediaPlayerPrivateRemote::updateCachedState):
(WebKit::MediaPlayerPrivateRemote::shouldIgnoreIntrinsicSize):
(WebKit::MediaPlayerPrivateRemote::prepareForRendering):
(WebKit::MediaPlayerPrivateRemote::setSize):
(WebKit::MediaPlayerPrivateRemote::setVisible):
(WebKit::MediaPlayerPrivateRemote::setShouldMaintainAspectRatio):
(WebKit::MediaPlayerPrivateRemote::setVideoFullscreenFrame):
(WebKit::MediaPlayerPrivateRemote::setVideoFullscreenGravity):
(WebKit::MediaPlayerPrivateRemote::acceleratedRenderingStateChanged):
(WebKit::MediaPlayerPrivateRemote::setShouldDisableSleep):
(WebKit::MediaPlayerPrivateRemote::naturalSize const):
* WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
* WebProcess/GPU/media/RemoteMediaPlayerConfiguration.h:
(WebKit::RemoteMediaPlayerConfiguration::encode const):
(WebKit::RemoteMediaPlayerConfiguration::decode):
* WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:
(WebKit::RemoteMediaPlayerManager::sizeChanged):
* WebProcess/GPU/media/RemoteMediaPlayerManager.h:
* WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in:
* WebProcess/GPU/media/RemoteMediaPlayerState.h:
(WebKit::RemoteMediaPlayerState::encode const):
(WebKit::RemoteMediaPlayerState::decode):

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

5 months agoImprove logging for when a synchronous IPC times out
cdumez@apple.com [Tue, 7 Jan 2020 00:31:13 +0000 (00:31 +0000)]
Improve logging for when a synchronous IPC times out
https://bugs.webkit.org/show_bug.cgi?id=205829

Reviewed by Tim Horton.

* Platform/IPC/Connection.cpp:
(IPC::Connection::sendSyncMessage):
(IPC::Connection::waitForSyncReply):
* Platform/IPC/Connection.h:

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

5 months agotest-lldb-webkit: Use logging module
jbedard@apple.com [Tue, 7 Jan 2020 00:13:19 +0000 (00:13 +0000)]
test-lldb-webkit: Use logging module
https://bugs.webkit.org/show_bug.cgi?id=205832

Reviewed by Stephanie Lewis.

* Scripts/test-lldb-webkit:
(LldbTester.run): Configure logger.

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

5 months agoWeb Inspector: Color picker: make it keyboard accessible
nvasilyev@apple.com [Mon, 6 Jan 2020 23:55:35 +0000 (23:55 +0000)]
Web Inspector: Color picker: make it keyboard accessible
https://bugs.webkit.org/show_bug.cgi?id=205572
<rdar://problem/58169943>

Reviewed by Brian Burg.

For the color square, make up, down, left, and right keys move the crosshair.

For the hue and opacity sliders:
- Pressing up and down keys should adjust the value by 1%.
- When holding Shift, up and down keys adjust the value by 10%.

* UserInterface/Views/ColorPicker.js:
(WI.ColorPicker.prototype.focus):
* UserInterface/Views/ColorSquare.css:
(.color-square):
Match the border of the hue and opacity sliders.

* UserInterface/Views/ColorSquare.js:
(WI.ColorSquare):
Make the color square focusable.

(WI.ColorSquare.prototype._handleMousedown):
(WI.ColorSquare.prototype._handleKeyDown):
* UserInterface/Views/InlineSwatch.js:
* UserInterface/Views/Slider.css:
(.slider:focus):
* UserInterface/Views/Slider.js:
(WI.Slider):
(WI.Slider.prototype._handleMousedown):
Drive-by: right clicking the slider shouldn't move the thumb.
(WI.Slider.prototype._handleKeyDown):

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

5 months agoBuild (unified) failure after adding source files to support media in GPU process
commit-queue@webkit.org [Mon, 6 Jan 2020 23:49:21 +0000 (23:49 +0000)]
Build (unified) failure after adding source files to support media in GPU process
https://bugs.webkit.org/show_bug.cgi?id=205616

Patch by Peng Liu <peng.liu6@apple.com> on 2020-01-06
Reviewed by Darin Adler.

No new tests, no functional change.

Source/WebCore:

* Modules/mediastream/UserMediaClient.h:

Source/WebKit:

* Sources.txt:
* SourcesGTK.txt:
* WebKit.xcodeproj/project.pbxproj:

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

5 months agoNetworkSessionCocoa::isolatedSession should not use iterator after mutating m_isolate...
commit-queue@webkit.org [Mon, 6 Jan 2020 23:32:31 +0000 (23:32 +0000)]
NetworkSessionCocoa::isolatedSession should not use iterator after mutating m_isolatedSessions
https://bugs.webkit.org/show_bug.cgi?id=205824
<rdar://problem/55107625>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-01-06
Reviewed by Chris Dumez.

Classic iterator use after mutating iterated container was causing crashes by returning a null SessionWrapper&
This was introduced in r252185 or r248640.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::isolatedSession):

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

5 months agoPrecision of getClientRects(), getBoundingClientRect() differs depending whether...
dbates@webkit.org [Mon, 6 Jan 2020 23:08:48 +0000 (23:08 +0000)]
Precision of getClientRects(), getBoundingClientRect() differs depending whether simple line layout or line box layout is used
https://bugs.webkit.org/show_bug.cgi?id=205563
<rdar://problem/58165528>

Reviewed by Zalan Bujtas.

Source/WebCore:

Fix up simple line layout run rect to match the rect returned by the line layout code path.

* rendering/InlineTextBox.cpp:
(WebCore::snappedSelectionRect): Added; extracted from localSelectionRect().
(WebCore::InlineTextBox::localSelectionRect const): Moved some logic into snappedSelectionRect()
and modified code to use it.
* rendering/InlineTextBox.h:
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::collectAbsoluteQuadsForRange): Fix up run rect.

Tools:

Update test results.

* TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:
(TEST):
* TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm:
(TEST):

LayoutTests:

Update expected result now that simple line layout computes a client rect that matches
the rect the line layout code computes.

* fast/dom/Range/getClientRects-expected.txt:
* fast/dom/Range/getClientRects.html:
* fast/dom/Range/mac/getClientRects-and-getBoundingClientRect-before-and-after-selection-expected.txt:
* fast/repaint/text-selection-overflow-hidden-expected.txt:

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

5 months agoXMLHTTPRequest POSTs blob data to a custom WKURLSchemeHandler protocol crash
youenn@apple.com [Mon, 6 Jan 2020 22:57:25 +0000 (22:57 +0000)]
XMLHTTPRequest POSTs blob data to a custom WKURLSchemeHandler protocol crash
https://bugs.webkit.org/show_bug.cgi?id=205685

Reviewed by Alex Christensen.

Source/WebCore:

There is no blob registry in the UIProcess.
This should not matter since we do not yet support blobs in custom scheme handlers.
But we are calling the blob registry when creating a request body, which does not work in UIProcess.
Instead, pass a lambda that will be called in case of blobs.
Covered by API test.

* platform/network/FormData.cpp:
(WebCore::FormDataElement::lengthInBytes const):
(WebCore::FormData::resolveBlobReferences):
* platform/network/FormData.h:
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::createHTTPBodyCFReadStream):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:

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

5 months agoString.prototype.replace() incorrectly handles named references on RegExp w/o named...
shvaikalesh@gmail.com [Mon, 6 Jan 2020 22:47:34 +0000 (22:47 +0000)]
String.prototype.replace() incorrectly handles named references on RegExp w/o named groups
https://bugs.webkit.org/show_bug.cgi?id=205785

Reviewed by Ross Kirsling.

JSTests:

* test262/expectations.yaml: Mark 2 test cases as passing.

Source/JavaScriptCore:

This patch fixes substitution of named references by ignoring "$<" sequences
for a RegExp without named capture groups, removing some index tweaking.
(step 11 of https://tc39.es/ecma262/#sec-getsubstitution)

Also this change removes 2 obsolete FIXMEs regarding possible spec changes.

* runtime/StringPrototype.cpp:
(JSC::substituteBackreferencesSlow):

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

5 months agoPerformanceTests:
mark.lam@apple.com [Mon, 6 Jan 2020 22:24:50 +0000 (22:24 +0000)]
PerformanceTests:
Convert ASSERT_DISABLED to ASSERT_ENABLED, and fix some tests of NDEBUG that should actually test for ASSERT_ENABLED.
https://bugs.webkit.org/show_bug.cgi?id=205776

Reviewed by Saam Barati.

* JetStream2/wasm/HashSet.cpp:
* StitchMarker/wtf/Assertions.h:
* StitchMarker/wtf/DateMath.cpp:
(WTF::initializeDates):
* StitchMarker/wtf/HashTable.h:
* StitchMarker/wtf/Hasher.h:
(WTF::StringHasher::addCharacters):
* StitchMarker/wtf/NeverDestroyed.h:
(WTF::LazyNeverDestroyed::construct):
* StitchMarker/wtf/StackBounds.h:
(WTF::StackBounds::checkConsistency const):
* StitchMarker/wtf/ValueCheck.h:
* StitchMarker/wtf/Vector.h:
(WTF::minCapacity>::checkConsistency):
* StitchMarker/wtf/text/AtomicStringImpl.cpp:
* StitchMarker/wtf/text/AtomicStringImpl.h:
* StitchMarker/wtf/text/StringCommon.h:
(WTF::hasPrefixWithLettersIgnoringASCIICaseCommon):
* StitchMarker/wtf/text/StringImpl.h:
* StitchMarker/wtf/text/SymbolImpl.h:
* StitchMarker/wtf/text/UniquedStringImpl.h:

Source/JavaScriptCore:
Convert ASSERT_DISABLED to ASSERT_ENABLED, and fix some tests of NDEBUG that should actually test for ASSERT_ENABLED.
https://bugs.webkit.org/show_bug.cgi?id=205776

Reviewed by Saam Barati.

* API/tests/testapi.c:
* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::replaceWithLoad):
(JSC::ARM64Assembler::replaceWithAddressComputation):
* assembler/AssemblerBuffer.h:
(JSC::AssemblerBuffer::LocalWriter::LocalWriter):
* assembler/LinkBuffer.cpp:
(JSC::LinkBuffer::copyCompactAndLinkCode):
* assembler/ProbeStack.cpp:
(JSC::Probe::Stack::Stack):
* assembler/ProbeStack.h:
* b3/B3FoldPathConstants.cpp:
* b3/B3LowerToAir.cpp:
* b3/B3MemoryValue.cpp:
(JSC::B3::MemoryValue::MemoryValue):
* b3/B3Opcode.cpp:
* b3/B3Type.h:
* b3/B3TypeMap.h:
* b3/B3Width.h:
* b3/air/AirAllocateRegistersAndStackAndGenerateCode.cpp:
(JSC::B3::Air::GenerateAndAllocateRegisters::prepareForGeneration):
(JSC::B3::Air::GenerateAndAllocateRegisters::generate):
* b3/air/AirAllocateRegistersAndStackAndGenerateCode.h:
* b3/air/AirAllocateRegistersByGraphColoring.cpp:
* b3/air/AirArg.cpp:
* b3/air/AirArg.h:
* b3/air/AirCode.h:
* b3/air/AirEmitShuffle.cpp:
(JSC::B3::Air::emitShuffle):
* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createExecutable):
* bytecode/AccessCase.cpp:
* bytecode/AccessCase.h:
* bytecode/CallVariant.cpp:
(JSC::variantListWithVariant):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeIndex):
* bytecode/CodeBlockHash.cpp:
(JSC::CodeBlockHash::dump const):
* bytecode/StructureStubInfo.cpp:
* bytecode/StructureStubInfo.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::FunctionCallResolveNode::emitBytecode):
* bytecompiler/RegisterID.h:
(JSC::RegisterID::RegisterID):
(JSC::RegisterID::setIndex):
* debugger/Debugger.cpp:
(JSC::Debugger::removeBreakpoint):
* debugger/DebuggerEvalEnabler.h:
(JSC::DebuggerEvalEnabler::DebuggerEvalEnabler):
(JSC::DebuggerEvalEnabler::~DebuggerEvalEnabler):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::observeTransitions):
* dfg/DFGAbstractValue.cpp:
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::merge):
(JSC::DFG::AbstractValue::checkConsistency const):
(JSC::DFG::AbstractValue::assertIsRegistered const):
* dfg/DFGArithMode.h:
(JSC::DFG::doesOverflow):
* dfg/DFGBasicBlock.cpp:
(JSC::DFG::BasicBlock::BasicBlock):
* dfg/DFGBasicBlock.h:
(JSC::DFG::BasicBlock::didLink):
* dfg/DFGCFAPhase.cpp:
(JSC::DFG::CFAPhase::performBlockCFA):
* dfg/DFGCommon.h:
(JSC::DFG::validationEnabled):
* dfg/DFGCommonData.cpp:
(JSC::DFG::CommonData::finalizeCatchEntrypoints):
* dfg/DFGDesiredWatchpoints.h:
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGEdge.h:
(JSC::DFG::Edge::makeWord):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGJITCode.cpp:
(JSC::DFG::JITCode::finalizeOSREntrypoints):
* dfg/DFGObjectAllocationSinkingPhase.cpp:
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* dfg/DFGScoreBoard.h:
(JSC::DFG::ScoreBoard::assertClear):
* dfg/DFGSlowPathGenerator.h:
(JSC::DFG::SlowPathGenerator::generate):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::emitBinarySwitchStringRecurse):
(JSC::DFG::SpeculativeJIT::emitAllocateButterfly):
(JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize):
(JSC::DFG::SpeculativeJIT::compileMakeRope):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateCell):
* dfg/DFGStructureAbstractValue.cpp:
* dfg/DFGStructureAbstractValue.h:
(JSC::DFG::StructureAbstractValue::assertIsRegistered const):
* dfg/DFGVarargsForwardingPhase.cpp:
* dfg/DFGVirtualRegisterAllocationPhase.cpp:
(JSC::DFG::VirtualRegisterAllocationPhase::run):
* ftl/FTLLink.cpp:
(JSC::FTL::link):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::callPreflight):
(JSC::FTL::DFG::LowerDFGToB3::callCheck):
(JSC::FTL::DFG::LowerDFGToB3::crash):
* ftl/FTLOperations.cpp:
(JSC::FTL::operationMaterializeObjectInOSR):
* heap/BlockDirectory.cpp:
(JSC::BlockDirectory::assertNoUnswept):
* heap/GCSegmentedArray.h:
(JSC::GCArraySegment::GCArraySegment):
* heap/GCSegmentedArrayInlines.h:
(JSC::GCSegmentedArray<T>::clear):
(JSC::GCSegmentedArray<T>::expand):
(JSC::GCSegmentedArray<T>::validatePrevious):
* heap/HandleSet.cpp:
* heap/HandleSet.h:
* heap/Heap.cpp:
(JSC::Heap::updateAllocationLimits):
* heap/Heap.h:
* heap/MarkedBlock.cpp:
* heap/MarkedBlock.h:
(JSC::MarkedBlock::assertValidCell const):
(JSC::MarkedBlock::assertMarksNotStale):
* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::beginMarking):
(JSC::MarkedSpace::endMarking):
(JSC::MarkedSpace::assertNoUnswept):
* heap/PreciseAllocation.cpp:
* heap/PreciseAllocation.h:
(JSC::PreciseAllocation::assertValidCell const):
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::SlotVisitor):
(JSC::SlotVisitor::appendJSCellOrAuxiliary):
* heap/SlotVisitor.h:
* inspector/InspectorProtocolTypes.h:
(Inspector::Protocol::BindingTraits<JSON::ArrayOf<T>>::assertValueHasExpectedType):
* inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:
(CppProtocolTypesImplementationGenerator._generate_assertion_for_object_declaration):
(CppProtocolTypesImplementationGenerator):
(CppProtocolTypesImplementationGenerator._generate_assertion_for_enum):
* inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
* interpreter/FrameTracers.h:
(JSC::JITOperationPrologueCallFrameTracer::JITOperationPrologueCallFrameTracer):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::Interpreter):
* interpreter/Interpreter.h:
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::emitStoreStructureWithTypeInfo):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::prepareCallOperation):
* jit/BinarySwitch.cpp:
(JSC::BinarySwitch::BinarySwitch):
* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupStubArgs):
* jit/CallFrameShuffler.cpp:
(JSC::CallFrameShuffler::emitDeltaCheck):
(JSC::CallFrameShuffler::prepareAny):
* jit/JIT.cpp:
(JSC::JIT::assertStackPointerOffset):
(JSC::JIT::compileWithoutLinking):
* jit/JITOpcodes.cpp:
(JSC::JIT::emitSlow_op_loop_hint):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_from_scope):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_from_scope):
* jit/Repatch.cpp:
(JSC::linkPolymorphicCall):
* jit/ThunkGenerators.cpp:
(JSC::emitPointerValidation):
* llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions):
* llint/LLIntOfflineAsmConfig.h:
* parser/Lexer.cpp:
* parser/Lexer.h:
(JSC::isSafeBuiltinIdentifier):
(JSC::Lexer<T>::lexExpectIdentifier):
* runtime/ArgList.h:
(JSC::MarkedArgumentBuffer::setNeedsOverflowCheck):
(JSC::MarkedArgumentBuffer::clearNeedsOverflowCheck):
* runtime/Butterfly.h:
(JSC::ContiguousData::ContiguousData):
(JSC::ContiguousData::Data::Data):
* runtime/HashMapImpl.h:
(JSC::HashMapImpl::checkConsistency const):
(JSC::HashMapImpl::assertBufferIsEmpty const):
* runtime/JSCellInlines.h:
(JSC::JSCell::methodTable const):
* runtime/JSFunction.cpp:
* runtime/JSFunction.h:
(JSC::JSFunction::assertTypeInfoFlagInvariants):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObject.h:
* runtime/JSObject.cpp:
(JSC::JSObject::visitChildren):
(JSC::JSFinalObject::visitChildren):
* runtime/JSObjectInlines.h:
(JSC::JSObject::validatePutOwnDataProperty):
* runtime/JSSegmentedVariableObject.h:
(JSC::JSSegmentedVariableObject::assertVariableIsInThisObject):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser<CharType>::Lexer::lex):
* runtime/LiteralParser.h:
* runtime/Operations.h:
(JSC::scribbleFreeCells):
* runtime/OptionsList.h:
* runtime/VM.cpp:
(JSC::VM::computeCanUseJIT):
* runtime/VM.h:
(JSC::VM::canUseJIT):
* runtime/VarOffset.h:
(JSC::VarOffset::checkSanity const):
* runtime/WeakMapImpl.h:
(JSC::WeakMapImpl::checkConsistency const):
(JSC::WeakMapImpl::assertBufferIsEmpty const):
* wasm/WasmAirIRGenerator.cpp:
(JSC::Wasm::AirIRGenerator::validateInst):
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::parseAndCompile):
* wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser::validationFail const):
* wasm/WasmLLIntGenerator.cpp:
(JSC::Wasm::LLIntGenerator::checkConsistency):
* wasm/WasmPlan.cpp:
(JSC::Wasm::Plan::tryRemoveContextAndCancelIfLast):
* wasm/WasmSectionParser.h:
* wasm/WasmSections.h:
* wasm/WasmSignatureInlines.h:
(JSC::Wasm::SignatureInformation::get):
* wasm/WasmWorklist.cpp:
(JSC::Wasm::Worklist::enqueue):
* wasm/js/JSToWasm.cpp:
(JSC::Wasm::createJSToWasmWrapper):
* wasm/js/WebAssemblyFunction.cpp:
(JSC::WebAssemblyFunction::previousInstanceOffset const):

Source/WebCore:
Convert ASSERT_DISABLED to ASSERT_ENABLED, and fix some tests of NDEBUG that should actually test for ASSERT_ENABLED.
https://bugs.webkit.org/show_bug.cgi?id=205776

Reviewed by Saam Barati.

* Modules/fetch/FetchBodySource.cpp:
(WebCore::FetchBodySource::close):
* Modules/fetch/FetchBodySource.h:
* Modules/webdatabase/DatabaseDetails.h:
(WebCore::DatabaseDetails::DatabaseDetails):
(WebCore::DatabaseDetails::operator=):
* Modules/webdatabase/DatabaseTask.cpp:
(WebCore::DatabaseTask::performTask):
* Modules/webdatabase/DatabaseTask.h:
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::terminationRequested const):
* Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h:
(WebCore::WHLSL::AST::TypeAnnotation::TypeAnnotation):
* Modules/webgpu/WHLSL/WHLSLHighZombieFinder.cpp:
(WebCore::WHLSL::findHighZombies):
* Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
(WebCore::WHLSL::matches):
* Modules/webgpu/WHLSL/WHLSLLiteralTypeChecker.cpp:
(WebCore::WHLSL::checkLiteralTypes):
* Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
(WebCore::WHLSL::FindAllTypes::appendNamedType):
* bindings/js/JSCallbackData.h:
* bindings/js/JSLazyEventListener.cpp:
* bindings/js/JSLazyEventListener.h:
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::compileRuleList):
* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcOperationNode::primitiveType const):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* css/CSSPrimitiveValue.cpp:
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText const):
* css/CSSStyleSheet.cpp:
* dom/ActiveDOMObject.cpp:
(WebCore::ActiveDOMObject::suspendIfNeeded):
(WebCore::ActiveDOMObject::assertSuspendIfNeededWasCalled const):
* dom/ActiveDOMObject.h:
* dom/ContainerNode.cpp:
* dom/ContainerNodeAlgorithms.cpp:
* dom/ContainerNodeAlgorithms.h:
* dom/CustomElementReactionQueue.cpp:
* dom/CustomElementReactionQueue.h:
(WebCore::CustomElementReactionDisallowedScope::CustomElementReactionDisallowedScope):
(WebCore::CustomElementReactionDisallowedScope::~CustomElementReactionDisallowedScope):
* dom/Document.cpp:
(WebCore::Document::hitTest):
* dom/Document.h:
(WebCore::Document::decrementReferencingNodeCount):
* dom/Element.cpp:
(WebCore::Element::addShadowRoot):
(WebCore::Element::getURLAttribute const):
(WebCore::Element::getNonEmptyURLAttribute const):
* dom/Element.h:
* dom/ElementAndTextDescendantIterator.h:
(WebCore::ElementAndTextDescendantIterator::ElementAndTextDescendantIterator):
(WebCore::ElementAndTextDescendantIterator::dropAssertions):
(WebCore::ElementAndTextDescendantIterator::popAncestorSiblingStack):
(WebCore::ElementAndTextDescendantIterator::traverseNextSibling):
(WebCore::ElementAndTextDescendantIterator::traversePreviousSibling):
* dom/ElementDescendantIterator.h:
(WebCore::ElementDescendantIterator::ElementDescendantIterator):
(WebCore::ElementDescendantIterator::dropAssertions):
(WebCore::ElementDescendantIterator::operator++):
(WebCore::ElementDescendantIterator::operator--):
(WebCore::ElementDescendantConstIterator::ElementDescendantConstIterator):
(WebCore::ElementDescendantConstIterator::dropAssertions):
(WebCore::ElementDescendantConstIterator::operator++):
* dom/ElementIterator.h:
(WebCore::ElementIterator<ElementType>::ElementIterator):
(WebCore::ElementIterator<ElementType>::traverseNext):
(WebCore::ElementIterator<ElementType>::traversePrevious):
(WebCore::ElementIterator<ElementType>::traverseNextSibling):
(WebCore::ElementIterator<ElementType>::traversePreviousSibling):
(WebCore::ElementIterator<ElementType>::traverseNextSkippingChildren):
(WebCore::ElementIterator<ElementType>::dropAssertions):
(WebCore::ElementIterator<ElementType>::traverseAncestor):
(WebCore::ElementConstIterator<ElementType>::ElementConstIterator):
(WebCore::ElementConstIterator<ElementType>::traverseNext):
(WebCore::ElementConstIterator<ElementType>::traversePrevious):
(WebCore::ElementConstIterator<ElementType>::traverseNextSibling):
(WebCore::ElementConstIterator<ElementType>::traversePreviousSibling):
(WebCore::ElementConstIterator<ElementType>::traverseNextSkippingChildren):
(WebCore::ElementConstIterator<ElementType>::traverseAncestor):
(WebCore::ElementConstIterator<ElementType>::dropAssertions):
* dom/EventContext.cpp:
* dom/EventContext.h:
* dom/EventListener.h:
* dom/EventPath.cpp:
* dom/EventSender.h:
* dom/EventTarget.cpp:
(WebCore::EventTarget::addEventListener):
(WebCore::EventTarget::setAttributeEventListener):
(WebCore::EventTarget::innerInvokeEventListeners):
* dom/Node.cpp:
(WebCore::Node::~Node):
(WebCore::Node::moveNodeToNewDocument):
(WebCore::Node::removedLastRef):
* dom/Node.h:
(WebCore::Node::deref const):
* dom/ScriptDisallowedScope.h:
(WebCore::ScriptDisallowedScope::InMainThread::isEventDispatchAllowedInSubtree):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::~ScriptExecutionContext):
* dom/ScriptExecutionContext.h:
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::execute const):
* dom/SlotAssignment.cpp:
(WebCore::SlotAssignment::addSlotElementByName):
(WebCore::SlotAssignment::removeSlotElementByName):
(WebCore::SlotAssignment::resolveSlotsAfterSlotMutation):
(WebCore::SlotAssignment::findFirstSlotElement):
* dom/SlotAssignment.h:
* dom/TreeScopeOrderedMap.cpp:
(WebCore::TreeScopeOrderedMap::add):
(WebCore::TreeScopeOrderedMap::get const):
* dom/TreeScopeOrderedMap.h:
* fileapi/Blob.cpp:
* fileapi/Blob.h:
* history/BackForwardCache.cpp:
(WebCore::BackForwardCache::removeAllItemsForPage):
* history/BackForwardCache.h:
* html/CanvasBase.cpp:
(WebCore::CanvasBase::notifyObserversCanvasDestroyed):
* html/CanvasBase.h:
* html/HTMLCollection.h:
(WebCore::CollectionNamedElementCache::didPopulate):
* html/HTMLSelectElement.cpp:
(WebCore:: const):
* html/HTMLTableRowsCollection.cpp:
(WebCore::assertRowIsInTable):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::indexForPosition const):
* html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::~CanvasRenderingContext2DBase):
* html/parser/HTMLParserScheduler.cpp:
(WebCore::HTMLParserScheduler::HTMLParserScheduler):
(WebCore::HTMLParserScheduler::suspend):
(WebCore::HTMLParserScheduler::resume):
* html/parser/HTMLParserScheduler.h:
* html/parser/HTMLToken.h:
(WebCore::HTMLToken::beginStartTag):
(WebCore::HTMLToken::beginEndTag):
(WebCore::HTMLToken::endAttribute):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
(WebCore::HTMLTreeBuilder::constructTree):
* html/parser/HTMLTreeBuilder.h:
(WebCore::HTMLTreeBuilder::~HTMLTreeBuilder):
* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::geometryForBox const):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
* layout/blockformatting/BlockFormattingContext.h:
* layout/displaytree/DisplayBox.cpp:
(WebCore::Display::Box::Box):
* layout/displaytree/DisplayBox.h:
(WebCore::Display::Box::setTopLeft):
(WebCore::Display::Box::setTop):
(WebCore::Display::Box::setLeft):
(WebCore::Display::Box::setContentBoxHeight):
(WebCore::Display::Box::setContentBoxWidth):
(WebCore::Display::Box::setHorizontalMargin):
(WebCore::Display::Box::setVerticalMargin):
(WebCore::Display::Box::setHorizontalComputedMargin):
(WebCore::Display::Box::setBorder):
(WebCore::Display::Box::setPadding):
* layout/displaytree/DisplayInlineRect.h:
(WebCore::Display::InlineRect::InlineRect):
(WebCore::Display::InlineRect::setTopLeft):
(WebCore::Display::InlineRect::setTop):
(WebCore::Display::InlineRect::setBottom):
(WebCore::Display::InlineRect::setLeft):
(WebCore::Display::InlineRect::setWidth):
(WebCore::Display::InlineRect::setHeight):
* layout/displaytree/DisplayLineBox.h:
(WebCore::Display::LineBox::LineBox):
(WebCore::Display::LineBox::setBaselineOffsetIfGreater):
(WebCore::Display::LineBox::resetBaseline):
(WebCore::Display::LineBox::Baseline::Baseline):
(WebCore::Display::LineBox::Baseline::setAscent):
(WebCore::Display::LineBox::Baseline::setDescent):
(WebCore::Display::LineBox::Baseline::reset):
* layout/displaytree/DisplayRect.h:
(WebCore::Display::Rect::Rect):
(WebCore::Display::Rect::setTopLeft):
(WebCore::Display::Rect::setTop):
(WebCore::Display::Rect::setLeft):
(WebCore::Display::Rect::setWidth):
(WebCore::Display::Rect::setHeight):
(WebCore::Display::Rect::setSize):
(WebCore::Display::Rect::clone const):
* layout/floats/FloatingContext.cpp:
* layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::CollapsibleContent::collapse):
* layout/tableformatting/TableGrid.cpp:
(WebCore::Layout::TableGrid::Column::setWidthConstraints):
(WebCore::Layout::TableGrid::Column::setLogicalWidth):
(WebCore::Layout::TableGrid::Column::setLogicalLeft):
* layout/tableformatting/TableGrid.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::continueAfterContentPolicy):
(WebCore::DocumentLoader::attachToFrame):
(WebCore::DocumentLoader::detachFromFrame):
(WebCore::DocumentLoader::addSubresourceLoader):
* loader/DocumentLoader.h:
* loader/ImageLoader.cpp:
* loader/cache/CachedResource.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::lruListFor):
(WebCore::MemoryCache::removeFromLRUList):
* page/FrameView.cpp:
(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
* page/FrameViewLayoutContext.cpp:
* page/FrameViewLayoutContext.h:
* page/Page.cpp:
* page/Page.h:
* page/ViewportConfiguration.cpp:
* page/ViewportConfiguration.h:
* page/mac/EventHandlerMac.mm:
(WebCore::CurrentEventScope::CurrentEventScope):
* platform/DateComponents.cpp:
(WebCore::DateComponents::toStringForTime const):
* platform/ScrollableArea.cpp:
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::combineIntoOneSegment const):
* platform/SharedBuffer.h:
* platform/Supplementable.h:
* platform/Timer.cpp:
(WebCore::TimerBase::checkHeapIndex const):
(WebCore::TimerBase::updateHeapIfNeeded):
* platform/graphics/BitmapImage.cpp:
* platform/graphics/BitmapImage.h:
* platform/graphics/Image.h:
* platform/graphics/ShadowBlur.cpp:
(WebCore::ScratchBuffer::ScratchBuffer):
(WebCore::ScratchBuffer::getScratchBuffer):
(WebCore::ScratchBuffer::scheduleScratchBufferPurge):
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::setWindow):
* platform/graphics/ca/win/CACFLayerTreeHost.h:
* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::ImageBufferData::putData):
* platform/graphics/cocoa/FontCacheCoreText.cpp:
* platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp:
(gstAllocatorFastMallocFree):
* platform/graphics/nicosia/cairo/NicosiaPaintingContextCairo.cpp:
(Nicosia::PaintingContextCairo::ForPainting::ForPainting):
* platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.cpp:
(Nicosia::BackingStoreTextureMapperImpl::createTile):
* platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.cpp:
(Nicosia::ContentLayerTextureMapperImpl::~ContentLayerTextureMapperImpl):
* platform/graphics/win/GradientDirect2D.cpp:
(WebCore::Gradient::fill):
* platform/graphics/win/ImageBufferDataDirect2D.cpp:
(WebCore::ImageBufferData::putData):
* platform/graphics/win/PathDirect2D.cpp:
(WebCore::Path::appendGeometry):
(WebCore::Path::Path):
(WebCore::Path::operator=):
(WebCore::Path::strokeContains const):
(WebCore::Path::transform):
* platform/graphics/win/PlatformContextDirect2D.cpp:
(WebCore::PlatformContextDirect2D::setTags):
* platform/mediastream/MediaStreamTrackPrivate.h:
* platform/mediastream/RealtimeOutgoingAudioSource.cpp:
(WebCore::RealtimeOutgoingAudioSource::~RealtimeOutgoingAudioSource):
* platform/mediastream/RealtimeOutgoingVideoSource.cpp:
(WebCore::RealtimeOutgoingVideoSource::~RealtimeOutgoingVideoSource):
* platform/network/HTTPParsers.cpp:
(WebCore::isCrossOriginSafeHeader):
* platform/sql/SQLiteDatabase.cpp:
* platform/sql/SQLiteDatabase.h:
* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::SQLiteStatement):
(WebCore::SQLiteStatement::prepare):
(WebCore::SQLiteStatement::finalize):
* platform/sql/SQLiteStatement.h:
* platform/win/COMPtr.h:
* rendering/ComplexLineLayout.cpp:
(WebCore::ComplexLineLayout::removeInlineBox const):
* rendering/FloatingObjects.cpp:
(WebCore::FloatingObject::FloatingObject):
(WebCore::FloatingObjects::addPlacedObject):
(WebCore::FloatingObjects::removePlacedObject):
* rendering/FloatingObjects.h:
* rendering/GridTrackSizingAlgorithm.cpp:
* rendering/GridTrackSizingAlgorithm.h:
* rendering/LayoutDisallowedScope.cpp:
* rendering/LayoutDisallowedScope.h:
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::removeFloatingObject):
(WebCore::RenderBlockFlow::ensureLineBoxes):
* rendering/RenderBoxModelObject.cpp:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderElement.cpp:
* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::mapToContainer const):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::placeItemsOnGrid const):
(WebCore::RenderGrid::baselinePosition const):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::willBeDestroyed):
* rendering/RenderLayer.cpp:
(WebCore::ClipRectsCache::ClipRectsCache):
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::paintList):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::updateClipRects):
(WebCore::RenderLayer::calculateClipRects const):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::traverseVisibleNonCompositedDescendantLayers):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
(WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
(WebCore::RenderLayerCompositor::addDescendantsToOverlapMapRecursive const):
(WebCore::RenderLayerCompositor::recursiveRepaintLayer):
(WebCore::RenderLayerCompositor::layerHas3DContent const):
* rendering/RenderLayoutState.cpp:
(WebCore::RenderLayoutState::RenderLayoutState):
(WebCore::RenderLayoutState::computeOffsets):
(WebCore::RenderLayoutState::addLayoutDelta):
* rendering/RenderLayoutState.h:
(WebCore::RenderLayoutState::RenderLayoutState):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::RenderObject):
(WebCore::RenderObject::~RenderObject):
(WebCore::RenderObject::clearNeedsLayout):
* rendering/RenderObject.h:
* rendering/RenderQuote.cpp:
(WebCore::quotesForLanguage):
* rendering/RenderTableCell.h:
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::computeOverflowFromCells):
* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::checkConsistency const):
* rendering/RenderTextLineBoxes.h:
* rendering/line/BreakingContext.h:
(WebCore::tryHyphenating):
* rendering/style/GridArea.h:
(WebCore::GridSpan::GridSpan):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::~RenderStyle):
* rendering/style/RenderStyle.h:
* rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::RenderTreeBuilder::Ruby::detach):
* rendering/updating/RenderTreePosition.cpp:
(WebCore::RenderTreePosition::computeNextSibling):
* rendering/updating/RenderTreePosition.h:
* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::Placeholder::Placeholder):
(WebCore::SVGToOTFFontConverter::Placeholder::populate):
(WebCore::SVGToOTFFontConverter::appendCFFTable):
(WebCore::SVGToOTFFontConverter::firstGlyph const):
(WebCore::SVGToOTFFontConverter::appendKERNTable):
* svg/SVGTransformDistance.cpp:
(WebCore::SVGTransformDistance::SVGTransformDistance):
(WebCore::SVGTransformDistance::scaledDistance const):
(WebCore::SVGTransformDistance::addSVGTransforms):
(WebCore::SVGTransformDistance::addToSVGTransform const):
(WebCore::SVGTransformDistance::distance const):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::nativeImage):
* testing/InternalSettings.cpp:
* workers/service/ServiceWorkerJob.h:
* worklets/PaintWorkletGlobalScope.h:
(WebCore::PaintWorkletGlobalScope::~PaintWorkletGlobalScope):
* xml/XPathStep.cpp:

Source/WebKit:
Convert ASSERT_DISABLED to ASSERT_ENABLED, and fix some tests of NDEBUG that should actually test for ASSERT_ENABLED.
https://bugs.webkit.org/show_bug.cgi?id=205776

Reviewed by Saam Barati.

* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::invalidateAndCancel):
* NetworkProcess/NetworkSession.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::setCapacity):
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(toNSURLSessionResponseDisposition):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
* Platform/IPC/Connection.cpp:
(IPC::Connection::waitForMessage):
* Platform/IPC/MessageReceiver.h:
(IPC::MessageReceiver::willBeAddedToMessageReceiverMap):
(IPC::MessageReceiver::willBeRemovedFromMessageReceiverMap):
* Platform/IPC/cocoa/ConnectionCocoa.mm:
(IPC::readFromMachPort):
* Platform/mac/MachUtilities.cpp:
(setMachExceptionPort):
* Shared/API/APIClient.h:
(API::Client::Client):
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
* Shared/Cocoa/ArgumentCodersCocoa.h:
* Shared/SharedStringHashTableReadOnly.cpp:
* UIProcess/BackingStore.cpp:
(WebKit::BackingStore::incorporateUpdate):
* UIProcess/GenericCallback.h:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/PageLoadState.h:
(WebKit::PageLoadState::Transaction::Token::Token):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::~WebPageProxy):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponse):
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
(WebKit::NetscapePluginStream::NetscapePluginStream):
(WebKit::NetscapePluginStream::notifyAndDestroyStream):
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runModal):
* WebProcess/WebProcess.cpp:
(WebKit::checkDocumentsCaptureStateConsistency):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::updateProcessName):

Source/WebKitLegacy:
Convert ASSERT_DISABLED to ASSERT_ENABLED, and fix some tests of NDEBUG that should actually test for ASSERT_ENABLED.
https://bugs.webkit.org/show_bug.cgi?id=205776

Reviewed by Saam Barati.

* Storage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::StorageAreaImpl):
(WebKit::StorageAreaImpl::close):
* Storage/StorageAreaImpl.h:

Source/WebKitLegacy/mac:
Convert ASSERT_DISABLED to ASSERT_ENABLED, and fix some tests of NDEBUG that should actually test for ASSERT_ENABLED.
https://bugs.webkit.org/show_bug.cgi?id=205776

Reviewed by Saam Barati.

* History/WebHistory.mm:
(-[WebHistoryPrivate removeItemForURLString:]):
* WebView/WebFrame.mm:

Source/WebKitLegacy/win:
Convert ASSERT_DISABLED to ASSERT_ENABLED, and fix some tests of NDEBUG that should actually test for ASSERT_ENABLED.
https://bugs.webkit.org/show_bug.cgi?id=205776

Reviewed by Saam Barati.

* WebKitQuartzCoreAdditions/CAD3DRenderer.cpp:
(WKQCA::CAD3DRenderer::swapChain):
(WKQCA::CAD3DRenderer::initialize):
* WebKitQuartzCoreAdditions/CAD3DRenderer.h:
* WebView.cpp:
(WebView::Release):
* WebView.h:

Source/WTF:
Convert ASSERT_DISABLED to ASSERT_ENABLED, and fix some tests of NDEBUG that should actually test for ASSERT_ENABLED.
https://bugs.webkit.org/show_bug.cgi?id=205776

Reviewed by Saam Barati.

This patch did the following changes:

1. Replaced ASSERT_DISABLED with ASSERT_ENABLED.  This change does away
   with the need for the double negative !ASSERT_DISABLED test that is commonly
   used all over the code, thereby improving code readability.

   In Assertions.h, there is also BACKTRACE_DISABLED, ASSERT_MSG_DISABLED,
   ASSERT_ARG_DISABLED, FATAL_DISABLED, ERROR_DISABLED, LOG_DISABLED, and
   RELEASE_LOG_DISABLED.  We should replace those with ..._ENABLED equivalents
   as well.  We'll do that in another patch.  For now, they are left as is to
   minimize the size of this patch.
   See https://bugs.webkit.org/show_bug.cgi?id=205780.

2. Fixed some code was guarded with "#ifndef NDEBUG" that should actually be
   guarded by "#if ASSERT_ENABLED" instead.

3. In cases where the change is minimal, we move some code around so that we can
   test for "#if ASSERT_ENABLED" instead of "#if !ASSERT_ENABLED".

* wtf/Assertions.h:
* wtf/AutomaticThread.cpp:
(WTF::AutomaticThread::start):
* wtf/BitVector.h:
* wtf/BlockObjCExceptions.mm:
(ReportBlockedObjCException):
* wtf/BloomFilter.h:
* wtf/CallbackAggregator.h:
(WTF::CallbackAggregator::CallbackAggregator):
* wtf/CheckedArithmetic.h:
(WTF::observesOverflow<AssertNoOverflow>):
* wtf/CheckedBoolean.h:
(CheckedBoolean::CheckedBoolean):
(CheckedBoolean::operator bool):
* wtf/CompletionHandler.h:
(WTF::CompletionHandler<Out):
* wtf/DateMath.cpp:
(WTF::initializeDates):
* wtf/Gigacage.cpp:
(Gigacage::tryAllocateZeroedVirtualPages):
* wtf/HashTable.h:
(WTF::KeyTraits>::checkKey):
(WTF::KeyTraits>::checkTableConsistencyExceptSize const):
* wtf/LoggerHelper.h:
* wtf/NaturalLoops.h:
(WTF::NaturalLoops::headerOf const):
* wtf/NeverDestroyed.h:
(WTF::LazyNeverDestroyed::construct):
* wtf/OptionSet.h:
(WTF::OptionSet::OptionSet):
* wtf/Platform.h:
* wtf/PtrTag.h:
* wtf/RefCounted.h:
(WTF::RefCountedBase::disableThreadingChecks):
(WTF::RefCountedBase::enableThreadingChecksGlobally):
(WTF::RefCountedBase::RefCountedBase):
(WTF::RefCountedBase::applyRefDerefThreadingCheck const):
* wtf/SingleRootGraph.h:
(WTF::SingleRootGraph::assertIsConsistent const):
* wtf/SizeLimits.cpp:
* wtf/StackBounds.h:
(WTF::StackBounds::checkConsistency const):
* wtf/URLParser.cpp:
(WTF::URLParser::URLParser):
(WTF::URLParser::domainToASCII):
* wtf/ValueCheck.h:
* wtf/Vector.h:
(WTF::Malloc>::checkConsistency):
* wtf/WeakHashSet.h:
* wtf/WeakPtr.h:
(WTF::WeakPtrImpl::WeakPtrImpl):
(WTF::WeakPtrFactory::WeakPtrFactory):
* wtf/text/AtomStringImpl.cpp:
* wtf/text/AtomStringImpl.h:
* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::reifyString const):
* wtf/text/StringBuilder.h:
* wtf/text/StringCommon.h:
(WTF::hasPrefixWithLettersIgnoringASCIICaseCommon):
* wtf/text/StringHasher.h:
(WTF::StringHasher::addCharacters):
* wtf/text/StringImpl.h:
* wtf/text/SymbolImpl.h:
* wtf/text/UniquedStringImpl.h:

Tools:
Remove WebsiteDataStore::setServiceWorkerRegistrationDirectory
https://bugs.webkit.org/show_bug.cgi?id=205754

Patch by Alex Christensen <achristensen@webkit.org> on 2020-01-06
Reviewed by Youenn Fablet.

* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::websiteDataStore):
(WTR::TestController::platformAdjustContext):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::initializeWebViewConfiguration):

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

5 months agoASSERTION FAILED: hasLayer() in RenderLayer::enclosingOverflowClipLayer
commit-queue@webkit.org [Mon, 6 Jan 2020 22:20:43 +0000 (22:20 +0000)]
ASSERTION FAILED: hasLayer() in RenderLayer::enclosingOverflowClipLayer
https://bugs.webkit.org/show_bug.cgi?id=205474

Patch by Jack Lee <shihchieh_lee@apple.com> on 2020-01-06
Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/css/sticky/sticky-tablecol-crash.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::enclosingClippingBoxForStickyPosition const):
(WebCore::RenderBoxModelObject::constrainingRectForStickyPosition const):
(WebCore::RenderBoxModelObject::stickyPositionOffset const):

LayoutTests:

* fast/css/sticky/sticky-tablecol-crash-expected.txt: Added.
* fast/css/sticky/sticky-tablecol-crash.html: Added.

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

5 months agoRemove WebsiteDataStore::setServiceWorkerRegistrationDirectory
commit-queue@webkit.org [Mon, 6 Jan 2020 22:17:30 +0000 (22:17 +0000)]
Remove WebsiteDataStore::setServiceWorkerRegistrationDirectory
https://bugs.webkit.org/show_bug.cgi?id=205754

Patch by Alex Christensen <achristensen@webkit.org> on 2020-01-06
Reviewed by Youenn Fablet.

Source/WebKit:

The directory is now only set in the configuration, which will prevent misuse of the misplaced SPI.
Updated API tests, which still work.

* UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.cpp:
(WKWebsiteDataStoreConfigurationCopyServiceWorkerRegistrationDirectory):
(WKWebsiteDataStoreConfigurationSetServiceWorkerRegistrationDirectory):
* UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.h:
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreCopyServiceWorkerRegistrationDirectory): Deleted.
(WKWebsiteDataStoreSetServiceWorkerRegistrationDirectory): Deleted.
* UIProcess/API/C/WKWebsiteDataStoreRef.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _hasRegisteredServiceWorker]):
(-[WKWebsiteDataStore _serviceWorkerRegistrationDirectory]): Deleted.
(-[WKWebsiteDataStore _setServiceWorkerRegistrationDirectory:]): Deleted.
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::setCacheStorageDirectory):
(WebKit::WebsiteDataStore::serviceWorkerRegistrationDirectory const): Deleted.
(WebKit::WebsiteDataStore::setServiceWorkerRegistrationDirectory): Deleted.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::websiteDataStore):
(WTR::TestController::platformAdjustContext):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::initializeWebViewConfiguration):

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

5 months agoAllow wildcard scheme in UserContentURLPattern
commit-queue@webkit.org [Mon, 6 Jan 2020 21:59:59 +0000 (21:59 +0000)]
Allow wildcard scheme in UserContentURLPattern
https://bugs.webkit.org/show_bug.cgi?id=205695

Patch by Alex Christensen <achristensen@webkit.org> on 2020-01-06
Reviewed by Darin Adler.

Source/WebCore:

This is needed for <rdar://problem/58011337> and covered by an API test.

* page/UserContentURLPattern.cpp:
(WebCore::UserContentURLPattern::matches const):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:

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

5 months agoREGRESSION: [ iOS ] imported/w3c/web-platform-tests/dom/events/Event-dispatch-on...
commit-queue@webkit.org [Mon, 6 Jan 2020 21:53:39 +0000 (21:53 +0000)]
REGRESSION: [ iOS ] imported/w3c/web-platform-tests/dom/events/Event-dispatch-on-disabled-elements.html is failing
https://bugs.webkit.org/show_bug.cgi?id=205458
<rdar://problem/58081704>

Patch by Antoine Quint <graouts@apple.com> on 2020-01-06
Reviewed by Wenson Hsieh.

Tools:

The last sub-test in imported/w3c/web-platform-tests/dom/events/Event-dispatch-on-disabled-elements.html checks on the
ability to activate various form controls after disabling and re-enabling them. Two of those form controls, <select>
and <textarea>, would trigger animations of the web view's UIScrollView causing touches to be consumed by UIKit and
never seen by the WKContentView, and as such the expected "click" events would not be received. It would have been
possible to modify the test to wait on any potential page scroll to complete before dispatching taps, but since this
is a WPT test, we cannot modify it. Instead, we make a change to the function called by uiScriptController.singleTapAtPoint()
to interrupt any pending UIScrollView animation when a tap is being triggered on the web view. Credit to Wenson Hsieh
for suggesting this simple and effective approach.

* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::singleTapAtPointWithModifiers):

LayoutTests:

Remove the platform-specific expectation since this test now passes reliably on iOS as well.

* platform/ios/imported/w3c/web-platform-tests/dom/events/Event-dispatch-on-disabled-elements-expected.txt: Removed.

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

5 months agoRemove _WKProcessPoolConfiguration.CTDataConnectionServiceType and suppressesConnecti...
commit-queue@webkit.org [Mon, 6 Jan 2020 21:23:19 +0000 (21:23 +0000)]
Remove _WKProcessPoolConfiguration.CTDataConnectionServiceType and suppressesConnectionTerminationOnSystemChange
https://bugs.webkit.org/show_bug.cgi?id=205751

Patch by Alex Christensen <achristensen@webkit.org> on 2020-01-06
Reviewed by Darin Adler.

Their replacements on _WKWebViewConfiguration have been adopted.

* NetworkProcess/NetworkProcess.h:
(WebKit::NetworkProcess::suppressesConnectionTerminationOnSystemChange const): Deleted.
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::dataConnectionServiceType const):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
(WebKit::globalCTDataConnectionServiceType): Deleted.
(WebKit::NetworkSessionCocoa::setCTDataConnectionServiceType): Deleted.
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration suppressesConnectionTerminationOnSystemChange]): Deleted.
(-[_WKProcessPoolConfiguration setSuppressesConnectionTerminationOnSystemChange:]): Deleted.
(-[_WKProcessPoolConfiguration CTDataConnectionServiceType]): Deleted.
(-[_WKProcessPoolConfiguration setCTDataConnectionServiceType:]): Deleted.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::paymentCoordinatorCTDataConnectionServiceType):

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

5 months agoAdd --force-optimization-level option to Tools/Scripts/set-webkit-configuration.
mark.lam@apple.com [Mon, 6 Jan 2020 20:58:44 +0000 (20:58 +0000)]
Add --force-optimization-level option to Tools/Scripts/set-webkit-configuration.
https://bugs.webkit.org/show_bug.cgi?id=205787

Reviewed by Saam Barati.

Usage:
    --force-optimization-level=<opt> Force optimization: O3, O2, O1, O0, Os, Ofast, Og, or none

This can be used to force debug builds to be built with a higher level optimization
so that tests can run to completion faster.

It can also be useful as a simple way to force release builds to be built with
different optimization levels for performance comparison.

Setting --force-optimization-level=none restores the default optimization levels.
Of course, the build targets need to be rebuilt for this to take effect.

* Scripts/set-webkit-configuration:
* Scripts/webkitdirs.pm:
(determineForceOptimizationLevel):
(forceOptimizationLevel):
(XcodeOptions):

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

5 months agoFix non unified build in FIDO Pin.cpp
youenn@apple.com [Mon, 6 Jan 2020 20:56:41 +0000 (20:56 +0000)]
Fix non unified build in FIDO Pin.cpp
https://bugs.webkit.org/show_bug.cgi?id=205794

Reviewed by Jiewen Tan.

No change of behavior, this is a build fix.

* Modules/webauthn/fido/Pin.cpp:

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

5 months agoReformat WebPage logging
krollin@apple.com [Mon, 6 Jan 2020 20:46:38 +0000 (20:46 +0000)]
Reformat WebPage logging
https://bugs.webkit.org/show_bug.cgi?id=205709
<rdar://problem/58290285>

Reviewed by Brent Fulgham.

Update the format used by WebPage in its RELEASE_LOG logging. Use the
format used by WebPageProxy and NetworkResourceLoader, which is
generally of the form:

    <object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values>

So, for example:

    0x4a1df5000 - WebLoaderStrategy::scheduleLoad: Resource is being scheduled with the NetworkProcess (frame=0x4a1db0220, priority=0, webPageID=15, frameID=3, resourceID=32)',

becomes:

    0x4a1df5000 - [resourceLoader=0x1418b7200, frameLoader=0x1326d7340, frame=0x4a1db0220, webPageID=15, frameID=3, resourceID=32] WebLoaderStrategy::scheduleLoad: Resource is being scheduled with the NetworkProcess (priority=2)

This new form is a lot more verbose, but it really helps in tracing
activity from the top of our page/frame/resource load stack to the
bottom.

No new tests - no added or changed functionality.

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::tryLoadingUsingURLSchemeHandler):
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::networkProcessCrashed):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
* WebProcess/Network/WebLoaderStrategy.h:

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

5 months agoRegression r254029: imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEv...
cdumez@apple.com [Mon, 6 Jan 2020 20:42:31 +0000 (20:42 +0000)]
Regression r254029: imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent.html is failing
https://bugs.webkit.org/show_bug.cgi?id=205819

Unreviewed, rebaseline test on iOS after r254029 now that one more check is passing.

* platform/ios/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt:

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

5 months agoRegression r254029: imported/w3c/web-platform-tests/dom/nodes/Document-createEvent...
cdumez@apple.com [Mon, 6 Jan 2020 20:38:44 +0000 (20:38 +0000)]
Regression r254029: imported/w3c/web-platform-tests/dom/nodes/Document-createEvent.https.html is failing
https://bugs.webkit.org/show_bug.cgi?id=205817

Unreviewed, rebaseline test on iOS after r254029 now that more checks are passing.

* platform/ios-wk2/imported/w3c/web-platform-tests/dom/nodes/Document-createEvent.https-expected.txt:

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

5 months agoAdd WKWebView SPI to query _WKMediaMutedState
commit-queue@webkit.org [Mon, 6 Jan 2020 20:29:49 +0000 (20:29 +0000)]
Add WKWebView SPI to query _WKMediaMutedState
https://bugs.webkit.org/show_bug.cgi?id=205789
<rdar://problem/58335241>

Patch by Luming Yin <luming_yin@apple.com> on 2020-01-06
Reviewed by Eric Carlson.

Add plumbing for clients to query the media muted state on WKWebView.

* SourcesCocoa.txt:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _mediaMutedState]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/MediaUtilities.h: Renamed from Source/WebKit/UIProcess/Cocoa/MediaCaptureUtilities.h.
* UIProcess/Cocoa/MediaUtilities.mm: Renamed from Source/WebKit/UIProcess/Cocoa/MediaCaptureUtilities.mm.
(WebKit::toWKMediaCaptureState):
(WebKit::toWKMediaMutedState):
* UIProcess/Cocoa/UIDelegate.mm:
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::mutedStateFlags const):
* WebKit.xcodeproj/project.pbxproj:

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

5 months agoREGRESSION: [r254042] pageoverlay/overlay- tests are failing in WK1
simon.fraser@apple.com [Mon, 6 Jan 2020 20:11:20 +0000 (20:11 +0000)]
REGRESSION: [r254042] pageoverlay/overlay- tests are failing in WK1
https://bugs.webkit.org/show_bug.cgi?id=205810

Unreviewed test gardening. Page Overlay test in WK1 now dump one or more repaint rects after r254042.

* platform/mac-wk1/pageoverlay/overlay-installation-expected.txt:
* platform/mac-wk1/pageoverlay/overlay-large-document-expected.txt:
* platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.txt:
* platform/mac-wk1/pageoverlay/overlay-small-frame-mouse-events-expected.txt:
* platform/mac-wk1/pageoverlay/overlay-small-frame-paints-expected.txt:

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

5 months agoProxy's [[OwnPropertyKeys]] is incorrect in DontEnumPropertiesMode::Exclude
shvaikalesh@gmail.com [Mon, 6 Jan 2020 19:31:01 +0000 (19:31 +0000)]
Proxy's [[OwnPropertyKeys]] is incorrect in DontEnumPropertiesMode::Exclude
https://bugs.webkit.org/show_bug.cgi?id=203818

Reviewed by Keith Miller.

JSTests:

Stress test was failing because "ownKeys" trap didn't return non-configurable
"prototype" property of Proxy's target, violating an invariant.

* stress/proxy-get-own-property-names-should-not-clear-previous-results.js:
* test262/expectations.yaml: Mark 8 test cases as passing.

Source/JavaScriptCore:

This change fixes two spec compatibility issues:

1. If Object.keys is called on Proxy w/o "ownKeys" trap, filtering non-enumerable
properties are not observed by "getOwnPropertyDescriptor" trap.
(step 4 of https://tc39.es/ecma262/#sec-enumerableownpropertynames)

2. If Object.keys is called on Proxy with "ownKeys" trap, non-enumerable
properties of Proxy's target are ignored during invariants validation.
(step 11 of https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys)

Instead of extracting DontEnum filtering to lambda function, a wrapper method for
ProxyObject::performGetOwnPropertyNames was introduced to avoid creating &
filling intermediate PropertyNameArray instance (in case of DontEnumPropertiesMode::Include)
and avoid having inner EnumerationMode in ProxyObject::performGetOwnPropertyNames.

* runtime/ProxyObject.cpp:
(JSC::ProxyObject::performGetOwnPropertyNames):
(JSC::ProxyObject::performGetOwnEnumerablePropertyNames):
(JSC::ProxyObject::getOwnPropertyNames):
* runtime/ProxyObject.h:

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

5 months agoVersioning.
alancoon@apple.com [Mon, 6 Jan 2020 19:18:04 +0000 (19:18 +0000)]
Versioning.

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

5 months agoREGRESSION(r247626): Introduced memory regression
pvollan@apple.com [Mon, 6 Jan 2020 19:16:18 +0000 (19:16 +0000)]
REGRESSION(r247626): Introduced memory regression
https://bugs.webkit.org/show_bug.cgi?id=205815

Unreviewed rollout of https://trac.webkit.org/changeset/247626/webkit.

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::prewarmGlobally):
(WebCore::fontFamiliesForPrewarming): Deleted.

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

5 months agoREGRESSION: [ Catalina wk1 ] editing/mac/attributed-string/attributed-string-across...
tsavell@apple.com [Mon, 6 Jan 2020 19:00:42 +0000 (19:00 +0000)]
REGRESSION: [ Catalina wk1 ] editing/mac/attributed-string/attributed-string-across-shadow-boundaries-with-style-2.html is failing
https://bugs.webkit.org/show_bug.cgi?id=205814

unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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