WebKit-https.git
5 months ago[ iOS wk2 ] crypto/subtle/rsa-indexeddb-non-exportable-private.html is flaky timing...
lawrence.j@apple.com [Wed, 12 Feb 2020 21:53:45 +0000 (21:53 +0000)]
[ iOS wk2 ] crypto/subtle/rsa-indexeddb-non-exportable-private.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=207660

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

5 months agoWeb Inspector: inspector/cpu-profiler/threads.html is flaky crashing
bburg@apple.com [Wed, 12 Feb 2020 21:50:49 +0000 (21:50 +0000)]
Web Inspector: inspector/cpu-profiler/threads.html is flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=207588
<rdar://problem/57458123>

Reviewed by Yusuke Suzuki.

* page/cocoa/ResourceUsageThreadCocoa.mm:
(WebCore::ResourceUsageThread::platformCollectCPUData):
Use a fence to force Thread to be completely ready for use by other threads
prior to storing it. Otherwise, ResourceUsageThread may see it too early.

* workers/WorkerThread.cpp:
(WebCore::WorkerThread::start): Ignore worker threads that are
not fully initialized.

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

5 months ago[iOS] Remove access to AppleKeyStoreUserClient from the WebContent process
bfulgham@apple.com [Wed, 12 Feb 2020 21:49:12 +0000 (21:49 +0000)]
[iOS] Remove access to AppleKeyStoreUserClient from the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=207654
<rdar://problem/58804060>

Reviewed by Per Arne Vollan.

Testing and telemetry show that we no longer need access to the AppleKeyStoreUserClient
IOKit class in the WebContent or GPU processes. We should remove this access.

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

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

5 months agoServiceWorkerContainer::jobResolvedWithRegistration scopeExit should capture all...
youenn@apple.com [Wed, 12 Feb 2020 21:46:36 +0000 (21:46 +0000)]
ServiceWorkerContainer::jobResolvedWithRegistration scopeExit should capture all lambda parameters by value
https://bugs.webkit.org/show_bug.cgi?id=207657

Reviewed by Chris Dumez.

shouldNotifyWhenResolved is captured by reference in the notifyIfExitEarly ScopeExit lambda.
The ScopeExit is not always called synchronously so it is unsafe to capture values by reference here.

* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

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

5 months ago[JSC] Compact StructureTransitionTable
ysuzuki@apple.com [Wed, 12 Feb 2020 20:32:28 +0000 (20:32 +0000)]
[JSC] Compact StructureTransitionTable
https://bugs.webkit.org/show_bug.cgi?id=207616

Reviewed by Mark Lam.

Some of StructureTransitionTable are shown as very large HashMap and we can compact it by encoding key.
We leverage 48bit pointers and 8byte alignment of UniquedStringImpl* to encode other parameters into it.

* runtime/Structure.cpp:
(JSC::StructureTransitionTable::contains const):
(JSC::StructureTransitionTable::get const):
(JSC::StructureTransitionTable::add):
* runtime/Structure.h:
* runtime/StructureTransitionTable.h:
(JSC::StructureTransitionTable::Hash::Key::Key):
(JSC::StructureTransitionTable::Hash::Key::isHashTableDeletedValue const):
(JSC::StructureTransitionTable::Hash::Key::impl const):
(JSC::StructureTransitionTable::Hash::Key::isAddition const):
(JSC::StructureTransitionTable::Hash::Key::attributes const):
(JSC::StructureTransitionTable::Hash::Key::operator==):
(JSC::StructureTransitionTable::Hash::Key::operator!=):
(JSC::StructureTransitionTable::Hash::hash):
(JSC::StructureTransitionTable::Hash::equal):

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

5 months ago[JSC] Make RegExpCache small
ysuzuki@apple.com [Wed, 12 Feb 2020 20:07:25 +0000 (20:07 +0000)]
[JSC] Make RegExpCache small
https://bugs.webkit.org/show_bug.cgi?id=207619

Reviewed by Mark Lam.

We can compact RegExpKey by using PackedRefPtr, so that we can shrink memory consumption of RegExpCache.

* runtime/RegExpKey.h:

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

5 months ago[LFC][IFC] Do not create Display::Boxes for anonymous inline text boxes
zalan@apple.com [Wed, 12 Feb 2020 20:01:14 +0000 (20:01 +0000)]
[LFC][IFC] Do not create Display::Boxes for anonymous inline text boxes
https://bugs.webkit.org/show_bug.cgi?id=207612
<rdar://problem/59374909>

Reviewed by Antti Koivisto.

<div>text content</div> : [text content] only needs a Display::Run.
<div><span>text content</span></div> [span] needs a Display::Box and [text content] needs a Display::Run.

* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):

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

5 months ago[ iOS ] imported/w3c/IndexedDB-private-browsing/idbcursor_delete_objectstore5.html...
jacob_uphoff@apple.com [Wed, 12 Feb 2020 19:43:00 +0000 (19:43 +0000)]
[ iOS ] imported/w3c/IndexedDB-private-browsing/idbcursor_delete_objectstore5.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=207652

Unreviewed test gardening.

* platform/ios/TestExpectations:

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

5 months ago[ iOS ] imported/w3c/IndexedDB-private-browsing/idbcursor_delete_objectstore4.html...
jacob_uphoff@apple.com [Wed, 12 Feb 2020 19:34:21 +0000 (19:34 +0000)]
[ iOS ] imported/w3c/IndexedDB-private-browsing/idbcursor_delete_objectstore4.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=207651

Unreviewed test gardening.

* platform/ios/TestExpectations:

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

5 months agoREGRESSION (r255158): http/tests/frame-throttling/raf-throttle-in-cross-origin-subfra...
said@apple.com [Wed, 12 Feb 2020 19:31:11 +0000 (19:31 +0000)]
REGRESSION (r255158): http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=206839

Reviewed by Simon Fraser.

Source/WebCore:

Remove the setting 'RenderingUpdateThrottling'. We will disable the
RenderingUpdateThrottling till the first layout happens. Then it will be
enabled for the rest of the page's life. This ensures VisuallyIdle won't
throttle the RenderingUpdate steps before the first paint.

* page/Page.cpp:
(WebCore::Page::renderingUpdateThrottlingEnabled const):
(WebCore::Page::addLayoutMilestones):
(WebCore::Page::renderingUpdateThrottlingEnabledChanged): Deleted.
* page/Page.h:
* page/Settings.yaml:
* page/SettingsBase.cpp:
(WebCore::SettingsBase::renderingUpdateThrottlingEnabledChanged): Deleted.
* page/SettingsBase.h:

Source/WebKit:

Remove the WKPreference key 'RenderingUpdateThrottlingEnabled'.

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetRenderingUpdateThrottlingEnabled): Deleted.
(WKPreferencesGetRenderingUpdateThrottlingEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:

Source/WebKitLegacy/mac:

Remove the WKPreference key 'RenderingUpdateThrottlingEnabled'.

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

Source/WebKitLegacy/win:

Remove the WKPreference key 'RenderingUpdateThrottlingEnabled'.

* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::renderingUpdateThrottlingEnabled): Deleted.
(WebPreferences::setRenderingUpdateThrottlingEnabled): Deleted.
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Tools:

Remove the WKPreference key 'RenderingUpdateThrottlingEnabled'.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:

Remove the setting 'RenderingUpdateThrottling'.

* fast/animation/css-animation-throttling-lowPowerMode.html:
* fast/animation/request-animation-frame-throttle-subframe.html:
* fast/animation/request-animation-frame-throttling-detached-iframe.html:
* fast/animation/request-animation-frame-throttling-lowPowerMode.html:
* fast/animation/request-animation-frame-throttling-outside-viewport.html:
* http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html:
* platform/mac-wk2/TestExpectations:

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

5 months ago[ iOS ] imported/w3c/IndexedDB-private-browsing/idbcursor_delete_objectstore3.html...
jacob_uphoff@apple.com [Wed, 12 Feb 2020 19:27:04 +0000 (19:27 +0000)]
[ iOS ] imported/w3c/IndexedDB-private-browsing/idbcursor_delete_objectstore3.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=207650

Unreviewed test gardening.

* platform/ios/TestExpectations:

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

5 months ago[ iOS ] imported/w3c/IndexedDB-private-browsing/idb_webworkers.html is flaky timing out
jacob_uphoff@apple.com [Wed, 12 Feb 2020 19:15:37 +0000 (19:15 +0000)]
[ iOS ] imported/w3c/IndexedDB-private-browsing/idb_webworkers.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=207649

Unreviewed test gardening.

* platform/ios/TestExpectations:

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

5 months agoRefactor DocumentLoader::commitData to use a Document& internally
youenn@apple.com [Wed, 12 Feb 2020 19:13:35 +0000 (19:13 +0000)]
Refactor DocumentLoader::commitData to use a Document& internally
https://bugs.webkit.org/show_bug.cgi?id=207579

Reviewed by Chris Dumez.

Once we write some bytes, the frame has a Document.
Put it in a local variable to improve readability of the code.
No change of behavior.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::commitData):

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

5 months ago[LFC][IFC] Display::Run should not have any geometry mutation functions.
zalan@apple.com [Wed, 12 Feb 2020 19:07:24 +0000 (19:07 +0000)]
[LFC][IFC] Display::Run should not have any geometry mutation functions.
https://bugs.webkit.org/show_bug.cgi?id=207633
<rdar://problem/59386235>

Reviewed by Antti Koivisto.

Now that Display::Runs are constructed after merging the runs on the line, we don't need any of
these mutation functions.

* layout/displaytree/DisplayRun.h:
(WebCore::Display::Run::textContent const):
(WebCore::Display::Run::isLineBreak const):
(WebCore::Display::Run::lineIndex const):
(WebCore::Display::Run::setWidth): Deleted.
(WebCore::Display::Run::setTop): Deleted.
(WebCore::Display::Run::setlLeft): Deleted.
(WebCore::Display::Run::moveVertically): Deleted.
(WebCore::Display::Run::moveHorizontally): Deleted.
(WebCore::Display::Run::expandVertically): Deleted.
(WebCore::Display::Run::expandHorizontally): Deleted.
(WebCore::Display::Run::setTextContent): Deleted.
(WebCore::Display::Run::setExpansion): Deleted.
(WebCore::Display::Run::setImage): Deleted.

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

5 months ago[ Mac wk2 ] http/tests/ssl/applepay/ApplePayBillingAddress.html a flaky failure
commit-queue@webkit.org [Wed, 12 Feb 2020 18:57:20 +0000 (18:57 +0000)]
[ Mac wk2 ] http/tests/ssl/applepay/ApplePayBillingAddress.html a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=207577

Patch by Nikos Mouchtaris <nmouchtaris@apple.com> on 2020-02-12
Reviewed by Wenson Hsieh

Fix for race condition when aborting paymentrequest.

* http/tests/ssl/applepay/ApplePayBillingAddress.html:

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

5 months agoSource/WebKit:
pvollan@apple.com [Wed, 12 Feb 2020 18:49:42 +0000 (18:49 +0000)]
Source/WebKit:
Pages that trigger a redirect will sometimes be left blank
https://bugs.webkit.org/show_bug.cgi?id=207614
rdar://problem/59077740

Patch by Simon Fraser <simon.fraser@apple.com> on 2020-02-12
Reviewed by Tim Horton.

TiledCoreAnimationDrawingArea::setRootCompositingGraphicsLayer() can be called when the layer tree
is frozen, in which case we stash away the layer in m_pendingRootLayer to be parented later at flush
time. However, this sequence of calls had a bug:

setRootCompositingGraphicsLayer() when frozen
    -> stash in m_pendingRootLayer
setRootCompositingGraphicsLayer() when not frozen
    -> set the root layer
flushLayers()
    -> set the root layer to the (old) m_pendingRootLayer

So we need to clear m_pendingRootLayer at step 2.

Very timing dependent, hard to test.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):

LayoutTests:
[iOS] Deny mach lookup access to analytics service in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=207482

Reviewed by Darin Adler.

* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup.html:

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

5 months ago[ iOS ] http/tests/security/strip-referrer-to-origin-for-third-party-redirects-in...
jacob_uphoff@apple.com [Wed, 12 Feb 2020 18:48:24 +0000 (18:48 +0000)]
[ iOS ] http/tests/security/strip-referrer-to-origin-for-third-party-redirects-in-private-mode.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=207647

Unreviewed test gardening.

* platform/ios/TestExpectations:

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

5 months agoresults.webkit.org: Cache archive content
jbedard@apple.com [Wed, 12 Feb 2020 18:47:58 +0000 (18:47 +0000)]
results.webkit.org: Cache archive content
https://bugs.webkit.org/show_bug.cgi?id=207589

Reviewed by Aakash Jain.

* resultsdbpy/resultsdbpy/flask_support/util.py:
(cache_for): Add decorator function which sets the cache values on the returned response.
* resultsdbpy/resultsdbpy/view/archive_view.py:
(ArchiveView): Cache archive content client-side for 12 hours.
* resultsdbpy/resultsdbpy/view/archive_view_unittest.py:
(ArchiveViewUnittest.test_file): Verify that archived content is cached.

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

5 months agoPages that trigger a redirect will sometimes be left blank
simon.fraser@apple.com [Wed, 12 Feb 2020 18:46:31 +0000 (18:46 +0000)]
Pages that trigger a redirect will sometimes be left blank
https://bugs.webkit.org/show_bug.cgi?id=207614
rdar://problem/59077740

Reviewed by Tim Horton.

TiledCoreAnimationDrawingArea::setRootCompositingGraphicsLayer() can be called when the layer tree
is frozen, in which case we stash away the layer in m_pendingRootLayer to be parented later at flush
time. However, this sequence of calls had a bug:

setRootCompositingGraphicsLayer() when frozen
    -> stash in m_pendingRootLayer
setRootCompositingGraphicsLayer() when not frozen
    -> set the root layer
flushLayers()
    -> set the root layer to the (old) m_pendingRootLayer

So we need to clear m_pendingRootLayer at step 2.

Very timing dependent, hard to test.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):

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

5 months agoFix highlight text decorations to work with all decoration types and colors
megan_gardner@apple.com [Wed, 12 Feb 2020 18:40:24 +0000 (18:40 +0000)]
Fix highlight text decorations to work with all decoration types and colors
https://bugs.webkit.org/show_bug.cgi?id=207601

Reviewed by Dean Jackson.

Source/WebCore:

MarkedText styles were incorrectly setting styles, and colors were being
calculated incorrectly.

Extended http/wpt/css/css-highlight-api/highlight-text-decorations.html.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::resolveStyleForMarkedText):
Correctly pass information about text decorations to MarkedTexts styles.

* rendering/TextDecorationPainter.cpp:
(WebCore::collectStylesForRenderer):
(WebCore::TextDecorationPainter::decorationColor):
(WebCore::decorationColor): Deleted.
Expose decorationColor calculator for use in InlineTextBox.
* rendering/TextDecorationPainter.h:

LayoutTests:

* http/wpt/css/css-highlight-api/highlight-text-decorations-expected.html:
* http/wpt/css/css-highlight-api/highlight-text-decorations.html:

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

5 months ago[iOS] Deny mach lookup access to view service in the WebContent process
pvollan@apple.com [Wed, 12 Feb 2020 18:40:04 +0000 (18:40 +0000)]
[iOS] Deny mach lookup access to view service in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=207487
Source/WebKit:

<rdar://problem/56995704>

Reviewed by Darin Adler.

As part of sandbox hardening, mach lookup access to com.apple.uikit.viewservice should be denied.

Test: fast/sandbox/ios/sandbox-mach-lookup.html

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

LayoutTests:

Reviewed by Darin Adler.

* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup.html:

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

5 months ago[ iOS ] http/tests/security/cross-frame-access-private-browsing.html is a flay timeout
jacob_uphoff@apple.com [Wed, 12 Feb 2020 18:36:05 +0000 (18:36 +0000)]
[ iOS ] http/tests/security/cross-frame-access-private-browsing.html is a flay timeout
https://bugs.webkit.org/show_bug.cgi?id=207645

Unreviewed test gardening.

* platform/ios/TestExpectations:

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

5 months ago[ iOS ] imported/w3c/web-platform-tests/service-workers/service-worker/resource-timin...
jacob_uphoff@apple.com [Wed, 12 Feb 2020 18:27:18 +0000 (18:27 +0000)]
[ iOS ] imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.sub.https.html is flaky failure
https://bugs.webkit.org/show_bug.cgi?id=207643

Unreviewed test gardening.

* platform/ios/TestExpectations:

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

5 months agoRELEASE_ASSERT() under WebSWClientConnection::didResolveRegistrationPromise()
cdumez@apple.com [Wed, 12 Feb 2020 18:24:16 +0000 (18:24 +0000)]
RELEASE_ASSERT() under WebSWClientConnection::didResolveRegistrationPromise()
https://bugs.webkit.org/show_bug.cgi?id=207637
<rdar://problem/59093490>

Reviewed by Youenn Fablet.

We were capturing data by reference in the notifyIfExitEarly ScopeExit lambda and then capturing it
in the task posted to the event loop, which was unsafe.

* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

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

5 months ago[ macOS ] inspector/runtime/getCollectionEntries.html is flaky failing
jacob_uphoff@apple.com [Wed, 12 Feb 2020 18:07:37 +0000 (18:07 +0000)]
[ macOS ] inspector/runtime/getCollectionEntries.html is flaky failing
[ macOS ] inspector/runtime/getCollectionEntries.html is flaky failing

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

5 months ago[css-grid] Move grid-item-auto-margins-alignment tests to WPT folder
commit-queue@webkit.org [Wed, 12 Feb 2020 18:03:55 +0000 (18:03 +0000)]
[css-grid] Move grid-item-auto-margins-alignment tests to WPT folder
https://bugs.webkit.org/show_bug.cgi?id=207534

Patch by Rossana Monteriso <rmonteriso@igalia.com> on 2020-02-12
Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

Add grid-item-auto-margins-alignment tests, checked and adapted to WPT, with their expected.txt files.
Imported to WPT with this PR: https://github.com/web-platform-tests/wpt/pull/21509

* web-platform-tests/css/css-grid/alignment/grid-item-auto-margins-alignment-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-item-auto-margins-alignment-vertical-lr-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-item-auto-margins-alignment-vertical-lr.html:
* web-platform-tests/css/css-grid/alignment/grid-item-auto-margins-alignment-vertical-rl-expected.txt:
* web-platform-tests/css/css-grid/alignment/grid-item-auto-margins-alignment-vertical-rl.html:
* web-platform-tests/css/css-grid/alignment/grid-item-auto-margins-alignment.html:

LayoutTests:

Remove grid-item-auto-margins-alignment tests and their expected.txt files. These tests
are being replaced by adapted tests in the corresponding WPT test folder.

* fast/css-grid-layout/grid-item-auto-margins-alignment-expected.txt: Removed.
* fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-lr-expected.txt: Removed.
* fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-rl-expected.txt: Removed.
* fast/css-grid-layout/grid-item-auto-margins-alignment.html: Removed.
* fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-lr.html: Removed.
* fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-rl.html: Removed.

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

5 months agoMake _WKResourceLoadDelegate.h able to be included before other headers
achristensen@apple.com [Wed, 12 Feb 2020 18:02:37 +0000 (18:02 +0000)]
Make _WKResourceLoadDelegate.h able to be included before other headers
https://bugs.webkit.org/show_bug.cgi?id=206037

* UIProcess/API/Cocoa/_WKResourceLoadDelegate.h:
Add missing "@class WKWebView;"

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

5 months agoANGLE has unused bison and glmark2 code
dino@apple.com [Wed, 12 Feb 2020 17:33:41 +0000 (17:33 +0000)]
ANGLE has unused bison and glmark2 code
https://bugs.webkit.org/show_bug.cgi?id=207597
rdar://59361460

Reviewed by Maciej Stachowiak.

Remove some unused files.

* changes.diff:
* src/tests/perf_tests/glmark2Benchmark.cpp: Removed.
* third_party/glmark2/BUILD.gn: Removed.
* third_party/glmark2/README.angle: Removed.
* tools/flex-bison/README.md: Removed.
* tools/flex-bison/linux/bison.sha1: Removed.
* tools/flex-bison/linux/flex.sha1: Removed.
* tools/flex-bison/third_party/.gitattributes: Removed.
* tools/flex-bison/third_party/m4sugar/LICENSE: Removed.
* tools/flex-bison/third_party/m4sugar/README.chromium: Removed.
* tools/flex-bison/third_party/m4sugar/foreach.m4: Removed.
* tools/flex-bison/third_party/m4sugar/m4sugar.m4: Removed.
* tools/flex-bison/third_party/skeletons/LICENSE: Removed.
* tools/flex-bison/third_party/skeletons/README.chromium: Removed.
* tools/flex-bison/third_party/skeletons/bison.m4: Removed.
* tools/flex-bison/third_party/skeletons/c-like.m4: Removed.
* tools/flex-bison/third_party/skeletons/c.m4: Removed.
* tools/flex-bison/third_party/skeletons/yacc.c: Removed.
* tools/flex-bison/update_flex_bison_binaries.py: Removed.
* tools/flex-bison/windows/bison.exe.sha1: Removed.
* tools/flex-bison/windows/flex.exe.sha1: Removed.
* tools/flex-bison/windows/m4.exe.sha1: Removed.
* tools/flex-bison/windows/msys-2.0.dll.sha1: Removed.
* tools/flex-bison/windows/msys-iconv-2.dll.sha1: Removed.
* tools/flex-bison/windows/msys-intl-8.dll.sha1: Removed.

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

5 months agoSupport event notifications in IsolatedTree mode.
andresg_22@apple.com [Wed, 12 Feb 2020 17:31:03 +0000 (17:31 +0000)]
Support event notifications in IsolatedTree mode.
https://bugs.webkit.org/show_bug.cgi?id=207581

Reviewed by Chris Fleizach.

- DOM/Render trees notifications are listened to by AXObjectCache and
the corresponding IsolatedTree is updated.
- The update is now happening for state, value and children change
notifications.
- AXObjectCache::updateIsolatedTree re-generates the subtree rooted at
the node receiving the notification.
- Consolidated creation of AXIsolatedObjects by passing treeID and
parentID to the create method and constructor.
- Changes to the IsolatedTree are set on the main thread using the
NodeChange structure, and applied to the tree on the AX thread.
- The updated IsolatedObjects are attached to their corresponding
platform wrappers on the AX thread, so that after creation they are only
accessed on the secondary thread.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::postNotification): Invokes updateIsolatedTree.
(WebCore::createIsolatedTreeHierarchy):
(WebCore::AXObjectCache::generateIsolatedTree):
(WebCore::AXObjectCache::updateIsolatedTree):
(WebCore::AXObjectCache::createIsolatedTreeHierarchy): Became a static helper function.
* accessibility/AXObjectCache.h:
* accessibility/AccessibilityObjectInterface.h:
* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::AXIsolatedObject):
(WebCore::AXIsolatedObject::create):
(WebCore::AXIsolatedObject::setProperty):
(WebCore::AXIsolatedObject::setParent):
(WebCore::AXIsolatedObject::detachFromParent):
(WebCore::AXIsolatedObject::setTreeIdentifier): Deleted, the tree identifier is set in the constructor.
* accessibility/isolatedtree/AXIsolatedObject.h:
* accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::NodeChange::NodeChange):
(WebCore::AXIsolatedTree::appendNodeChanges):
(WebCore::AXIsolatedTree::applyPendingChanges):
* accessibility/isolatedtree/AXIsolatedTree.h:
* accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:
(WebCore::AXIsolatedObject::attachPlatformWrapper):
* accessibility/mac/AXObjectCacheMac.mm:

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

5 months ago[ macOS wk2 ] webgpu/whlsl/whlsl.html
jacob_uphoff@apple.com [Wed, 12 Feb 2020 17:27:48 +0000 (17:27 +0000)]
[ macOS wk2 ] webgpu/whlsl/whlsl.html
https://bugs.webkit.org/show_bug.cgi?id=207638

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

5 months ago[ macOS wk2 ] webgpu/whlsl/textures-sample-bias.html is flaky failing
jacob_uphoff@apple.com [Wed, 12 Feb 2020 17:13:09 +0000 (17:13 +0000)]
[ macOS wk2 ] webgpu/whlsl/textures-sample-bias.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207636

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

5 months agoExpand WebContent process sandbox with additional syscall
bfulgham@apple.com [Wed, 12 Feb 2020 17:05:11 +0000 (17:05 +0000)]
Expand WebContent process sandbox with additional syscall
https://bugs.webkit.org/show_bug.cgi?id=206260
<rdar://problem/58580997>

Reviewed by Per Arne Vollan.

Testing shows that we will improve performance on some platforms by supporting an additional Syscall.

This patch revises our sandboxes so that WebKit can use this fast path if available.

No new tests. No change in test result behavior.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* WebProcess/com.apple.WebProcess.sb.in:

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

5 months ago[ macOS wk2 ] fast/events/before-input-prevent-insert-replacement.html is a flay...
jacob_uphoff@apple.com [Wed, 12 Feb 2020 16:35:13 +0000 (16:35 +0000)]
[ macOS wk2 ] fast/events/before-input-prevent-insert-replacement.html is a flay failure
https://bugs.webkit.org/show_bug.cgi?id=207635

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

5 months ago[LFC][IFC] Rename Display::Run::TextContext to TextContent
zalan@apple.com [Wed, 12 Feb 2020 15:53:36 +0000 (15:53 +0000)]
[LFC][IFC] Rename Display::Run::TextContext to TextContent
https://bugs.webkit.org/show_bug.cgi?id=207611
<rdar://problem/59374523>

Reviewed by Antti Koivisto.

* layout/Verification.cpp:
(WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
(WebCore::Layout::checkForMatchingTextRuns):
(WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
* layout/displaytree/DisplayPainter.cpp:
(WebCore::Display::paintInlineContent):
* layout/displaytree/DisplayRun.h:
(WebCore::Display::Run::setTextContent):
(WebCore::Display::Run::textContent const):
(WebCore::Display::Run::textContent):
(WebCore::Display::Run::isLineBreak const):
(WebCore::Display::Run::Run):
(WebCore::Display::Run::TextContent::TextContent):
(WebCore::Display::Run::TextContext::start const): Deleted.
(WebCore::Display::Run::TextContext::end const): Deleted.
(WebCore::Display::Run::TextContext::length const): Deleted.
(WebCore::Display::Run::TextContext::content const): Deleted.
(WebCore::Display::Run::TextContext::needsHyphen const): Deleted.
(WebCore::Display::Run::TextContext::setNeedsHyphen): Deleted.
(WebCore::Display::Run::TextContext::expand): Deleted.
(WebCore::Display::Run::setTextContext): Deleted.
(WebCore::Display::Run::textContext const): Deleted.
(WebCore::Display::Run::textContext): Deleted.
(WebCore::Display::Run::TextContext::TextContext): Deleted.
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
* layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::m_textContent):
(WebCore::Layout::LineBuilder::Run::expand):
(WebCore::Layout::LineBuilder::Run::removeTrailingWhitespace):
(WebCore::Layout::m_textContext): Deleted.
* layout/inlineformatting/InlineLineBuilder.h:
(WebCore::Layout::LineBuilder::Run::textContent const):
(WebCore::Layout::LineBuilder::Run::textContext const): Deleted.
* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::paint):
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::outputInlineRuns):
* rendering/line/LineLayoutTraversalDisplayRunPath.h:
(WebCore::LineLayoutTraversal::DisplayRunPath::hasHyphen const):
(WebCore::LineLayoutTraversal::DisplayRunPath::text const):
(WebCore::LineLayoutTraversal::DisplayRunPath::localStartOffset const):
(WebCore::LineLayoutTraversal::DisplayRunPath::localEndOffset const):
(WebCore::LineLayoutTraversal::DisplayRunPath::length const):

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

5 months ago[GStreamer][EME] Fix build with ENCRYPTED_MEDIA=OFF
cturner@igalia.com [Wed, 12 Feb 2020 15:49:07 +0000 (15:49 +0000)]
[GStreamer][EME] Fix build with ENCRYPTED_MEDIA=OFF
https://bugs.webkit.org/show_bug.cgi?id=207628

Unreviewed build fix.

Covered by existing tests.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::parseInitDataFromProtectionMessage):
(WebCore::MediaPlayerPrivateGStreamer::waitForCDMAttachment):

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

5 months agoREGRESSION: (256400) tiled-drawing/scrolling/fixed/fixed-during-rubberband.html is...
jacob_uphoff@apple.com [Wed, 12 Feb 2020 15:42:17 +0000 (15:42 +0000)]
REGRESSION: (256400) tiled-drawing/scrolling/fixed/fixed-during-rubberband.html is failing
https://bugs.webkit.org/show_bug.cgi?id=207631

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

5 months agoREGRESSION: (356400) tiled-drawing/scrolling/sticky/sticky-during-rubberband.html...
jacob_uphoff@apple.com [Wed, 12 Feb 2020 15:39:44 +0000 (15:39 +0000)]
REGRESSION: (356400) tiled-drawing/scrolling/sticky/sticky-during-rubberband.html is failing
https://bugs.webkit.org/show_bug.cgi?id=207632

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

5 months agomacCatalyst: Unable to grab scrollbar on editable text field
wenson_hsieh@apple.com [Wed, 12 Feb 2020 15:39:14 +0000 (15:39 +0000)]
macCatalyst: Unable to grab scrollbar on editable text field
https://bugs.webkit.org/show_bug.cgi?id=207615
<rdar://problem/59212993>

Reviewed by Tim Horton.

In macCatalyst, hovering over the scrollbar (an instance of the internal UIKit class
`_UIScrollViewScrollIndicator`) is required in order for a click and drag with the mouse to actually move the
scrollbar. This is because UIKit depends on the cursor interaction added to this view to recognize and call its
delegate methods.

However, we override hit-testing in WebKit to skip over all children of scroll views, and instead force hit-
testing to find the scroll view instead. This means that UIKit can never hit-test to the scroll indicator views
embedded directly beneath each WKChildScrollView, so the cursor interactions described earlier will not
recognize. To work around this, special case these scroll indicator views, such that we will allow
-hitTest:withEvent: to find these views.

* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
(WebKit::scrollViewScrollIndicatorClass):
(-[UIView _web_findDescendantViewAtPoint:withEvent:]):

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

5 months agoWebSWServerConnection::registerServiceWorkerClient is not sending IPC message to...
youenn@apple.com [Wed, 12 Feb 2020 15:32:51 +0000 (15:32 +0000)]
WebSWServerConnection::registerServiceWorkerClient is not sending IPC message to UIProcess when it should
https://bugs.webkit.org/show_bug.cgi?id=207537

Reviewed by Chris Dumez.

Source/WebKit:

Covered by added API test.

* NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::registerServiceWorkerClient):
Fix use after move so that we can get the context connection and send the IPC message to UIProcess as expected.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

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

5 months ago[LFC][IFC] Move expansion struct out of Display::Run::TextContext to Display::Run
zalan@apple.com [Wed, 12 Feb 2020 15:15:54 +0000 (15:15 +0000)]
[LFC][IFC] Move expansion struct out of Display::Run::TextContext to Display::Run
https://bugs.webkit.org/show_bug.cgi?id=207610
<rdar://problem/59374136>

Reviewed by Antti Koivisto.

This is in preparation for renaming Display::Run::TextContext to Display::Run:TextContent.
Non-text runs now have the default expansion behavior with 0 horizontal expansion.

* layout/displaytree/DisplayPainter.cpp:
(WebCore::Display::paintInlineContent):
* layout/displaytree/DisplayRun.h:
(WebCore::Display::Run::TextContext::setNeedsHyphen):
(WebCore::Display::Run::TextContext::expand):
(WebCore::Display::Run::setExpansion):
(WebCore::Display::Run::expansion const):
(WebCore::Display::Run::TextContext::setExpansion): Deleted.
(WebCore::Display::Run::TextContext::expansion const): Deleted.
* layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::justifyRuns):
(WebCore::Layout::LineBuilder::Run::expand):
(WebCore::Layout::LineBuilder::Run::visuallyCollapseTrailingWhitespace):
(WebCore::Layout::LineBuilder::Run::setExpansionBehavior):
(WebCore::Layout::LineBuilder::Run::expansionBehavior const):
(WebCore::Layout::LineBuilder::Run::setComputedHorizontalExpansion):
(WebCore::Layout::LineBuilder::Run::adjustExpansionBehavior): Deleted.
* layout/inlineformatting/InlineLineBuilder.h:
* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::paint):

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

5 months agoWebDriver: return invalidSessionID exception if the WebProcess doesn't respond (crashes)
clopez@igalia.com [Wed, 12 Feb 2020 13:16:04 +0000 (13:16 +0000)]
WebDriver: return invalidSessionID exception if the WebProcess doesn't respond (crashes)
https://bugs.webkit.org/show_bug.cgi?id=207565

Reviewed by Adrian Perez de Castro.

Report InvalidSessionID if the session connection its not connected.

* WebDriverService.cpp:
(WebDriver::WebDriverService::findSessionOrCompleteWithError):

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

5 months ago[EME][GStreamer] Introduce CDMProxy
cturner@igalia.com [Wed, 12 Feb 2020 11:11:22 +0000 (11:11 +0000)]
[EME][GStreamer] Introduce CDMProxy
https://bugs.webkit.org/show_bug.cgi?id=206730

Reviewed by Xabier Rodriguez-Calvar.

Introduce a new subclass of CDMInstance, CDMProxyInstance.

CDMInstance is a main-thread only class, its purpose is to provide
an interface that will satisfy the JavaScript EME APIs, which by
design, don't actually interact with a real DRM system, what might
also be called "The CDM Instance". That's why the naming is
misleading here, CDMInstance isn't actually an instance of a real
CDM, rather it is a facade for JavaScript.

CDMProxyInstance is a sub-class which provides two APIs,
1/ For background media threads to safely interrogate the status
of keys and to perform decryption using said keys. This API is
exposed by CDMProxy and is platform specific.
2/ For media players to safely assess the state of decryptors and
what their status is.

CDMProxy exists to allow thread-safe access to a real CDM, along
with their quirks. The two main problems GTK integrators of a CDM
have in WebKit is key management and CDM access from background
media threads.

Key management is how to manage the state of keys in a way
coherent with JavaScript, the cross-platform EME implementation,
the real CDMs themselves, and the background media
threads. CDMProxy provides a default key store interface for
sub-classes. Sub-classes can, on receipt of new information from a
real CDM, tell CDMProxy about the keys and their
statuses. CDMProxy is intended to Do The Right Thing from there,
letting JavaScript and WebCore know all the details they need to
about the new state, as well as the media decode threads when they
next come asking.

Access from background threads is ill-advised when using the
thread-unsafe CDMInstance. We used to get away with doing exactly
this, but WebCore recently became more diligent about
thread-unsafe access of main-thread-only data, and we had to do
something to fix the asserts. That something was ProxyCDM (a
terrible name, removed now), which was a hack and please forget
about it. CDMProxy can be safely passed to background threads, and
it will by default provide a thread-safe view of the key store for
background threads to interrogate the key store and perform
CDM-specific decryption / decode.

Covered by existing tests.

* WebCore.xcodeproj/project.pbxproj: Add CDMProxy to build
definition.
* platform/GStreamer.cmake: Add CDMProxy include directories and
implementation files.
* platform/encryptedmedia/CDMInstance.h: Remove references to old
ProxyCDM shim. This approach was a temporary hack to avoid some
thread-safety asserts. I took the liberty of renaming to CDMProxy,
for no other reason that it felt like a better name, sorry for the
confusion.
* platform/encryptedmedia/CDMProxy.cpp: Added.
(WebCore::Key::idAsString const):
(WebCore::Key::valueAsString const):
(WebCore::KeyStore::containsKeyID const):
(WebCore::KeyStore::merge):
(WebCore::KeyStore::allKeysAsReleased const):
(WebCore::KeyStore::addKeys):
(WebCore::KeyStore::add):
(WebCore::KeyStore::removeAllKeysFrom):
(WebCore::KeyStore::remove):
(WebCore::KeyStore::keyValue const):
(WebCore::KeyStore::convertToJSKeyStatusVector const):
(WebCore::CDMProxy::updateKeyStore):
(WebCore::CDMProxy::setInstance):
(WebCore::CDMProxy::keyValue const):
(WebCore::CDMProxy::startedWaitingForKey const):
(WebCore::CDMProxy::stoppedWaitingForKey const):
(WebCore::CDMProxy::tryWaitForKey const):
(WebCore::CDMProxy::keyAvailableUnlocked const):
(WebCore::CDMProxy::keyAvailable const):
(WebCore::CDMProxy::getOrWaitForKey const):
(WebCore::CDMInstanceProxy::startedWaitingForKey):
(WebCore::CDMInstanceProxy::stoppedWaitingForKey):
(WebCore::CDMInstanceProxy::mergeKeysFrom):
(WebCore::CDMInstanceProxy::removeAllKeysFrom):
* platform/encryptedmedia/CDMProxy.h: Added.
(WebCore::Key::create):
(WebCore::Key::idAsSharedBuffer const):
(WebCore::Key::id const):
(WebCore::Key::value const):
(WebCore::Key::value):
(WebCore::Key::status const):
(WebCore::Key::operator==):
(WebCore::Key::addSessionReference):
(WebCore::Key::removeSessionReference):
(WebCore::Key::numSessionReferences const):
(WebCore::Key::Key):
(WebCore::KeyStore::removeAllKeys):
(WebCore::KeyStore::numKeys const):
(WebCore::KeyStore::begin):
(WebCore::KeyStore::begin const):
(WebCore::KeyStore::end):
(WebCore::KeyStore::end const):
(WebCore::KeyStore::rbegin):
(WebCore::KeyStore::rbegin const):
(WebCore::KeyStore::rend):
(WebCore::KeyStore::rend const):
(WebCore::CDMInstanceProxy::setProxy):
(WebCore::CDMInstanceProxy::proxy const):
(WebCore::CDMInstanceProxy::isWaitingForKey const):
(WebCore::CDMInstanceProxy::setPlayer):
(WebCore::CDMInstanceProxy::trackSession):
* platform/encryptedmedia/clearkey/CDMClearKey.cpp:
(WebCore::parseLicenseFormat): Refactored to use new Key class.
(WebCore::extractKeyidsLocationFromCencInitData): Refactored to
use better named constants.
(WebCore::extractKeyidsFromCencInitData): Ditto.
(WebCore::CDMInstanceClearKey::createSession): Use the
trackSession method to allow easier monitoring of all EME
sessions.
(WebCore::CDMInstanceSessionClearKey::requestLicense): Refactor to
keep track of generated session IDs.
(WebCore::CDMInstanceSessionClearKey::updateLicense): Refactor to
use new key management classes.
(WebCore::CDMInstanceSessionClearKey::loadSession): Ditto.
(WebCore::CDMInstanceSessionClearKey::removeSessionData): Ditto.
(WebCore::ClearKeyState::keys): Deleted.
(WebCore::ClearKeyState::singleton): Deleted.
(WebCore::isolatedKey): Deleted.
(WebCore::ProxyCDMClearKey::isolatedKeys const): Deleted.
(WebCore::CDMInstanceClearKey::CDMInstanceClearKey): Deleted.
(WebCore::CDMInstanceClearKey::Key::keyIDAsString const): Deleted.
(WebCore::CDMInstanceClearKey::Key::keyValueAsString const): Deleted.
(WebCore::operator==): Deleted.
(WebCore::operator<): Deleted. It looks like we were unnecessarily
sorting the key vectors. It doesn't make any sense to impose an
ordering on keys, so I removed it.
* platform/encryptedmedia/clearkey/CDMClearKey.h: Refactor to use
new key management classes.
* platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
Remove obsolete ProxyCDM method.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::parseInitDataFromProtectionMessage):
Refactored out of syncMessage. The code was moved here and into
waitForCDMAttachment.
(WebCore::MediaPlayerPrivateGStreamer::waitForCDMAttachment):
Ditto.
(WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Remove
waiting-for-key code, it was all broken anyway.
(WebCore::MediaPlayerPrivateGStreamer::cdmInstanceAttached):
Enforce use of CDMInstanceProxy, all GStreamer-based ports will be
using the CDMProxy derived classes from background
threads. CDMProxy's need a handle to the MediaPlayer for
waitingForKey management, so wire that in here too. Also wire the
GStreamer specific ClearKey proxy here.
(WebCore::MediaPlayerPrivateGStreamer::cdmInstanceDetached):
(WebCore::MediaPlayerPrivateGStreamer::waitingForKey const): Key
status notifications are the responsibility of the CDMProxy now.
(WebCore::MediaPlayerPrivateGStreamer::setWaitingForKey): Deleted.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Now
we use CDMInstanceProxy, not CDMInstance.
* platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp:
Added. G*-specific ClearKey implementation.
(WebCore::CDMProxyClearKey::~CDMProxyClearKey):
(WebCore::CDMProxyClearKey::cencSetCounterVector):
(WebCore::CDMProxyClearKey::cencSetDecryptionKey):
(WebCore::CDMProxyClearKey::cencDecryptFullSample):
(WebCore::CDMProxyClearKey::cencDecryptSubsampled):
(WebCore::CDMProxyClearKey::cencDecrypt):
(WebCore::CDMProxyClearKey::initializeGcrypt):
* platform/graphics/gstreamer/eme/CDMProxyClearKey.h: Added.
* platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
Refactor to use CDMProxy.
(webkit_media_clear_key_decrypt_class_init):
(webkit_media_clear_key_decrypt_init):
(finalize):
(cdmProxyAttached):
(decrypt):
(handleKeyResponse): Deleted. This was a badly named method that
has been changed to cdmProxyAttached.
(findAndSetKey): Deleted.
* platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
(webkit_media_common_encryption_decrypt_class_init):
(transformInPlace):
(isCDMProxyAvailable):
(getCDMProxyFromGstContext):
(attachCDMProxy):
(installCDMProxyIfNotAvailable):
(sinkEventHandler):
(changeState):
(setContext):
(): Deleted.
(isCDMInstanceAvailable): Deleted.
(queryHandler): Deleted.
* platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
* testing/MockCDMFactory.cpp:
(WebCore::MockCDMInstance::proxyCDM const): Deleted.
* testing/MockCDMFactory.h:

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

5 months ago[GL] Remove unused methods in GLContext
commit-queue@webkit.org [Wed, 12 Feb 2020 09:25:35 +0000 (09:25 +0000)]
[GL] Remove unused methods in GLContext
https://bugs.webkit.org/show_bug.cgi?id=207564

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2020-02-12
Reviewed by Carlos Alberto Lopez Perez.

These declarations are crumbs left from
https://bugs.webkit.org/show_bug.cgi?id=161605

No new tests because there's no behavior change.

* platform/graphics/GLContext.h:

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

5 months agoFix crash due to uninitialized currentStyle in CSSTransition
commit-queue@webkit.org [Wed, 12 Feb 2020 08:39:51 +0000 (08:39 +0000)]
Fix crash due to uninitialized currentStyle in CSSTransition
https://bugs.webkit.org/show_bug.cgi?id=205959
<rdar://57073673>

Patch by Sunny He <sunny_he@apple.com> on 2020-02-12
Reviewed by Antoine Quint.

Source/WebCore:

Test: legacy-animation-engine/transitions/svg-bad-scale-crash.html

* animation/CSSTransition.cpp:
(WebCore::CSSTransition::create):
(WebCore::CSSTransition::CSSTransition):
* animation/CSSTransition.h:

LayoutTests:

Fix crash due to uninitialized currentStyle in CSSTransition

* legacy-animation-engine/transitions/svg-bad-scale-crash-expected.txt: Added.
* legacy-animation-engine/transitions/svg-bad-scale-crash.html: Added.

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

5 months ago[ Mac Debug wk2 ] ASSERTION FAILED: m_wasConstructedOnMainThread == isMainThread()
youenn@apple.com [Wed, 12 Feb 2020 06:15:24 +0000 (06:15 +0000)]
[ Mac Debug wk2 ] ASSERTION FAILED: m_wasConstructedOnMainThread == isMainThread()
https://bugs.webkit.org/show_bug.cgi?id=207509
<rdar://problem/59325466>

Reviewed by Chris Dumez.

Covered by existing tests.

* NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::Engine::writeSizeFile):
Make sure completion handler is always called on the main thread.
Minor refactoring to make things more efficient.

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

5 months agoAdd WebCrypto LayoutTests to check if PKCS#7 padding is correctly implemented in...
commit-queue@webkit.org [Wed, 12 Feb 2020 05:41:20 +0000 (05:41 +0000)]
Add WebCrypto LayoutTests to check if PKCS#7 padding is correctly implemented in AES-CBC
https://bugs.webkit.org/show_bug.cgi?id=207174

Patch by Tomoki Imai <Tomoki.Imai@sony.com> on 2020-02-11
Reviewed by Jiewen Tan.

WebCrypto AES-CBC specification requires PKCS#7 padding,

Add decrypt/encrypt test cases for 0 ~ 33 bytes data.
It covers the boundary values where the padding size are changed, namely, 0, 1, 15, 16, 17, 31, 32, and 33.

* crypto/subtle/aes-cbc-import-key-decrypt-expected.txt:
* crypto/subtle/aes-cbc-import-key-decrypt.html:
* crypto/subtle/aes-cbc-import-key-encrypt-expected.txt:
* crypto/subtle/aes-cbc-import-key-encrypt.html:

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

5 months agoRename VideoFullscreenLayerManager to VideoLayerManager
peng.liu6@apple.com [Wed, 12 Feb 2020 05:11:22 +0000 (05:11 +0000)]
Rename VideoFullscreenLayerManager to VideoLayerManager
https://bugs.webkit.org/show_bug.cgi?id=207502

Reviewed by Youenn Fablet.

No new tests -- no new or changed functionality.

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/VideoLayerManager.h: Renamed from Source/WebCore/platform/graphics/VideoFullscreenLayerManager.h.
(WebCore::VideoLayerManager::~VideoLayerManager):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoFullscreenInlineImage):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
(WebCore::MediaPlayerPrivateAVFoundationObjC::requiresTextTrackRepresentation const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setTextTrackRepresentation):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformLayer const):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenFrame):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::requiresTextTrackRepresentation const):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::syncTextTrackBounds):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setTextTrackRepresentation):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayers):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer const):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenLayer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenFrame):
* platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h: Renamed from Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.h.
* platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm: Renamed from Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.mm.
(WebCore::VideoLayerManagerObjC::VideoLayerManagerObjC):
(WebCore::VideoLayerManagerObjC::setVideoLayer):
(WebCore::VideoLayerManagerObjC::updateVideoFullscreenInlineImage):
(WebCore::VideoLayerManagerObjC::setVideoFullscreenLayer):
(WebCore::VideoLayerManagerObjC::setVideoFullscreenFrame):
(WebCore::VideoLayerManagerObjC::didDestroyVideoLayer):
(WebCore::VideoLayerManagerObjC::requiresTextTrackRepresentation const):
(WebCore::VideoLayerManagerObjC::syncTextTrackBounds):
(WebCore::VideoLayerManagerObjC::setTextTrackRepresentation):
(WebCore::VideoLayerManagerObjC::logChannel const):

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

5 months agoCompress ImmutableStyleProperties by using PackedPtr
ysuzuki@apple.com [Wed, 12 Feb 2020 04:11:04 +0000 (04:11 +0000)]
Compress ImmutableStyleProperties by using PackedPtr
https://bugs.webkit.org/show_bug.cgi?id=207604

Reviewed by Mark Lam.

ImmutableStyleProperties is kept so long and consumes enough memory.
We already attempted to compact it by storing CSSProperty's members separately.
But we can compact further by using PackedPtr. This patch makes,

    1. Use PackedPtr for CSSValue* in ImmutableStyleProperties so that we can cut some bytes
    2. Reorder CSSValue* and StylePropertyMetadata arrays since StylePropertyMetadata requires alignment while PackedPtr<CSSValue> is not.

No behavior change.

* css/StyleProperties.cpp:
(WebCore::sizeForImmutableStylePropertiesWithPropertyCount):
(WebCore::ImmutableStyleProperties::ImmutableStyleProperties):
(WebCore::ImmutableStyleProperties::~ImmutableStyleProperties):
(WebCore::ImmutableStyleProperties::findCustomPropertyIndex const):
* css/StyleProperties.h:
(WebCore::ImmutableStyleProperties::valueArray const):
(WebCore::ImmutableStyleProperties::metadataArray const):
(WebCore::ImmutableStyleProperties::propertyAt const):

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

5 months ago[GTK][WPE] Gardening some tests crashing in debug builds
commit-queue@webkit.org [Wed, 12 Feb 2020 03:43:23 +0000 (03:43 +0000)]
[GTK][WPE] Gardening some tests crashing in debug builds
https://bugs.webkit.org/show_bug.cgi?id=207607

Unreviewed test gardening.

Patch by Lauro Moura <lmoura@igalia.com> on 2020-02-11

* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:

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

5 months ago[GStreamer] Debug build fix after r256353.
clopez@igalia.com [Wed, 12 Feb 2020 02:56:59 +0000 (02:56 +0000)]
[GStreamer] Debug build fix after r256353.

Unreviewed build fix.

* platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
(WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue):
(WebCore::InbandMetadataTextTrackPrivateGStreamer::addGenericCue):

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

5 months agoFix declarations marked by wrong export macros (WEBCORE_EXPORT and WTF_EXPORT)
Hironori.Fujii@sony.com [Wed, 12 Feb 2020 01:59:28 +0000 (01:59 +0000)]
Fix declarations marked by wrong export macros (WEBCORE_EXPORT and WTF_EXPORT)
https://bugs.webkit.org/show_bug.cgi?id=207453

Reviewed by Ross Kirsling.

Source/WebCore:

No new tests because there is no behavior change.

* rendering/RenderTheme.h:
* testing/MockContentFilterSettings.h:
* testing/MockGamepadProvider.h:

Source/WebKit:

* UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.h:
* UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.h:

Source/WebKitLegacy:

* Storage/InProcessIDBServer.h:

Source/WebKitLegacy/win:

* Plugins/PluginMainThreadScheduler.h:

Source/WTF:

Export macros are prone to be misused because thier definitions
are identical for POSIX ports. They can be used interchangeably on
such ports.

WTF should use WTF_EXPORT_PRIVATE instead of WTF_EXPORT.

* wtf/HexNumber.h:
* wtf/Language.h:
* wtf/Logger.h:
* wtf/ProcessPrivilege.h:
* wtf/cocoa/CrashReporter.h:
* wtf/cocoa/Entitlements.h:
* wtf/text/LineEnding.h:
* wtf/text/TextBreakIterator.h:
* wtf/text/icu/UTextProviderLatin1.h:
Replaced WTF_EXPORT with WTF_EXPORT_PRIVATE.

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

5 months ago[Win][CMake][WK1] WebKitLegacyGUID doesn't get recompiled by updating IDL files
Hironori.Fujii@sony.com [Wed, 12 Feb 2020 01:50:19 +0000 (01:50 +0000)]
[Win][CMake][WK1] WebKitLegacyGUID doesn't get recompiled by updating IDL files
https://bugs.webkit.org/show_bug.cgi?id=207456

Reviewed by Don Olmstead.

In GENERATE_INTERFACE macro, only *.h files were specified to
OUTPUT of add_custom_command. Generated *_i.c files were just
marked GENERATED source file property. So, WebKitLegacyGUID didn't
know which command generates *_i.c files.

Added a new option HEADER_ONLY to GENERATE_INTERFACE. If
HEADER_ONLY is not specified, append ${_filewe}_i.c to the OUTPUT.
Only AccessibleStates.idl and IA2CommonTypes.idl are marked with
HEADER_ONLY.

Removed _defines and _depends options to simplify
GENERATE_INTERFACE.

* PlatformWin.cmake:

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

5 months agoREGRESSION (r236025): Correct flaky WebGL2 test failures
bfulgham@apple.com [Wed, 12 Feb 2020 01:21:09 +0000 (01:21 +0000)]
REGRESSION (r236025): Correct flaky WebGL2 test failures
https://bugs.webkit.org/show_bug.cgi?id=207595
<rdar://problem/59367393>

Reviewed by Jon Lee.

Correct handling of sample parameters in the prototype WebGL2 implementation.

Tested by existing tests.

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::getInternalformatParameter):

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

5 months ago[LFC] Rename Layout::Container to Layout::ContainerBox
zalan@apple.com [Wed, 12 Feb 2020 01:08:08 +0000 (01:08 +0000)]
[LFC] Rename Layout::Container to Layout::ContainerBox
https://bugs.webkit.org/show_bug.cgi?id=207585
<rdar://problem/59363845>

Reviewed by Antti Koivisto.

ContainerBox name is more inline with the rest of the box classes.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::FormattingContext):
(WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
(WebCore::Layout::mapHorizontalPositionToAncestor):
(WebCore::Layout::FormattingContext::mapTopToFormattingContextRoot const):
* layout/FormattingContext.h:
(WebCore::Layout::FormattingContext::root const):
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
(WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
(WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
(WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
* layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):
(WebCore::Layout::LayoutContext::createFormattingContext):
* layout/LayoutContext.h:
* layout/LayoutState.cpp:
(WebCore::Layout::LayoutState::LayoutState):
(WebCore::Layout::LayoutState::establishedFormattingState const):
(WebCore::Layout::LayoutState::establishedInlineFormattingState const):
(WebCore::Layout::LayoutState::establishedBlockFormattingState const):
(WebCore::Layout::LayoutState::establishedTableFormattingState const):
(WebCore::Layout::LayoutState::ensureFormattingState):
(WebCore::Layout::LayoutState::ensureInlineFormattingState):
(WebCore::Layout::LayoutState::ensureBlockFormattingState):
(WebCore::Layout::LayoutState::ensureTableFormattingState):
* layout/LayoutState.h:
(WebCore::Layout::LayoutState::hasInlineFormattingState const):
(WebCore::Layout::LayoutState::root const):
* layout/Verification.cpp:
(WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
(WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
(WebCore::Layout::verifyAndOutputSubtree):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::BlockFormattingContext):
(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
(WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
(WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints):
* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
* layout/blockformatting/BlockFormattingContextQuirks.cpp:
(WebCore::Layout::initialContainingBlock):
* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore const):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter const):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore const):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter const):
* layout/displaytree/DisplayPainter.cpp:
(WebCore::Display::absoluteDisplayBox):
(WebCore::Display::paintSubtree):
(WebCore::Display::collectPaintRootsAndContentRect):
* layout/floats/FloatAvoider.cpp:
* layout/floats/FloatingContext.cpp:
(WebCore::Layout::FloatingContext::FloatingContext):
(WebCore::Layout::FloatingContext::mapTopToFloatingStateRoot const):
(WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):
* layout/floats/FloatingContext.h:
(WebCore::Layout::FloatingContext::root const):
* layout/floats/FloatingState.cpp:
(WebCore::Layout::FloatingState::FloatingState):
(WebCore::Layout::FloatingState::append):
(WebCore::Layout::FloatingState::bottom const):
(WebCore::Layout::FloatingState::top const):
* layout/floats/FloatingState.h:
(WebCore::Layout::FloatingState::create):
(WebCore::Layout::FloatingState::root const):
(WebCore::Layout::FloatingState::leftBottom const):
(WebCore::Layout::FloatingState::rightBottom const):
(WebCore::Layout::FloatingState::bottom const):
(WebCore::Layout::FloatingState::FloatItem::isDescendantOfFormattingRoot const):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::InlineFormattingContext):
(WebCore::Layout::nextInlineLevelBoxToLayout):
(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
(WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded):
* layout/inlineformatting/InlineFormattingContext.h:
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::InlineFormattingContext::Geometry::computedTextIndent const):
* layout/inlineformatting/InlineFormattingContextQuirks.cpp:
(WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
(WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
* layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::alignContentVertically):
(WebCore::Layout::LineBuilder::adjustBaselineAndLineHeight):
* layout/inlineformatting/LineLayoutContext.cpp:
(WebCore::Layout::LineLayoutContext::LineLayoutContext):
* layout/inlineformatting/LineLayoutContext.h:
(WebCore::Layout::LineLayoutContext::root const):
* layout/integration/LayoutIntegrationBoxTree.h:
(WebCore::LayoutIntegration::BoxTree::rootLayoutBox const):
(WebCore::LayoutIntegration::BoxTree::rootLayoutBox):
* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::rootLayoutBox const):
(WebCore::LayoutIntegration::LineLayout::rootLayoutBox):
* layout/integration/LayoutIntegrationLineLayout.h:
* layout/invalidation/InvalidationState.h:
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::establishesInlineFormattingContext const):
(WebCore::Layout::Box::containingBlock const):
(WebCore::Layout::Box::formattingContextRoot const):
(WebCore::Layout::Box::initialContainingBlock const):
(WebCore::Layout::Box::isDescendantOf const):
(WebCore::Layout::Box::isContainingBlockDescendantOf const):
(WebCore::Layout::Box::isOverflowVisible const):
* layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::parent const):
(WebCore::Layout::Box::isContainerBox const):
(WebCore::Layout::Box::setParent):
(WebCore::Layout::Box::isContainer const): Deleted.
* layout/layouttree/LayoutChildIterator.h:
(WebCore::Layout::LayoutChildIterator<T>::LayoutChildIterator):
(WebCore::Layout::LayoutChildIteratorAdapter<T>::LayoutChildIteratorAdapter):
(WebCore::Layout::childrenOfType):
* layout/layouttree/LayoutContainerBox.cpp: Renamed from Source/WebCore/layout/layouttree/LayoutContainer.cpp.
(WebCore::Layout::ContainerBox::ContainerBox):
(WebCore::Layout::ContainerBox::firstInFlowChild const):
(WebCore::Layout::ContainerBox::firstInFlowOrFloatingChild const):
(WebCore::Layout::ContainerBox::lastInFlowChild const):
(WebCore::Layout::ContainerBox::lastInFlowOrFloatingChild const):
(WebCore::Layout::ContainerBox::setFirstChild):
(WebCore::Layout::ContainerBox::setLastChild):
(WebCore::Layout::ContainerBox::appendChild):
* layout/layouttree/LayoutContainerBox.h: Renamed from Source/WebCore/layout/layouttree/LayoutContainer.h.
* layout/layouttree/LayoutDescendantIterator.h:
(WebCore::Layout::LayoutDescendantIterator<T>::LayoutDescendantIterator):
(WebCore::Layout::LayoutDescendantIteratorAdapter<T>::LayoutDescendantIteratorAdapter):
(WebCore::Layout::descendantsOfType):
* layout/layouttree/LayoutIterator.h:
(WebCore::Layout::LayoutBoxTraversal::firstChild):
(WebCore::Layout::LayoutBoxTraversal::nextAncestorSibling):
(WebCore::Layout::LayoutBoxTraversal::next):
(WebCore::Layout::LayoutBoxTraversal::nextSkippingChildren):
(WebCore::Layout::Traversal::next):
(WebCore::Layout::LayoutIterator<T>::LayoutIterator):
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::LayoutTreeContent::LayoutTreeContent):
(WebCore::Layout::appendChild):
(WebCore::Layout::TreeBuilder::buildLayoutTree):
(WebCore::Layout::TreeBuilder::createContainer):
(WebCore::Layout::TreeBuilder::createLayoutBox):
(WebCore::Layout::TreeBuilder::buildTableStructure):
(WebCore::Layout::TreeBuilder::buildSubTree):
(WebCore::Layout::outputInlineRuns):
(WebCore::Layout::outputLayoutTree):
* layout/layouttree/LayoutTreeBuilder.h:
(WebCore::Layout::LayoutTreeContent::rootLayoutBox const):
(WebCore::Layout::LayoutTreeContent::rootLayoutBox):
(WebCore::Layout::LayoutTreeContent::addBox):
(WebCore::Layout::LayoutTreeContent::addContainer):
* layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::TableFormattingContext):
(WebCore::Layout::TableFormattingContext::layoutTableCellBox):
(WebCore::Layout::TableFormattingContext::ensureTableGrid):
(WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
* layout/tableformatting/TableFormattingContext.h:

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

5 months agoIndexedDB: iteration of cursors skip records if deleted
sihui_liu@apple.com [Wed, 12 Feb 2020 01:05:47 +0000 (01:05 +0000)]
IndexedDB: iteration of cursors skip records if deleted
https://bugs.webkit.org/show_bug.cgi?id=207437

Reviewed by Brady Eidson.

Source/WebCore:

When changes are made to records, cursors will dump cached records and set new key range for iteration.
The new range did not include key of current cursor record, which is wrong because two index records can have
the same key but different values.
r237590 tried fixing this issue by caching all the following records which have the same key as current record.
That is not quite right as there could be changes on the cached records, and the cached records were not
updated.

To correctly fix the issue, set the new key range to include key of current cursor record and exclude values
visited before. To not regress preformance, we complete this by making an extra statment and changing
IndexRecordsIndex index of table IndexRecords to cover value column.

Added test case in: storage/indexeddb/cursor-update-while-iterating.html
Index upgrade covered by existing API test: IndexedDB.IDBObjectStoreInfoUpgradeToV2

* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidIndexRecordsIndex):
* Modules/indexeddb/server/SQLiteIDBCursor.cpp:
(WebCore::IDBServer::buildPreIndexStatement):
(WebCore::IDBServer::SQLiteIDBCursor::objectStoreRecordsChanged):
(WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindPreIndexStatementIfNecessary):
(WebCore::IDBServer::SQLiteIDBCursor::fetch):
(WebCore::IDBServer::SQLiteIDBCursor::fetchNextRecord):
(WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord):
* Modules/indexeddb/server/SQLiteIDBCursor.h:
(WebCore::IDBServer::SQLiteIDBCursor::isDirectionNext const):

LayoutTests:

* storage/indexeddb/cursor-update-while-iterating-expected.txt:
* storage/indexeddb/resources/cursor-update-while-iterating.js:
(populateObjectStore):
(onOpenSuccess.request.onsuccess):
(onOpenSuccess):
(prepareDatabase): Deleted.

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

5 months agoWebPage::getFocusedElementInformation should be robust when the focused element chang...
wenson_hsieh@apple.com [Wed, 12 Feb 2020 00:49:58 +0000 (00:49 +0000)]
WebPage::getFocusedElementInformation should be robust when the focused element changes during layout
https://bugs.webkit.org/show_bug.cgi?id=207582
<rdar://problem/47634344>

Reviewed by Tim Horton.

This is a speculative fix for <rdar://problem/47634344>, wherein the initial layout update in WebPage::
getFocusedElementInformation may cause the currently focused element to disappear (or change). In the case where
m_focusedElement becomes nil, we end up crashing with a null pointer deref, since the rest of the method assumes
that m_focusedElement exists.

To patch this crash, bail early (after the first layout update) if m_focusedElement changed during the layout
pass. Since the rest of the function my trigger even more layout updates that could nuke m_focusedElement, I
also changed the rest of the function to use the locally stored `focusedElement` variable instead of
m_focusedElement, on WebPage.

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

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

5 months agoUnreviewed, partial rollout of r255037.
ryanhaddad@apple.com [Wed, 12 Feb 2020 00:49:29 +0000 (00:49 +0000)]
Unreviewed, partial rollout of r255037.
<rdar://problem/59240559>

* page/scrolling/cocoa/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::applyLayerPositions):
* page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::computeLayerPosition const):

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

5 months ago[iOS] Deny access to unused tcp service from NetworkProcess
bfulgham@apple.com [Wed, 12 Feb 2020 00:47:35 +0000 (00:47 +0000)]
[iOS] Deny access to unused tcp service from NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=207590
<rdar://problem/57895351>

Reviewed by Darin Adler.

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

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

5 months ago[ Mac wk2 ] webgpu/whlsl/do-while-loop.html is flaky failing.
lawrence.j@apple.com [Wed, 12 Feb 2020 00:47:09 +0000 (00:47 +0000)]
[ Mac wk2 ] webgpu/whlsl/do-while-loop.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207599

Unreviewed test gardening.

Adjusted expectations to reflect image failure.

* platform/mac-wk2/TestExpectations:

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

5 months ago[ Mac wk2 ] webgpu/whlsl/do-while-loop.html is flaky failing.
lawrence.j@apple.com [Wed, 12 Feb 2020 00:39:09 +0000 (00:39 +0000)]
[ Mac wk2 ] webgpu/whlsl/do-while-loop.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207599

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

5 months agoUnreviewed, revert r255662 as it seems to cause blank views in SVC.
cdumez@apple.com [Wed, 12 Feb 2020 00:31:22 +0000 (00:31 +0000)]
Unreviewed, revert r255662 as it seems to cause blank views in SVC.
https://bugs.webkit.org/show_bug.cgi?id=207144
<rdar://problem/59334011>

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::initializeNewWebProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

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

5 months agoBug 207424: Crash in WebCore::ParsedContentType::parseContentType when parsing invali...
ddkilzer@apple.com [Wed, 12 Feb 2020 00:13:55 +0000 (00:13 +0000)]
Bug 207424: Crash in WebCore::ParsedContentType::parseContentType when parsing invalid MIME type
<https://webkit.org/b/207424>
<rdar://problem/59250384>

Patch by Rob Buis <rbuis@igalia.com> and David Kilzer <ddkilzer@apple.com> on 2020-02-11
Reviewed by Rob Buis.

Source/WebCore:

Return StringView directly rather than wrapping
it in Optional, since StringView's can be null tested.

Tests: TestWebKitAPI.ParsedContentType

* platform/network/ParsedContentType.cpp:
(WebCore::parseToken):
(WebCore::parseQuotedString):
(WebCore::ParsedContentType::parseContentType): Don't set type
parameter if parameterName is null string.  Remove unneeded
`parameterName` variable; use keyRange.toString() instead.

Tools:

* TestWebKitAPI/Tests/WebCore/ParsedContentType.cpp:
(TestWebKitAPI::TEST): Add more tests.

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

5 months ago[ iOS wk2 ] fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden...
lawrence.j@apple.com [Wed, 12 Feb 2020 00:05:09 +0000 (00:05 +0000)]
[ iOS wk2 ] fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207596

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

5 months ago[LFC] Do not create generic Layout::Box leaf boxes
zalan@apple.com [Tue, 11 Feb 2020 23:51:36 +0000 (23:51 +0000)]
[LFC] Do not create generic Layout::Box leaf boxes
https://bugs.webkit.org/show_bug.cgi?id=207570
<rdar://problem/59356417>

Reviewed by Antti Koivisto.

A Layout::Box is either a container box or a very specific leaf type (text, replaced etc).

* layout/layouttree/LayoutBox.cpp:
* layout/layouttree/LayoutBox.h:

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

5 months agoUnreviewed, rolling out r256314.
commit-queue@webkit.org [Tue, 11 Feb 2020 23:49:43 +0000 (23:49 +0000)]
Unreviewed, rolling out r256314.
https://bugs.webkit.org/show_bug.cgi?id=207594

It is breaking an API test (Requested by youenn on #webkit).

Reverted changeset:

"WebSWServerConnection::registerServiceWorkerClient is not
sending IPC message to UIProcess when it should"
https://bugs.webkit.org/show_bug.cgi?id=207537
https://trac.webkit.org/changeset/256314

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

5 months agoresults.webkit.org: Configuration documentation should include architecture
jbedard@apple.com [Tue, 11 Feb 2020 23:42:44 +0000 (23:42 +0000)]
results.webkit.org: Configuration documentation should include architecture
https://bugs.webkit.org/show_bug.cgi?id=207584

Reviewed by Aakash Jain.

* resultsdbpy/resultsdbpy/view/templates/documentation.html: Add architecture documentation.

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

5 months agoParent service worker controller should be used for child iframe as per https://w3c...
youenn@apple.com [Tue, 11 Feb 2020 23:32:10 +0000 (23:32 +0000)]
Parent service worker controller should be used for child iframe as per https://w3c.github.io/ServiceWorker/#control-and-use-window-client
https://bugs.webkit.org/show_bug.cgi?id=207506

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/service-worker/local-url-inherit-controller.https-expected.txt:

Source/WebCore:

Instead of checking document URL protocol, implement the rules as per spec, in particular:
- If http/https, do not reuse controller
- If iframe has a unique origin, do not reuse controller
- If iframe does not have same origin as parent, do not reuse controller.

Covered by rebased test.

* loader/DocumentLoader.cpp:
(WebCore::isInheritingControllerFromParent):
(WebCore::DocumentLoader::commitData):
(WebCore::isLocalURL): Deleted.

LayoutTests:

* http/tests/workers/service/serviceworkerclients-claim.https-expected.txt:
Rebased test since now the frame is doing a fetch that is no longer intercepted by the service worker,
and is thus failing due to CORS.
* http/tests/workers/service/serviceworkerclients-claim.https.html:

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

5 months ago[LFC] Introduce Layout::ReplacedBox
zalan@apple.com [Tue, 11 Feb 2020 23:13:00 +0000 (23:13 +0000)]
[LFC] Introduce Layout::ReplacedBox
https://bugs.webkit.org/show_bug.cgi?id=207561
<rdar://problem/59353151>

Reviewed by Antti Koivisto.

This is in preparation for making Layout::Box an "abstract" box (so that it stops being a leaf type of box).

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
* layout/FormattingContext.h:
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::complicatedCases const):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin const):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin const):
(WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin const):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::precomputedMarginBefore):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
(WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
* layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::append):
(WebCore::Layout::LineBuilder::appendReplacedInlineBox):
(WebCore::Layout::LineBuilder::runContentHeight const):
(WebCore::Layout::LineBuilder::isVisuallyNonEmpty const):
* layout/inlineformatting/LineLayoutContext.cpp:
(WebCore::Layout::LineLayoutContext::inlineItemWidth const):
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::Box):
(WebCore::Layout::Box::isInlineBox const):
(WebCore::Layout::Box::replaced const): Deleted.
(WebCore::Layout::Box::replaced): Deleted.
* layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::isTableCell const):
(WebCore::Layout::Box::isReplacedBox const):
(WebCore::Layout::Box::isReplaced const): Deleted.
* layout/layouttree/LayoutReplacedBox.cpp: Renamed from Source/WebCore/layout/layouttree/LayoutReplaced.cpp.
(WebCore::Layout::ReplacedBox::ReplacedBox):
(WebCore::Layout::ReplacedBox::hasIntrinsicWidth const):
(WebCore::Layout::ReplacedBox::hasIntrinsicHeight const):
(WebCore::Layout::ReplacedBox::hasIntrinsicRatio const):
(WebCore::Layout::ReplacedBox::intrinsicWidth const):
(WebCore::Layout::ReplacedBox::intrinsicHeight const):
(WebCore::Layout::ReplacedBox::intrinsicRatio const):
(WebCore::Layout::ReplacedBox::hasAspectRatio const):
* layout/layouttree/LayoutReplacedBox.h: Renamed from Source/WebCore/layout/layouttree/LayoutReplaced.h.
(WebCore::Layout::ReplacedBox::setCachedImage):
(WebCore::Layout::ReplacedBox::cachedImage const):
(WebCore::Layout::ReplacedBox::setIntrinsicSize):
(WebCore::Layout::ReplacedBox::setIntrinsicRatio):
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createLayoutBox):
(WebCore::Layout::outputLayoutBox):

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

5 months ago[ iOS wk2 ] http/wpt/service-workers/service-worker-spinning-fetch.https.html is...
lawrence.j@apple.com [Tue, 11 Feb 2020 22:59:38 +0000 (22:59 +0000)]
[ iOS wk2 ] http/wpt/service-workers/service-worker-spinning-fetch.https.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207515

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

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

5 months agoShould not allow zooming to reveal focused element when suppressing selection assistant
dbates@webkit.org [Tue, 11 Feb 2020 22:57:39 +0000 (22:57 +0000)]
Should not allow zooming to reveal focused element when suppressing selection assistant
https://bugs.webkit.org/show_bug.cgi?id=207575

Reviewed by Wenson Hsieh.

Do not tell the UIScrollView to scroll and zoom to reveal the focused element when the
selection assistant is being suppressed as it does not make sense to do so: the primary
motivation for zooming to reveal the focused (aka the editable) element is make it easier
to edit it.

This fixes a bug where previewing a partially offscreen link inside an editable element
would cause the page content to scroll and zoom to reveal the editable element. Previewing
a link is not considered an editing operation and selection assistance is prevented, but
"zoom to reveal" was inadvertently allowed. Now it is not.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _zoomToRevealFocusedElement]): Bail out if selection is being suppressed
for any reason. Note that pre-r245882 there was reason SuppressSelectionAssistantReason::DropAnimationIsRunning
that was used to suppress selection assistance AND allow "zoom to reveal". But this
reason was removed and there are no suppression reasons as of the time of writing where
it makes sense to have behavior like SuppressSelectionAssistantReason::DropAnimationIsRunning.

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

5 months agoRegression: RTCRtpSender.getCapabilities("video") returns null on iOS 13.4 (17E5223h)
youenn@apple.com [Tue, 11 Feb 2020 22:53:08 +0000 (22:53 +0000)]
Regression: RTCRtpSender.getCapabilities("video") returns null on iOS 13.4 (17E5223h)
https://bugs.webkit.org/show_bug.cgi?id=207325
<rdar://problem/59224810>

Reviewed by Eric Carlson.

Source/WebCore:

Manually tested and covered by API test.

* platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
(WebCore::LibWebRTCProvider::webRTCAvailable):
Return true unconditionally on iOS since libwebrtc.dylib is always available.

Tools:

* TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
(TestWebKitAPI::TEST):
Add a test validating that RTCRtpSender.getCapabilities does not return null.
* TestWebKitAPI/Tests/WebKit/getUserMedia.html:

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

5 months agoDeprecate _WKUserContentWorld replaced by WKContentWorld
achristensen@apple.com [Tue, 11 Feb 2020 22:50:47 +0000 (22:50 +0000)]
Deprecate _WKUserContentWorld replaced by WKContentWorld
https://bugs.webkit.org/show_bug.cgi?id=207514

Add the rest of the SPI to convert between the two.

* UIProcess/API/Cocoa/_WKUserContentWorld.h:
* UIProcess/API/Cocoa/_WKUserContentWorld.mm:
(-[_WKUserContentWorld contentWorld]):

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

5 months ago[ iOS ] imported/w3c/web-platform-tests/IndexedDB/key-generators/reading-autoincremen...
lawrence.j@apple.com [Tue, 11 Feb 2020 22:43:11 +0000 (22:43 +0000)]
[ iOS ] imported/w3c/web-platform-tests/IndexedDB/key-generators/reading-autoincrement-indexes-cursors.any.serviceworker.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=206934

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

5 months agoWeb Inspector RTL: Elements closing tag is reversed
nvasilyev@apple.com [Tue, 11 Feb 2020 22:38:23 +0000 (22:38 +0000)]
Web Inspector RTL: Elements closing tag is reversed
https://bugs.webkit.org/show_bug.cgi?id=207214

Reviewed by Timothy Hatcher.

Wrap text nodes in `unicode-bidi: isolate-override`. From MDN:

isolate-override:
    This keyword applies the isolation behavior of the isolate
    keyword to the surrounding content and the override behavior
    of the bidi-override keyword to the inner content.

* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom li > span > .html-text-node):

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

5 months agoUnreviewed, rolling out r256345.
ryanhaddad@apple.com [Tue, 11 Feb 2020 22:36:56 +0000 (22:36 +0000)]
Unreviewed, rolling out r256345.

Broke iOS builds.

Reverted changeset:

"Deprecate _WKUserContentWorld replaced by WKContentWorld"
https://bugs.webkit.org/show_bug.cgi?id=207514
https://trac.webkit.org/changeset/256345

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

5 months agoCleanup WebCore.xcodeproj/project.pbxproj
peng.liu6@apple.com [Tue, 11 Feb 2020 22:36:48 +0000 (22:36 +0000)]
Cleanup WebCore.xcodeproj/project.pbxproj
https://bugs.webkit.org/show_bug.cgi?id=207573

Reviewed by Darin Adler.

No new tests -- no new or changed functionality.

* WebCore.xcodeproj/project.pbxproj:

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

5 months ago[iOS] Deny mach lookup access to the tccd service in the WebContent process
pvollan@apple.com [Tue, 11 Feb 2020 22:22:23 +0000 (22:22 +0000)]
[iOS] Deny mach lookup access to the tccd service in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=207488

Reviewed by Darin Adler.

Source/WebKit:

As part of sandbox hardening, deny mach lookup access to the tccd service.

Test: fast/sandbox/ios/sandbox-mach-lookup.html

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

LayoutTests:

* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup.html:

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

5 months ago[ iOS wk2 ] http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight.html is...
lawrence.j@apple.com [Tue, 11 Feb 2020 22:13:15 +0000 (22:13 +0000)]
[ iOS wk2 ] http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207583

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

6 months agoDraw underlines when specified in highlights
megan_gardner@apple.com [Tue, 11 Feb 2020 21:53:01 +0000 (21:53 +0000)]
Draw underlines when specified in highlights
https://bugs.webkit.org/show_bug.cgi?id=207319

Reviewed by Simon Fraser.

Source/WebCore:

Test: http/wpt/css/css-highlight-api/highlight-text-decorations.html

When determining if we have any text decorations, currently we were only looking at the lineStyle,
but since highlights can have text decorations, they need to be considered in these calculations.

* dom/Document.cpp:
(WebCore::Document::updateHighlightPositions):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::collectMarkedTextsForHighlights const):
(WebCore::InlineTextBox::paintMarkedTextDecoration):
* rendering/TextDecorationPainter.cpp:
(WebCore::TextDecorationPainter::textDecorationsInEffectForStyle):
* rendering/TextDecorationPainter.h:

LayoutTests:

* http/wpt/css/css-highlight-api/highlight-text-decorations-expected.html: Copied from LayoutTests/http/wpt/css/css-highlight-api/highlight-text-expected.html.
* http/wpt/css/css-highlight-api/highlight-text-decorations.html: Added.
* http/wpt/css/css-highlight-api/highlight-text-expected.html:

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

6 months agoSupport in-band VTT captions when loading media in the GPU Process
eric.carlson@apple.com [Tue, 11 Feb 2020 21:37:58 +0000 (21:37 +0000)]
Support in-band VTT captions when loading media in the GPU Process
https://bugs.webkit.org/show_bug.cgi?id=207467
<rdar://problem/59312749>

Reviewed by Jer Noble.

Source/WebCore:

No new tests, existing tests enabled in GPU process.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
* Modules/webaudio/AudioContext.h:
(WebCore::AudioContext::nextAudioNodeLogIdentifier):
(WebCore::AudioContext::nextAudioParameterLogIdentifier):
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack):
(WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack):
(WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack):
* html/track/AudioTrack.cpp:
(WebCore::AudioTrack::AudioTrack):
(WebCore::AudioTrack::willRemove):
(WebCore::AudioTrack::setMediaElement):
(WebCore::AudioTrack::setLogger):
* html/track/AudioTrack.h:
* html/track/InbandGenericTextTrack.cpp:
(WebCore::InbandGenericTextTrack::parseWebVTTCueData):
* html/track/InbandGenericTextTrack.h:
* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::create):
(WebCore::InbandTextTrack::InbandTextTrack):
(WebCore::toPrivate):
(WebCore::InbandTextTrack::updateKindFromPrivate):
(WebCore::InbandTextTrack::setLogger):
* html/track/InbandTextTrack.h:
* html/track/InbandWebVTTTextTrack.cpp:
(WebCore::InbandWebVTTTextTrack::parseWebVTTCueData):
* html/track/InbandWebVTTTextTrack.h:
* html/track/TextTrack.cpp:
(WebCore::TextTrack::setKind):
(WebCore::TextTrack::setMode):
(WebCore::TextTrack::removeAllCues):
(WebCore::TextTrack::addCue):
* html/track/TextTrack.h:
(WTF::LogArgument<WebCore::TextTrack::Kind>::toString):
(WTF::LogArgument<WebCore::TextTrack::Mode>::toString):
* html/track/TrackBase.cpp:
(WebCore::TrackBase::TrackBase):
(WebCore::TrackBase::setMediaElement):
(WebCore::TrackBase::setLogger):
(WebCore::nextLogIdentifier): Deleted.
* html/track/TrackBase.h:
* html/track/VideoTrack.cpp:
(WebCore::VideoTrack::VideoTrack):
(WebCore::VideoTrack::setMediaElement):
(WebCore::VideoTrack::setLogger):
* html/track/VideoTrack.h:
* platform/graphics/InbandTextTrackPrivate.h:
(WebCore::InbandTextTrackPrivate::kind const):
(WebCore::InbandTextTrackPrivate::cueFormat const):
(WebCore::InbandTextTrackPrivate::InbandTextTrackPrivate):
* platform/graphics/InbandTextTrackPrivateClient.h:
* platform/graphics/MediaPlayerEnums.h:
* platform/graphics/TrackPrivateBase.cpp:
(WebCore::TrackPrivateBase::setLogger):
* platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
(WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processNativeSamples):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks):
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
(WebCore::InbandTextTrackPrivateAVFObjC::kind const):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState):
(WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions):
(WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack):
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
(WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):
* platform/graphics/iso/ISOVTTCue.cpp:
(WebCore::ISOWebVTTCue::ISOWebVTTCue):
* platform/graphics/iso/ISOVTTCue.h:
* platform/mock/mediasource/MockTracks.h:
(WebCore::MockTextTrackPrivate::MockTextTrackPrivate):

Source/WebKit:

* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* GPUProcess/media/RemoteAudioTrackProxy.h:
* GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddAudioTrack):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddVideoTrack):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddTextTrack):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerDidRemoveTextTrack):
(WebKit::RemoteMediaPlayerProxy::textTrackRepresentationBoundsChanged):
(WebKit::RemoteMediaPlayerProxy::textTrackSetMode):
* GPUProcess/media/RemoteMediaPlayerProxy.h:
* GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
* GPUProcess/media/RemoteTextTrackProxy.cpp: Added.
(WebKit::RemoteTextTrackProxy::RemoteTextTrackProxy):
(WebKit::RemoteTextTrackProxy::configuration):
(WebKit::RemoteTextTrackProxy::configurationChanged):
(WebKit::RemoteTextTrackProxy::willRemove):
(WebKit::RemoteTextTrackProxy::idChanged):
(WebKit::RemoteTextTrackProxy::labelChanged):
(WebKit::RemoteTextTrackProxy::languageChanged):
(WebKit::RemoteTextTrackProxy::addDataCue):
(WebKit::RemoteTextTrackProxy::updateDataCue):
(WebKit::RemoteTextTrackProxy::removeDataCue):
(WebKit::RemoteTextTrackProxy::addGenericCue):
(WebKit::RemoteTextTrackProxy::updateGenericCue):
(WebKit::RemoteTextTrackProxy::removeGenericCue):
(WebKit::RemoteTextTrackProxy::parseWebVTTFileHeader):
(WebKit::RemoteTextTrackProxy::parseWebVTTCueData):
* GPUProcess/media/RemoteTextTrackProxy.h: Copied from Source/WebKit/GPUProcess/media/RemoteVideoTrackProxy.h.
* GPUProcess/media/RemoteVideoTrackProxy.h:
* GPUProcess/media/TextTrackPrivateRemoteConfiguration.h: Added.
(WebKit::TextTrackPrivateRemoteConfiguration::encode const):
(WebKit::TextTrackPrivateRemoteConfiguration::decode):
* GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h:
* GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp:
(WebKit::RemoteSampleBufferDisplayLayerManager::createLayer):
* GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h:
* Scripts/webkit/messages.py:
* Sources.txt:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::removeRemoteAudioTrack):
(WebKit::MediaPlayerPrivateRemote::remoteAudioTrackConfigurationChanged):
(WebKit::MediaPlayerPrivateRemote::addRemoteTextTrack):
(WebKit::MediaPlayerPrivateRemote::removeRemoteTextTrack):
(WebKit::MediaPlayerPrivateRemote::remoteTextTrackConfigurationChanged):
(WebKit::MediaPlayerPrivateRemote::parseWebVTTFileHeader):
(WebKit::MediaPlayerPrivateRemote::parseWebVTTCueData):
(WebKit::MediaPlayerPrivateRemote::parseWebVTTCueDataStruct):
* WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
* WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in:
* WebProcess/GPU/media/TextTrackPrivateRemote.cpp: Added.
(WebKit::TextTrackPrivateRemote::TextTrackPrivateRemote):
(WebKit::TextTrackPrivateRemote::setMode):
(WebKit::TextTrackPrivateRemote::updateConfiguration):
(WebKit::TextTrackPrivateRemote::addDataCue):
(WebKit::TextTrackPrivateRemote::updateDataCue):
(WebKit::TextTrackPrivateRemote::removeDataCue):
(WebKit::TextTrackPrivateRemote::addGenericCue):
(WebKit::TextTrackPrivateRemote::updateGenericCue):
(WebKit::TextTrackPrivateRemote::removeGenericCue):
(WebKit::TextTrackPrivateRemote::parseWebVTTFileHeader):
(WebKit::TextTrackPrivateRemote::parseWebVTTCueData):
(WebKit::TextTrackPrivateRemote::parseWebVTTCueDataStruct):
* WebProcess/GPU/media/TextTrackPrivateRemote.h: Added.
* WebProcess/GPU/media/TextTrackPrivateRemote.messages.in: Added.

Source/WTF:

* wtf/LoggerHelper.h:
(WTF::LoggerHelper::childLogIdentifier const):

LayoutTests:

* gpu-process/TestExpectations:

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

6 months agoFix for crashes in WebAccessibilityObjectWrapper after notification updates in Isolat...
andresg_22@apple.com [Tue, 11 Feb 2020 21:33:41 +0000 (21:33 +0000)]
Fix for crashes in WebAccessibilityObjectWrapper after notification updates in IsolatedTree mode.
https://bugs.webkit.org/show_bug.cgi?id=207558

Reviewed by Chris Fleizach.

- Accessibility methods invoked in the secondary thread that Return id
values retrieved from the main thread, need to retain/autorelease the
returned ids.
- When serving a request on the AX thread that requires retrieving a
value from the main thread, the backing obbject on the main thread may
have gone away, so need to check for nullity of the backing object also
on the main thread.

* accessibility/AccessibilityObjectInterface.h:
(WebCore::Accessibility::retrieveAutoreleasedValueFromMainThread):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper attachmentView]):
(-[WebAccessibilityObjectWrapper textMarkerRangeFromRange:]):
(-[WebAccessibilityObjectWrapper renderWidgetChildren]):
(-[WebAccessibilityObjectWrapper associatedPluginParent]):
(-[WebAccessibilityObjectWrapper scrollViewParent]):
(-[WebAccessibilityObjectWrapper windowElement:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

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

6 months agovideo.currentTime is not being updated in iOS 13.4 Beta
eric.carlson@apple.com [Tue, 11 Feb 2020 21:14:44 +0000 (21:14 +0000)]
video.currentTime is not being updated in iOS 13.4 Beta
https://bugs.webkit.org/show_bug.cgi?id=207489
<rdar://problem/59322640>

Reviewed by Youenn Fablet.

Source/WebKit:

Allow the Web process and the GPU process to communicate with
'com.apple.coremedia.audiodeviceclock.xpc' because it is necessary to use a
CMTimeBase, which is used by MediaPlayerPrivateMediaStreamAVFObjC for currentTime.

Test: fast/mediastream/media-element-current-time.html

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

LayoutTests:

* fast/mediastream/media-element-current-time.html: Added.

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

6 months agoDeprecate _WKUserContentWorld replaced by WKContentWorld
achristensen@apple.com [Tue, 11 Feb 2020 21:09:21 +0000 (21:09 +0000)]
Deprecate _WKUserContentWorld replaced by WKContentWorld
https://bugs.webkit.org/show_bug.cgi?id=207514

Add the rest of the SPI to convert between the two.

* UIProcess/API/Cocoa/_WKUserContentWorld.h:
* UIProcess/API/Cocoa/_WKUserContentWorld.mm:
(-[_WKUserContentWorld contentWorld]):

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

6 months ago[ Mac wk2 ] http/tests/ssl/applepay/ApplePayBillingAddress.html is flaky failing.
lawrence.j@apple.com [Tue, 11 Feb 2020 21:08:09 +0000 (21:08 +0000)]
[ Mac wk2 ] http/tests/ssl/applepay/ApplePayBillingAddress.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207577

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

6 months agoKeyboardInputTests.SupportsImagePaste fails on recent versions of UIKit
wenson_hsieh@apple.com [Tue, 11 Feb 2020 20:59:13 +0000 (20:59 +0000)]
KeyboardInputTests.SupportsImagePaste fails on recent versions of UIKit
https://bugs.webkit.org/show_bug.cgi?id=207557

Reviewed by Jonathan Bedard.

The exception occurs because UIKit attempts to create a QoS interval upon setting the initially selected row in
a UITableView when we focus a date picker. This fails because TestWebKitAPI isn't actually an app, so the call
to `work_interval_create` with `WORK_INTERVAL_TYPE_CA_CLIENT` as the option flag fails. For the time being, work
around this by focusing an empty select element instead (for which we won't attempt to create and select any
table view cells).

* TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:

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

6 months ago[ macOS wk2 ] http/tests/IndexedDB/collect-IDB-objects.https.html is flaky failing
jacob_uphoff@apple.com [Tue, 11 Feb 2020 19:41:55 +0000 (19:41 +0000)]
[ macOS wk2 ] http/tests/IndexedDB/collect-IDB-objects.https.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207571

Unreviewed test gardening

* platform/mac-wk2/TestExpectations:

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

6 months agoDeprecate _WKUserContentWorld replaced by WKContentWorld
achristensen@apple.com [Tue, 11 Feb 2020 19:40:03 +0000 (19:40 +0000)]
Deprecate _WKUserContentWorld replaced by WKContentWorld
https://bugs.webkit.org/show_bug.cgi?id=207514

Reviewed by Brady Eidson.

I also add SPI to convert between the two to aid a smooth transition.

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/APIContentWorld.cpp:
(API::ContentWorld::fromUserContentWorld):
(API::ContentWorld::ContentWorld):
* UIProcess/API/APIContentWorld.h:
(API::ContentWorldBase::ContentWorldBase):
* UIProcess/API/APIUserContentWorld.cpp:
(API::UserContentWorld::fromContentWorld):
(API::UserContentWorld::UserContentWorld):
* UIProcess/API/APIUserContentWorld.h:
* UIProcess/API/Cocoa/WKContentWorld.mm:
(-[WKContentWorld _userContentWorld]):
* UIProcess/API/Cocoa/WKContentWorldInternal.h:
* UIProcess/API/Cocoa/WKContentWorldPrivate.h: Added.
* UIProcess/API/Cocoa/WKUserContentController.mm:
* UIProcess/API/Cocoa/WKUserScript.mm:
* UIProcess/API/Cocoa/_WKUserContentWorld.h:
* UIProcess/API/Cocoa/_WKUserContentWorld.mm:
* UIProcess/API/Cocoa/_WKUserContentWorldInternal.h:
* UIProcess/API/Cocoa/_WKUserStyleSheet.h:
* UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
* WebKit.xcodeproj/project.pbxproj:

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

6 months ago[ macOS wk1 ] legacy-animation-engine/animations/3d/transform-origin-vs-functions...
jacob_uphoff@apple.com [Tue, 11 Feb 2020 19:25:47 +0000 (19:25 +0000)]
[ macOS wk1 ] legacy-animation-engine/animations/3d/transform-origin-vs-functions.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207569

Unreviewed test gardening

* platform/mac-wk1/TestExpectations:

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

6 months ago[ macOS wk1 ] inspector/page/overrideUserAgent.html is a flaky failure
jacob_uphoff@apple.com [Tue, 11 Feb 2020 19:16:51 +0000 (19:16 +0000)]
[ macOS wk1 ] inspector/page/overrideUserAgent.html  is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=207568

Unreviewed test gardening

* platform/mac-wk1/TestExpectations:

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

6 months ago[ macOS wk1 ] imported/w3c/web-platform-tests/web-animations/timing-model/animations...
jacob_uphoff@apple.com [Tue, 11 Feb 2020 19:06:46 +0000 (19:06 +0000)]
[ macOS wk1 ] imported/w3c/web-platform-tests/web-animations/timing-model/animations/pausing-an-animation.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207566

Unreviewed test gardening

* platform/mac-wk1/TestExpectations:

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

6 months ago[ iOS ] imported/w3c/web-platform-tests/content-security-policy/frame-ancestors/frame...
tsavell@apple.com [Tue, 11 Feb 2020 19:04:05 +0000 (19:04 +0000)]
[ iOS ] imported/w3c/web-platform-tests/content-security-policy/frame-ancestors/frame-ancestors-from-serviceworker.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=207563

Unreviewed test gardening

* platform/ios/TestExpectations:

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

6 months agoAX: Wrong includes for internal SDK
cfleizach@apple.com [Tue, 11 Feb 2020 18:58:19 +0000 (18:58 +0000)]
AX: Wrong includes for internal SDK
https://bugs.webkit.org/show_bug.cgi?id=207554

Reviewed by Chris Dumez.

* pal/spi/mac/HIServicesSPI.h:

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

6 months ago[ macOS iOS ] animations/animation-callback-timestamp.html is flaky failing.
jacob_uphoff@apple.com [Tue, 11 Feb 2020 18:49:14 +0000 (18:49 +0000)]
[ macOS iOS ] animations/animation-callback-timestamp.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207153

Unreviewed test gardening

* platform/mac-wk1/TestExpectations:

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

6 months agoBOTWATCH: editing/selection/5354455-1.html causes nasty crash
jacob_uphoff@apple.com [Tue, 11 Feb 2020 18:38:20 +0000 (18:38 +0000)]
BOTWATCH: editing/selection/5354455-1.html causes nasty crash
rdar://problem/13448458

Unreviewed test gardening

* platform/mac-wk2/TestExpectations: unskip test because it no longer crashes locally

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

6 months agoREGRESSION (r256009): [ Mojave wk2 Debug ] ASSERTION FAILED: Completion handler shoul...
youenn@apple.com [Tue, 11 Feb 2020 18:26:51 +0000 (18:26 +0000)]
REGRESSION (r256009): [ Mojave wk2 Debug ] ASSERTION FAILED: Completion handler should always be called under WebKit::WebMDNSRegister::PendingRegistration
https://bugs.webkit.org/show_bug.cgi?id=207521
<rdar://problem/59331313>

Reviewed by Eric Carlson.

Source/WebKit:

Covered by debug assertion not hit in layout tests.

* WebProcess/Network/webrtc/WebMDNSRegister.cpp:
(WebKit::WebMDNSRegister::finishedRegisteringMDNSName):
Call completion handler even if the document entry has been cleared, which can happen in suspend/destruction case.
If the entry is not there, all MDNS names for the document have been unregistered. We then report a registration error.

LayoutTests:

* platform/mac-wk2/TestExpectations:

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

6 months ago[ macOS wk1 ] media/airplay-target-availability.html is flaky failing
jacob_uphoff@apple.com [Tue, 11 Feb 2020 18:18:37 +0000 (18:18 +0000)]
[ macOS wk1 ] media/airplay-target-availability.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207560

Unreviewed test gardening

* platform/mac-wk1/TestExpectations:

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

6 months agoAdd WKHTTPCookieStore._getCookiesForURL SPI
commit-queue@webkit.org [Tue, 11 Feb 2020 18:14:10 +0000 (18:14 +0000)]
Add WKHTTPCookieStore._getCookiesForURL SPI
https://bugs.webkit.org/show_bug.cgi?id=207527

Patch by Alex Christensen <achristensen@webkit.org> on 2020-02-11
Reviewed by Brady Eidson.

Source/WebKit:

This is needed to implement rdar://problem/57193106 without re-implementing the cookie/URL matching logic that exists in CFNetwork.
Covered by an API test with a great pun in it.

* UIProcess/API/APIHTTPCookieStore.cpp:
(API::HTTPCookieStore::cookiesForURL):
* UIProcess/API/APIHTTPCookieStore.h:
* UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
(-[WKHTTPCookieStore _getCookiesForURL:completionHandler:]):
* UIProcess/API/Cocoa/WKHTTPCookieStorePrivate.h: Added.
* WebKit.xcodeproj/project.pbxproj:

Tools:

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

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

6 months agoWebSWServerConnection::registerServiceWorkerClient is not sending IPC message to...
youenn@apple.com [Tue, 11 Feb 2020 17:57:16 +0000 (17:57 +0000)]
WebSWServerConnection::registerServiceWorkerClient is not sending IPC message to UIProcess when it should
https://bugs.webkit.org/show_bug.cgi?id=207537

Reviewed by Chris Dumez.

Source/WebKit:

Covered by added API test.

* NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::registerServiceWorkerClient):
Fix use after move so that we can get the context connection and send the IPC message to UIProcess as expected.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

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

6 months ago[ macOS iOS ] fast/parser/parser-yield-timing.html is a flaky failure
jacob_uphoff@apple.com [Tue, 11 Feb 2020 17:51:00 +0000 (17:51 +0000)]
[ macOS iOS ] fast/parser/parser-yield-timing.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=207559

Unreviewed test gardening

* platform/ios-wk2/TestExpectations:
* platform/mac-wk1/TestExpectations:

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

6 months agoAdd WKContentWorld.h to WebKit.h
achristensen@apple.com [Tue, 11 Feb 2020 17:48:15 +0000 (17:48 +0000)]
Add WKContentWorld.h to WebKit.h
https://bugs.webkit.org/show_bug.cgi?id=207351

Suggested by Alex Christensen.

Patch by Brady Eidson <beidson@apple.com> on 2020-02-11

* Shared/API/Cocoa/WebKit.h:

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