Timeline



Apr 23, 2021:

11:11 PM Changeset in webkit [276546] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Crash in IndentOutdentCommand::outdentParagraph attempting to move a paragraph
https://bugs.webkit.org/show_bug.cgi?id=224909

Patch by Ian Gilbert <iang@apple.com> on 2021-04-23
Reviewed by Ryosuke Niwa.

Added check inside IndentOutdentCommand::outdentParagraph to ensure that inserting a
HTMLBRElement was successful before attempting to move a paragraph to that node.

  • editing/IndentOutdentCommand.cpp:

(WebCore::IndentOutdentCommand::outdentParagraph):

5:47 PM Changeset in webkit [276545] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

PCM: debug mode should send the second report on a 10 second delay after the first
https://bugs.webkit.org/show_bug.cgi?id=225010
<rdar://problem/77092303>

Reviewed by John Wilander.

Fix a bug in PCM debug mode where we don't set the timer for 10_s
after sending the first report for an attribution.

No new tests, this is debug mode only. Non-debug mode behavior is
covered by existing tests, and I tested debug mode manually.

  • NetworkProcess/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests):
If the attribution has been sent to only one endpoint, indicated by
a non-null laterTimeToSend value, we should set the timer to be 10
seconds if debug mode is enabled.

Also, change the interval time from 1 minute to 10 seconds, because
there was no good reason that it was 1 minute and we should be
consistent. Also 1 minute is a long time to wait during a test.

5:40 PM Changeset in webkit [276544] by Russell Epstein
  • 1 copy in tags/Safari-611.2.4

Tag Safari-611.2.4.

5:36 PM Changeset in webkit [276543] by Russell Epstein
  • 1 copy in tags/Safari-611.1.21.2.6

Tag Safari-611.1.21.2.6.

5:26 PM Changeset in webkit [276542] by Russell Epstein
  • 2 edits in branches/safari-611.1.21.2-branch/Source/JavaScriptCore

Cherry-pick r276527. rdar://problem/77092686

[YARR Interpreter] Improper backtrack of parentheses with non-zero based greedy quantifiers
https://bugs.webkit.org/show_bug.cgi?id=224983

Reviewed by Mark Lam.

When we backtrack a parentheses with a greedy non zero based quantifier,
we don't properly restore for the case where we hadn't reached the minimum count.
We now save the input position on entry and restore it when we backtrack for
this case. We also properly release the allocated ParenthesesDisjunctionContext's.

  • yarr/YarrInterpreter.cpp: (JSC::Yarr::Interpreter::matchParentheses): (JSC::Yarr::Interpreter::backtrackParentheses):

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

5:26 PM Changeset in webkit [276541] by Russell Epstein
  • 8 edits in branches/safari-611.1.21.2-branch/Source

Versioning.

WebKit-7611.1.21.2.6

5:25 PM Changeset in webkit [276540] by aakash_jain@apple.com
  • 1 edit
    2 deletes in trunk/Tools

Delete unused buildbot.css and default.css
https://bugs.webkit.org/show_bug.cgi?id=224997

Reviewed by Alexey Proskuryakov.

  • CISupport/build-webkit-org/public_html/buildbot.css: Removed.
  • CISupport/build-webkit-org/public_html/default.css: Removed.
5:22 PM Changeset in webkit [276539] by Russell Epstein
  • 1 copy in tags/Safari-611.1.21.161.6

Tag Safari-611.1.21.161.6.

5:21 PM Changeset in webkit [276538] by Russell Epstein
  • 2 edits in branches/safari-611.1.21.161-branch/Source/JavaScriptCore

Cherry-pick r276527. rdar://problem/77092673

[YARR Interpreter] Improper backtrack of parentheses with non-zero based greedy quantifiers
https://bugs.webkit.org/show_bug.cgi?id=224983

Reviewed by Mark Lam.

When we backtrack a parentheses with a greedy non zero based quantifier,
we don't properly restore for the case where we hadn't reached the minimum count.
We now save the input position on entry and restore it when we backtrack for
this case. We also properly release the allocated ParenthesesDisjunctionContext's.

  • yarr/YarrInterpreter.cpp: (JSC::Yarr::Interpreter::matchParentheses): (JSC::Yarr::Interpreter::backtrackParentheses):

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

5:21 PM Changeset in webkit [276537] by Russell Epstein
  • 2 edits in branches/safari-611.1.21.161-branch/Source/JavaScriptCore

Cherry-pick r276524. rdar://problem/77092702

Fix B3 strength reduction for shl.
https://bugs.webkit.org/show_bug.cgi?id=224913
rdar://76978874

Reviewed by Michael Saboff.

If the operation can potentially either underflow or overflow, then the result
can be any value.

  • b3/B3ReduceStrength.cpp:

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

5:18 PM Changeset in webkit [276536] by Jonathan Bedard
  • 1 edit
    2 copies
    1 add
    1 delete in trunk/Websites/bugs.webkit.org

Bugzilla needs to linkify identifiers (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=224312
<rdar://problem/75845629>

Reviewed by Dewei Zhu.

  • extensions/Commits: Moved from Trac.
  • extensions/Commits/Config.pm: Changed Plugin name.
  • extensions/Commits/Extension.pm: Ditto.

(_replace_revision): Use commit.webkit.org instead of trac.

  • extensions/Trac: Moved to Commits.
5:18 PM Changeset in webkit [276535] by Russell Epstein
  • 8 edits in branches/safari-611.1.21.161-branch/Source

Versioning.

WebKit-7611.1.21.161.6

5:16 PM Changeset in webkit [276534] by Russell Epstein
  • 1 copy in tags/Safari-611.1.21.0.14

Tag Safari-611.1.21.0.14.

5:13 PM Changeset in webkit [276533] by Russell Epstein
  • 2 edits in branches/safari-611.1.21.0-branch/Source/JavaScriptCore

Cherry-pick r276527. rdar://problem/77092655

[YARR Interpreter] Improper backtrack of parentheses with non-zero based greedy quantifiers
https://bugs.webkit.org/show_bug.cgi?id=224983

Reviewed by Mark Lam.

When we backtrack a parentheses with a greedy non zero based quantifier,
we don't properly restore for the case where we hadn't reached the minimum count.
We now save the input position on entry and restore it when we backtrack for
this case. We also properly release the allocated ParenthesesDisjunctionContext's.

  • yarr/YarrInterpreter.cpp: (JSC::Yarr::Interpreter::matchParentheses): (JSC::Yarr::Interpreter::backtrackParentheses):

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

5:13 PM Changeset in webkit [276532] by Russell Epstein
  • 2 edits in branches/safari-611.1.21.0-branch/Source/JavaScriptCore

Cherry-pick r276524. rdar://problem/77092695

Fix B3 strength reduction for shl.
https://bugs.webkit.org/show_bug.cgi?id=224913
rdar://76978874

Reviewed by Michael Saboff.

If the operation can potentially either underflow or overflow, then the result
can be any value.

  • b3/B3ReduceStrength.cpp:

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

5:08 PM Changeset in webkit [276531] by Russell Epstein
  • 8 edits in branches/safari-611.1.21.0-branch/Source

Versioning.

WebKit-7611.1.21.0.14

4:45 PM Changeset in webkit [276530] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Crash in constructCustomElementSynchronously
https://bugs.webkit.org/show_bug.cgi?id=224992
<rdar://66988026>

Reviewed by Tadeu Zagallo.

Exit early when the global object is nullptr although this shouldn't happen.

No new tests since we have no reproductions.

  • bindings/js/JSCustomElementInterface.cpp:

(WebCore::JSCustomElementInterface::tryToConstructCustomElement): Added a null check.

4:38 PM Changeset in webkit [276529] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/JavaScriptCore

Cherry-pick r276527. rdar://problem/77091667

[YARR Interpreter] Improper backtrack of parentheses with non-zero based greedy quantifiers
https://bugs.webkit.org/show_bug.cgi?id=224983

Reviewed by Mark Lam.

When we backtrack a parentheses with a greedy non zero based quantifier,
we don't properly restore for the case where we hadn't reached the minimum count.
We now save the input position on entry and restore it when we backtrack for
this case. We also properly release the allocated ParenthesesDisjunctionContext's.

  • yarr/YarrInterpreter.cpp: (JSC::Yarr::Interpreter::matchParentheses): (JSC::Yarr::Interpreter::backtrackParentheses):

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

4:21 PM Changeset in webkit [276528] by don.olmstead@sony.com
  • 3 edits in trunk/Source/WebCore

Add additional guards around USE_ANGLE
https://bugs.webkit.org/show_bug.cgi?id=225001

Reviewed by Fujii Hironori.

When USE(ANGLE) initializeOpenGLShims isn't used or available.

When USE(ANGLE) the ANGLE shader compiler isn't needed.

  • platform/graphics/GLContext.cpp:

(WebCore::initializeOpenGLShimsIfNeeded):

  • platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
4:06 PM Changeset in webkit [276527] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[YARR Interpreter] Improper backtrack of parentheses with non-zero based greedy quantifiers
https://bugs.webkit.org/show_bug.cgi?id=224983

Reviewed by Mark Lam.

When we backtrack a parentheses with a greedy non zero based quantifier,
we don't properly restore for the case where we hadn't reached the minimum count.
We now save the input position on entry and restore it when we backtrack for
this case. We also properly release the allocated ParenthesesDisjunctionContext's.

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::Interpreter::matchParentheses):
(JSC::Yarr::Interpreter::backtrackParentheses):

4:01 PM Changeset in webkit [276526] by Chris Dumez
  • 5 edits
    1 copy
    2 adds in trunk/LayoutTests

http/tests/security/referrer-policy-header.html is slow
https://bugs.webkit.org/show_bug.cgi?id=224998

Reviewed by Geoffrey Garen.

The test is a flaky timeout on the bots because it is slow. On my machine, it takes 17 seconds to run
it with a debug build. To speed things up, I am now running the subtests in parallel instead of
sequentially. I also split the test in 2 (regular response vs multipart response). Each tests now takes
about ~5 seconds to run on my machine.

  • http/tests/security/referrer-policy-header-expected.txt:
  • http/tests/security/referrer-policy-header-multipart-expected.txt: Added.
  • http/tests/security/referrer-policy-header-multipart.html: Added.
  • http/tests/security/referrer-policy-header-test.js: Copied from LayoutTests/http/tests/security/referrer-policy-header.html.

(printResults):
(onmessage):
(runTests):

  • http/tests/security/referrer-policy-header.html:
  • http/tests/security/resources/postReferrer.py:
  • http/tests/security/resources/serve-referrer-policy-and-test.py:
3:46 PM Changeset in webkit [276525] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/JavaScriptCore

Cherry-pick r276524. rdar://problem/77089783

Fix B3 strength reduction for shl.
https://bugs.webkit.org/show_bug.cgi?id=224913
rdar://76978874

Reviewed by Michael Saboff.

If the operation can potentially either underflow or overflow, then the result
can be any value.

  • b3/B3ReduceStrength.cpp:

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

3:14 PM Changeset in webkit [276524] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix B3 strength reduction for shl.
https://bugs.webkit.org/show_bug.cgi?id=224913
rdar://76978874

Reviewed by Michael Saboff.

If the operation can potentially either underflow or overflow, then the result
can be any value.

  • b3/B3ReduceStrength.cpp:
3:06 PM Changeset in webkit [276523] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebKit

Unreviewed, reverting r275562.
https://bugs.webkit.org/show_bug.cgi?id=225002

Causes issues in iOS contextmenu animations and interactions
with other popovers

Reverted changeset:

"[iOS] contextmenu hints can be clipped by the WKWebView"
https://bugs.webkit.org/show_bug.cgi?id=224204
https://trac.webkit.org/changeset/275562

3:04 PM Changeset in webkit [276522] by Aditya Keerthi
  • 2 edits in trunk/Source/WebKit

REGRESSION (r273154): fast/forms/ios/repeatedly-focus-offscreen-select.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=224985
<rdar://problem/77042177>

Reviewed by Wenson Hsieh.

The test is failing after r273154, which made <select> elements present
a UIMenu rather than a popover. The old logic ensured popovers were not
presented when the <select> element was offscreen (see r265117 for more
information on why that behavior was necessary), but the new
presentation omitted that logic.

To achieve the correct behavior, and fix the failing test, <select>
menus should not be presented when the element is offscreen.

  • UIProcess/ios/forms/WKFormSelectPicker.mm:

(-[WKSelectPicker controlBeginEditing]):

3:00 PM Changeset in webkit [276521] by cathiechen
  • 7 edits in trunk

Not computing image aspect ratios from width and height attributes for lazy loaded images
https://bugs.webkit.org/show_bug.cgi?id=224197

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

The test cases for error images and images without src in img-aspect-ratio.html are passed. This patch
doesn't change the behavior of the original aspect ratio case, so it's failed like before.

  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio-expected.txt:

Source/WebCore:

This patch supports error images and lazy loaded images (without src attribute) to compute
implicit aspect ratios from width and height attributes. Refactor the code a bit. Added
intrinsicAspectRatioFromWidthHeight() to compute aspect ratio from width and height attributes when
the object is allowed to which is decided by canMapWidthHeightToAspectRatio().
Remove !downcast<RenderImage>(*this).cachedImage() constraint, so that images without src attributes
is allowed. As to error images, compute the aspect ratio when the image shouldDisplayBrokenImageIcon().

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::canMapWidthHeightToAspectRatio const): To indicate that the object is allowed
to compute aspect ratio from width and height attributes.
(WebCore::RenderImage::computeIntrinsicRatioInformation const): When shouldDisplayBrokenImageIcon(),
try to compute the aspect ratio from attributes width and height.

  • rendering/RenderImage.h:
  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::intrinsicAspectRatioFromWidthHeight const): Compute the aspect ratio from attributes width and height.
(WebCore::RenderReplaced::computeIntrinsicRatioInformation const):

  • rendering/RenderReplaced.h:

(WebCore::RenderReplaced::canMapWidthHeightToAspectRatio const): Ditto.

2:53 PM Changeset in webkit [276520] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/css-module-worker-test.html is a flakey crash and failure
https://bugs.webkit.org/show_bug.cgi?id=222750

Unreviewed test gardening.

Move expectation to a more general location, this isn't limited to macOS.

2:38 PM Changeset in webkit [276519] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r276451.
https://bugs.webkit.org/show_bug.cgi?id=224999

Broke perf testing

Reverted changeset:

"[iOS] Update sandbox message filter syntax"
https://bugs.webkit.org/show_bug.cgi?id=223384
https://trac.webkit.org/changeset/276451

2:32 PM Changeset in webkit [276518] by Russell Epstein
  • 1 edit in branches/safari-611-branch/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp

Unreviewed build fix. rdar://problem/76963040

WebKit2/UIProcess/AuxiliaryProcessProxy.cpp:163:10: error: use of undeclared identifier 'isMainRunLoop'

2:29 PM Changeset in webkit [276517] by Ruben Turcios
  • 13 edits in branches/safari-611-branch/Source

Cherry-pick r276324. rdar://problem/77086404

FullGCActivityCallback should use the percentage of pages uncompressed in RAM to determine deferral.
https://bugs.webkit.org/show_bug.cgi?id=224817

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Right now we try to determine if too many pages are paged out by
dereferencing them and bailing out of the GC if we go over a
deadline. While this works if the only goal is to avoid causing
extensive thrashing on spinny disks (HDD), it doesn't prevent
thrashing when access to disk is fast (e.g. SSD). This is because
on fast disks the proportional time to load the memory from disk
is much lower. Additionally, on SSDs in particular we don't want
to load the pages into RAM then bail as that will force a
different page onto disk, increasing wear.

This patch switches to asking the OS if each MarkedBlock is paged
out. Then if we are over a threshold we wait until we would have
GC'd anyway. This patch uses the (maxVMGrowthFactor - 1) as the
percentage of "slow" pages (paged out or compressed) needed to
defer the GC. The idea behind that threshold is that if we add
that many pages then the same number of pages would be forced
out of RAM for us to do a GC anyway (in the limit).

  • heap/BlockDirectory.cpp: (JSC::BlockDirectory::updatePercentageOfPagedOutPages): (JSC::BlockDirectory::isPagedOut): Deleted.
  • heap/BlockDirectory.h:
  • heap/FullGCActivityCallback.cpp: (JSC::FullGCActivityCallback::doCollection):
  • heap/Heap.cpp: (JSC::Heap::isPagedOut):
  • heap/Heap.h:
  • heap/MarkedSpace.cpp: (JSC::MarkedSpace::isPagedOut):
  • heap/MarkedSpace.h:
  • runtime/OptionsList.h:

Source/WebKit:

Add mincore to the acceptable syscall list.

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

Source/WTF:

Add a noexcept flavor of FunctionTraits. On Linux mincore (and probably other syscalls) are marked noexcept so the existing overloads don't work.

  • wtf/FunctionTraits.h:

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

2:01 PM Changeset in webkit [276516] by Fujii Hironori
  • 2 edits in trunk/Source/JavaScriptCore

[JSC][Win] callOperationNoExceptionCheck() also needs to support operations that return SlowPathReturnType
https://bugs.webkit.org/show_bug.cgi?id=224964

Reviewed by Yusuke Suzuki.

r229989 (Bug 183655) added the x64 Windows support only for
callOperation(), but for callOperationNoExceptionCheck().
callOperationNoExceptionCheck() also needs the x64 Windows
support.

This change is a preparation for Bug 224920 that is going to use
callOperationNoExceptionCheck instead of callOperation.

  • jit/JIT.h:

(callOperation): Rewrote by using 'if constexpr' instead of SFINAE.
(callOperationNoExceptionCheck): Added a new implementation for
x64 Windows based on callOperation.

1:11 PM Changeset in webkit [276515] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

[iOS] GPU Process sandbox lacks IOMobileFramebufferUserClient method filter
https://bugs.webkit.org/show_bug.cgi?id=224956
<rdar://problem/68227590>

Reviewed by Per Arne Vollan.

This patch updates the GPU process sandbox to match the method filter used in the WebContent process
so that we will retain consistent protections when activating the GPU Process. These are the same rules
governing access to this resource when the GPU process is disabled, so should not create a change in behavior.

We also remove unneeded telemetry to reduce messaging burden and avoid performance issues.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
12:53 PM Changeset in webkit [276514] by BJ Burg
  • 2 edits in trunk/Source/WebKit

Web Inspector: [Cocoa] WKInspectorResourceURLSchemeHandler needs to serialize cleanup actions
https://bugs.webkit.org/show_bug.cgi?id=224986
<rdar://76768454>

Reviewed by Devin Rousso.

  • UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm:

(-[WKInspectorResourceURLSchemeHandler webView:startURLSchemeTask:]):
Do cleanup on the main queue so that it can be serialized with reads.

(-[WKInspectorResourceURLSchemeHandler webView:stopURLSchemeTask:]):
Ensure that all removals from the map are processed before doing a lookup.

12:51 PM Changeset in webkit [276513] by Michael Catanzaro
  • 6 edits in trunk/Source/WebCore

Remove virtual function calls in GraphicsLayer destructors
https://bugs.webkit.org/show_bug.cgi?id=180232

Reviewed by Adrian Perez de Castro.

I notice that ~CoordinatedGraphicsLayer makes a virtual function call to
GraphicsLayer::willBeDestroyed, which makes a virtual function call to
CoordinatedGraphicsLayer::removeFromParent. I think that the functions are being called as
intended, because ~CoordinatedGraphicsLayer has not yet been fully destroyed. However, I'm
reminded of Effective C++ item #9: Never call virtual functions during construction or
destruction ("because such calls will never go to a more derived class than that of the
currently executing constructor or destructor"). This code is almost certain to break if
anyone tries in the future to subclass any of the existing subclasses of GraphicsLayer, so
let's refactor it a bit. This doesn't fix anything, but my hope is that it will make the
code a bit harder to break, and not the opposite.

The main risk here is that some reordering of operations is necessary. The derived class
portion of removeFromParent must now be executed before willBeDestroyed. It can't happen
after, because parent would already be unset by that point. It's hard to be certain that
this won't break anything, but I think it should be fine.

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::willBeDestroyed):
(WebCore::GraphicsLayer::removeFromParentInternal):
(WebCore::GraphicsLayer::removeFromParent):

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::~GraphicsLayerCA):
(WebCore::GraphicsLayerCA::willBeDestroyed): Deleted.

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):

12:34 PM Changeset in webkit [276512] by Sam Sneddon
  • 4 edits
    2 adds in trunk/Tools

Add a conftest.py to run existing webkitpy tests in pytest
https://bugs.webkit.org/show_bug.cgi?id=224687

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/common/system/executive_unittest.py:

(ExecutiveTest.serial_test_run_in_parallel): Deal with the fact that pytest
running the tests might be not be the same version as the autoinstalled version,
and not API compatible.

  • Scripts/webkitpy/conftest.py: Added.

(pytest_configure): Define the markers the plugins in conftest use
(pytest_addoption): Add --run-integration to allow them to be disabled by default.
(pytest_pycollect_makeitem): Rename serial/integration tests so pytest finds them.
(pytest_collection_modifyitems): Mark tests as skipped when needed per the above.

  • Scripts/webkitpy/pytest.ini: Added.
  • Scripts/webkitpy/test/main_unittest.py:

(TestStubs): Stop these from being picked up by pytest as tests.

  • Scripts/webkitpy/test/markers.py: Fix this so pytest is technically optional,

even though it is always present because of the autoinstalled copy.

12:21 PM Changeset in webkit [276511] by Russell Epstein
  • 1 edit in branches/safari-611-branch/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp

Unreviewed build fix.

WebKit2/UIProcess/Network/NetworkProcessProxy.cpp:127:17: error: use of undeclared identifier 'defaultProcess'

12:06 PM Changeset in webkit [276510] by Darin Adler
  • 10 edits in trunk/Source

Remove decoder memory allocations based on untrusted data (sizes) in the stream; related changes
https://bugs.webkit.org/show_bug.cgi?id=224984

Reviewed by Sam Weinig.

Source/WebCore:

  • platform/network/cf/CertificateInfoCFNet.cpp:

(WTF::Persistence::decodeCFData): Removed unneeded check for zero size. Removed code that
locally allocates a vector before bufferIsLargeEnoughToContain is called. Instead use
bufferPointerForDirectRead, which makes does the buffer size check, and pass the pointer
directly to CFDataCreate.

Source/WebKit:

  • Platform/IPC/ArgumentCoders.h: Remove the calls to

HashMap::reserveInitialCapacity and HashSet::reserveInitialCapacity, based
on number read in from the decoder. This means there will be more wasted
memory in these HashMap and HashSet objects, so we have to test to make
sure this does not create a performance problem. But without this check,
we are trying to allocate memory based on an unstrusted size.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<RefPtr<ApplePayError>>::encode): Removed the coder
for a Vector of these RefPtr, replaced it with a coder for an individual one,
allowing the Vector ArgumentCoder template to handle vector size and construction.
One benefit is that this adds in a shrinkToFit and prevents us from making any
separate mistake about pre-sizing the Vector here since we use shared code.
(IPC::ArgumentCoder<RefPtr<ApplePayError>>::decode): Ditto.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<RefPtr<SecurityOrigin>>::encode): Ditto.
(IPC::ArgumentCoder<RefPtr<SecurityOrigin>>::decode): Ditto.
(IPC::ArgumentCoder<WebCore::CDMInstanceSession::KeyStatusVector>::encode):
(IPC::ArgumentCoder<WebCore::CDMInstanceSession::KeyStatusVector>::decode):
Removed unnecessary specialization for the KeyStatusVector. There is already
an ArgumentCoder for Vector, for std::pair, for Ref<SharedBuffer>, and for
enumerations like CDMKeyStatus, so there's no need to have a specialized
coder for this. This function that we are removing had a call to
reserveInitialCapacity, but the Vector ArgumentCoder template does not.

  • Shared/WebCoreArgumentCoders.h: Replaced the

ArgumentCoder<Vector<RefPtr<WebCore::ApplePayError>>> specialization with
ArgumentCoder<RefPtr<WebCore::ApplePayError>>. Removed the
ArgumentCoder<WebCore::CDMInstanceSession::KeyStatusVector> specialization.

Source/WTF:

  • wtf/persistence/PersistentDecoder.cpp:

(WTF::Persistence::Decoder::bufferPointerForDirectRead): Added.
(WTF::Persistence::Decoder::decodeFixedLengthData): Refactor to use bufferPointerForDirectRead.

  • wtf/persistence/PersistentDecoder.h: Added bufferPointerForDirectRead function for use in the

rare cases where we want to read directly out of the decoder buffer, rather than writing to a
passed-in pointer. Also did a small refactoring of bufferIsLargeEnoughToContain to use &&
rather than an if statement.

11:57 AM Changeset in webkit [276509] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

Set proper network logging level for full web browsers
https://bugs.webkit.org/show_bug.cgi?id=224982
<rdar://problem/76903650>

Reviewed by Brent Fulgham.

Full web browsers have different low-level network logging requirements
for ephemeral sessions.

No new tests. There's no automated way to test if network level logs
show up. I tested that logging is correct for web browser and non web
browser apps manually.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::configurationForSessionID):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

11:54 AM Changeset in webkit [276508] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[macOS] imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/css-module-worker-test.html is a flakey crash and failure
https://bugs.webkit.org/show_bug.cgi?id=222750

Unreviewed test gardening.

  • platform/mac/TestExpectations:
11:15 AM Changeset in webkit [276507] by Truitt Savell
  • 3 edits in trunk/Source/ThirdParty/ANGLE

Unreviewed, reverting r276190.

broke a test internally.

Reverted changeset:

"Metal-ANGLE: Shared memory texture tests failing in iOS
Simulator"
https://bugs.webkit.org/show_bug.cgi?id=222685
https://commits.webkit.org/r276190

10:44 AM Changeset in webkit [276506] by Chris Dumez
  • 4 edits in trunk/Source

Disable GPUProcess on shipping iOS
https://bugs.webkit.org/show_bug.cgi?id=224897

Reviewed by Eric Carlson.

Source/WebKit:

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultUseGPUProcessForCanvasRenderingEnabled):
(WebKit::defaultUseGPUProcessForDOMRenderingEnabled):
(WebKit::defaultUseGPUProcessForMediaEnabled):
(WebKit::defaultUseGPUProcessForWebGLEnabled):
(WebKit::defaultCaptureAudioInGPUProcessEnabled):
(WebKit::defaultCaptureVideoInGPUProcessEnabled):
(WebKit::defaultWebRTCCodecsInGPUProcess):

Source/WTF:

  • wtf/PlatformEnableCocoa.h:
10:31 AM Changeset in webkit [276505] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Make report-non-inclusive-language ignore .db files
https://bugs.webkit.org/show_bug.cgi?id=224979

Reviewed by Darin Adler.

  • Scripts/report-non-inclusive-language:
10:21 AM Changeset in webkit [276504] by youenn@apple.com
  • 7 edits in trunk

Fix KVO for camera/microphone capture state WKWebView API
https://bugs.webkit.org/show_bug.cgi?id=224922
<rdar://problem/77008199>

Reviewed by Eric Carlson.

Source/WebKit:

Add missing willChange observer call and migrate keys to API keys.
Covered by API test.

  • UIProcess/Cocoa/PageClientImplCocoa.h:
  • UIProcess/Cocoa/PageClientImplCocoa.mm:

(WebKit::PageClientImplCocoa::microphoneCaptureWillChange):
(WebKit::PageClientImplCocoa::cameraCaptureWillChange):
(WebKit::PageClientImplCocoa::microphoneCaptureChanged):
(WebKit::PageClientImplCocoa::cameraCaptureChanged):

  • UIProcess/PageClient.h:

(WebKit::PageClient::microphoneCaptureWillChange):
(WebKit::PageClient::cameraCaptureWillChange):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::updateReportedMediaCaptureState):

Tools:

Add tests for capture state API.

  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

(-[MediaCaptureObserver observeValueForKeyPath:ofObject:change:context:]):
(TestWebKitAPI::waitUntilCameraState):
(TestWebKitAPI::waitUntilMicrophoneState):
(TestWebKitAPI::TEST):

10:04 AM Changeset in webkit [276503] by Russell Epstein
  • 1 edit in branches/safari-611-branch/Source/WebCore/layout/inlineformatting/InlineContentBreaker.cpp

Apply patch. rdar://problem/76963029

10:00 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
9:55 AM Changeset in webkit [276502] by Chris Dumez
  • 25 edits in trunk/Source

Improve our constructDeletedValue() template specializations
https://bugs.webkit.org/show_bug.cgi?id=224889

Reviewed by Darin Adler.

Source/WebCore:

Improve our constructDeletedValue() template specializations and make them more consistent:

  • Use placement-new instead of object assignment since we don't want/need to destroy the existing object (since it is uninitialized).
  • Do as little initialization as possible for performance reasons.
  • Modules/indexeddb/IDBKeyData.cpp:

(WebCore::IDBKeyData::deletedValue): Deleted.

  • Modules/indexeddb/IDBKeyData.h:

(WebCore::IDBKeyDataHashTraits::constructDeletedValue):
(WebCore::IDBKeyDataHashTraits::isDeletedValue):
(WebCore::IDBKeyData::isDeletedValue const): Deleted.

  • Modules/indexeddb/shared/IDBResourceIdentifier.cpp:

(WebCore::IDBResourceIdentifier::deletedValue): Deleted.
(WebCore::IDBResourceIdentifier::isHashTableDeletedValue const): Deleted.

  • Modules/indexeddb/shared/IDBResourceIdentifier.h:

(WebCore::IDBResourceIdentifierHashTraits::constructDeletedValue):
(WebCore::IDBResourceIdentifierHashTraits::isDeletedValue):

  • dom/MessagePortIdentifier.h:

(WTF::HashTraits<WebCore::MessagePortIdentifier>::constructDeletedValue):
(WTF::HashTraits<WebCore::MessagePortIdentifier>::isDeletedValue):

  • history/BackForwardItemIdentifier.h:

(WTF::HashTraits<WebCore::BackForwardItemIdentifier>::constructDeletedValue):
(WTF::HashTraits<WebCore::BackForwardItemIdentifier>::isDeletedValue):

  • layout/LayoutUnits.h:

(WTF::HashTraits<WebCore::Layout::SlotPosition>::constructDeletedValue):
(WTF::HashTraits<WebCore::Layout::SlotPosition>::isDeletedValue):

  • loader/PrivateClickMeasurement.h:

(WebCore::PrivateClickMeasurement::AttributionDestinationSite::matches const):
(WTF::HashTraits<WebCore::PrivateClickMeasurement::SourceSite>::constructDeletedValue):
(WTF::HashTraits<WebCore::PrivateClickMeasurement::SourceSite>::isDeletedValue):
(WTF::HashTraits<WebCore::PrivateClickMeasurement::AttributionDestinationSite>::constructDeletedValue):
(WTF::HashTraits<WebCore::PrivateClickMeasurement::AttributionDestinationSite>::isDeletedValue):
(WebCore::PrivateClickMeasurement::SourceSite::isHashTableDeletedValue const): Deleted.
(WebCore::PrivateClickMeasurement::SourceSite::deletedValue): Deleted.
(WebCore::PrivateClickMeasurement::SourceSite::constructDeletedValue): Deleted.
(WebCore::PrivateClickMeasurement::SourceSite::deleteValue): Deleted.
(WebCore::PrivateClickMeasurement::SourceSite::isDeletedValue const): Deleted.
(WebCore::PrivateClickMeasurement::AttributionDestinationSite::isHashTableDeletedValue const): Deleted.
(WebCore::PrivateClickMeasurement::AttributionDestinationSite::deletedValue): Deleted.
(WebCore::PrivateClickMeasurement::AttributionDestinationSite::constructDeletedValue): Deleted.
(WebCore::PrivateClickMeasurement::AttributionDestinationSite::deleteValue): Deleted.
(WebCore::PrivateClickMeasurement::AttributionDestinationSite::isDeletedValue const): Deleted.

  • page/ClientOrigin.h:

(WTF::HashTraits<WebCore::ClientOrigin>::constructDeletedValue):

  • page/GlobalWindowIdentifier.h:

(WTF::HashTraits<WebCore::GlobalWindowIdentifier>::constructDeletedValue):
(WTF::HashTraits<WebCore::GlobalWindowIdentifier>::isDeletedValue):

  • platform/Cookie.h:

(WTF::HashTraits<WebCore::Cookie>::constructDeletedValue):
(WebCore::Cookie::Cookie): Deleted.

  • platform/graphics/FontCache.cpp:

(WebCore::FontPlatformDataCacheKeyHashTraits::constructDeletedValue):

  • platform/graphics/FontCache.h:

(WebCore::FontCascadeCacheKeyHashTraits::constructDeletedValue):

  • platform/graphics/IntPointHash.h:

(WTF::HashTraits<WebCore::IntPoint>::constructDeletedValue):
(WTF::HashTraits<WebCore::IntPoint>::isDeletedValue):

  • rendering/CSSValueKey.h:

(WTF::HashTraits<WebCore::CSSValueKey>::constructDeletedValue):

  • workers/service/ServiceWorkerClientIdentifier.h:

(WTF::HashTraits<WebCore::ServiceWorkerClientIdentifier>::constructDeletedValue):
(WTF::HashTraits<WebCore::ServiceWorkerClientIdentifier>::isDeletedValue):

Source/WebCore/PAL:

  • pal/SessionID.h:

(WTF::HashTraits<PAL::SessionID>::constructDeletedValue):

Source/WebKit:

Improve our constructDeletedValue() template specializations and make them more consistent:

  • Use placement-new instead of object assignment since we don't want/need to destroy the existing object (since it is uninitialized).
  • Do as little initialization as possible for performance reasons.
  • NetworkProcess/cache/NetworkCache.h:

(WTF::HashTraits<WebKit::NetworkCache::GlobalFrameID>::constructDeletedValue):
(WTF::HashTraits<WebKit::NetworkCache::GlobalFrameID>::isDeletedValue):

  • Platform/IPC/StringReference.h:

(WTF::HashTraits<IPC::StringReference>::constructDeletedValue):

  • Shared/CallbackID.h:

(WTF::HashTraits<WebKit::CallbackID>::constructDeletedValue):
(WTF::HashTraits<WebKit::CallbackID>::isDeletedValue):

Source/WebKitLegacy/mac:

Improve our constructDeletedValue() template specializations and make them more consistent:

  • Use placement-new instead of object assignment since we don't want/need to destroy the existing object (since it is uninitialized).
  • Do as little initialization as possible for performance reasons.
  • History/BinaryPropertyList.cpp:

(IntegerArray::integers const):
(IntegerArray::size const):
(IntegerArrayHashTraits::constructDeletedValue):
(IntegerArrayHashTraits::isDeletedValue):
(IntegerArray::markDeleted): Deleted.
(IntegerArray::isDeletedValue const): Deleted.
(IntegerArray::deletedValueSize): Deleted.

9:53 AM Changeset in webkit [276501] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r276482. rdar://problem/77074513

[Mac] CMBaseClass object pointers can become unaligned on x86
https://bugs.webkit.org/show_bug.cgi?id=224950
<rdar://77020922>

Reviewed by Eric Carlson.

CMBaseClass has a 4-byte version member before its 8-byte pointers on x86. Deal with this
the same way we do with other pointer-bearing, static, CM-type objects: enforce a 4-byte
packing, and prepend the struct with another 4-byte object in order to force the pointers
into 8-byte alignment.

  • Shared/mac/MediaFormatReader/CoreMediaWrapped.h: (WebKit::CoreMediaWrapped<Wrapped>::vTable):

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

9:31 AM Changeset in webkit [276500] by calvaris@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer][EME] cbcs fixes
https://bugs.webkit.org/show_bug.cgi?id=224976

Reviewed by Philippe Normand.

In cbcs you can get from qtdemux buffers without an iv_size
because it had constant_iv_size. We need to check that.

When decryption bails out because of the buffer being unencrypted,
we should TRACE so.

cbcs buffers could not include the subsample_count, we consider 0
as default.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:

(transformInPlace):

9:15 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
9:14 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
9:12 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
8:40 AM Changeset in webkit [276499] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Improve HashTableDeletedValue of ServiceWorkerRegistrationKey
https://bugs.webkit.org/show_bug.cgi?id=224975

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-04-23
Reviewed by Chris Dumez.

We construct only the SecurityOriginData, no need to construct a full
ServiceWorkerRegistrationKey or URL. No behavior changes.

  • workers/service/ServiceWorkerRegistrationKey.h:

(WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>::constructDeletedValue):
(WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>::isDeletedValue):
(WebCore::ServiceWorkerRegistrationKey::isHashTableDeletedValue const): Deleted.
(WebCore::ServiceWorkerRegistrationKey::ServiceWorkerRegistrationKey): Deleted.

8:16 AM Changeset in webkit [276498] by cathiechen
  • 8 edits in trunk/LayoutTests/imported/w3c

Import the update to "mapping attribute width and height to aspect ratio" tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=224911

Reviewed by Rob Buis.

Import the update to "mapping attribute width and height to aspect ratio" tests from WPT commit 0ae0bb7cab. Split up the test cases, to make sure
each image has its own test case and won't affect testing other images.

  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/canvas-aspect-ratio-expected.txt:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio-expected.txt:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/picture-aspect-ratio-expected.txt:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/picture-aspect-ratio.html:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:

(test_computed_style_aspect_ratio):

  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio-expected.txt:
7:32 AM Changeset in webkit [276497] by youenn@apple.com
  • 5 edits in trunk/Source

Handle rotation correctly in WebRTC GPUProcess rendering pipeline
https://bugs.webkit.org/show_bug.cgi?id=224927
<rdar://76915991>

Reviewed by Eric Carlson.

Source/WebCore:

Add a routine to update the affine transformn of the root layer.
Manually tested.

  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h:
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:

(WebCore::LocalSampleBufferDisplayLayer::updateRootLayerAffineTransform):

Source/WebKit:

Instead of updating the inner layer, update the root layer.

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:

(WebKit::RemoteSampleBufferDisplayLayer::updateAffineTransform):

7:07 AM Changeset in webkit [276496] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r276486.
https://bugs.webkit.org/show_bug.cgi?id=224973

broke windows build

Reverted changeset:

"[JSC][Win] callOperationNoExceptionCheck() also needs to
support operations that return SlowPathReturnType"
https://bugs.webkit.org/show_bug.cgi?id=224964
https://trac.webkit.org/changeset/276486

6:29 AM Changeset in webkit [276495] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

Unreviewed, GStreamer follow-up after r276493

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Remove spurious adoptGRef call, as
this is not transfer-full.

6:17 AM Changeset in webkit [276494] by Philippe Normand
  • 2 edits in trunk/LayoutTests

Unreviewed, GTK gardening

  • platform/gtk/TestExpectations: Remove test expectation for

imported/w3c/web-platform-tests/mediacapture-fromelement/capture.html which is tracked in
the main TestExpectations already.

2:46 AM Changeset in webkit [276493] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

[Media] Allow access to MediaElement id from MediaPlayerPrivate
https://bugs.webkit.org/show_bug.cgi?id=224818

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-23
Reviewed by Xabier Rodriguez-Calvar.

A new method is added in the MediaPlayer allowing to query the client media element for its
identifier. That could be useful for accurate naming of the internal player/pipeline in the
MediaPlayerPrivate. If no specific id was set on the media element then the id is empty
string and the MediaPlayerPrivate needs to handle that by forging a unique id.

This also lead me to simplify pipeline-related code in the GStreamer player. The player can
handle only one pipeline in its entire life-time so the code handling pipeline "re-loading"
was actually never hit.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::parseAttribute):

  • html/HTMLMediaElement.h:
  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::elementId const):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayerClient::mediaPlayerElementId const):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::load):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
(WebCore::MediaPlayerPrivateGStreamer::loadFull): Deleted.
(WebCore::MediaPlayerPrivateGStreamer::setPipeline): Deleted.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2:43 AM Changeset in webkit [276492] by svillar@igalia.com
  • 2 edits in trunk/Source/WebCore

Do not set synchronous scrolling for layers without relevant scrolling scopes
https://bugs.webkit.org/show_bug.cgi?id=221383

Reviewed by Simon Fraser.

Fixed backgrounds could force the layer compositor to set synchronous scrolling because they're slow
to repaint. However that cannot be done if the layer's boxScrollingScope hasn't been previously updated
in RenderLayer::updateLayerPosition.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateSynchronousScrollingNodes): Do not call
setSynchronousScrollingReasons() if there is no scrollingScope.

2:23 AM Changeset in webkit [276491] by commit-queue@webkit.org
  • 12 edits
    4 adds in trunk

[LibWebRTC][WPE][GTK] Enable vp9 and NO_MAIN_THREAD_WRAPPING
https://bugs.webkit.org/show_bug.cgi?id=222795

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-23
Reviewed by Xabier Rodriguez-Calvar.

Source/ThirdParty/libwebrtc:

  • CMakeLists.txt: Enable NO_MAIN_THREAD_WRAPPING as in the XCode build and harmonize options

between Apple and non-Apple ports.

  • Source/webrtc/common_video/h265/h265_pps_parser.h:

Source/WebCore:

Add VP9 encoding and decoding support in the WPE/GTK LibWebRTC backend. The underlying
encoding support is based on LibWebRTC's internal VP9 support. The GStreamer VPx encoders
lack simulcast and high profile support, so can't really be used anyway. The
GStreamerVP8Encoder was removed for this reason as well.

  • platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:

(WebCore::VP9Decoder::VP9Decoder):
(WebCore::VP9Decoder::Create):
(WebCore::GStreamerVideoDecoderFactory::CreateVideoDecoder):
(WebCore::GStreamerVideoDecoderFactory::GStreamerVideoDecoderFactory):
(WebCore::GStreamerVideoDecoderFactory::GetSupportedFormats const):

  • platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.h:
  • platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp:
  • platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:

(WebCore::GStreamerVideoEncoder::makeElement):
(WebCore::GStreamerVideoEncoder::createEncoder):
(WebCore::GStreamerVideoEncoder::SetRestrictionCaps):
(WebCore::GStreamerVideoEncoderFactory::CreateVideoEncoder):
(WebCore::GStreamerVideoEncoderFactory::GStreamerVideoEncoderFactory):
(WebCore::GStreamerVideoEncoderFactory::GetSupportedFormats const):

  • platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.h:
  • platform/mediastream/libwebrtc/LibWebRTCProviderGStreamer.cpp:

(WebCore::LibWebRTCProviderGStreamer::createDecoderFactory):
(WebCore::LibWebRTCProviderGStreamer::createEncoderFactory):

LayoutTests:

Update GLIB baselines for webrtc tests.

  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-onnegotiationneeded-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-restartIce.https-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/webrtc/RTCRtpTransceiver-setCodecPreferences-expected.txt: Added.
12:16 AM Changeset in webkit [276490] by Carlos Garcia Campos
  • 15 edits in trunk/Source/WebKit

[GTK] Implement PageClient::makeViewBlank()
https://bugs.webkit.org/show_bug.cgi?id=224236

Reviewed by Chris Dumez.

Make most of the changes in r275485 cross platform and implement PageClient::makeViewBlank() for the GTK port.

  • UIProcess/API/glib/WebKitUIClient.cpp:
  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::makeViewBlank):

  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseSnapshot):
(webkitWebViewBaseDraw):
(webkitWebViewBaseMakeBlank):

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didUpdateRenderingAfterCommittingLoad):
(WebKit::WebPageProxy::stopMakingViewBlankDueToLackOfRenderingUpdate):
(WebKit::WebPageProxy::makeViewBlankIfUnpaintedSinceLastLoadCommit):
(WebKit::WebPageProxy::didCommitLoadForFrame):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::didUpdateRenderingAfterCommittingLoad): Deleted.

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::flushPendingLayerChanges):

  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:

(WebKit::DrawingAreaCoordinatedGraphics::updateBackingStoreState):
(WebKit::DrawingAreaCoordinatedGraphics::display):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didUpdateRendering):
(WebKit::WebPage::didCommitLoad):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::didUpdateRendering): Deleted.

Apr 22, 2021:

10:42 PM Changeset in webkit [276489] by Diego Pino Garcia
  • 2 edits
    1 add in trunk/LayoutTests

[GTK] Unreviewed test gardening. Update baseline after r276448.

  • platform/glib/TestExpectations:
  • platform/gtk/fast/forms/datalist/input-list-expected.txt: Added.
10:25 PM Changeset in webkit [276488] by commit-queue@webkit.org
  • 18 edits
    2 adds in trunk

[css-counter-styles] Parse @counter-style descriptors
https://bugs.webkit.org/show_bug.cgi?id=224718

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-04-22
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Parsing for all @counter-style descriptors is implemented with this
patch, so mark more tests passing.

You'll notice that some @counter-style descriptors implemented in this
patch did not gain any passing tests (e.g. pad, negative). In all
of these cases, the expected results contain a <string> value, and we
fail only because we incorrectly don't serialize these <string> values
with quotes. I have manually confirmed in all cases that these values
are properly parsed, so it's just the serialization that's incorrect.

These <string> values serialize without quotes because WebKit's representation
of custom identifiers is not a separate type, but instead overloaded onto the
CSS_STRING type. This means that during serialization time, WebKit must guess
whether it is actually serializing a string (and include quotes if so), or if
it's serializing a custom ident (leaving off quotes if so).

Relevant code snippet:

https://github.com/WebKit/WebKit/blob/36caeec07975bd5f47db8ac6b749c2787230a461/Source/WebCore/css/CSSMarkup.cpp#L153#L161

Relevant changelog snippet from David Hyatt, 2016-12-07:

We also overload CSS_STRING primitive value type and have it act as both a string
and a custom identifier. This is lame, since the parser should have made two different
types of objects instead, but since our parser doesn't do that yet, I added a serializeAsStringOrCustomIdent
that preserves our old behavior of "quote the string only if needed." In this case what
that really meant was "Try to guess that we were originally a custom ident and leave off
quotes if so." This function will go away once we properly create CSSStringValues and
CSSCustomIdentValues instead of turning the latter into strings.

  • web-platform-tests/css/css-counter-styles/counter-style-fallback-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-prefix-suffix-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-range-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-speak-as-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-system-syntax-expected.txt:

Source/WebCore:

Implement parsing and CSSCounterStyleRule IDL interface for @counter-style descriptors.
See spec for full details on all descriptors:

https://drafts.csswg.org/css-counter-styles-3/#the-counter-style-rule

Test: webexposed/counter-style-image-symbols-not-exposed.html and WPTs

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
Return nullptr for new @counter-style descriptor properties.

  • css/CSSCounterStyleRule.cpp:

(WebCore::toCounterStyleSystemEnum):
(WebCore::symbolsValidForSystem):
(WebCore::StyleRuleCounterStyle::newValueInvalidOrEqual const):
(WebCore::CSSCounterStyleRule::cssText const):
(WebCore::CSSCounterStyleRule::setName):
(WebCore::CSSCounterStyleRule::setterInternal):
(WebCore::CSSCounterStyleRule::setSystem):
(WebCore::CSSCounterStyleRule::setNegative):
(WebCore::CSSCounterStyleRule::setPrefix):
(WebCore::CSSCounterStyleRule::setSuffix):
(WebCore::CSSCounterStyleRule::setRange):
(WebCore::CSSCounterStyleRule::setPad):
(WebCore::CSSCounterStyleRule::setFallback):
(WebCore::CSSCounterStyleRule::setSymbols):
(WebCore::CSSCounterStyleRule::setAdditiveSymbols):
(WebCore::CSSCounterStyleRule::setSpeakAs):
Implement setters and tangential functionality required by setters.

  • css/CSSCounterStyleRule.h:

Replace FIXME with actual descriptor getter and setter
implementations.

  • css/CSSProperties.json:

Add @counter-style descriptor properties.

  • css/CSSValueKeywords.in:

Add new values required for system and speak-as
@counter-style descriptor properties.

  • css/parser/CSSParserContext.cpp:

(WebCore::CSSParserContext::isPropertyRuntimeDisabled const):
Ensure new @counter-style descriptors are disabled at runtime based
on CSSParserContext state.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeCounterStyleSystem):
(WebCore::consumeCounterStyleSymbol):
(WebCore::consumeCounterStyleNegative):
(WebCore::consumeCounterStyleRangeBound):
(WebCore::consumeCounterStyleRange):
(WebCore::consumeCounterStylePad):
(WebCore::consumeCounterStyleSymbols):
(WebCore::consumeCounterStyleAdditiveSymbols):
(WebCore::consumeCounterStyleSpeakAs):
(WebCore::CSSPropertyParser::parseCounterStyleDescriptor):
Parse @counter-style descriptors.

Tools:

  • DumpRenderTree/TestOptions.cpp:

(WTR::TestOptions::defaults):
Fix typo (missing 's'). CSSCounterStyleAtRulesEnabled, not
CSSCounterStyleAtRuleEnabled.

LayoutTests:

Add test ensuring <image> @counter-style symbol values cannot be
parsed when the counterStyleAtRuleImageSymbolsEnabled feature flag
is disabled.

---

This test is skipped on Windows because I haven't been able to get the
required feature flags (CSSCounterStyleAtRulesEnabled and
CSSCounterStyleAtRuleImageSymbolsEnabled) to work properly for that
port.

The code hidden behind these flags is all in the CSS parser, which is not
unique to Windows, so I think we can be confident that if the test passes
on all other platforms, that the behavior is correct on Windows too.

One attempt at implementing the necessary Windows-specific flag functionality is here:

https://bugs.webkit.org/attachment.cgi?id=426371&action=edit

Which failed to compile[1] with this error:

C:\cygwin\home\buildbot\worker\Windows-EWS\build\Tools\DumpRenderTree\win\DumpRenderTree.cpp(834,51): error C2039: 'setCSSCounterStyleAtRulesEnabled': is not a member of 'IWebPreferencesPrivate7' [C:\cygwin\home\buildbot\worker\Windows-EWS\build\WebKitBuild\Release\Tools\DumpRenderTree\DumpRenderTreeLib.vcxproj]
C:\cygwin\home\buildbot\worker\Windows-EWS\build\Tools\DumpRenderTree\win\DumpRenderTree.cpp(835,62): error C2039: 'setCSSCounterStyleAtRuleImageSymbolsEnabled': is not a member of 'IWebPreferencesPrivate7' [C:\cygwin\home\buildbot\worker\Windows-EWS\build\WebKitBuild\Release\Tools\DumpRenderTree\DumpRenderTreeLib.vcxproj]

Those methods are present in IWebPreferencesPrivate7.idl, and implemented similarly to other
flags in other places (e.g. win/WebPreferences.{h, cpp}, win/WebPreferenceKeysPrivate.h).
I can't reproduce this compilation error on my Windows machine.

I then tried removing the lines that caused the above compilation failure.
Those setters are called in DumpRenderTree::enableExperimentalFeatures, so in
lieu of enabling these flags there I could enable the flag I need via test header.

That patch is: https://bugs.webkit.org/attachment.cgi?id=426509&action=edit

This results in successful compilation, but causes lots (all?) of the
layout tests to fail[2] with a stacktrace that looks like:

10:20 PM Changeset in webkit [276487] by Lauro Moura
  • 2 edits in trunk/WebDriverTests

[GTK][WebDriver] Garden keypress failures

Unreviewed test gardening.

10:16 PM Changeset in webkit [276486] by Fujii Hironori
  • 2 edits in trunk/Source/JavaScriptCore

[JSC][Win] callOperationNoExceptionCheck() also needs to support operations that return SlowPathReturnType
https://bugs.webkit.org/show_bug.cgi?id=224964

Reviewed by Yusuke Suzuki.

r229989 (Bug 183655) added the x64 Windows support only for
callOperation(), but for callOperationNoExceptionCheck().
callOperationNoExceptionCheck() also needs the x64 Windows
support.

This change is a preparation for Bug 224920 that is going to use
callOperationNoExceptionCheck instead of callOperation.

  • jit/JIT.h:

(callOperation): Rewrote by using 'if constexpr' instead of SFINAE.
(callOperationNoExceptionCheck): Added a new implementation for
x64 Windows based on callOperation.

10:06 PM Changeset in webkit [276485] by Lauro Moura
  • 2 edits in trunk/Source/WTF

[WTF] Undefined behavior warning in StringBuilder::allocateBuffer
https://bugs.webkit.org/show_bug.cgi?id=224942

Reviewed by Chris Dumez.

  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::allocateBuffer): Add check before calling memcpy

8:56 PM Changeset in webkit [276484] by Megan Gardner
  • 3 edits
    2 adds in trunk

Sometimes appHighlights are not painted when created.
https://bugs.webkit.org/show_bug.cgi?id=224904

Reviewed by Antti Koivisto.

Source/WebCore:

In order for highlights to be painted correctly, we need to not use the new line layout code,
so we need to opt out when we are repainting due to a highlight being added or removed.

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

  • Modules/highlight/Highlight.cpp:

(WebCore::repaintRange):

LayoutTests:

  • http/wpt/css/css-highlight-api/highlight-text-dynamic-expected-mismatch.html: Added.
  • http/wpt/css/css-highlight-api/highlight-text-dynamic.html: Added.
8:26 PM Changeset in webkit [276483] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed test gardening. Update test expectations.

  • platform/gtk/TestExpectations:
8:23 PM Changeset in webkit [276482] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

[Mac] CMBaseClass object pointers can become unaligned on x86
https://bugs.webkit.org/show_bug.cgi?id=224950
<rdar://77020922>

Reviewed by Eric Carlson.

CMBaseClass has a 4-byte version member before its 8-byte pointers on x86. Deal with this
the same way we do with other pointer-bearing, static, CM-type objects: enforce a 4-byte
packing, and prepend the struct with another 4-byte object in order to force the pointers
into 8-byte alignment.

  • Shared/mac/MediaFormatReader/CoreMediaWrapped.h:

(WebKit::CoreMediaWrapped<Wrapped>::vTable):

7:52 PM Changeset in webkit [276481] by Diego Pino Garcia
  • 7 edits
    20 adds in trunk/LayoutTests

[GTK] Unreviewed test gardening. Update baselines after r276448.

r276448 turned on editable <input type=date> and <input type=time>,
many tests baselines need to be updated or emitted as result differ
from general baseline.

  • platform/gtk/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/rendering/widgets/baseline-alignment-and-overflow.tentative-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-checkValidity-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-reportValidity-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-badInput-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeOverflow-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-stepMismatch-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valid-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valueMissing-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-willValidate-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/date-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/datetime-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/datetime-local-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-seconds-leading-zeroes-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-valueasdate-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-valueasdate-stepping-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-valueasnumber-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-valueasnumber-stepping-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/month-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/selection-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-2-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/valueMode-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/week-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/inrange-outofrange-expected.txt: Added.
7:33 PM Changeset in webkit [276480] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Followup to r276397
https://bugs.webkit.org/show_bug.cgi?id=224883

Reviewed by Darin Adler.

Use a range-based for loop when mapping FloatQuads in sendTapHighlightForNodeIfNecessary.
No change in behavior.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::sendTapHighlightForNodeIfNecessary):

6:29 PM Changeset in webkit [276479] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur wk2 arm64 ] webrtc/captureCanvas-webrtc.html
https://bugs.webkit.org/show_bug.cgi?id=224963

Uneviewed test gardneing.

  • platform/mac-wk2/TestExpectations: Updated test expectations to Pass Timeout for BigSur arm64 only while test is reviewed.
5:56 PM Changeset in webkit [276478] by Jean-Yves Avenard
  • 3 edits
    2 adds in trunk

Fix color gamut in WebRTC when using VPx software decoder.
https://bugs.webkit.org/show_bug.cgi?id=220972
<rdar://problem/73616455>

Reviewed by Youenn Fablet.

Source/WebCore:

By default, and how libwebrtc is configuring its encoders and decoder, video range levels are used
(16-235). Video range was assumed to use full range instead (0-255), causing blacks to look grey and
whites to appear washed-out.
It is theoretically possible, when using VP9 that full-range level are used. While the information
related to video levels is available at the VP9 codec level; only the color space information is
being made available in libwebrtc's public image data structure, color range isn't.
For now we can assume the default is sufficient, and a follow-up change will be submitted to libwebrtc
later on.

In memory of Dr. Alex. May he rest in peace.
Test: webrtc/video-vp8-videorange.html

  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:

(WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferPool):

LayoutTests:

  • webrtc/video-vp8-videorange-expected.txt: Added.
  • webrtc/video-vp8-videorange.html: Added.
5:42 PM Changeset in webkit [276477] by Brent Fulgham
  • 4 edits in trunk/Source/WebKit

[iOS] Remove useless 'network-outbound' rule from non-networking file rule
https://bugs.webkit.org/show_bug.cgi?id=224940
<rdar://problem/66583476>

Reviewed by Per Arne Vollan.

No new tests. No effect on behavior.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb:
5:09 PM Changeset in webkit [276476] by BJ Burg
  • 14 edits in trunk

[Cocoa] re-enable test case WKInspectorDelegate.InspectorConfiguration
https://bugs.webkit.org/show_bug.cgi?id=224577
<rdar://70505272>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Adjust the CSP directive list in the <meta> tag to allow for customization
by WebKit ports.

  • UserInterface/Main.html:
  • Remove default-src 'self' so as not to block custom scheme loads.
  • Remove connect-src * ws: so as not to block custom scheme loads.
  • Add object-src 'none' as we have no reason to allow <object>, <embed>, or <applet>.

Source/WebKit:

For the purposes of testing, we want to be able to issue a fetch() that will
hit a custom URL scheme handler registered with _WKInspectorConfiguration.
This is not allowed by the existing <meta> tag CSP directive list because 'connect-src *'
does not allow connecting to arbitrary schemes, just arbitrary domains.

To fix this, relax the 'connect-src' directive in Main.html and apply
a dynamically-computed CSP directive using the 'Content-Security-Policy' HTTP
response header. This is only sent for main resources (Main.html and Test.html)
using the newly added inspector-resource: URL scheme handler.

The dynamically computed directive explicitly allows 'self' and any other registered
custom URL scheme handlers. WebKit ports which have not migrated away from file:///
will only apply the weaker 'connect-src' directive from the <meta> tag after this change.

Progresses an existing API test: WKInspectorDelegate.InspectorConfiguration.

  • UIProcess/API/Cocoa/_WKInspectorDelegate.h:
  • UIProcess/API/APIInspectorClient.h:

(API::InspectorClient::frontendLoaded):

  • UIProcess/API/Cocoa/_WKInspectorPrivateForTesting.h:
  • UIProcess/API/Cocoa/_WKInspector.mm:
  • UIProcess/API/Cocoa/_WKInspectorTesting.mm:

(JavaScriptSnippetToFetchURL):
(-[_WKInspector _fetchURLForTesting:]):

  • UIProcess/Inspector/WebInspectorUIProxy.cpp:

(WebKit::WebInspectorUIProxy::frontendLoaded): Notify the _WKInspectorDelegate
adapter that the frontend has finished loading.

  • UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.h:
  • UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm:

(-[WKInspectorResourceURLSchemeHandler allowedURLSchemesForCSP]):
(-[WKInspectorResourceURLSchemeHandler setAllowedURLSchemesForCSP:]):
(-[WKInspectorResourceURLSchemeHandler webView:startURLSchemeTask:]):
Added. Keep track of allowed custom schemes and allowed main resources.
Apply the CSP directive for main resource requests only.

  • UIProcess/Inspector/mac/WKInspectorViewController.mm:

(-[WKInspectorViewController webViewConfiguration]):
Set the allowed URL schemes property so the URL scheme handler can include
the schemes in the dynamically computed 'connect-src' directive.

Tools:

Trigger a fetch of a resource that uses a custom URL scheme handler in
order to test that custom scheme handlers registered in an _WKInspectorConfiguration
are getting used as expected.

Add an -inspectorFrontendLoaded: delegate method to -WKInspectorDelegate.
This is mainly used to prevent tests from progressing with a half-loaded inspector.

To make it possible to do this fetch(), there are some CSP related changes
that were made for Main.html so that fetching from a registered custom scheme is allowed.

Drive-by, per post-commit comments, add a better fix for the memory leak reported in
https://bugs.webkit.org/show_bug.cgi?id=223899. Thanks Joe!

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm:

(resetGlobalState):
(-[InspectorDelegate inspectorFrontendLoaded:]):
(TEST):
(-[UIDelegate _webView:didAttachLocalInspector:]):
(-[UIDelegate _webView:willCloseLocalInspector:]):
(-[UIDelegate _webViewDidEnableInspectorBrowserDomain:]):
(-[UIDelegate _webViewDidDisableInspectorBrowserDomain:]):

4:04 PM Changeset in webkit [276475] by Lauro Moura
  • 2 edits in trunk/Tools

Unreviewed. Gardening TestSSL flakiness

  • TestWebKitAPI/glib/TestExpectations.json:
4:04 PM Changeset in webkit [276474] by Ruben Turcios
  • 1 copy in tags/Safari-612.1.11.5

Tag Safari-612.1.11.5.

3:33 PM Changeset in webkit [276473] by Simon Fraser
  • 9 edits in trunk

Add trace points for WKWebView snapshotting
https://bugs.webkit.org/show_bug.cgi?id=224943

Reviewed by Tim Horton.

Source/WebKit:

Add new trace points to make snapshotting-related issues easier to diagnose. In the UI
process we start/end a trace scope when requested to snapshot, and before calling the
client's completion handler.

Trace CARenderServer snapshots which happen in the UI process, and in the web process, trace
the start and end of the snapshot painting.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):

  • UIProcess/API/Cocoa/_WKThumbnailView.mm:

(-[_WKThumbnailView requestSnapshot]):

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::paintSnapshotAtSize):

Source/WTF:

New snapshot values.

  • wtf/SystemTracing.h:

Tools:

New snapshot descriptions.

  • Tracing/SystemTracePoints.plist:
3:31 PM Changeset in webkit [276472] by Lauro Moura
  • 2 edits in trunk/Source/WebKit

Unreviewed. Guard doesPageNeedTCCD in platform COCOA after r274213
https://bugs.webkit.org/show_bug.cgi?id=224951

Silence -Wunused-function in non-cocoa platforms.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3:31 PM Changeset in webkit [276471] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[SOUP] Null pointer dereference in ResourceLoader::didReceiveAuthenticationChallenge
https://bugs.webkit.org/show_bug.cgi?id=224838

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-04-22
Reviewed by Adrian Perez de Castro.

Add a RELEASE_ASSERT_NOT_REACHED() to avoid this warning.

  • platform/network/soup/AuthenticationChallenge.h:
3:24 PM Changeset in webkit [276470] by commit-queue@webkit.org
  • 5 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r276456.
https://bugs.webkit.org/show_bug.cgi?id=224952

Windows specific crash

Reverted changeset:

"[JSC} Remove exception checks from non-throwing function
calls in Baseline JIT"
https://bugs.webkit.org/show_bug.cgi?id=224920
https://trac.webkit.org/changeset/276456

3:23 PM Changeset in webkit [276469] by Patrick Griffis
  • 4 edits in trunk/Source

[SOUP] Show more connection information in the inspector
https://bugs.webkit.org/show_bug.cgi?id=224873

Source/WebCore:

Handle SOUP_HTTP_2_0.

Reviewed by Adrian Perez de Castro.

  • platform/network/soup/ResourceResponseSoup.cpp:

(WebCore::ResourceResponse::ResourceResponse):

Source/WebKit:

Show the h2 protocol as well as the connection identifier
in the inspector.

Reviewed by Adrian Perez de Castro.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::gotHeadersCallback):
(WebKit::soupHTTPVersionToString):
(WebKit::NetworkDataTaskSoup::didGetHeaders):

3:16 PM Changeset in webkit [276468] by Chris Dumez
  • 2 edits in trunk/Source/WebKitLegacy/win

Disable prefixed WebAudio on WebKitLegacy-Windows
https://bugs.webkit.org/show_bug.cgi?id=224944

Reviewed by Eric Carlson.

Disable prefixed WebAudio on WebKitLegacy-Windows. It is already disabled everywhere else.

  • WebView.cpp:

(WebView::notifyPreferencesChanged):

3:12 PM Changeset in webkit [276467] by Robert Jenner
  • 2 edits in trunk/LayoutTests

REGRESSION (Metal ANGLE): webgl/2.0.0/conformance/glsl/misc/shader-uniform-packing-restrictions.html is constantly timing out.
https://bugs.webkit.org/show_bug.cgi?id=224257

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updating test that's timing out constantly to slow to see if it improves.
3:09 PM Changeset in webkit [276466] by Lauro Moura
  • 2 edits in trunk/Source/ThirdParty/ANGLE

[CMake][ANGLE] Silence -Wreturn-type for gcc and clang
https://bugs.webkit.org/show_bug.cgi?id=224949

Reviewed by Don Olmstead.

Avoid "control reaches end of non-void function" in
sh::TIntermRebuild::traverseChildren(...)

  • CMakeLists.txt:
3:07 PM Changeset in webkit [276465] by graouts@webkit.org
  • 10 edits in trunk

Add discrete animation support for border-image-repeat
https://bugs.webkit.org/show_bug.cgi?id=224923

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Mark 10 WPT progressions.

  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt:

Source/WebCore:

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • rendering/style/NinePieceImage.cpp:

(WebCore::operator<<):

  • rendering/style/NinePieceImage.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::setBorderImageHorizontalRule):
(WebCore::RenderStyle::setBorderImageVerticalRule):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::borderImageHorizontalRule const):
(WebCore::RenderStyle::borderImageVerticalRule const):

3:02 PM Changeset in webkit [276464] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[RenderTreeBuilder] Multi-column spanners are not part of the enclosing multi-column renderer's subtree
https://bugs.webkit.org/show_bug.cgi?id=224914
<rdar://76846946>

Reviewed by Simon Fraser.

Source/WebCore:

This patch handles the case when the newly inserted renderer is a column spanner and checking enclosingFragmentedFlow()
on the spanner's new parent returns the incorrect enclosing multi-column renderer.
This can result in having the spanner in multiple multi-column flows.

(Note that the spanners are directly attached to the RenderBlockFlow that establishes the multi-column context, while non-spanner
renderers are part of the RenderMultiColumnFlow subtree. e.g

RenderBlockFlow <- spanner's parent.

RenderMultiColumnFlow

Non-spanner renderer

spanner renderer

calling enclosingFragmentedFlow() on a spanner's parent (RenderBlockFlow) returns the parent multi-column flow -and
not the one it establishes. e.g.

RenderMultiColumnFlow <- parent multi-column flow -in case of nested columns.

RenderBlockFlow <- spanner's parent.

RenderMultiColumnFlow

Non-spanner renderer

spanner renderer

)

Test: fast/multicol/spanner-inserted-to-multiple-multicolumns.html

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::childFlowStateChangesAndAffectsParentBlock):

LayoutTests:

  • fast/multicol/spanner-inserted-to-multiple-multicolumns-expected.txt: Added.
  • fast/multicol/spanner-inserted-to-multiple-multicolumns.html: Added.
2:56 PM Changeset in webkit [276463] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

[WebXR] Optional button test is incorrect
https://bugs.webkit.org/show_bug.cgi?id=224945

Reviewed by Tim Horton.

Fix a conditional test that was always true.

  • testing/WebFakeXRInputController.cpp:

(WebCore::WebFakeXRInputController::getButtonOrPlaceholder const):

(A != B
A != C) -> (A != B && A != C)
2:50 PM Changeset in webkit [276462] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

[WebXR] Closure is capturing this unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=224946

Reviewed by Tim Horton.

Remove the "this" capture.

  • Modules/webxr/WebXRInputSourceArray.cpp:

(WebCore::WebXRInputSourceArray::handleRemovedInputSources):

2:19 PM Changeset in webkit [276461] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

NowPlayingInfoForGPUManager::clearNowPlayingInfoPrivate() sometimes launches the GPUProcess on page close
https://bugs.webkit.org/show_bug.cgi?id=224939

Reviewed by Simon Fraser.

Make sure NowPlayingInfoForGPUManager::clearNowPlayingInfoPrivate() never launches the GPUProcess. The GPU
process already takes care of clearing now playing info on exit.

  • WebProcess/GPU/media/WebMediaStrategy.cpp:

(WebKit::WebMediaStrategy::createNowPlayingManager const):

1:52 PM Changeset in webkit [276460] by Chris Dumez
  • 5 edits in trunk/Source/WebKit

Call RemoteMediaEngineConfigurationFactory::registerFactory() in WebProcess::setUseGPUProcessForMedia()
https://bugs.webkit.org/show_bug.cgi?id=224937

Reviewed by Eric Carlson.

Call RemoteMediaEngineConfigurationFactory::registerFactory() in WebProcess::setUseGPUProcessForMedia(),
like we used to do, instead of doing it in the GPUProcessConnection constructor. It is safer to
register the factory before we have a GPUProcessConnection and we wouldn't want things to behave
differently depending on whether or not the GPUProcess is already launched. I made sure that this does
not eagerly launch the GPUProcess.

  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::GPUProcessConnection):
(WebKit::GPUProcessConnection::mediaEngineConfigurationFactory): Deleted.

  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::setUseGPUProcessForMedia):
(WebKit::WebProcess::mediaEngineConfigurationFactory):

  • WebProcess/WebProcess.h:
1:36 PM Changeset in webkit [276459] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Fix ENABLE macro around NetworkProcessConnection::connectToRTCDataChannelRemoteSource declaration
https://bugs.webkit.org/show_bug.cgi?id=224938

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-22
Reviewed by Chris Dumez.

This matches the macro around the definition.

  • WebProcess/Network/NetworkProcessConnection.h:
1:25 PM Changeset in webkit [276458] by commit-queue@webkit.org
  • 4 edits
    2 deletes in trunk

Unreviewed, reverting r271644.
https://bugs.webkit.org/show_bug.cgi?id=224908

Caused regression
<http://webkit.org/b/221962|webkit.org/b/221962>

Reverted changeset:

"[css-multicol] OOM with 1px height columns"
https://bugs.webkit.org/show_bug.cgi?id=220490
https://trac.webkit.org/changeset/271644

1:22 PM Changeset in webkit [276457] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Add "Tim Nguyen" to contributors.json.
https://bugs.webkit.org/show_bug.cgi?id=224936

Patch by Tim Nguyen <ntim@apple.com> on 2021-04-22
Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/common/config/contributors.json:
1:17 PM Changeset in webkit [276456] by ysuzuki@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

[JSC} Remove exception checks from non-throwing function calls in Baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=224920

Reviewed by Tadeu Zagallo.

These functions are not taking JSGlobalObject and will not throw an error.
Use callOperationNoExceptionCheck instead to avoid emitting unnecessary exception checks.

  • jit/JIT.cpp:

(JSC::JIT::emitEnterOptimizationCheck):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emitSlow_op_new_object):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emitSlow_op_loop_hint):
(JSC::JIT::emit_op_profile_type):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emitSlow_op_new_object):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_profile_type):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitWriteBarrier):

1:01 PM Changeset in webkit [276455] by Fujii Hironori
  • 2 edits in trunk/Tools

[Win][WTR] eventSender.leapForward doesn't work as expected
https://bugs.webkit.org/show_bug.cgi?id=224918

Reviewed by Don Olmstead.

fast/events/click-count.html was failing because
eventSender.leapForward didn't work as expected.

Use Sleep() API to implement it as well as DRT does.

  • WebKitTestRunner/win/EventSenderProxyWin.cpp:

(WTR::EventSenderProxy::dispatchMessage):
(WTR::EventSenderProxy::EventSenderProxy):
(WTR::EventSenderProxy::leapForward):

12:48 PM Changeset in webkit [276454] by BJ Burg
  • 4 edits in trunk

v2: REGRESSION(r266890): [Cocoa] Fix API::InspectorClient leak
https://bugs.webkit.org/show_bug.cgi?id=223899
<rdar://problem/75249282>

Reviewed by Devin Rousso.

Address post-review feedback.

Source/WebKit:

  • UIProcess/API/Cocoa/_WKInspectorTesting.mm:

(-[_WKInspector _openURLExternallyForTesting:useFrontendAPI:]):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm:

(TEST):

12:32 PM Changeset in webkit [276453] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Add some new messages.in files to the Mac CMake build

  • PlatformMac.cmake:
12:21 PM Changeset in webkit [276452] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Unreviewed, reverting r276393.

This expectation is needed so that the test will pass on bots

Reverted changeset:

"Mass removing prior test expectations that don't need to be
set anymore"
https://bugs.webkit.org/show_bug.cgi?id=224898
https://commits.webkit.org/r276393

12:19 PM Changeset in webkit [276451] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Update sandbox message filter syntax
https://bugs.webkit.org/show_bug.cgi?id=223384
<rdar://problem/75531614>

Reviewed by Brent Fulgham.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
11:44 AM Changeset in webkit [276450] by Chris Lord
  • 61 edits
    2 adds in trunk

Implement FontFace in Workers for OffscreenCanvas
https://bugs.webkit.org/show_bug.cgi?id=224178
<rdar://problem/76529024>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

FontFace is now available for Workers, rebaseline related tests.

  • web-platform-tests/css/css-font-loading/fontfaceset-load-css-wide-keywords-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.center.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.left.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.right.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.basic.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.measure.advances.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.measure.baselines.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.measure.emHeights.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.basic.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.empty.worker-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker-expected.txt:

Source/WebCore:

To comply with spec and complete the OffscreenCanvas implementation,
FontFace needs to be made available on WorkerGlobalScope. This patch
makes it available and fixes crashes using it due to accessing
main-thread only singletons.

No new tests, rebaselined existing tests.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj: Add new files WorkerFontLoadRequest.cpp, WorkerFontLoadRequest.h
  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::fontCacheFallingBackToSingleton):
(WebCore::CSSFontFace::font):

  • css/CSSFontFace.h: Use the ScriptExecutionContext's FontCache if possible when loading fonts.
  • css/CSSFontFaceSet.cpp:

(WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered):
(WebCore::CSSFontFaceSet::matchingFacesExcludingPreinstalledFonts):

Use the correct CSSValuePool and FontCache in
ensureLocalFontFacesForFamilyRegistered. Also clarify a vaguely-named
variable.

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::CSSFontFaceSource):

Use FontLoadRequest::isPending instead of making assumptions about the
request state on construction.

  • css/FontFace.cpp:

(WebCore::FontFace::create):
(WebCore::FontFace::display const):

  • css/FontFace.h:
  • css/FontFace.idl: Construct with a ScriptExecutionContext instead of a Document and make available for Workers.
  • css/FontFaceSet.idl: Expose to Workers.
  • loader/FontLoadRequest.h:

(WebCore::FontLoadRequest::isWorkerFontLoadRequest const):

Add isPending function and new type WorkerFontLoadRequest.

  • loader/cache/CachedFont.cpp:

(WebCore::CachedFont::createCustomFontData):

Use convertWOFFToSfntIfNecessary().

  • loader/cache/CachedFontLoadRequest.h: Implement FontLoadRequest::isPending.
  • platform/graphics/Font.cpp:

(WebCore::Font::create):
(WebCore::Font::Font):
(WebCore::Font::systemFallbackFontForCharacter const):

  • platform/graphics/Font.h: Add an optional FontCache parameter for use with vertical font data retrieval and add a FontCache parameter to systemFallbackFontForCharacter instead of using the singleton.
  • platform/graphics/FontCache.cpp:

(WebCore::FontCache::fontForPlatformData):

Pass FontCache parameter when creating fonts.

  • platform/graphics/FontCache.h:

(WebCore::FontCache::fontCacheFallingBackToSingleton):

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::update const):

  • platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:

(WebCore::FontCascade::fontForCombiningCharacterSequence const):

Rename fontCacheFallbackToSingleton -> fontCacheFallingBackToSingleton

  • platform/graphics/FontCascadeFonts.cpp:

(WebCore::FontCascadeFonts::realizeFallbackRangesAt):
(WebCore::FontCascadeFonts::glyphDataForSystemFallback):

Use familyNamesData instead of familyNames and pass the FontCache
parameter when calling glyphDataForSystemFallback to make this safe
to use in a Worker.

  • platform/graphics/FontTaggedSettings.h: Add missing wtf/Hasher.h include.
  • platform/graphics/WOFFFileFormat.cpp:

(WebCore::convertWOFFToSfntIfNecessary):

  • platform/graphics/WOFFFileFormat.h: Add utility function to convert WOFF fonts on non-Cocoa platforms.
  • workers/WorkerFontLoadRequest.cpp: Added.

(WebCore::WorkerFontLoadRequest::WorkerFontLoadRequest):
(WebCore::WorkerFontLoadRequest::load):
(WebCore::WorkerFontLoadRequest::ensureCustomFontData):
(WebCore::WorkerFontLoadRequest::createFont):
(WebCore::WorkerFontLoadRequest::setClient):
(WebCore::WorkerFontLoadRequest::didReceiveResponse):
(WebCore::WorkerFontLoadRequest::didReceiveData):
(WebCore::WorkerFontLoadRequest::didFinishLoading):
(WebCore::WorkerFontLoadRequest::didFail):

  • workers/WorkerFontLoadRequest.h: Added. Implement FontLoadRequest for Workers.
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::fonts):
(WebCore::WorkerGlobalScope::fontLoadRequest):
(WebCore::WorkerGlobalScope::beginLoadingFontSoon):

  • workers/WorkerGlobalScope.h: Implement ScriptExecutionContext font-loading related functions.
  • workers/WorkerGlobalScope.idl: Include FontFaceSource.
11:41 AM Changeset in webkit [276449] by ysuzuki@apple.com
  • 5 edits
    1 add in trunk

[JSC] Baseline should have fast path for switch_imm
https://bugs.webkit.org/show_bug.cgi?id=224521

Reviewed by Tadeu Zagallo.

JSTests:

  • stress/switch-imm-baseline.js: Added.

(shouldBe):
(test):

Source/JavaScriptCore:

This patch implements op_switch_imm fast path in Baseline.
We have this fast path in LLInt, DFG, and FTL. So only Baseline lacks this.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::emitSwitchIntJump):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_switch_imm):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_switch_imm):

11:09 AM Changeset in webkit [276448] by Martin Robinson
  • 13 edits
    7 adds in trunk

[GTK] Turn on editable <input type=date> and <input type=time> fields
https://bugs.webkit.org/show_bug.cgi?id=224921

Reviewed by Carlos Garcia Campos.

.:

Turn on editable date and time inputs for GTK

  • Source/cmake/OptionsGTK.cmake: Add new source file to the list.

Source/WebCore:

Turn on editable date and time inputs for GTK.

No new tests. This is covered by enabling existing <input type=date>
and <input type=time> tests.

  • Headers.cmake: Add headers to the list.
  • loader/EmptyClients.cpp: Add missing header include.

Source/WebKit:

Turn on editable date and time inputs for GTK.

  • SourcesGTK.txt: Add source file.
  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::createDateTimePicker): Added.

  • UIProcess/API/gtk/PageClientImpl.h: Added method declaration.
  • UIProcess/gtk/WebDateTimePickerGtk.cpp: Added. Stub for date/time picker which

doesn't have any user interface. This will allow clients to use the editable shadow
DOM date/time input editable fields.
(WebKit::WebDateTimePickerGtk::create):
(WebKit::WebDateTimePickerGtk::~WebDateTimePickerGtk):
(WebKit::WebDateTimePickerGtk::WebDateTimePickerGtk):
(WebKit::WebDateTimePickerGtk::endPicker):
(WebKit::WebDateTimePickerGtk::showDateTimePicker):

  • UIProcess/gtk/WebDateTimePickerGtk.h: Added.

Source/WTF:

Turn on editable date and time inputs for GTK.

  • Scripts/Preferences/WebPreferencesInternal.yaml: Set editable date/time inputs

on by default for GTK as well.

LayoutTests:

Turn on editable date and time inputs for GTK.

  • platform/gtk/TestExpectations: Enable new forms test for WebKitGTK.
  • platform/gtk/fast/forms/date/date-input-rendering-basic-expected.txt: Added.
  • platform/gtk/fast/forms/date/date-pseudo-elements-expected.txt: Added.
  • platform/gtk/fast/forms/time/time-input-rendering-basic-expected.txt: Added.
11:05 AM Changeset in webkit [276447] by Aditya Keerthi
  • 5 edits in trunk/Source

Fix the tvOS build after r276325
https://bugs.webkit.org/show_bug.cgi?id=224929
<rdar://problem/77003408>

Reviewed by Wenson Hsieh.

Source/WebKit:

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/forms/WKDateTimeInputControl.mm:

[UIColor systemBackgroundColor] is SPI on tvOS.

(-[WKDateTimePickerViewController viewDidLoad]):

UIBlurEffectStyleSystemMaterial is not available on tvOS. Instead, use
a UIView with a system background color as the background view.

Source/WTF:

Fix the tvOS build after r276325

  • wtf/PlatformHave.h:
11:00 AM Changeset in webkit [276446] by BJ Burg
  • 2 edits in trunk/Source/WebKit

v2: Web Inspector: exempt API::SharedJSContext from remote inspection and automatic inspection
https://bugs.webkit.org/show_bug.cgi?id=224841
<rdar://69386559>

Reviewed by Devin Rousso.

Use the RemoteInspector C SPI to temporarily turn off "allow remote inspection by default".

  • UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:

(API::SharedJSContext::ensureContext):

10:12 AM Changeset in webkit [276445] by commit-queue@webkit.org
  • 4 edits in trunk

[css-grid] WPT Tests css/css-grid/grid-items/grid-item-percentage-sizes-*.html fail
https://bugs.webkit.org/show_bug.cgi?id=209650

Patch by Ziran Sun <Ziran Sun> on 2021-04-22
Reviewed by Sergio Villar Senin.

Source/WebCore:

We need to check child's writing mode in order to pick the correct dimension to resolve
percentage height against. Overriding containing block size should also be chosen in favour
of special code for orthogonal writing mode.

This change is an import of Chromium CL at
https://chromium-review.googlesource.com/c/chromium/src/+/1348055.

Three tests that failed are now passing.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computePercentageLogicalHeight const):

LayoutTests:

  • TestExpectations: grid-item-percentage-sizes-00{1-3}.html are passing and unskipped now.
9:52 AM Changeset in webkit [276444] by Alan Coon
  • 1 copy in tags/Safari-611.1.21.161.5

Tag Safari-611.1.21.161.5.

9:44 AM Changeset in webkit [276443] by Alan Coon
  • 8 edits in branches/safari-611.1.21.161-branch/Source

Versioning.

WebKit-7611.1.21.161.5

9:43 AM Changeset in webkit [276442] by Sam Sneddon
  • 3 edits in trunk/Tools

Ensure all non-local AutoInstalled libraries specify version
https://bugs.webkit.org/show_bug.cgi?id=224872

Reviewed by Jonathan Bedard.

Currently on Python 3 running test-webkitpy fails due to us attempting to
install flask 2.0.0rc1, recently released. We shouldn't, however, be installing
the latest possible version of flask, but rather specifying one. We do actually
attempt to specify one in webkitflaskpy, but we pass the Version object to the
wrong place.

Now actually specifying the versions, we need to change some of them to the
latest version which supports Python 2 to be able to install them to run
test-webkitpy-python2.

To ensure we don't repeat this, this makes AutoInstall.register raise if you try
to register a non-local package without specifying a version.

Additionally, require AutoInstall.register's package argument be a Package by
passing moving the lookup to AutoInstall.install and requiring it to be
successful.

Finally, while I'm touching this, make registering 'autoinstalled' an outright
failure, and make installing a local package fail if it cannot be found.

  • Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:

(AutoInstall.register):
(AutoInstall.install):

  • Scripts/libraries/webkitflaskpy/webkitflaskpy/init.py:
9:38 AM Changeset in webkit [276441] by Wenson Hsieh
  • 5 edits
    1 add in trunk

[iOS] The Look Up text service popover should avoid covering selected text
https://bugs.webkit.org/show_bug.cgi?id=224915
rdar://75891746

Reviewed by Megan Gardner.

Source/WebKit:

Adjust the presentation rect when showing the Look Up text service popup using the callout bar on iOS so that
we use the entire bounds of the selection. Currently, we only use the first selection rect (top to bottom) as
the presentation rect, which may cause the popup to obscure selected text.

This seems to have been derived from iOS legacy web view behavior that dating back to rdar://7475904; while the
exact reasoning for this is effectively lost to time, it's likely due to how there used to only be a single
block selection rect in non-editable content in iOS 5 anyways, so taking only the first selection rect would not
be incorrect. However, we now use character granularity selection everywhere in WebKit2, so this logic is no
longer sensible.

Test: TextServicesTests.LookUpPresentationRect

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _lookupForWebView:]):
(-[WKContentView _translateForWebView:]):

Make a similar adjustment here, since this presentation rect is intended to match that of the Look Up popover.

Tools:

Add a new API test to exercise the change.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/ios/TextServicesTests.mm: Added.

(TestWebKitAPI::handleLookup):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/ios/UIKitSPI.h: Add SPI declarations for UIWKTextInteractionAssistant.
9:35 AM Changeset in webkit [276440] by Ruben Turcios
  • 6 edits in branches/safari-612.1.11-branch/Source

Cherry-pick r275899. rdar://problem/76986496

Revert r275172
https://bugs.webkit.org/show_bug.cgi?id=224499
<rdar://76396241>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-13
Reviewed by Tim Horton.

Source/WebKit:

It turns out that terminate_with_reason uses a different syscall than xpc_connection_kill in its implementation,
and the former is not allowed by Messages's sandbox yet. Revert for Messages until they add it.

  • Platform/IPC/cocoa/ConnectionCocoa.mm: (IPC::ConnectionTerminationWatchdog::watchdogTimerFired): (IPC::Connection::kill):
  • Platform/spi/Cocoa/ReasonSPI.h:
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::ProcessLauncher::platformInvalidate): (WebKit::terminateWithReason):

Source/WTF:

  • wtf/spi/darwin/XPCSPI.h:

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

9:34 AM Changeset in webkit [276439] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[macOS] Re-block access to SYS_setattrlist
https://bugs.webkit.org/show_bug.cgi?id=224892
<rdar://problem/74828532>

Reviewed by Per Arne Vollan.

No new tests. No change in behavior.

  • WebProcess/com.apple.WebProcess.sb.in:
9:12 AM Changeset in webkit [276438] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Services EWS should run for webkitscmpy and webkitcorepy changes
https://bugs.webkit.org/show_bug.cgi?id=223941

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(CheckPatchRelevance):

  • CISupport/ews-build/steps_unittest.py: Added unit-test.
9:04 AM Changeset in webkit [276437] by Chris Dumez
  • 5 edits in trunk/Source/WebKit

Call RemoteCDMFactory::registerFactory() in WebProcess::setUseGPUProcessForMedia()
https://bugs.webkit.org/show_bug.cgi?id=224907

Reviewed by Eric Carlson.

Call RemoteCDMFactory::registerFactory() in WebProcess::setUseGPUProcessForMedia() like we
did before r275887, instead of doing it in the GPUProcessConnection constructor. This is
safer as it makes sure the CDMFactory gets registered even if the GPUProcess has not launched
yet. This is also more consistent with what we do for LegacyCDM since Bug 224905.

The MediaKeys API still seems functional after r275887 (unlike the LegacyCDM one) so it does
not seem it caused obvious breakage. That said, it is still safer to restore pre-r275887
behavior. There is also no drawback to restoring the previous behavior since I made sure the
GPUProcess does not get launched eagerly.

  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::GPUProcessConnection):
(WebKit::GPUProcessConnection::dispatchMessage):

  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::setUseGPUProcessForMedia):
(WebKit::WebProcess::cdmFactory):

  • WebProcess/WebProcess.h:
8:17 AM Changeset in webkit [276436] by Sam Sneddon
  • 4 edits
    1 move
    1 delete in trunk/Tools

Add an xfail marker for webkitpy's tests; get SCM passing
https://bugs.webkit.org/show_bug.cgi?id=224886

Reviewed by Jonathan Bedard.

Also:

Delete the old, unused skip_if decorator.

Fix our runner to detect unexpected-success and report them as failures.

  • Scripts/webkitpy/common/checkout/scm/scm_unittest.py:

(GitSVNTest.test_rebase_in_progress):
(GitTestWithMock.test_create_patch):

  • Scripts/webkitpy/test/markers.py:

(xfail):
(xfail.decorator):

  • Scripts/webkitpy/test/runner.py:

(Runner.handle):
(_Worker.handle):
(TestResult):
(TestResult.init):
(TestResult.addSuccess):

  • Scripts/webkitpy/test/runner_unittest.py:

(FakeTestCase):
(FakeTestCase.init):
(FakeTestCase.id):
(FakeModuleSuite.run):

  • Scripts/webkitpy/test/skip.py: Removed.
  • Scripts/webkitpy/test/skip_unittest.py: Removed.
7:48 AM Changeset in webkit [276435] by Sam Sneddon
  • 2 edits in trunk/Tools

server_process_unittest.py's MockFile should all be bytes
https://bugs.webkit.org/show_bug.cgi?id=224877

Reviewed by Jonathan Bedard.

This fixes the test when run under pytest on Python 3.

  • Scripts/webkitpy/port/server_process_unittest.py:

(MockFile.read):

7:09 AM Changeset in webkit [276434] by Sam Sneddon
  • 6 edits in trunk/Tools

Fix potential flakiness when running webkitpy tests
https://bugs.webkit.org/show_bug.cgi?id=224887

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/common/system/executive_unittest.py:

(ExecutiveTest.serial_test_run_in_parallel): Increase the delay to ensure it's
much greater than the VM spawn time, as the current time is a bit marginal when
the system is under load and we're using the spawn multiprocessing start method

  • Scripts/webkitpy/test/main.py:

(Tester.run): Allow argv to be passed through for testing

  • Scripts/webkitpy/test/main_unittest.py:

(TesterTest.test_no_tests_found): Explicitly pass argv to avoid using sys.argv

  • Scripts/webkitpy/w3c/test_parser_unittest.py:

(TestParserTest.test_analyze_pixel_test_all_true): Reset options after test
(TestParserTest.test_analyze_pixel_test_all_false): Reset options after test

  • Scripts/webkitpy/xcode/simulated_device_unittest.py:

(SimulatedDeviceTest.reset_simulated_device_manager): _device_identifier_to_name
is a dict, and should remain one

7:06 AM Changeset in webkit [276433] by imanol
  • 33 edits
    4 copies
    11 adds in trunk

Implement WebXR Input Sources
https://bugs.webkit.org/show_bug.cgi?id=223257

Reviewed by Youenn Fablet.

.:

Enable WPE Gamepad when WebXR is enabled.

  • Source/cmake/OptionsWPE.cmake:

LayoutTests/imported/w3c:

Update WebXR Input Source test expectations.

  • web-platform-tests/webxr/events_input_source_recreation.https-expected.txt: Added.
  • web-platform-tests/webxr/events_input_sources_change.https-expected.txt: Added.
  • web-platform-tests/webxr/events_session_select.https-expected.txt: Added.
  • web-platform-tests/webxr/events_session_select_subframe.https-expected.txt: Added.
  • web-platform-tests/webxr/events_session_squeeze.https-expected.txt: Added.
  • web-platform-tests/webxr/getInputPose_handedness.https-expected.txt: Added.
  • web-platform-tests/webxr/xrInputSource_add_remove.https-expected.txt: Added.
  • web-platform-tests/webxr/xrInputSource_emulatedPosition.https-expected.txt: Added.
  • web-platform-tests/webxr/xrInputSource_profiles.https-expected.txt: Added.
  • web-platform-tests/webxr/xrInputSource_sameObject.https-expected.txt: Added.
  • web-platform-tests/webxr/xrReferenceSpace_originOffset.https-expected.txt: Added.

Source/WebCore:

This patch implements the platform data definition and the DOM bits required to support WebXR Input Sources, the input mechanism used in WebXR.
Example XR input sources include, but are not limited to, handheld controllers, optically tracked hands, and gaze-based input methods.

More info about the API in:

Tested by WebXR WPT.

  • Modules/gamepad/Gamepad.h: Add setConnected method.
  • Modules/webxr/WebXRGamepad.cpp: Bridge between WebXRInputSource and Gamepad

(WebCore::WebXRGamepad::WebXRGamepad):

  • Modules/webxr/WebXRGamepad.h:
  • Modules/webxr/WebXRInputSpace.cpp: Instance of WebXRSpace used for WebXRInputSource spaces.

(WebCore::WebXRInputSpace::create):
(WebCore::WebXRInputSpace::WebXRInputSpace):
(WebCore::WebXRInputSpace::nativeOrigin const):

  • Modules/webxr/WebXRInputSpace.h:
  • Modules/webxr/WebXRFrame.cpp:

(WebCore::WebXRFrame::populatePose): set emulatedPosition based on the spaces.

  • Modules/webxr/WebXRInputSource.cpp: Complete WebXRInputSource implementation.

(WebCore::WebXRInputSpace::create):
(WebCore::WebXRInputSpace::WebXRInputSpace):
(WebCore::WebXRInputSpace::nativeOrigin const):
(WebCore::WebXRInputSource::create):
(WebCore::WebXRInputSource::WebXRInputSource):
(WebCore::WebXRInputSource::update):
(WebCore::WebXRInputSource::requiresInputSourceChange):
(WebCore::WebXRInputSource::disconnect):
(WebCore::WebXRInputSource::pollEvents):
(WebCore::WebXRInputSource::createEvent):

  • Modules/webxr/WebXRInputSource.h:

(WebCore::WebXRInputSource::handle const):
(WebCore::WebXRInputSource::handedness const):
(WebCore::WebXRInputSource::targetRayMode const):
(WebCore::WebXRInputSource::targetRaySpace const):
(WebCore::WebXRInputSource::gripSpace const):
(WebCore::WebXRInputSource::profiles const):
(WebCore::WebXRInputSource::gamepad const):

  • Modules/webxr/WebXRInputSource.idl: Add gamepad attribute.
  • Modules/webxr/WebXRInputSourceArray.cpp: Implement input source updates and event dispatching.

(WebCore::WebXRInputSourceArray::create):
(WebCore::WebXRInputSourceArray::WebXRInputSourceArray):
(WebCore::WebXRInputSourceArray::length const):
(WebCore::WebXRInputSourceArray::item const):
(WebCore::WebXRInputSourceArray::clear):
(WebCore::WebXRInputSourceArray::update):
(WebCore::WebXRInputSourceArray::handleRemovedInputSources):
(WebCore::WebXRInputSourceArray::handleAddedOrUpdatedInputSources):

  • Modules/webxr/WebXRInputSourceArray.h:
  • Modules/webxr/WebXRSession.cpp:

(WebCore::WebXRSession::WebXRSession): Set tracking delegate before initializing tracking and rendering.
(WebCore::WebXRSession::isPositionEmulated const): Add helper method.
(WebCore::WebXRSession::shutdown): Clear WebXRInputSourceArray instance.
(WebCore::WebXRSession::sessionDidInitializeInputSources): Dispatch initial InputSource discovery event.
(WebCore::WebXRSession::onFrame): Update WebXRInputSourceArray instance.

  • Modules/webxr/WebXRSession.h:
  • Modules/webxr/WebXRSpace.cpp: Add virtual class isPositionEmulated to be used in WebXRFrame.

(WebCore::WebXRSpace::isPositionEmulated const):

  • Modules/webxr/WebXRSpace.h:
  • Modules/webxr/WebXRSystem.cpp:

(WebCore::WebXRSystem::requestSession): update FIXME comment.

  • Modules/webxr/XRHandedness.h: Reuse PlatformXR enum.
  • Modules/webxr/XRInputSourceEvent.cpp:

(WebCore::XRInputSourceEvent::XRInputSourceEvent):
(WebCore::XRInputSourceEvent::setFrameActive):

  • Modules/webxr/XRInputSourceEvent.h:
  • Modules/webxr/XRInputSourcesChangeEvent.h:
  • Modules/webxr/XRTargetRayMode.h: Reuse PlatformXR enum.
  • platform/gamepad/GamepadConstants.cpp:

(WebCore::xrStandardGamepadMappingString): Add xr-standard gamepad mapping name.

  • platform/gamepad/GamepadConstants.h:
  • platform/xr/PlatformXR.h: Add Input Source frame data.
  • testing/WebFakeXRDevice.cpp: Implement required changes to run and pass WebXR Input Source tests.

(WebCore::SimulatedXRDevice::initializeTrackingAndRendering):
(WebCore::SimulatedXRDevice::frameTimerFired):
(WebCore::WebFakeXRDevice::simulateResetPose):
(WebCore::WebFakeXRDevice::simulateInputSourceConnection):

  • testing/WebFakeXRDevice.h:
  • testing/WebFakeXRInputController.cpp:

(WebCore::WebFakeXRInputController::create):
(WebCore::WebFakeXRInputController::WebFakeXRInputController):
(WebCore::WebFakeXRInputController::setGripOrigin):
(WebCore::WebFakeXRInputController::setPointerOrigin):
(WebCore::WebFakeXRInputController::disconnect):
(WebCore::WebFakeXRInputController::reconnect):
(WebCore::WebFakeXRInputController::setSupportedButtons):
(WebCore::WebFakeXRInputController::updateButtonState):
(WebCore::WebFakeXRInputController::getFrameData):
(WebCore::WebFakeXRInputController::getButtonOrPlaceholder const):

  • testing/WebFakeXRInputController.h:

LayoutTests:

Update WebXR Input Source test expectations.

  • platform/wpe/TestExpectations:
5:18 AM Changeset in webkit [276432] by Carlos Garcia Campos
  • 9 edits in trunk

[SOUP] Add support for preconnect
https://bugs.webkit.org/show_bug.cgi?id=177934

Reviewed by Sergio Villar Senin.

.:

Enable server preconnect support when building with libsoup3.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/WebKit:

Use new libsoup API to implement preconnect support.

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::create):

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
(WebKit::NetworkDataTaskSoup::createRequest):
(WebKit::NetworkDataTaskSoup::resume):
(WebKit::NetworkDataTaskSoup::preconnectCallback):

  • NetworkProcess/soup/NetworkDataTaskSoup.h:

LayoutTests:

Remove expectations for tests that are now passing.

  • platform/glib/TestExpectations:
5:14 AM Changeset in webkit [276431] by Philippe Normand
  • 3 edits in trunk/Source/ThirdParty/ANGLE

Unreviewed, WPE build fix after r276390

Fix namespacing issues in nullptr_t invocations.

  • src/compiler/translator/tree_util/IntermRebuild.cpp:

(sh::TIntermRebuild::BaseResult::BaseResult):
(sh::PreResult::PreResult):
(sh::PostResult::PostResult):

  • src/compiler/translator/tree_util/IntermRebuild.h:
4:52 AM Changeset in webkit [276430] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[GTK] Build error: Couldn't find include 'Soup-2.4.gir'
https://bugs.webkit.org/show_bug.cgi?id=224926

Reviewed by Philippe Normand.

Use the right soup API version when generating the introspection.

  • PlatformGTK.cmake:
4:47 AM Changeset in webkit [276429] by Carlos Garcia Campos
  • 10 edits in trunk

[GTK][WPE] Bump libsoup3 version to 2.99.4
https://bugs.webkit.org/show_bug.cgi?id=224925

Reviewed by Philippe Normand.

.:

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

Update to use the new API.

  • platform/network/soup/ResourceResponseSoup.cpp:

(WebCore::ResourceResponse::ResourceResponse):

  • platform/network/soup/SoupVersioning.h:

(soup_message_get_tls_peer_certificate):
(soup_message_get_tls_peer_certificate_errors):
(soup_message_get_tls_certificate): Deleted.
(soup_message_get_tls_certificate_errors): Deleted.

Tools/buildstream:

  • elements/sdk/libsoup3.bst:

LayoutTests:

Remove expectations for tests that should be passing now.

  • platform/glib/TestExpectations:
1:29 AM Changeset in webkit [276428] by mmaxfield@apple.com
  • 9 edits
    1 add in trunk

[iOS] Web processes recreated after crashing are not created with the right contentSizeCategory
https://bugs.webkit.org/show_bug.cgi?id=224916

Reviewed by Tim Horton.

Source/WebCore:

The constructor of WKWebView sets the contentSizeCategory for the first page.
But if the web process crashes, the new one won't have it set.

This patch simply adds the contentSizeCategory to the WebProcessCreationParameters.

Tests: TextStyleFontSize.Startup

TextStyleFontSize.AfterCrash

  • rendering/RenderThemeCocoa.h:

Source/WebKit:

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/ios/TextStyleFontSize.mm: Added.

(-[TextStyleFontSizeWebView _contentSizeCategory]):
(TEST):

1:27 AM Changeset in webkit [276427] by ysuzuki@apple.com
  • 18 edits
    2 adds in trunk

[JSC] DFG / FTL should inline switch_string
https://bugs.webkit.org/show_bug.cgi?id=224578

Reviewed by Mark Lam.

JSTests:

  • microbenchmarks/switch-inlining.js: Added.

(inner):
(outer):

  • stress/switch-inlining-nested.js: Added.

(shouldBe):
(inner):
(outer):

Source/JavaScriptCore:

Because of r275840 change, we no longer copy StringJumpTable when compiling DFG / FTL code.
Instead we are using a pointer to UnlinkedStringTable stored in UnlinkedCodeBlock.
This allows DFG / FTL to inline CodeBlock which includes op_switch_string. We were previously not able
to do that because we cannot copy StringImpl in DFG / FTL concurrent compiler thread.

  1. We handle StringJumpTable / UnlinkedStringJumpTable in the same way as SimpleJumpTable / UnlinkedSimpleJumpTable.
  2. We put m_ctiDefault of StringJumpTable in the last element of m_ctiOffsets vector of StringJumpTable to make sizeof(StringJumpTable) small.
  3. We use m_indexInTable instead of m_branchOffset in FTL switch generation to make switch table dense.

The microbenchmark shows 30% improvement because of unlocking inlining feature.

ToT Patched

switch-inlining 27.1238+-0.2708 20.2630+-0.1477 definitely 1.3386x faster

<geometric> 27.1238+-0.2708 20.2630+-0.1477 definitely 1.3386x faster

  • bytecode/JumpTable.h:

(JSC::StringJumpTable::ensureCTITable):
(JSC::StringJumpTable::ctiForValue const):
(JSC::StringJumpTable::ctiDefault const):
(JSC::StringJumpTable::isEmpty const):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedStringJumpTable::indexForValue const):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGGraph.h:
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGOperations.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::emitSwitchStringOnString):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::switchStringSlow):

  • ftl/FTLOperations.cpp:

(JSC::FTL::JSC_DEFINE_JIT_OPERATION):

  • ftl/FTLOperations.h:
  • jit/JIT.cpp:

(JSC::JIT::link):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_switch_string):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_switch_string):

  • jit/JITOperations.cpp:

(JSC::JSC_DEFINE_JIT_OPERATION):

1:25 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
12:50 AM Changeset in webkit [276426] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

REGRESSION(r275790) [GTK][WPE] Scrolling rendering fails after the second page
https://bugs.webkit.org/show_bug.cgi?id=224824

Patch by Alejandro G. Castro <alex@igalia.com> on 2021-04-22
Reviewed by Simon Fraser.

We are making the implementation more similar to the Apple
scrolling coordinator. Now we reimplement willStartRenderingUpdate
to be able to synchronize the state there. That way we can avoid
the timer and just schedule a rendering update when we want to
commit the tree state.

Test: Fixes the timeout of the overflow-scrollable-after-back.html,
added in the regression.

  • page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:

(WebCore::ScrollingCoordinatorNicosia::ScrollingCoordinatorNicosia):
(WebCore::ScrollingCoordinatorNicosia::pageDestroyed):
(WebCore::ScrollingCoordinatorNicosia::commitTreeStateIfNeeded):
(WebCore::ScrollingCoordinatorNicosia::scheduleTreeStateCommit):
(WebCore::ScrollingCoordinatorNicosia::willStartRenderingUpdate):
(WebCore::ScrollingCoordinatorNicosia::commitTreeState): Deleted.

  • page/scrolling/nicosia/ScrollingCoordinatorNicosia.h:
12:40 AM Changeset in webkit [276425] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

GraphicsContextGLOpenGLCocoa should check that ANGLE is loaded in WK1 releaseCurrentContext
https://bugs.webkit.org/show_bug.cgi?id=224532
<rdar://problem/76632149>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-22
Reviewed by Kenneth Russell.

Avoid crashing in case WK1 is used but ANGLE library is not present.
There are some cases where ANGLE could be omitted for size savings.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::releaseCurrentContext):

Apr 21, 2021:

11:03 PM Changeset in webkit [276424] by Ruben Turcios
  • 16 edits in branches/safari-612.1.11-branch

Cherry-pick r276347. rdar://problem/76986456

Support scrolling to a selected AppHighlight
https://bugs.webkit.org/show_bug.cgi?id=224773

Reviewed by Tim Horton.

Source/WebCore:

Test: AppHighlights::AppHighlightCreateAndRestoreAndScroll

  • Modules/highlight/AppHighlightStorage.cpp: (WebCore::AppHighlightStorage::restoreAndScrollToAppHighlight): (WebCore::AppHighlightStorage::attemptToRestoreHighlightAndScroll): (WebCore::AppHighlightStorage::restoreUnrestoredAppHighlights): (WebCore::AppHighlightStorage::restoreAppHighlight): Deleted.
  • Modules/highlight/AppHighlightStorage.h:
  • WebCore.xcodeproj/project.pbxproj:
  • editing/Editor.cpp: (WebCore::TemporarySelectionChange::setSelection):
  • page/Page.cpp: (WebCore::Page::doAfterUpdateRendering):

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebView.mm: (restoreHighlight): (-[WKWebView _restoreAppHighlights:]): (-[WKWebView _restoreAndScrollToAppHighlight:]):
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::restoreAppHighlightsAndScrollToIndex): (WebKit::WebPageProxy::restoreAppHighlights): Deleted.
  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::restoreAppHighlightsAndScrollToIndex): (WebKit::WebPage::restoreAppHighlights): Deleted.
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm: (TestWebKitAPI::TEST):

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

10:31 PM Changeset in webkit [276423] by Ruben Turcios
  • 8 edits in branches/safari-612.1.11-branch/Source

Versioning.

WebKit-7612.1.11.5

10:12 PM Changeset in webkit [276422] by commit-queue@webkit.org
  • 4 edits
    49 adds in trunk/LayoutTests

Import css/css-will-change tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=224870

Patch by Tim Nguyen <ntim@apple.com> on 2021-04-21
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • resources/import-expectations.json:
  • web-platform-tests/css/css-will-change/META.yml: Added.
  • web-platform-tests/css/css-will-change/inheritance-expected.txt: Added.
  • web-platform-tests/css/css-will-change/inheritance.html: Added.
  • web-platform-tests/css/css-will-change/parsing/w3c-import.log: Added.
  • web-platform-tests/css/css-will-change/parsing/will-change-computed-expected.txt: Added.
  • web-platform-tests/css/css-will-change/parsing/will-change-computed.html: Added.
  • web-platform-tests/css/css-will-change/parsing/will-change-invalid-expected.txt: Added.
  • web-platform-tests/css/css-will-change/parsing/will-change-invalid.html: Added.
  • web-platform-tests/css/css-will-change/parsing/will-change-valid-expected.txt: Added.
  • web-platform-tests/css/css-will-change/parsing/will-change-valid.html: Added.
  • web-platform-tests/css/css-will-change/w3c-import.log: Added.
  • web-platform-tests/css/css-will-change/will-change-abspos-cb-001-expected.html: Added.
  • web-platform-tests/css/css-will-change/will-change-abspos-cb-001.html: Added.
  • web-platform-tests/css/css-will-change/will-change-abspos-cb-002-expected.html: Added.
  • web-platform-tests/css/css-will-change/will-change-abspos-cb-002.html: Added.
  • web-platform-tests/css/css-will-change/will-change-abspos-cb-003-expected.html: Added.
  • web-platform-tests/css/css-will-change/will-change-abspos-cb-003.html: Added.
  • web-platform-tests/css/css-will-change/will-change-abspos-cb-dynamic-001-expected.html: Added.
  • web-platform-tests/css/css-will-change/will-change-abspos-cb-dynamic-001.html: Added.
  • web-platform-tests/css/css-will-change/will-change-fixedpos-cb-001-expected.html: Added.
  • web-platform-tests/css/css-will-change/will-change-fixedpos-cb-001.html: Added.
  • web-platform-tests/css/css-will-change/will-change-fixedpos-cb-002-expected.html: Added.
  • web-platform-tests/css/css-will-change/will-change-fixedpos-cb-002.html: Added.
  • web-platform-tests/css/css-will-change/will-change-fixedpos-cb-003-expected.html: Added.
  • web-platform-tests/css/css-will-change/will-change-fixedpos-cb-003.html: Added.
  • web-platform-tests/css/css-will-change/will-change-fixedpos-cb-004-expected.html: Added.
  • web-platform-tests/css/css-will-change/will-change-fixedpos-cb-004.html: Added.
  • web-platform-tests/css/css-will-change/will-change-fixedpos-cb-005-expected.html: Added.
  • web-platform-tests/css/css-will-change/will-change-fixedpos-cb-005.html: Added.
  • web-platform-tests/css/css-will-change/will-change-fixedpos-cb-006-expected.html: Added.
  • web-platform-tests/css/css-will-change/will-change-fixedpos-cb-006.html: Added.
  • web-platform-tests/css/css-will-change/will-change-inherit-dynamic-expected.txt: Added.
  • web-platform-tests/css/css-will-change/will-change-inherit-dynamic.html: Added.
  • web-platform-tests/css/css-will-change/will-change-stacking-context-001-expected.html: Added.
  • web-platform-tests/css/css-will-change/will-change-stacking-context-001.html: Added.
  • web-platform-tests/css/css-will-change/will-change-stacking-context-002-expected.html: Added.
  • web-platform-tests/css/css-will-change/will-change-stacking-context-002.html: Added.
  • web-platform-tests/css/css-will-change/will-change-stacking-context-003-expected.html: Added.
  • web-platform-tests/css/css-will-change/will-change-stacking-context-003.html: Added.
  • web-platform-tests/css/css-will-change/will-change-transform-add-content-expected.html: Added.
  • web-platform-tests/css/css-will-change/will-change-transform-add-content.html: Added.
  • web-platform-tests/css/css-will-change/will-change-transform-image-expected.html: Added.
  • web-platform-tests/css/css-will-change/will-change-transform-image.html: Added.
  • web-platform-tests/css/css-will-change/will-change-transform-zero-size-child-overflow-visible-expected.html: Added.
  • web-platform-tests/css/css-will-change/will-change-transform-zero-size-child-overflow-visible.html: Added.
  • web-platform-tests/css/css-will-change/will-change-will-change-1-expected.xht: Added.
  • web-platform-tests/css/css-will-change/will-change-will-change-1.html: Added.

LayoutTests:

9:51 PM Changeset in webkit [276421] by Fujii Hironori
  • 6 edits in trunk/Source

[Win] GetDoubleClickTime() returns 0 in the non-interactive window station on Windows 10 version 2004
https://bugs.webkit.org/show_bug.cgi?id=224793

Reviewed by Don Olmstead.

Source/WebCore:

Some editing and events tests using double click were failing on
Windows 10 version 2004 and 20H2. DumpRenderTree.exe creates a
non-interactive window station if it is running as admin. However,
GetDoubleClickTime() returns 0 in the window station on the latest
Windows 10.

  • platform/win/GDIUtilities.h:

(WebCore::getDoubleClickTime): Added.

Source/WebKit:

  • Shared/win/WebEventFactory.cpp:

(WebKit::clickCount): Use WebCore::getDoubleClickTime instead of
GetDoubleClickTime API.

Source/WebKitLegacy/win:

  • WebView.cpp:

(WebView::handleMouseEvent): Use WebCore::getDoubleClickTime
instead of GetDoubleClickTime API. Change coding style for
check-webkit-style.

9:27 PM Changeset in webkit [276420] by Fujii Hironori
  • 3 edits in trunk/LayoutTests

[WinCairo] Unreviewed test gardening

  • platform/wincairo-wk1/TestExpectations:
  • platform/wincairo/TestExpectations:
8:41 PM Changeset in webkit [276419] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Ignore column spanner property for the inner part of a text control.
https://bugs.webkit.org/show_bug.cgi?id=224757
<rdar://problem/76844224>

Reviewed by Antti Koivisto.

Source/WebCore:

Let's not try to span columns with the _inner_ part of a text control. Such subtrees should be opaque to multi-column layout.
(we already do this for <legend>)

Test: fast/multicol/spanner-inside-text-control.html

  • rendering/updating/RenderTreeBuilderMultiColumn.cpp:

(WebCore::isValidColumnSpanner):

LayoutTests:

  • fast/multicol/spanner-inside-text-control-expected.txt: Added.
  • fast/multicol/spanner-inside-text-control.html: Added.
8:28 PM Changeset in webkit [276418] by commit-queue@webkit.org
  • 17 edits
    2 deletes in trunk

Unreviewed, reverting r276380 and r276386.
https://bugs.webkit.org/show_bug.cgi?id=224912

Caused WPT css/css-counter-styles/cssom test crashes on macOS
WK1 with ASan

Reverted changesets:

"[css-counter-styles] Parse @counter-style descriptors"
https://bugs.webkit.org/show_bug.cgi?id=224718
https://trac.webkit.org/changeset/276380

"CSSComputedStyleDeclaration.cpp should use C++ style
comments"
https://bugs.webkit.org/show_bug.cgi?id=224875
https://trac.webkit.org/changeset/276386

8:20 PM Changeset in webkit [276417] by Robert Jenner
  • 2 edits in trunk/LayoutTests

Mass removing prior test expectations that don't need to be set anymore
https://bugs.webkit.org/show_bug.cgi?id=224898

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Removing test expectation, as it is no longer needed.
7:27 PM Changeset in webkit [276416] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ iOS, EWS ] scrollingcoordinator/ios/fixed-inside-sticky-no-stacking-context-2.html is a constant Image Failure
https://bugs.webkit.org/show_bug.cgi?id=224910

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations: Updating expectation to Failure to speed up EWS while test is reviewed.
7:12 PM Changeset in webkit [276415] by Diego Pino Garcia
  • 3 edits
    1 move
    1 add
    11 deletes in trunk/LayoutTests

[GLIB][GTK][WPE] Unreviewed test gardening. Remove redundant baselines.

  • platform/glib/TestExpectations:
  • platform/glib/fast/canvas/webgl/webgl-compressed-texture-astc-expected.txt: Removed.
  • platform/glib/http/tests/loading/oauth-expected.txt: Renamed from LayoutTests/platform/gtk/http/tests/loading/oauth-expected.txt.
  • platform/glib/imported/w3c/web-platform-tests/css/css-text/white-space/trailing-space-before-br-001-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.scale2-expected.txt: Removed.
  • platform/gtk/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt: Removed.
  • platform/gtk/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt: Removed.
  • platform/gtk/imported/w3c/web-platform-tests/service-workers/service-worker/clients-matchall-client-types.https-expected.txt: Removed.
  • platform/wpe/TestExpectations:
  • platform/wpe/http/tests/loading/oauth-expected.txt: Removed.
  • platform/wpe/http/tests/websocket/tests/hybi/send-object-tostring-check-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/service-workers/service-worker/windowclient-navigate.https-expected.txt: Removed.
6:28 PM Changeset in webkit [276414] by Peng Liu
  • 26 edits
    1 delete in trunk

[GPUP] Refactor SourceBuffer::enqueuedSamplesForTrackID() for testing purposes
https://bugs.webkit.org/show_bug.cgi?id=224891

Reviewed by Eric Carlson.

Source/WebCore:

This patch is a preparation to run MockMediaPlayerMediaSource in the GPU Process.

SourceBuffer::enqueuedSamplesForTrackID() is a synchronous function used for testing
purposes. It works fine when "Media in GPU process" is disabled. However, when
"Media in GPU process" is enabled, we have to use a synchronous IPC message to
implement it. This patch changes it to be a function with a completion handler
parameter, so that we can implement it with an asynchronous IPC message when
we run MockMediaPlayerMediaSource in the GPU process.

There is no behavior change when "Media in GPU Process" is disabled.

Covered by existing tests.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::enqueuedSamplesForTrackID):

  • Modules/mediasource/SourceBuffer.h:
  • platform/graphics/SourceBufferPrivate.cpp:

(WebCore::SourceBufferPrivate::enqueuedSamplesForTrackID):

  • platform/graphics/SourceBufferPrivate.h:

(WebCore::SourceBufferPrivate::enqueuedSamplesForTrackID): Deleted.

  • platform/mock/mediasource/MockSourceBufferPrivate.cpp:

(WebCore::MockSourceBufferPrivate::enqueuedSamplesForTrackID):

  • platform/mock/mediasource/MockSourceBufferPrivate.h:
  • testing/Internals.cpp:

(WebCore::Internals::enqueuedSamplesForTrackID):

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

  • GPUProcess/media/RemoteSourceBufferProxy.cpp:

(WebKit::RemoteSourceBufferProxy::enqueuedSamplesForTrackID):

  • GPUProcess/media/RemoteSourceBufferProxy.h:
  • GPUProcess/media/RemoteSourceBufferProxy.messages.in:
  • WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:

(WebKit::SourceBufferPrivateRemote::bufferedSamplesForTrackId):
(WebKit::SourceBufferPrivateRemote::enqueuedSamplesForTrackID):

  • WebProcess/GPU/media/SourceBufferPrivateRemote.h:

LayoutTests:

Update following tests to use the asynchronous enqueuedSamplesForTrackID().

  • media/media-source/media-source-append-acb-no-frame-lost.html:
  • media/media-source/media-source-append-acb-tolerance.html:
  • media/media-source/media-source-append-presentation-durations.html:
  • media/media-source/media-source-dropped-iframe.html:
  • media/media-source/media-source-erase-after-last-append.html:
  • media/media-source/media-source-first-append-not-starting-at-zero.html:
  • media/media-source/media-source-remove-b-frame.html:
  • media/media-source/media-source-seek-back.html:
  • media/media-source/media-source-timestampoffset-rounding-error.html:

We don't need this platform-specific test expectation now.

  • platform/mac/media/media-source/media-source-append-before-last-range-no-quota-exceeded-expected.txt: Removed.
6:15 PM Changeset in webkit [276413] by wilander@apple.com
  • 2 edits in trunk/Source/WebKit

PCM: Remove PrivateClickMeasurement::PcmDataCarried::NonPersonallyIdentifiable overrides in testing
https://bugs.webkit.org/show_bug.cgi?id=224885
<rdar://problem/76973184>

Reviewed by Brent Fulgham.

We had a temporary override to PrivateClickMeasurement::PcmDataCarried::NonPersonallyIdentifiable
in WebKit::PrivateClickMeasurementManager::getTokenPublicKey() and
WebKit::PrivateClickMeasurementManager::getSignedUnlinkableToken().

This patch removes those overrides since the network load hang has been resolved.

No new tests. Existing tests cover this code.

  • NetworkProcess/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::getTokenPublicKey):
(WebKit::PrivateClickMeasurementManager::getSignedUnlinkableToken):

6:04 PM Changeset in webkit [276412] by Amir Mark Jr.
  • 3 edits in trunk/LayoutTests

Mass removal of prior test expectations that do not need to be set anymore.
https://bugs.webkit.org/show_bug.cgi?id=224901

Unreviewed test gardening.

Two more tests removed from test expectations.

  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
5:59 PM Changeset in webkit [276411] by Chris Dumez
  • 8 edits in trunk

Regression(r275887) open.spotify.com says Safari is not supported
https://bugs.webkit.org/show_bug.cgi?id=224905
<rdar://76982108>

Reviewed by Eric Carlson.

Source/WebKit:

Move legacyCDMFactory() getter from GPUProcessConnection to WebProcess so that
we can query it without having to launch the GPUProcess. This means we can
call legacyCDMFactory().registerFactory() inside of WebProcess::setUseGPUProcessForMedia()
(like before r275887) instead of doing it in the GPUProcessConnection constructor.

As a result, calls to WebKitMediaKeys.isTypeSupported() return accurate results
even if the GPUProcess is not launched yet. Calling WebKitMediaKeys.isTypeSupported() ends
up launching the GPU Process, as is expected.

  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::GPUProcessConnection):
(WebKit::GPUProcessConnection::legacyCDMFactory): Deleted.

  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::setCDM):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::setUseGPUProcessForMedia):
(WebKit::WebProcess::legacyCDMFactory):

  • WebProcess/WebProcess.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:

(TEST):

5:53 PM Changeset in webkit [276410] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Update test expectations after r276393.

  • platform/glib/TestExpectations:
5:50 PM Changeset in webkit [276409] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Crash under RegistrationDatabase::openSQLiteDatabase()
https://bugs.webkit.org/show_bug.cgi?id=224895
<rdar://64574013>

Reviewed by Geoffrey Garen.

This was a thread-safety issue. The static string in recordsTableSchema() was being used
from several threads without synchronization. The reason is that there can be several
RegistrationDatabase that co-exist (one per SWServer, meaning one per sessionID) and each
RegistrationDatabase was using its own WorkQueue.

To address the issue, all RegistrationDatabase objects now share the same WorkQueue.

  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::registrationDatabaseWorkQueue):
(WebCore::RegistrationDatabase::RegistrationDatabase):

5:13 PM Changeset in webkit [276408] by Alan Coon
  • 1 copy in tags/Safari-612.1.11.4

Tag Safari-612.1.11.4.

4:54 PM Changeset in webkit [276407] by Alan Coon
  • 8 edits in branches/safari-612.1.11-branch/Source

Versioning.

WebKit-7612.1.11.4

4:50 PM Changeset in webkit [276406] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[build.webkit.org] Disable unused parameters in force build dialog box
https://bugs.webkit.org/show_bug.cgi?id=224544

Unreviewed minor infrastructure fix.

  • CISupport/build-webkit-org/loadConfig.py:
4:39 PM Changeset in webkit [276405] by Alan Coon
  • 8 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r275805. rdar://problem/76963040

Crash under WebProcessProxy::shouldSendPendingMessage()
https://bugs.webkit.org/show_bug.cgi?id=224377
<rdar://75329251>

Reviewed by David Kilzer.

We are crashing with a null-dereference of pendingMessage.encoder inside WebProcessProxy::shouldSendPendingMessage().
However, pendingMessage.encoder is a UniqueRef<> and thus cannot be null. Also, we know that the WebProcessProxy
is alive because WebProcessProxy::didFinishLaunching() has a protector.

One thing that I believe could theoretically happen and would not be safe though is AuxiliaryProcessProxy::sendMessage()
being called on a non-main thread. Sending IPC off the main thread is safe in general and something we commonly do with
an IPC::Connection. To make this safe, IPC::Connection uses a Lock to protect its vector of messages. However, sending
IPC via an AuxiliaryProcessProxy is currently not thread safe as it relies on the process state (which gets updated on
the main thread) and access to the m_pendingMessages is not synchronized.

As a speculative fix, I have added logic in AuxiliaryProcessProxy::sendMessage() to dispatch to the main thread if
we're not already on it. I have also used WTF::DestructionThread::MainRunLoop to make sure all AuxiliaryProcessProxy
objects get destroyed on the main thread.

In a follow-up, I am planning to add a release assertion in AuxiliaryProcessProxy::sendMessage() to make sure we're
on a main thread. We'll then be able to drop the "dispatching the main thread" logic. For now though, I think we
should start with the "dispatch to main thread" logic, so that we have a patch that we can cherry-pick to a branch.

  • UIProcess/AuxiliaryProcessProxy.cpp: (WebKit::AuxiliaryProcessProxy::sendMessage): (WebKit::AuxiliaryProcessProxy::didFinishLaunching): (WebKit::AuxiliaryProcessProxy::replyToPendingMessages):
  • UIProcess/AuxiliaryProcessProxy.h:
  • UIProcess/GPU/GPUProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Plugins/PluginProcessProxy.h:
  • UIProcess/WebAuthentication/WebAuthnProcessProxy.cpp: (WebKit::WebAuthnProcessProxy::singleton):
  • UIProcess/WebProcessProxy.h:

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

4:39 PM Changeset in webkit [276404] by Alan Coon
  • 7 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r276010. rdar://problem/76962988

Integrator's note, used bit 27 instead of 26 to avoid conflict.

REGRESSION(r272900): Nullptr crash in ComposedTreeIterator::traverseNextInShadowTree() via ShadowRoot::hostChildElementDidChange
https://bugs.webkit.org/show_bug.cgi?id=222720

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-04-15
Reviewed by Ryosuke Niwa.

This patch reverts r274064 to apply a different fix. Instead of null-checking the nodes returned by
SlotAssignment::assignedNodesForSlot(), assigned nodes are removed from the list when they are about to be
removed from the parent. That ensures we never return nullptr nodes nor nodes with a nullptr parent from the
assigned nodes vector.

  • dom/ComposedTreeIterator.cpp: (WebCore::ComposedTreeIterator::traverseNextInShadowTree): (WebCore::ComposedTreeIterator::advanceInSlot):
  • dom/ContainerNode.cpp: (WebCore::ContainerNode::removeBetween):
  • dom/Node.h: (WebCore::Node::hasShadowRootContainingSlots const): (WebCore::Node::setHasShadowRootContainingSlots):
  • dom/ShadowRoot.h:
  • dom/SlotAssignment.cpp: (WebCore::SlotAssignment::addSlotElementByName): (WebCore::SlotAssignment::removeSlotElementByName): (WebCore::SlotAssignment::willRemoveAssignedNode):
  • dom/SlotAssignment.h: (WebCore::ShadowRoot::willRemoveAssignedNode):

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

4:39 PM Changeset in webkit [276403] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r276206. rdar://problem/76962916

Perform port blocking earlier in the load
https://bugs.webkit.org/show_bug.cgi?id=224525
<rdar://problem/75440591>

Unreviewed follow-up (suggested by David Kilzer)

  • loader/DocumentLoader.cpp: (WebCore::DocumentLoader::willSendRequest): Restore an m_frame nullptr check.,

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

4:39 PM Changeset in webkit [276402] by Alan Coon
  • 29 edits
    4 copies
    2 adds in branches/safari-611-branch

Cherry-pick r276193. rdar://problem/76962916

Perform port blocking earlier in the load
https://bugs.webkit.org/show_bug.cgi?id=224525
<rdar://problem/75440591>

Reviewed by Darin Adler.

Source/WebCore:

WebKit blocks loads to URLs with any of the prohibited ports defined in
the engine. This blocking happens late in the load process, allowing
connections to be made (and observed). Instead, we should stop the load
early, at the same time we perform other checks.

Test: http/tests/security/form-blocked-port.html

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::isSafeToLoadURL): Add a check for prohibited ports, and block (with relevant logging) if a load to a denied port is attempted.
  • loader/DocumentLoader.cpp: (WebCore::DocumentLoader::willSendRequest): Ditto.
  • loader/FrameLoader.cpp: (WebCore::FrameLoader::loadFrameRequest): Ditto. (WebCore::FrameLoader::reportBlockedLoadFailed): Ditto.
  • loader/FrameLoader.h:
  • loader/PingLoader.cpp: (WebCore::PingLoader::loadImage): Ditto.
  • loader/ResourceLoader.cpp: (WebCore::ResourceLoader::init): Ditto.
  • loader/SubframeLoader.cpp: (WebCore::FrameLoader::SubframeLoader::pluginIsLoadable): Ditto. (WebCore::FrameLoader::SubframeLoader::loadSubframe): Ditto.
  • loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::canRequest): Ditto. (WebCore::CachedResourceLoader::canRequestAfterRedirection const): Ditto.

Tools:

Update URLScheme test to use a non-prohibited port for the test. Tests of
failed fetches are already handled in WPT and other tests, so using a valid
port here should continue to be a valid test.

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: (-[FrameSchemeHandler webView:startURLSchemeTask:]): Use allowed port or the test instead of 123.

LayoutTests:

WebKit blocks loads to URLs with any of the prohibited ports defined in
the engine. This blocking happens late in the load process, allowing
connections to be made (and observed). Instead, we should stop the load
early, at the same time we perform other checks.

Note: The fact that we now block loads earlier means that we do not fire
'willSendRequestForFrame' for blocked ports, so WebKitTestRunner no longer
outputs a message to stdout. Those errors are reported in the JS console,
but since some test paths are specified to always output JS console messages
to stderrr (for example the WPT tests), we have to revise out test expectations
for a few cases.

  • fast/loader/cancel-load-during-port-block-timer.html: Revised expectation to reflect new console error message.
  • http/tests/cache/cancel-during-failure-crash-expected.txt: Ditto.
  • http/tests/preload/download_resources_from_invalid_headers-expected.txt: Update to reflect a preflight is not executed for a blocked port.
  • http/tests/preload/resources/nph-invalid_resources_from_header.pl: Update to reflect that we do not preload from restricted ports.
  • http/tests/security/blocked-on-redirect-expected.txt: Revised expectation to match revised error message.
  • http/tests/security/form-blocked-port.html: Added.
  • http/tests/security/form-blocked-port-expected.txt: Added.
  • http/tests/xmlhttprequest/cross-origin-redirect-responseURL-expected.txt: Revised expectation for revised error message.
  • http/tests/xmlhttprequest/redirect-cross-origin-2-expected.txt: Ditto.
  • http/tests/xmlhttprequest/redirect-cross-origin-expected.txt: Ditto.
  • http/tests/xmlhttprequest/simple-cross-origin-denied-events.html: Instead of using a port WebKit blocks (7), use one that is not blocked but is unlikely to be active (as originally intended). This retains the expected test behavior since we now block loads to restricted ports earlier in the load process.
  • http/tests/xmlhttprequest/simple-cross-origin-denied-events-post.html: Ditto.
  • http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt: Update test output to reflect that we are attempting to load from port 8 instead of port 7.
  • http/wpt/beacon/beacon-async-error-logging-expected.txt: Ditto.
  • http/wpt/beacon/beacon-async-error-logging.html: Update to reflect a preflight is not executed for a blocked port.
  • imported/w3c/web-platform-tests/fetch/api/request/request-bad-port.any-expected.txt: Since we block before executing the load, TestRunner no longer outputs an error message to stdout. Instead, they appear in stderr (since all 'wpt' tests are marked to dump console.log output to stderr).
  • imported/w3c/web-platform-tests/fetch/api/request/request-bad-port.any.worker-expected.txt: Ditto.
  • platform/mac-wk1/http/tests/xmlhttprequest/redirect-cross-origin-post-expected.txt: Revise to reflect change in console logging (the functional test results are identical).
  • platform/mac-wk1/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt: Ditto.
  • platform/win/http/tests/xmlhttprequest/redirect-cross-origin-post-expected.txt: Ditto.
  • platform/win/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt: Ditto.
  • platform/wk2/http/tests/security/blocked-on-redirect-expected.txt: Ditto.

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

4:39 PM Changeset in webkit [276401] by Alan Coon
  • 9 edits in branches/safari-611-branch

Cherry-pick r275487. rdar://problem/76962948

REGRESSION(r267763) NetworkProcess never terminates
https://bugs.webkit.org/show_bug.cgi?id=224191
<rdar://problem/76124590>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-05
Reviewed by Chris Dumez.

Source/WebKit:

Before r267763, when a WebProcessPool was deallocated, the NetworkProcess it owned was terminated.
Since then, once you start using a NetworkProcess, it will be kept until your app closes or it crashes.
To reclaim these resources in a way similar to how we did before, we now terminate the network process in two situations:

  1. If all WebsiteDataStores associated with it are deallocated. This happens if you have never used the default WKWebsiteDataStore.
  2. If all WebProcessPools are deallocated. This can still happen if you do use the default WKWebsiteDataStore, which is never deallocated.

Covered by API tests.

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm: (+[WKWebsiteDataStore _defaultNetworkProcessExists]):
  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::defaultNetworkProcessExists): (WebKit::NetworkProcessProxy::removeSession):
  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::~WebProcessPool):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm: (TEST):

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

4:39 PM Changeset in webkit [276400] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r274504. rdar://problem/76962959

The WebContent process crashes when launching Safari
https://bugs.webkit.org/show_bug.cgi?id=223264
<rdar://75482851>

Reviewed by Brent Fulgham.

The WebContent process crashes when launching Safari on older OSes, because of unavailable sandbox features.

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

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

4:39 PM Changeset in webkit [276399] by Alan Coon
  • 13 edits in branches/safari-611-branch/Source/bmalloc

Cherry-pick r276266. rdar://problem/76962930

[bmalloc] Enable Adaptive Scavenger for Mac
https://bugs.webkit.org/show_bug.cgi?id=224706

Reviewed by Filip Pizlo.

Enabled the adaptive scavenger code paths for macOS.
The original reason that the partial scavenging paths were kept for macOS was due
to regression on power tests. To alleviate the power regression, this patch splits
out the adaptive scavenger parameters with macOS specific values.

The parameters are:

The multiplier used to compute the next scavenging wait time based on the

time needed for the prior scavenging.

Minimum wait time between scavenging.
Maximum wait time between scavenging.

The values in the current code are:

Wait time Multiplier: 150
Minimum wait time: 100ms
Maximum wait time: 10,000ms (10 seconds)

The proposed values for macOS, determined using empirical testing.

Wait time Multiplier: 300
Minimum wait time: 750ms
Maximum wait time: 20,000ms (20 seconds)

When tested on various mac variants, this change:

  • Provides a 3-5% reduction in memory use on RAMification.
  • It is neutral on JetStream2.
  • It is neutral to a slight regression on Speedometer2, but there is some variability in those results.

Since macOS was the only platform still using the partial scavenging code path,
the partial scavenging code paths were deleted.

  • bmalloc/BPlatform.h:
  • bmalloc/Heap.cpp: (bmalloc::Heap::scavenge): (bmalloc::Heap::allocateSmallChunk): (bmalloc::Heap::allocateSmallPage): (bmalloc::Heap::allocateLarge): (bmalloc::Heap::scavengeToHighWatermark): Deleted.
  • bmalloc/Heap.h:
  • bmalloc/IsoDirectory.h:
  • bmalloc/IsoDirectoryInlines.h: (bmalloc::passedNumPages>::takeFirstEligible): (bmalloc::passedNumPages>::scavenge): (bmalloc::passedNumPages>::scavengeToHighWatermark): Deleted.
  • bmalloc/IsoHeapImpl.h:
  • bmalloc/IsoHeapImplInlines.h: (bmalloc::IsoHeapImpl<Config>::scavengeToHighWatermark): Deleted.
  • bmalloc/LargeMap.cpp: (bmalloc::LargeMap::add):
  • bmalloc/LargeRange.h: (bmalloc::LargeRange::LargeRange): (bmalloc::LargeRange::setUsedSinceLastScavenge): (bmalloc::merge): (): Deleted.
  • bmalloc/Scavenger.cpp: (bmalloc::Scavenger::Scavenger): (bmalloc::Scavenger::scavenge): (bmalloc::Scavenger::threadRunLoop): (bmalloc::Scavenger::timeSinceLastPartialScavenge): Deleted. (bmalloc::Scavenger::partialScavenge): Deleted.
  • bmalloc/Scavenger.h:
  • bmalloc/SmallPage.h: (bmalloc::SmallPage::setUsedSinceLastScavenge):

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

4:39 PM Changeset in webkit [276398] by Alan Coon
  • 3 edits
    2 adds in branches/safari-611-branch

Cherry-pick r274064. rdar://problem/76962988

REGRESSION(r272900): Nullptr crash in ComposedTreeIterator::traverseNextInShadowTree() via ShadowRoot::hostChildElementDidChange
https://bugs.webkit.org/show_bug.cgi?id=222720

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-03-08
Reviewed by Ryosuke Niwa.

Source/WebCore:

The list of assigned nodes contains weak pointers, we should check the node hasn't been destroyed.

Test: fast/html/details-set-inner-text-crash.html

  • dom/ComposedTreeIterator.cpp: (WebCore::ComposedTreeIterator::traverseNextInShadowTree):

LayoutTests:

  • fast/html/details-set-inner-text-crash-expected.txt: Added.
  • fast/html/details-set-inner-text-crash.html: Added.

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

4:06 PM Changeset in webkit [276397] by Wenson Hsieh
  • 7 edits in trunk/Source

Introduce helper methods to map FloatQuads to and from content and root view coordinates
https://bugs.webkit.org/show_bug.cgi?id=224883

Reviewed by Tim Horton.

Source/WebCore:

Add new helper methods to transform FloatQuads from content coordinates to root view coordinates, and vice
versa; use these methods in several places throughout WebKit to avoid code duplication.

No change in behavior.

  • inspector/agents/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::didPaint):
(WebCore::InspectorTimelineAgent::localToPageQuad): Deleted.

  • inspector/agents/InspectorTimelineAgent.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::rootViewToContents const):
(WebCore::ScrollView::contentsToRootView const):

  • platform/ScrollView.h:

Source/WebKit:

Use the new helper methods.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::convertContentToRootView):
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary):

Note that we previously rounded absolute quads to the nearest integer when mapping through root view
coordinates. From <https://bugs.webkit.org/show_bug.cgi?id=128277#c2>, this seemed unintentional to begin with,
and we should be able to use the FloatPoint conversion methods instead.

4:01 PM Changeset in webkit [276396] by Amir Mark Jr.
  • 4 edits in trunk/LayoutTests

Mass removal of prior test expectations that do not need to be set anymore.
https://bugs.webkit.org/show_bug.cgi?id=224901

Unreviewed test gardening.

  • platform/ios-device/TestExpectations:
  • platform/ios-wk1/TestExpectations:
  • platform/mac-wk1/TestExpectations:
3:59 PM Changeset in webkit [276395] by Aditya Keerthi
  • 4 edits in trunk/Source

[iOS] Fix internal builds after r276325
https://bugs.webkit.org/show_bug.cgi?id=224896

Reviewed by Tim Horton.

Source/WebKit:

  • UIProcess/ios/forms/WKDateTimeInputControl.mm:

(-[WKDateTimePickerViewController datePickerInsets]):
(-[WKDateTimePicker _contextMenuInteraction:styleForMenuWithConfiguration:]):

Source/WTF:

  • wtf/PlatformHave.h:
3:48 PM Changeset in webkit [276394] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Crash in StyledMarkupAccumulator::traverseNodesForSerialization()
https://bugs.webkit.org/show_bug.cgi?id=224836

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-04-21
Reviewed by Ryosuke Niwa.

Source/WebCore:

In traverseNodesForSerialization(), make sure we check if the current node
is a descendant of the pastEnd node even if we not entering the current node.

Test: editing/execCommand/selectAll-copy-crash.html

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):

LayoutTests:

Add a test for the crash fixed here. Thanks to Tuomas Karkkainen for its first version.

  • editing/execCommand/selectAll-copy-crash-expected.txt: Added.
  • editing/execCommand/selectAll-copy-crash.html: Added.
3:07 PM Changeset in webkit [276393] by Robert Jenner
  • 2 edits in trunk/LayoutTests

Mass removing prior test expectations that don't need to be set anymore
https://bugs.webkit.org/show_bug.cgi?id=224898

Unreviewed test gardening.

Missed one test to removed expectations for.

3:00 PM Changeset in webkit [276392] by Aditya Keerthi
  • 2 edits in trunk/Source/WebKit

[iOS][FCR] Update font for group headers in the <select multiple> picker
https://bugs.webkit.org/show_bug.cgi?id=224823
<rdar://problem/76785841>

Reviewed by Wenson Hsieh.

  • UIProcess/ios/forms/WKFormSelectPicker.mm:

(-[WKSelectPickerTableViewController tableView:heightForHeaderInSection:]):

The new font's size can varying depending on the user's Dynamic Type
setting. Consequently, the height of the header must now be computed
dynamically.

(-[WKSelectPickerTableViewController tableView:viewForHeaderInSection:]):
(-[WKSelectPickerTableViewController groupHeaderFont]):

Use a font with text style UIFontTextStyleTitle3 and a semibold weight,
matching other system grouped headers. The font is not saved as an
instance variable so that an up-to-date lineHeight can be obtained in
"tableView:heightForHeightInSection:".

2:52 PM Changeset in webkit [276391] by Robert Jenner
  • 4 edits in trunk/LayoutTests

Mass removing prior test expectations that don't need to be set anymore
https://bugs.webkit.org/show_bug.cgi?id=224898

Unreviewed test gardening.

Remove test expectations that no longer needed to be set.

  • TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
2:13 PM Changeset in webkit [276390] by don.olmstead@sony.com
  • 6 edits in trunk

[Python 3] Update gni-to-cmake.py
https://bugs.webkit.org/show_bug.cgi?id=224880

Reviewed by Kenneth Russell.

Source/ThirdParty/ANGLE:

Update gni-to-cmake.py to run on Python 3. Added ArgumentParser support to be able to run
the script on Windows since the script assumed it would be called through a UNIX style
shell.

Ran the .gni files through the converter to verify output. It appears that the
Compiler.cmake file wasn't generated in the last update to ANGLE so it has many changes.

  • Compiler.cmake:
  • D3D.cmake:
  • gni-to-cmake.py:

Tools:

Update script to use the --prepend argument.

  • Scripts/update-angle:
1:53 PM Changeset in webkit [276389] by Chris Dumez
  • 7 edits in trunk

GPUProcess launches unnecessarily when loading the amazon front page
https://bugs.webkit.org/show_bug.cgi?id=224843

Reviewed by Eric Carlson.

Source/WebCore:

Amazon.com was going media-related feature detection like so:
`
!!h.createElement("audio").canPlayType
!!h.createElement("video").canPlayType
`

Constructing an HTMLAudioElement / HTMLVideoElement would initialize a MediaSession
object, which would launch the GPUProcess. Running such code should really not require
launching the GPUProcess though.

To address this, I made the MediaSession initialization lazy. Instead of doing it when
constructing an HTMLMediaElement, we now do it as soon as we actually need a MediaSession
in the mediaSession() getter. This will at the very least happen in prepareForLoad() after
setting the 'src' attribute. However, in cases where the HTMLMediaElement is not used for
anyway meaningful (e.g no 'src' attribute is ever set), then we avoid launching the
GPUProcess.

I have verified on an iPad that visiting the amazon.com front page and searching for
something no longer launches the GPUProcess after this change. This changes also seems to
be a ~3.6% PLUM progression on iPhone and potentially higher on iPad.

  • html/HTMLAudioElement.cpp:

(WebCore::HTMLAudioElement::create):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::initializeMediaSession):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::registerWithDocument):
(WebCore::HTMLMediaElement::unregisterWithDocument):
(WebCore::HTMLMediaElement::prepareForDocumentSuspension):
(WebCore::HTMLMediaElement::resumeFromDocumentSuspension):
(WebCore::HTMLMediaElement::parseAttribute):
(WebCore::HTMLMediaElement::didFinishInsertingNode):
(WebCore::HTMLMediaElement::prepareForLoad):
(WebCore::HTMLMediaElement::selectMediaResource):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::mediaLoadingFailed):
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::seekWithTolerance):
(WebCore::HTMLMediaElement::play):
(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::pause):
(WebCore::HTMLMediaElement::pauseInternal):
(WebCore::HTMLMediaElement::setVolume):
(WebCore::HTMLMediaElement::setMuted):
(WebCore::HTMLMediaElement::beginScrubbing):
(WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack):
(WebCore::HTMLMediaElement::sourceWasAdded):
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
(WebCore::HTMLMediaElement::addBehaviorRestrictionsOnEndIfNecessary):
(WebCore::HTMLMediaElement::seekToPlaybackPositionEndedTimerFired):
(WebCore::HTMLMediaElement::mediaEngineWasUpdated):
(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
(WebCore::HTMLMediaElement::pausedForUserInteraction const):
(WebCore::HTMLMediaElement::updatePlayState):
(WebCore::HTMLMediaElement::checkForAudioAndVideo):
(WebCore::HTMLMediaElement::clearMediaPlayer):
(WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
(WebCore::HTMLMediaElement::stop):
(WebCore::HTMLMediaElement::suspend):
(WebCore::HTMLMediaElement::resume):
(WebCore::HTMLMediaElement::visibilityStateChanged):
(WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker):
(WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange):
(WebCore::HTMLMediaElement::setIsPlayingToWirelessTarget):
(WebCore::HTMLMediaElement::addEventListener):
(WebCore::HTMLMediaElement::removeEventListener):
(WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent):
(WebCore::HTMLMediaElement::remoteHasAvailabilityCallbacksChanged):
(WebCore::HTMLMediaElement::exitFullscreen):
(WebCore::HTMLMediaElement::shouldForceControlsDisplay const):
(WebCore::HTMLMediaElement::configureMediaControls):
(WebCore::HTMLMediaElement::createMediaPlayer):
(WebCore::HTMLMediaElement::mediaPlayerIsFullscreenPermitted const):
(WebCore::HTMLMediaElement::removeBehaviorRestrictionsAfterFirstUserGesture):
(WebCore::HTMLMediaElement::updateRateChangeRestrictions):
(WebCore::HTMLMediaElement::maximumSourceBufferSize const):
(WebCore::HTMLMediaElement::updateMediaState):
(WebCore::HTMLMediaElement::mediaState const):
(WebCore::HTMLMediaElement::purgeBufferedDataIfPossible):
(WebCore::HTMLMediaElement::allowsMediaDocumentInlinePlaybackChanged):
(WebCore::HTMLMediaElement::isVisibleInViewportChanged):
(WebCore::HTMLMediaElement::updateShouldAutoplay):
(WebCore::HTMLMediaElement::updateShouldPlay):
(WebCore::HTMLMediaElement::playbackControlsManagerBehaviorRestrictionsTimerFired):
(WebCore::HTMLMediaElement::setInActiveDocument):
(WebCore::HTMLMediaElement::mediaSession const):

  • html/HTMLMediaElement.h:
  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::create):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:

(TEST):

1:11 PM Changeset in webkit [276388] by Wenson Hsieh
  • 16 edits
    2 adds in trunk

[iOS] Text selection in image overlays should not be limited to rectilinear quads
https://bugs.webkit.org/show_bug.cgi?id=224837
<rdar://76829981>

Reviewed by Tim Horton.

Source/WebCore:

Refactor the iOS-specific WebCore::SelectionGeometry such that it is backed by a FloatQuad instead of an
IntRect, and additionally support a flag to indicate that the selection geometry should render as individual
quads, instead of allowing adjacent rects to be coalesced based on each rects' enclosing bounds.

See comments below for more information.

Test: fast/images/image-extraction/ios/selection-rects-in-image-overlay.html

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::selectionRenderingBehavior):

  • html/HTMLElement.h:
  • platform/ios/SelectionGeometry.cpp:

(WebCore::SelectionGeometry::SelectionGeometry):

Change these constructors to take FloatQuad instead of an enclosing bounding box of a quad. Refer to call
sites below.

(WebCore::SelectionGeometry::setLogicalLeft):
(WebCore::SelectionGeometry::setLogicalWidth):
(WebCore::SelectionGeometry::setLogicalTop):
(WebCore::SelectionGeometry::setLogicalHeight):

Adjust these four setters so that they automatically inflate the selection quad to the quad's enclosing bounds
before changing any of the dimensions of the rect. Note that in practice, these methods are only used by code
that attempts to coalesce adjacent selection geometries, in which case we shouldn't be rendering non-rectilinear
quads anyways.

(WebCore::SelectionGeometry::rect const):

This method now computes the enclosing bounding rect of the selection quad. Since this can be called many times
for a single selection geometry, we cache the enclosing bounds in m_cachedEnclosingRect to avoid repeated
bounding box computation.

(WebCore::SelectionGeometry::setQuad):

Set the selection quad, and invalidate the enclosing bounding rect.

(WebCore::SelectionGeometry::setRect):

Since we're already setting the quad from an IntRect, we can go ahead and set the cached enclosing rect at the
same time to avoid computing it again in the future.

(WebCore::operator<<):

  • platform/ios/SelectionGeometry.h:

Add a few new members to SelectionGeometry. Instead of maintaining an IntRect, store a FloatRect in
m_quad. Additionally, add a new enum describing how the SelectionGeometry should behave. This enum only has
two values: CoalesceBoundingRects, indicating that adjacent selection geometries should be coalesced based on
the enclosing bounding rects of their quads, and UseIndividualQuads, indicating that each quad should be
rendered individually.

(WebCore::SelectionGeometry::quad const):
(WebCore::SelectionGeometry::logicalLeft const):
(WebCore::SelectionGeometry::logicalWidth const):
(WebCore::SelectionGeometry::logicalTop const):
(WebCore::SelectionGeometry::logicalHeight const):
(WebCore::SelectionGeometry::behavior const):
(WebCore::SelectionGeometry::setBehavior):
(WebCore::SelectionGeometry::rect const): Deleted.
(WebCore::SelectionGeometry::setRect): Deleted.

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::collectSelectionGeometries):

  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::collectSelectionGeometries):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::collectSelectionGeometries):
(WebCore::adjustLineHeightOfSelectionGeometries):

When collecting selection geometry from renderers, avoid coalescing selection geometry when the
SelectionGeometry has SelectionRenderingBehavior::UseIndividualQuads.

(WebCore::coalesceSelectionGeometries):
(WebCore::RenderObject::collectSelectionGeometriesInternal):

  • rendering/RenderText.cpp:

(WebCore::RenderText::collectSelectionGeometries):

Source/WebKit:

See WebCore ChangeLog for more details.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<SelectionGeometry>::encode):
(IPC::ArgumentCoder<SelectionGeometry>::decode):

Encode the SelectionGeometry by serializing a FloatQuad instead of an enclosing rect.

  • UIProcess/ios/WKContentViewInteraction.mm:

(WebKit::operator==):
(-[WKContentView selectedTextRange]):
(-[WKContentView markedTextRange]):

  • UIProcess/ios/WKTextSelectionRect.h:
  • UIProcess/ios/WKTextSelectionRect.mm:

(-[WKTextSelectionRectCustomHandleInfo initWithFloatQuad:]):
(-[WKTextSelectionRectCustomHandleInfo bottomLeft]):
(-[WKTextSelectionRectCustomHandleInfo topLeft]):
(-[WKTextSelectionRectCustomHandleInfo bottomRight]):
(-[WKTextSelectionRectCustomHandleInfo topRight]):
(-[WKTextSelectionRect initWithCGRect:]):
(-[WKTextSelectionRect initWithSelectionGeometry:scaleFactor:]):
(-[WKTextSelectionRect _path]):
(-[WKTextSelectionRect _customHandleInfo]):

Implement SPI methods on UITextSelectionRect to render text selection UI using quads instead of rects.

(-[WKTextSelectionRect initWithSelectionGeometry:]): Deleted.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::convertContentToRootView):

LayoutTests:

Add a new layout test to exercise the new selection rendering behavior.

  • fast/images/image-extraction/ios/selection-rects-in-image-overlay-expected.txt: Added.
  • fast/images/image-extraction/ios/selection-rects-in-image-overlay.html: Added.
1:06 PM Changeset in webkit [276387] by Sam Sneddon
  • 2 edits in trunk/Tools

Always pass --no-abbrev-commit to git-log/show
https://bugs.webkit.org/show_bug.cgi?id=224879

Reviewed by Jonathan Bedard.

Currently some of the SCM tests fail with git's log.abbrevCommit; we should
avoid any risk of the tests failing or functionality being broken by always
asking for the unabbreviated commit.

  • Scripts/webkitpy/common/checkout/scm/git.py:

(Git.local_commits):
(Git.exists):
(Git._changes_files_for_commit):
(Git.revisions_changing_file):
(Git._most_recent_log_matching):
(Git._most_recent_log_for_revision):
(Git.git_commit_from_svn_revision):
(Git.contents_at_revision):
(Git.show_head):
(Git.committer_email_for_revision):

12:45 PM Changeset in webkit [276386] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

CSSComputedStyleDeclaration.cpp should use C++ style comments
https://bugs.webkit.org/show_bug.cgi?id=224875

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-04-21
Reviewed by Darin Adler.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
Use instead of /* */ for comments, as this is suggested WebKit
coding style.

12:44 PM Changeset in webkit [276385] by Aditya Keerthi
  • 2 edits in trunk/Source/WebCore

[iOS][FCR] Adjust border radius for large buttons and <select>
https://bugs.webkit.org/show_bug.cgi?id=224825
<rdar://problem/76912116>

Reviewed by Wenson Hsieh.

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::adjustRoundBorderRadius):

Larger UIKit buttons do not have a pill-shaped appearance. Match their
appearance for buttons and <select> elements that are natively styled
(ones that do not set "-webkit-appearance: none").

12:42 PM Changeset in webkit [276384] by Adrian Perez de Castro
  • 41 edits in trunk/Source

Non-unified build fixes, mid April 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=222652
<rdar://problem/75262285>

Unreviewed non-unified build fixes.

Source/JavaScriptCore:

  • bytecode/JumpTable.cpp: Remove inclusion of wtf/text/StringHash.h
  • bytecode/JumpTable.h: Add missing inclusions of wtf/FixedVector.h and

wtf/text/StringHash.h

  • bytecode/SpeculatedType.cpp: Add missing includes JSCJSValueInlines.h and

JSCellInlines.h

  • bytecompiler/BytecodeGenerator.cpp: Move template method to header, remove now uneeded

LinkTimeConstant.h include.

  • bytecompiler/BytecodeGenerator.h: Add include for LinkTimeConstant.h

(JSC::BytecodeGenerator::emitDirectSetPrototypeOf): Template method moved here from
BytecodeGenerator.cpp to avoid compile errors due to usage of missing template body
definition.

  • dfg/DFGDesiredGlobalProperties.cpp: Add missing DFGDesiredWatchpoints.h include.
  • ftl/FTLAbstractHeap.cpp: Add missing JSCJSValueInlines.h include.
  • runtime/JSCustomGetterFunction.cpp: Add missing IdentifierInlines.h include.
  • runtime/JSCustomSetterFunction.cpp: Ditto.
  • runtime/SetPrototype.cpp: Add missing HashMapImplInlines.h include.
  • runtime/VMTraps.cpp: Add missing VMEntryScope.h include.
  • runtime/WeakSetConstructor.cpp: Add missing WeakMapImplInlines.h include.
  • runtime/WeakSetPrototype.cpp: Add missing includes for HashMapImplInlines.h and

WeakMapImplInlines.h

  • wasm/js/JSWebAssemblyTable.cpp: Add missing ObjectConstructor.h include.

Source/WebCore:

No new tests needed.

  • bindings/js/JSWebXRRigidTransformCustom.cpp: Add missing JSDOMConvertBufferSource.h

include.

  • bindings/js/JSWebXRSpaceCustom.cpp: Add missing JSWebXRReferenceSpace.h include.
  • bindings/js/JSWebXRViewCustom.cpp: Add missing JSDOMConvertBufferSource.h include.
  • bindings/js/WorkerModuleScriptLoader.cpp: Add missing ServiceWorkerGlobalScope.h

include.

  • css/CSSFontFaceSrcValue.cpp: Add missing CachedFontLoadRequest.h include.
  • css/parser/CSSPropertyParserWorkerSafe.cpp: Add missing includes for

CSSFontFaceSrcValue.h, CSSFontFeatureValue.h, CSSUnicodeRangeValue.h, Document.h, and
StyleSheetContents.h; remove (now unneeded) CSSPropertyParserHelpers.h include.
(WebCore::CSSPropertyParserWorkerSafe::parseFont): Sprinkle usage of functions with
missing WebCore:: namespace prefixes.
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFaceSrcLocal): Ditto.
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontStyleRange): Ditto.

  • css/parser/CSSPropertyParserWorkerSafe.h: Add missing CSSPropertyParserHelpers.h

include.

  • dom/DocumentFontLoader.cpp: Add missing includes CSSFontSelector.h,

CachedResourceLoader.h, Frame.h, and FrameLoader.h

  • editing/AppendNodeCommand.cpp: Add missing CompositeEditCommand.h include.
  • editing/DeleteFromTextNodeCommand.cpp: Ditto.
  • editing/InsertIntoTextNodeCommand.cpp: Ditto.
  • editing/InsertNodeBeforeCommand.cpp: Ditto.
  • editing/MergeIdenticalElementsCommand.h: Ditto, and remove unneeded EditCommand.h

include.

  • editing/RemoveNodeCommand.cpp: Add missing CompositeEditCommand.h include.
  • editing/SetNodeAttributeCommand.cpp: Ditto.
  • editing/SetSelectionCommand.cpp: Ditto.
  • editing/SplitElementCommand.cpp: Ditto.
  • editing/SplitTextNodeCommand.cpp: Ditto.
  • loader/cache/CachedFontLoadRequest.h: Add missing FontSelectionAlgorithm.h include.
  • platform/graphics/FontTaggedSettings.h: Add missing wtf/Hasher.h include.
  • platform/text/BidiContext.cpp: Add missing <mutex> and wtf/NeverDestroyed.h includes.
  • workers/WorkerGlobalScopeProxy.h: Forward-declare WebCore::ScriptBuffer.

Source/WebKit:

  • WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp: Add missing

NetworkProcessConnection.h include.
(WebKit::RTCDataChannelRemoteManager::connectToRemoteSource): Sprinkle missing WebCore::
namespace prefixes.
(WebKit::RTCDataChannelRemoteManager::postTaskToHandler): Ditto.
(WebKit::RTCDataChannelRemoteManager::sourceFromIdentifier): Ditto.

  • WebProcess/WebPage/WebURLSchemeTaskProxy.cpp: Add missing WebProcess.h include.
12:41 PM Changeset in webkit [276383] by Aditya Keerthi
  • 2 edits in trunk/Source/WebCore

[iOS][FCR] Update datalist dropdown indicator
https://bugs.webkit.org/show_bug.cgi?id=224844
<rdar://problem/76785950>

Reviewed by Wenson Hsieh.

  • css/html.css:

(input::-webkit-list-button):

Updated to use a "small" sized SF symbol.

12:08 PM Changeset in webkit [276382] by commit-queue@webkit.org
  • 10 edits in trunk

Enable CSS Scroll Snap by default
https://bugs.webkit.org/show_bug.cgi?id=224867

Patch by Martin Robinson <mrobinson@igalia.com> on 2021-04-21
Reviewed by Don Olmstead.

.:

  • Source/cmake/OptionsFTW.cmake: Remove redundant line enabling scroll snap.
  • Source/cmake/OptionsGTK.cmake: Ditto.
  • Source/cmake/OptionsMac.cmake: Ditto.
  • Source/cmake/OptionsWPE.cmake: Ditto.
  • Source/cmake/OptionsWin.cmake: Explicitly disable scroll snap for AppleWin port

until it can be approved by maintainers.

  • Source/cmake/WebKitFeatures.cmake: Enable scroll snap by default.

Source/WTF:

  • wtf/PlatformEnable.h: Move the preprocessor enabling of scroll snap here.
  • wtf/PlatformEnableCocoa.h: Move it from here.
12:07 PM Changeset in webkit [276381] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Fix build break after r276363
https://bugs.webkit.org/show_bug.cgi?id=224881

Unreviewed, build fix.

Fix build break after r276363
WebGL GPUP crashes when preparing for display due to off-thread WeakPtr access (IOSURFACE_SET_OWNERSHIP_IDENTITY)

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-21

  • GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:
12:07 PM Changeset in webkit [276380] by commit-queue@webkit.org
  • 17 edits
    2 adds in trunk

[css-counter-styles] Parse @counter-style descriptors
https://bugs.webkit.org/show_bug.cgi?id=224718

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-04-21
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Parsing for all @counter-style descriptors is implemented with this
patch, so mark more tests passing.

You'll notice that some @counter-style descriptors implemented in this
patch did not gain any passing tests (e.g. pad, negative). In all
of these cases, the expected results contain a <string> value, and we
fail only because we incorrectly don't serialize these <string> values
with quotes. I have manually confirmed in all cases that these values
are properly parsed, so it's just the serialization that's incorrect.

These <string> values serialize without quotes because WebKit's representation
of custom identifiers is not a separate type, but instead overloaded onto the
CSS_STRING type. This means that during serialization time, WebKit must guess
whether it is actually serializing a string (and include quotes if so), or if
it's serializing a custom ident (leaving off quotes if so).

Relevant code snippet:

https://github.com/WebKit/WebKit/blob/36caeec07975bd5f47db8ac6b749c2787230a461/Source/WebCore/css/CSSMarkup.cpp#L153#L161

Relevant changelog snippet from David Hyatt, 2016-12-07:

We also overload CSS_STRING primitive value type and have it act as both a string
and a custom identifier. This is lame, since the parser should have made two different
types of objects instead, but since our parser doesn't do that yet, I added a serializeAsStringOrCustomIdent
that preserves our old behavior of "quote the string only if needed." In this case what
that really meant was "Try to guess that we were originally a custom ident and leave off
quotes if so." This function will go away once we properly create CSSStringValues and
CSSCustomIdentValues instead of turning the latter into strings.

  • web-platform-tests/css/css-counter-styles/counter-style-fallback-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-prefix-suffix-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-range-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-speak-as-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-system-syntax-expected.txt:

Source/WebCore:

Implement parsing and CSSCounterStyleRule IDL interface for @counter-style descriptors.
See spec for full details on all descriptors:

https://drafts.csswg.org/css-counter-styles-3/#the-counter-style-rule

Test: webexposed/counter-style-image-symbols-not-exposed.html and WPTs

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
Return nullptr for new @counter-style descriptor properties.

  • css/CSSCounterStyleRule.cpp:

(WebCore::toCounterStyleSystemEnum):
(WebCore::symbolsValidForSystem):
(WebCore::StyleRuleCounterStyle::newValueInvalidOrEqual const):
(WebCore::CSSCounterStyleRule::cssText const):
(WebCore::CSSCounterStyleRule::setName):
(WebCore::CSSCounterStyleRule::setterInternal):
(WebCore::CSSCounterStyleRule::setSystem):
(WebCore::CSSCounterStyleRule::setNegative):
(WebCore::CSSCounterStyleRule::setPrefix):
(WebCore::CSSCounterStyleRule::setSuffix):
(WebCore::CSSCounterStyleRule::setRange):
(WebCore::CSSCounterStyleRule::setPad):
(WebCore::CSSCounterStyleRule::setFallback):
(WebCore::CSSCounterStyleRule::setSymbols):
(WebCore::CSSCounterStyleRule::setAdditiveSymbols):
(WebCore::CSSCounterStyleRule::setSpeakAs):
Implement setters and tangential functionality required by setters.

  • css/CSSCounterStyleRule.h:

Replace FIXME with actual descriptor getter and setter
implementations.

  • css/CSSProperties.json:

Add @counter-style descriptor properties.

  • css/CSSValueKeywords.in:

Add new values required for system and speak-as
@counter-style descriptor properties.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeCounterStyleSystem):
(WebCore::consumeCounterStyleSymbol):
(WebCore::consumeCounterStyleNegative):
(WebCore::consumeCounterStyleRangeBound):
(WebCore::consumeCounterStyleRange):
(WebCore::consumeCounterStylePad):
(WebCore::consumeCounterStyleSymbols):
(WebCore::consumeCounterStyleAdditiveSymbols):
(WebCore::consumeCounterStyleSpeakAs):
(WebCore::CSSPropertyParser::parseCounterStyleDescriptor):
Parse @counter-style descriptors.

Tools:

  • DumpRenderTree/TestOptions.cpp:

(WTR::TestOptions::defaults):
Fix typo (missing 's'). CSSCounterStyleAtRulesEnabled, not
CSSCounterStyleAtRuleEnabled.

LayoutTests:

Add test ensuring <image> @counter-style symbol values cannot be
parsed when the counterStyleAtRuleImageSymbolsEnabled feature flag
is disabled.

---

This test is skipped on Windows because I haven't been able to get the
required feature flags (CSSCounterStyleAtRulesEnabled and
CSSCounterStyleAtRuleImageSymbolsEnabled) to work properly for that
port.

The code hidden behind these flags is all in the CSS parser, which is not
unique to Windows, so I think we can be confident that if the test passes
on all other platforms, that the behavior is correct on Windows too.

One attempt at implementing the necessary Windows-specific flag functionality is here:

https://bugs.webkit.org/attachment.cgi?id=426371&action=edit

Which failed to compile[1] with this error:

C:\cygwin\home\buildbot\worker\Windows-EWS\build\Tools\DumpRenderTree\win\DumpRenderTree.cpp(834,51): error C2039: 'setCSSCounterStyleAtRulesEnabled': is not a member of 'IWebPreferencesPrivate7' [C:\cygwin\home\buildbot\worker\Windows-EWS\build\WebKitBuild\Release\Tools\DumpRenderTree\DumpRenderTreeLib.vcxproj]
C:\cygwin\home\buildbot\worker\Windows-EWS\build\Tools\DumpRenderTree\win\DumpRenderTree.cpp(835,62): error C2039: 'setCSSCounterStyleAtRuleImageSymbolsEnabled': is not a member of 'IWebPreferencesPrivate7' [C:\cygwin\home\buildbot\worker\Windows-EWS\build\WebKitBuild\Release\Tools\DumpRenderTree\DumpRenderTreeLib.vcxproj]

Those methods are present in IWebPreferencesPrivate7.idl, and implemented similarly to other
flags in other places (e.g. win/WebPreferences.{h, cpp}, win/WebPreferenceKeysPrivate.h).
I can't reproduce this compilation error on my Windows machine.

I then tried removing the lines that caused the above compilation failure.
Those setters are called in DumpRenderTree::enableExperimentalFeatures, so in
lieu of enabling these flags there I could enable the flag I need via test header.

That patch is: https://bugs.webkit.org/attachment.cgi?id=426509&action=edit

This results in successful compilation, but causes lots (all?) of the
layout tests to fail[2] with a stacktrace that looks like:

00 00000065738fdf00 00007ffc3e9e3113 WebKit!WebPreferences::speechRecognitionEnabled(int * enabled = 0x00007ffc`3eae0f50)+0x29 [C:\cygwin\home\buildbot\worker\Windows-EWS\build\Source\WebKitLegacy\win\WebPreferences.cpp @ 2617]
01 00000065738fdf30 00007ffc3e9e3cc0 DumpRenderTreeLib!resetWebPreferencesToConsistentValues(struct IWebPreferences * preferences = 0x00000205`e2f204b0)+0x63 [C:\cygwin\home\buildbot\worker\Windows-EWS\build\Tools\DumpRenderTree\win\DumpRenderTree.cpp @ 847]
02 00000065738fdfa0 00007ffc3e9e4171 DumpRenderTreeLib!resetWebViewToConsistentStateBeforeTesting(class WTR::TestOptions * options = 0x00000065`738fea60)+0x2e0 [C:\cygwin\home\buildbot\worker\Windows-EWS\build\Tools\DumpRenderTree\win\DumpRenderTree.cpp @ 1054]
03 00000065738fe050 00007ffc3e9e67d3 DumpRenderTreeLib!runTest(class std::basic_string<char,std::char_traits<char>,std::allocator<char> > * inputLine = <Value unavailable error>)+0x2f1 [C:\cygwin\home\buildbot\worker\Windows-EWS\build\Tools\DumpRenderTree\win\DumpRenderTree.cpp @ 1239]
04 00000065738feca0 00007ff789952f30 DumpRenderTreeLib!main(int argc = <Value unavailable error>, char argv = <Value unavailable error>)+0x5d3 [C:\cygwin\home\buildbot\worker\Windows-EWS\build\Tools\DumpRenderTree\win\DumpRenderTree.cpp @ 1676]
05 00000065738ff5b0 00007ff789953884 DumpRenderTree!main(int argc = 0n2, char
argv = 0x00000205`e2e74b80)+0x880 [C:\cygwin\home\buildbot\worker\Windows-EWS\build\Tools\win\DLLLauncher\DLLLauncherMain.cpp @ 232]

I haven't done much digging into why this happens, and cannot reproduce it on my Windows machine.

[1]: https://ews-build.webkit.org/#/builders/10/builds/86747
[2]: https://ews-build.webkit.org/#/builders/10/builds/86897

  • platform/win/TestExpectations: Skip newly added test on Windows.
  • webexposed/counter-style-image-symbols-not-exposed-expected.txt: Added.
  • webexposed/counter-style-image-symbols-not-exposed.html: Added.
11:47 AM Changeset in webkit [276379] by Chris Dumez
  • 3 edits
    2 adds in trunk

ASSERTION FAILED: context().isInitialized() ./Modules/webaudio/OfflineAudioDestinationNode.cpp(142)
https://bugs.webkit.org/show_bug.cgi?id=224876
<rdar://76896256>

Reviewed by Eric Carlson.

Source/WebCore:

In OfflineAudioDestinationNode::uninitialize(), we were synchronizing with the
render thread to make sure that OfflineAudioDestinationNode::offlineRender() was
done running before proceeding with uninitialization. However, when an audio
worklet is used, m_renderThread is null and no synchronization with the AudioWorklet
thread would happen. This patch adds the missing synchronization with the AudioWorklet
thread when present.

Test: webaudio/OfflineAudioContext/offlineaudiocontext-uninitialized-crash.html

  • Modules/webaudio/OfflineAudioDestinationNode.cpp:

(WebCore::OfflineAudioDestinationNode::uninitialize):

LayoutTests:

Add layout test coverage.

  • webaudio/OfflineAudioContext/offlineaudiocontext-uninitialized-crash-expected.txt: Added.
  • webaudio/OfflineAudioContext/offlineaudiocontext-uninitialized-crash.html: Added.
11:34 AM Changeset in webkit [276378] by Alan Coon
  • 1 copy in tags/Safari-612.1.11.3

Tag Safari-612.1.11.3.

11:23 AM Changeset in webkit [276377] by Simon Fraser
  • 5 edits
    2 adds in trunk

will-change: transform should affect nested position:fixed
https://bugs.webkit.org/show_bug.cgi?id=167600

Reviewed by Alan Bujtas.

"will-change transform" should make an element a container for position:fixed,
just as a transform does.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-position/position-absolute-dynamic-containing-block-expected.txt:

Source/WebCore:

Test: fast/css/will-change/will-change-transform-contains-fixed.html

  • rendering/RenderElement.h:

(WebCore::RenderElement::canContainFixedPositionObjects):

LayoutTests:

  • fast/css/will-change/will-change-transform-contains-fixed-expected.html: Added.
  • fast/css/will-change/will-change-transform-contains-fixed.html: Added.
11:15 AM Changeset in webkit [276376] by graouts@webkit.org
  • 7 edits in trunk

Add discrete animation support for several background CSS properties
https://bugs.webkit.org/show_bug.cgi?id=224871

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Mark 30 WPT progressions.

  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt:

Source/WebCore:

We now support animation of background-attachment, background-clip, background-origin
and background-repeat.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::setBackgroundAttachment):
(WebCore::RenderStyle::setBackgroundClip):
(WebCore::RenderStyle::setBackgroundOrigin):
(WebCore::RenderStyle::setBackgroundRepeatX):
(WebCore::RenderStyle::setBackgroundRepeatY):

11:06 AM Changeset in webkit [276375] by Alan Coon
  • 8 edits in branches/safari-612.1.11-branch/Source

Versioning.

WebKit-7612.1.11.3

10:58 AM Changeset in webkit [276374] by Sam Sneddon
  • 3 edits in trunk/Tools

Handle os.getenv returning None
https://bugs.webkit.org/show_bug.cgi?id=224869

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/common/checkout/scm/svn.py:

(SVNRepository.has_authorization_for_realm): This entirely replaces reading
$HOME with a call to os.path.expanduser. Notably, the stdlib function both
handles cases on Unix-like OSes when $HOME is undefined and on Windows (where
$HOME is undefined by default) correctly constructs the path.

  • Scripts/webkitpy/common/system/executive.py:

(Executive.kill_all): Handle $USER being undefined by just attempting to kill
all processes regardless of owner.

10:57 AM Changeset in webkit [276373] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Enable mid-layout render tree dump with floating boxes
https://bugs.webkit.org/show_bug.cgi?id=224878

Reviewed by Simon Fraser.

Floating box geometry dump requires the box to be placed first (see assert(isPlaced()) in FloatingObject::frameRect()).

  • rendering/FloatingObjects.cpp:

(WebCore::operator<<):

10:43 AM Changeset in webkit [276372] by Chris Lord
  • 8 edits in trunk

DOMException should be Serializable
https://bugs.webkit.org/show_bug.cgi?id=224865

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

DOMException is now serializable, rebaseline related tests.

  • web-platform-tests/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window-expected.txt:
  • web-platform-tests/html/infrastructure/safe-passing-of-structured-data/structuredclone_0-expected.txt:

Source/WebCore:

Implement serialization of DOMException objects.

No new tests, rebaselined existing tests.

  • bindings/js/SerializedScriptValue.cpp:

LayoutTests:

  • storage/indexeddb/resources/structured-clone.js: Cloning DOMException is valid.
  • storage/indexeddb/resources/structured-clone-expected.txt:
10:10 AM Changeset in webkit [276371] by Alan Coon
  • 1 copy in tags/Safari-612.1.11.2

Tag Safari-612.1.11.2.

10:08 AM Changeset in webkit [276370] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

RenderGeometryMap should know about individual transform properties
https://bugs.webkit.org/show_bug.cgi?id=224856

Patch by Rob Buis <rbuis@igalia.com> on 2021-04-21
Reviewed by Simon Fraser.

Source/WebCore:

RenderGeometryMap should know about individual transform properties.

Test: fast/transforms/textarea-individual-transform-properties-crash.html

  • rendering/RenderGeometryMap.cpp:

(WebCore::RenderGeometryMap::mapToContainer const):
(WebCore::canMapBetweenRenderersViaLayers):

LayoutTests:

Add test for this.

  • fast/transforms/textarea-individual-transform-properties-crash-expected.txt: Added.
  • fast/transforms/textarea-individual-transform-properties-crash.html: Added.
9:37 AM Changeset in webkit [276369] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

Followup change to bug 224779 based on post-land review comment.
https://bugs.webkit.org/show_bug.cgi?id=224779
<rdar://problem/76738879>

Reviewed by Chris Dumez.

Remove unnecessary document check.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::preconnectTo):

9:36 AM Changeset in webkit [276368] by don.olmstead@sony.com
  • 10 edits in trunk

[CMake] Add OpenGLES2 targets
https://bugs.webkit.org/show_bug.cgi?id=224786

Reviewed by Adrian Perez de Castro.

.:

Modernize the FindOpenGLES2.cmake module. Add an OpenGL::GLES target. Also add an
OpenGLES2_API_VERSION value so HAVE_OPENGL_ES_3 can be determined.

For WPE add a find_package for OpenGL ES so the target is present.

For GTK set HAVE_OPENGL_ES_3 if OpenGLES2_API_VERSION supports it.

  • Source/cmake/FindOpenGLES2.cmake:
  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/ThirdParty/ANGLE:

Add an ALIAS target mapping ANGLE's GLESv2 target to OpenGL::GLES if the target is not
already present. This is the case for Windows which uses ANGLE as its sole OpenGL ES
implementation.

  • CMakeLists.txt:

Source/WebCore:

Use the OpenGL::GLES target.

  • CMakeLists.txt:

Source/WebKit:

Use the OpenGL::GLES target.

  • CMakeLists.txt:
9:20 AM Changeset in webkit [276367] by Peng Liu
  • 11 edits in trunk/Source

[GPUP] Refactor the implementation of MediaSource::buffered()
https://bugs.webkit.org/show_bug.cgi?id=224848

Reviewed by Eric Carlson.

Source/WebCore:

This patch is a preparation to run MockMediaPlayerMediaSource in the GPU Process.

In the current implementation, MediaSource::m_buffered is updated by the caller
of MediaSource::buffered(). As a result, when an object from the GPU process
wants to get the value of m_buffered, it may need to use a synchronous IPC
message (from the GPU process to a WebContent process), which is bad.
Therefore, there is an ASSERT_NOT_REACHED() in RemoteMediaSourceProxy::buffered().
However, MockMediaPlayerMediaSource needs to use it for testing purposes.

This patch adds a function sourceBufferDidChangeBufferedDirty() to
MediaSource, so that SourceBuffer can notify the MediaSource object to
refresh its m_buffered and notify MediaSourcePrivate regarding the new value.
When "Media in GPU process" is enabled, MediaSourcePrivateRemote will forward
the new value to the GPU process, so that we can avoid the synchronous IPC
message from the GPU process to the WebContent process, and meet the requirement
of MockMediaPlayerMediaSource.

There is no behavior change when "Media in GPU Process" is disabled.

Covered by existing tests.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::MediaSource):
(WebCore::MediaSource::buffered const):
(WebCore::MediaSource::sourceBufferDidChangeBufferedDirty):
(WebCore::MediaSource::regenerateActiveSourceBuffers):
(WebCore::MediaSource::updateBufferedIfNeeded):

  • Modules/mediasource/MediaSource.h:
  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::sourceBufferPrivateBufferedDirtyChanged):

  • platform/graphics/MediaSourcePrivate.h:

(WebCore::MediaSourcePrivate::bufferedChanged):

Source/WebKit:

Add an IPC message BufferedChanged to forward the buffered ranges of
MediaSource from a WebContent process to the GPU process.

  • GPUProcess/media/RemoteMediaSourceProxy.cpp:

(WebKit::RemoteMediaSourceProxy::buffered const):
(WebKit::RemoteMediaSourceProxy::bufferedChanged):

  • GPUProcess/media/RemoteMediaSourceProxy.h:
  • GPUProcess/media/RemoteMediaSourceProxy.messages.in:
  • WebProcess/GPU/media/MediaSourcePrivateRemote.cpp:

(WebKit::MediaSourcePrivateRemote::bufferedChanged):

  • WebProcess/GPU/media/MediaSourcePrivateRemote.h:
9:09 AM Changeset in webkit [276366] by Aditya Keerthi
  • 3 edits
    2 adds in trunk

[iOS][FCR] <select> decorations should match the text color
https://bugs.webkit.org/show_bug.cgi?id=224831
<rdar://problem/76918959>

Reviewed by Darin Adler.

Source/WebCore:

Currently, <select> decorations always have a system blue color, even
if a different text color is specified. To improve stylability, the
color of the decoration should match the color of the text.

Test: fast/forms/ios/form-control-refresh/select/decoration-color.html

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::paintMenuListButtonDecorationsWithFormControlRefresh):

Use the color property of the style when painting the decoration.

LayoutTests:

An empty <select> element contains nothing apart from the decoration
(chevron). Added a test to verify that specifying a different text
color changes the color of the decoration.

  • fast/forms/ios/form-control-refresh/select/decoration-color-expected-mismatch.html: Added.
  • fast/forms/ios/form-control-refresh/select/decoration-color.html: Added.
8:46 AM Changeset in webkit [276365] by Caio Lima
  • 3 edits in trunk/JSTests

[JSC] Unskip some tests for ARMv7 and MIPS
https://bugs.webkit.org/show_bug.cgi?id=224813

Unreviewed test gardening.

  • stress/has-own-property-name-cache-symbols-and-strings.js:
  • stress/incremental-marking-should-not-dead-lock-in-new-property-transition.js:
8:44 AM Changeset in webkit [276364] by Aditya Keerthi
  • 5 edits in trunk/Source/WebKit

Fix the watchOS build after r276325
https://bugs.webkit.org/show_bug.cgi?id=224868
<rdar://problem/76938541>

Reviewed by Wenson Hsieh.

r276325 broke the watchOS build by using UIBlurEffectStyleSystemMaterial
in WKDateTimeInputControl.mm.

However, while we have been compiling WKDateTimeInputControl for
watchOS, the class is unused. This is due to the fact that watchOS has
a separate date/time picker implementation. Rather than conditionally
compiling the UIBlurEffectStyleSystemMaterial logic (which would
involve writing additional logic to make sure WKDateTimeInputControl
still compiles on watchOS), we can simply stop building
WKDateTimeInputControl on watchOS.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dateTimeInputControl:]):
(-[WKContentView timePickerValueHour:]):
(-[WKContentView timePickerValueMinute:]):

  • UIProcess/ios/forms/WKDateTimeInputControl.h:
  • UIProcess/ios/forms/WKDateTimeInputControl.mm:
8:41 AM Changeset in webkit [276363] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

WebGL GPUP crashes when preparing for display due to off-thread WeakPtr access (IOSURFACE_SET_OWNERSHIP_IDENTITY)
https://bugs.webkit.org/show_bug.cgi?id=224864

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-21
Reviewed by Chris Dumez.

Do not navigate WeakPtr in RemoteGraphicsContextGL thread.
Instead, cache the ownership identity tag during constructor
in main thread.

No new tests, caught with existing tests when the define
is enabled.

  • GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:

(WebKit::RemoteGraphicsContextGLCocoa::RemoteGraphicsContextGLCocoa):
(WebKit::RemoteGraphicsContextGLCocoa::prepareForDisplay):

8:25 AM Changeset in webkit [276362] by commit-queue@webkit.org
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

WebRTC should be compiled with thread-safe statics
https://bugs.webkit.org/show_bug.cgi?id=224863

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-21
Reviewed by Youenn Fablet.

Compile libwebrtc with normal thread-safe c++ local statics.
No known threading failures. Based on ad-hoc risk vs benefit
evaluation of today and after future merges, it appears
better to err in the side of caution.

  • Configurations/Base.xcconfig:
8:01 AM Changeset in webkit [276361] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

URL::URL(HashTableDeletedValueType) triggers -Wuninitialized warnings with GCC 11
https://bugs.webkit.org/show_bug.cgi?id=224755

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-04-21
Reviewed by Chris Dumez

My first thought here was to just always fully-initialize the URL object when used as a
HashTableDeletedValue, but Alex is concerned it might have a performance impact. Instead,
Chris suggested we could use the SecurityOriginData rather than URL to track whether we are
a HashTableDeletedValue. This seems good because it avoids any size increase in
ServiceWorkerRegistrationKey. Additionally, let's follow Darin's advice to construct the
ServiceWorkerRegistrationKey using placement new rather than via assignment to the
uninitialized storage.

There should be no behavior change. (Although we were copying uninitialized data before, it
was never read. Hopefully.)

  • workers/service/ServiceWorkerRegistrationKey.h:

(WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>::constructDeletedValue):
(WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>::isDeletedValue):

8:00 AM Changeset in webkit [276360] by Simon Fraser
  • 8 edits in trunk

Enhance scrolling-related trace points
https://bugs.webkit.org/show_bug.cgi?id=224852

Reviewed by Tim Horton.
Source/WebCore:

Add a new trace point when the "display did refresh" ping gets to ThreadedScrollingTree on
the EventDispatcher thread, and add some metadata to the existing displayDidRefresh trace
scope.

  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::displayDidRefreshOnScrollingThread):
(WebCore::ThreadedScrollingTree::displayDidRefresh):

Source/WebKit:

Add a new trace point in EventDispatcher::displayWasRefreshed() so we can tell when the
WebProcess receives displayDidRefresh IPC (this can sometimes be delayed by other work that
might share the same dispatch thread).

We repurpose the existing DisplayRefreshDispatchingToMainThread which is the WK1 equivalent.

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::displayWasRefreshed):

Source/WTF:

One new trace point, and some argument descriptors.

  • wtf/SystemTracing.h:

Tools:

Update trace point descriptions.

  • Tracing/SystemTracePoints.plist:
7:15 AM Changeset in webkit [276359] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

AudioMediaStreamTrackRendererUnit should not have its data zeroed if one track has not enough data
https://bugs.webkit.org/show_bug.cgi?id=224673

Reviewed by Eric Carlson.

AudioMediaStreamTrackRendererUnit may get data from multiple tracks.
If one track has not enough data, AudioSampleDataSource will zero the buffer while it should leave it unchanged.
If all tracks do not have enough data, AudioMediaStreamTrackRendererUnit will have silent output as the first track will actually zero the buffer.

Manually tested.

  • platform/audio/cocoa/AudioSampleDataSource.mm:

(WebCore::AudioSampleDataSource::pullSamplesInternal):

6:36 AM Changeset in webkit [276358] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC] Take "contain: size" into account when computing the preferred logical width
https://bugs.webkit.org/show_bug.cgi?id=224850

Reviewed by Antti Koivisto.

The intrinsic sizes of the size containment box are determined as if the element had no content,
following the same logic as when sizing as if empty.

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints):

6:36 AM Changeset in webkit [276357] by Alan Bujtas
  • 6 edits
    2 adds in trunk

REGRESSION(r256107): Text moves around when selecting at https://www.tokyo-sports.co.jp/entame/news/2834187/
https://bugs.webkit.org/show_bug.cgi?id=224839
<rdar://74958484>

Reviewed by Darin Adler.

Source/WebCore:

Pass in locale information when constructing the text iterator for the content (locale affects soft wrap opportunities).

Test: fast/text/line-break-with-locale.html

  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::createAndAppendTextItems):

  • layout/inlineformatting/text/TextUtil.cpp: In addition to locale, add missing line breaking mode.

(WebCore::Layout::TextUtil::lineBreakIteratorMode):

  • layout/inlineformatting/text/TextUtil.h:

LayoutTests:

  • fast/text/line-break-with-locale-expected.html: Added.
  • fast/text/line-break-with-locale.html: Added.
6:34 AM Changeset in webkit [276356] by commit-queue@webkit.org
  • 6 edits in trunk

[css-grid] last-baseline shouldn't affect baseline alignment
https://bugs.webkit.org/show_bug.cgi?id=224538

Patch by Ziran Sun <Ziran Sun> on 2021-04-21
Reviewed by Darin Adler and Javier Fernandez.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-grid/alignment/grid-baseline-004-expected.txt:

Source/WebCore:

According to discussions at https://github.com/w3c/csswg-drafts/issues/5293,
"align-self: last baseline" should not interfere with baseline alignment in
first row. This change is to make sure this is checked while deciding
whether an item participates in baseline alignment.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::firstLineBaseline const):
(WebCore::RenderGrid::isBaselineAlignmentForChild const):

2:57 AM Changeset in webkit [276355] by Lauro Moura
  • 5 edits in trunk/Tools

[WPE] Allow defining custom repo and branch for Cog checkout
https://bugs.webkit.org/show_bug.cgi?id=224739

Reviewed by Philippe Normand.

Use cmake args "-DWPE_COG_REPO=<repo>" and "-DWPE_COG_TAG=<tag>" to
build different cog versions without having to edit the cmake files.

There might be the need to wipe the checked-out dir from time to time,
as only CMake 3.18 introduced different checkout strategies. Previous
cmakes try to rebase the previously checked out branch which might
lead to conflicts.

This commit also allows selecting between Cog and MiniBrowser with the
WPE_BROWSER envvar.

  • PlatformWPE.cmake:
  • Scripts/webkitpy/port/wpe.py:

(WPEPort.cog_path):
(WPEPort):
(WPEPort.browser_name):
(WPEPort.run_minibrowser):

  • Scripts/webkitpy/port/wpe_unittest.py:

(WPEPortTest.test_default_upload_configuration):
(WPEPortTest):
(WPEPortTest.test_browser_name_default):
(WPEPortTest.test_browser_name_with_cog_built):
(WPEPortTest.test_browser_name_override_minibrowser_with_cog_built):
(WPEPortTest.test_browser_name_override_cog_without_cog_built):
(WPEPortTest.test_browser_name_override_unknown):

  • Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py:

(WebDriverWPE.browser_name): Make it cog-aware.
(WebDriverWPE.browser_path): Ditto.

2:38 AM Changeset in webkit [276354] by Philippe Normand
  • 2 edits in trunk/Source/WebKit

Unreviewed, WPE Cog build fix after r276316

  • wpe/wpe-webkit-uninstalled.pc.in: Adjust paths once again.
2:04 AM Changeset in webkit [276353] by Martin Robinson
  • 8 edits
    2 adds in trunk

Add basic (non-momentum) wheel event handling for scroll snap
https://bugs.webkit.org/show_bug.cgi?id=222594

Reviewed by Darin Adler.

Source/WebCore:

Test: css3/scroll-snap/scroll-snap-wheel-event.html

Enable scroll snapping for basic wheel events on GTK+ and WPE. The Mac port
has special wheel handling due to momentum scrolling. Other scroll-snap-enabled
ports can just use a basic version.

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::scroll): Accept a bitmask of options now. This
will allow using this method when handling wheel events that do not animate.
(WebCore::ScrollAnimator::handleWheelEvent): Trigger ::scroll with
scroll snapping enabled and pass the appropriate option to disable animations.
(WebCore::ScrollAnimator::processWheelEventForScrollSnap): Deleted.

  • platform/ScrollAnimator.h:

(WebCore::ScrollAnimator::ScrollAnimator::processWheelEventForScrollSnap): Made
this a method that can be overridden by subclasses.

  • platform/mac/ScrollAnimatorMac.h: Added processWheelEventForScrollSnap.
  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::scroll): Pay attention to the NeverAnimate bitmask now.
(WebCore::ScrollAnimatorMac::processWheelEventForScrollSnap): Added.

LayoutTests:

  • css3/scroll-snap/scroll-snap-wheel-event-expected.txt: Added.
  • css3/scroll-snap/scroll-snap-wheel-event.html: Added.
  • platform/ios-wk2/TestExpectations: Skip new test because it uses mouse event simulation.

Move existing classification to better section as well.

  • platform/mac-wk1/fast/scrolling/latching/scroll-snap-latching-expected.txt: Rebased this previous failing test.
1:44 AM Changeset in webkit [276352] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Use BlobURL::getOriginURL in more places
https://bugs.webkit.org/show_bug.cgi?id=224857

Reviewed by Alex Christensen.

Covered by existing tests.

  • loader/PolicyChecker.cpp:

(WebCore::FrameLoader::PolicyChecker::extendBlobURLLifetimeIfNecessary const):

1:13 AM WebKitGTK/2.32.x edited by Philippe Normand
(diff)
12:38 AM Changeset in webkit [276351] by timothy_horton@apple.com
  • 13 edits in trunk

Long-pressing a data detectors link causes the link to be followed
https://bugs.webkit.org/show_bug.cgi?id=224847
<rdar://problem/72889738>

Reviewed by Wenson Hsieh.

Source/WebCore:

New API tests: iOSMouseSupport.{EndedTouchesTriggerClick,CancelledTouchesDoNotTriggerClick}

  • page/EventHandler.h:

Source/WebKit:

On iOS, it is possible for a gesture to be externally cancelled (in this case,
when a data detectors context menu is presented by long pressing a link).
This is reported to WKMouseGestureRecognizer as "touches cancelled".
Currently, WKMouseGestureRecognizer just runs with that as a normal
"mouse button release" event, which then causes the link that you're long
pressing to also be followed.

  • Shared/NativeWebMouseEvent.h:
  • Shared/WebMouseEvent.cpp:

(WebKit::WebMouseEvent::WebMouseEvent):
(WebKit::WebMouseEvent::encode const):
(WebKit::WebMouseEvent::decode):

  • Shared/WebMouseEvent.h:

(WebKit::WebMouseEvent::gestureCancelled const):

  • Shared/ios/NativeWebMouseEventIOS.mm:

(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):

  • UIProcess/ios/WKMouseGestureRecognizer.mm:

(-[WKMouseGestureRecognizer createMouseEventWithType:wasCancelled:]):
(-[WKMouseGestureRecognizer touchesBegan:withEvent:]):
(-[WKMouseGestureRecognizer touchesMoved:withEvent:]):
(-[WKMouseGestureRecognizer touchesEnded:withEvent:]):
(-[WKMouseGestureRecognizer touchesCancelled:withEvent:]):
(-[WKMouseGestureRecognizer _hoverEntered:withEvent:]):
(-[WKMouseGestureRecognizer _hoverMoved:withEvent:]):
(-[WKMouseGestureRecognizer _hoverExited:withEvent:]):
(-[WKMouseGestureRecognizer createMouseEventWithType:]): Deleted.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::handleMouseEvent):
Add a bit to WebKit::WebMouseEvent indicating that the gesture it is a part of
was cancelled. This will only be set on the mouse release event dispatched from
touchesCancelled from WKMouseGestureRecognizer, and will cause WebCore to
avoid dispatching the click event, as you would on macOS if you e.g.
moved the mouse too far from its origin during the press.

Plumb the bit all the way from WKMouseGestureRecognizer, through the
NativeWebMouseEvent constructor, to WebMouseEvent, and then check it
and call invalidateClick() immediately before handing WebCore the
mouse release event, to avoid the click event.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm:

(TEST):
Add tests ensuring that we get a click event for completed touches, and not for cancelled touches.

12:33 AM Changeset in webkit [276350] by Manuel Rego Casasnovas
  • 2 edits
    2 adds in trunk/LayoutTests/imported/w3c

[selectors] Import one more :focus-visible WPT test
https://bugs.webkit.org/show_bug.cgi?id=224827

Reviewed by Rob Buis.

  • web-platform-tests/css/selectors/focus-visible-020-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-020.html: Added.
  • web-platform-tests/css/selectors/w3c-import.log:
12:33 AM Changeset in webkit [276349] by youenn@apple.com
  • 7 edits in trunk/Source

[ BigSur wk2 ARM64 ] http/wpt/webrtc/change-encoded-transform.html is a flakey crash
https://bugs.webkit.org/show_bug.cgi?id=224696
<rdar://problem/76780020>

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

On stream recreation, the new delegate may have to process a transformed frame before receiving one from the encoder.
Check for encoder_queue to not be null in that case.

  • Source/webrtc/modules/rtp_rtcp/source/rtp_sender_video_frame_transformer_delegate.cc:

Source/WebCore:

Sometimes the video sender delegate will be recreated on the fly.
In that case, it might receive a frame from the old delegate before processing an existing frame.
This makes the encoder queue being null.
To prevent this we update backends to only register once.

Covered by tests no longer crashing.

  • Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverTransformBackend.cpp:

(WebCore::LibWebRTCRtpReceiverTransformBackend::setTransformableFrameCallback):

  • Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverTransformBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderTransformBackend.cpp:

(WebCore::LibWebRTCRtpSenderTransformBackend::setTransformableFrameCallback):

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderTransformBackend.h:
12:21 AM Changeset in webkit [276348] by Wenson Hsieh
  • 6 edits in trunk/Source

[macOS] Avoid triggering image extraction for animated images
https://bugs.webkit.org/show_bug.cgi?id=224851

Reviewed by Megan Gardner.

Source/WebCore:

Avoid adding the "Reveal Image" context menu item for animated images. Testing is currently blocked on
webkit.org/b/224641.

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::populate):

Source/WebKit:

Avoid making image extraction requests for animated images by adding an optional AllowsAnimatedImages
argument to createShareableBitmap, and passing in AllowsAnimatedImages::No in the case where we're creating
a shareable bitmap for image extraction.

  • WebProcess/WebCoreSupport/ShareableBitmapUtilities.cpp:

(WebKit::createShareableBitmap):

  • WebProcess/WebCoreSupport/ShareableBitmapUtilities.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::requestImageExtraction):

12:18 AM Changeset in webkit [276347] by Megan Gardner
  • 16 edits in trunk

Support scrolling to a selected AppHighlight
https://bugs.webkit.org/show_bug.cgi?id=224773

Reviewed by Tim Horton.

Source/WebCore:

Test: AppHighlights::AppHighlightCreateAndRestoreAndScroll

  • Modules/highlight/AppHighlightStorage.cpp:

(WebCore::AppHighlightStorage::restoreAndScrollToAppHighlight):
(WebCore::AppHighlightStorage::attemptToRestoreHighlightAndScroll):
(WebCore::AppHighlightStorage::restoreUnrestoredAppHighlights):
(WebCore::AppHighlightStorage::restoreAppHighlight): Deleted.

  • Modules/highlight/AppHighlightStorage.h:
  • WebCore.xcodeproj/project.pbxproj:
  • editing/Editor.cpp:

(WebCore::TemporarySelectionChange::setSelection):

  • page/Page.cpp:

(WebCore::Page::doAfterUpdateRendering):

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebView.mm:

(restoreHighlight):
(-[WKWebView _restoreAppHighlights:]):
(-[WKWebView _restoreAndScrollToAppHighlight:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::restoreAppHighlightsAndScrollToIndex):
(WebKit::WebPageProxy::restoreAppHighlights): Deleted.

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::restoreAppHighlightsAndScrollToIndex):
(WebKit::WebPage::restoreAppHighlights): Deleted.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm:

(TestWebKitAPI::TEST):

Apr 20, 2021:

11:58 PM Changeset in webkit [276346] by Paulo Matos
  • 3 edits in trunk/JSTests

Unskip couple of tests for armv7l and mips
https://bugs.webkit.org/show_bug.cgi?id=224607

Unreviewed gardening.

  • stress/check-stack-overflow-before-value-profiling-arguments.js:

(fullGC):

  • stress/intl-suppored-locales-of.js:
10:47 PM Changeset in webkit [276345] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Connection::m_mainThread is unused
https://bugs.webkit.org/show_bug.cgi?id=224806

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-20
Reviewed by Darin Adler.

Remove unused Connection::m_mainThread.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::Connection):

  • Platform/IPC/Connection.h:
9:58 PM Changeset in webkit [276344] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Crash in CompositeEditCommand::insertNodeAt
https://bugs.webkit.org/show_bug.cgi?id=224504

Patch by Ian Gilbert <iang@apple.com> on 2021-04-20
Reviewed by Ryosuke Niwa.

Source/WebCore:

CompositeEditCommand::cleanupAfterDeletion will remove text nodes that only
have a newline. Added check inside FormatBlockCommand::formatRange to avoid
a null pointer dereference on a removed node.

Test: editing/execCommand/format-block-remove-text-node-crash.html

  • editing/FormatBlockCommand.cpp:

(WebCore::FormatBlockCommand::formatRange):

LayoutTests:

Adding a regression test case.

  • editing/execCommand/format-block-remove-text-node-crash-expected.txt: Added.
  • editing/execCommand/format-block-remove-text-node-crash.html: Added.
7:38 PM Changeset in webkit [276343] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

Static asserts in WasmAirIRGenerator.cpp and WasmB3IRGenerator.cpp trigger -Wnonnull warnings with GCC 11
https://bugs.webkit.org/show_bug.cgi?id=224826

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-04-20
Reviewed by Yusuke Suzuki.

Rewrite these static asserts to avoid warnings when built with GCC 11. Credit to Jonathan
Wakely for providing this mind-bending solution.

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::AirIRGenerator::addCurrentMemory):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::addCurrentMemory):

6:42 PM Changeset in webkit [276342] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/WebCore

[clang] Remove implicit cast related warnings.
https://bugs.webkit.org/show_bug.cgi?id=224797

Reviewed by Darin Adler.

Added explicit cast to suppress warning.
Behavior is not changed from implicit cast.

No new tests because there's no behavior change.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::adjustLinePositionForPagination):

6:20 PM Changeset in webkit [276341] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Crash due to VectorBuffer pre-allocation failure
https://bugs.webkit.org/show_bug.cgi?id=224840

Patch by Ian Gilbert <iang@apple.com> on 2021-04-20
Reviewed by Sam Weinig.

Source/WebKit:

Vector decoder could attempt to allocate a large buffer and on failure would crash.
Changed decode to avoid allocating a Vector based on the decoded size.

Test: ipc/large-vector-allocate-failure-crash.html

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<Vector<RefPtr<ApplePayError>>>::decode):

LayoutTests:

Added a regression test.

  • ipc/large-vector-allocate-failure-crash-expected.txt: Added.
  • ipc/large-vector-allocate-failure-crash.html: Added.
6:05 PM Changeset in webkit [276340] by Brent Fulgham
  • 6 edits in trunk/Source

[Cocoa] Prevent GPU and WebContent processes from attempting to connect to the AppSSO service
https://bugs.webkit.org/show_bug.cgi?id=224834
<rdar://problem/72157514>

Reviewed by Jiewen Tan.

Source/WebCore:

Call version of '_protocolClassForRequest' that tells CFNetwork to ignore AppSSO flows
when building for a platform that supports it.

  • platform/mac/WebCoreNSURLExtras.mm:

(WebCore::URLByCanonicalizingURL):

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h: Add declaration for 'skipAppSSO' version of NSURLProtocol method.

Source/WTF:

  • wtf/PlatformHave.h:
5:58 PM Changeset in webkit [276339] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

If an idle GPUProcess doesn't exit under memory pressure because it just launched, check again later
https://bugs.webkit.org/show_bug.cgi?id=224829

Reviewed by Darin Adler.

In r276305, I made it so that the GPUProcess does not exit under memory pressure when idle
if it launched less than 5 seconds ago. This gives the WebProcess time to schedule work with
the GPUProcess after launching it and makes sure we don't repeatedly / frequently exit &
relaunch the GPUProcess.

In this patch, I am tweaking the policy so that if we could have exited but didn't because
the GPUProcess was too young (less than 5 seconds old), then I schedule a timer for this
5 second deadline to check again if the GPUProcess could exit (meaning that it is unused).
When the timer fires, the process doesn't have to be under memory pressure still in order
to exit, it just needs to be idle. I figured the fact that we were under memory pressure
less than 5 seconds ago should be enough incentive to exit if idle.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::GPUProcess):
(WebKit::GPUProcess::canExitUnderMemoryPressure const):

  • GPUProcess/GPUProcess.h:
5:48 PM Changeset in webkit [276338] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WTF

[Cocoa] Enable MediaSession and MediaSessionCoordinator experimental features
https://bugs.webkit.org/show_bug.cgi?id=224822
<rdar://problem/76908014>

Reviewed by Jer Noble.

  • Scripts/Preferences/WebPreferencesExperimental.yaml: Change the defaults for

MediaSessionCoordinatorEnabled and MediaSessionEnabled to true.

5:46 PM Changeset in webkit [276337] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur wk2 Debug arm64 ] http/wpt/preload/change-link-rel-attribute.html is a flakey crash
https://bugs.webkit.org/show_bug.cgi?id=224845

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updted test expectations to Pass Crash while test is reviewed.
5:41 PM Changeset in webkit [276336] by eric.carlson@apple.com
  • 4 edits in trunk/LayoutTests

[BigSur Wk1] media/video-ended-event-negative-playback.html is flaky text failure
https://bugs.webkit.org/show_bug.cgi?id=221106
<rdar://problem/73724911>

Reviewed by Jer Noble.

Seeking to 0.5 and playing backwards to the beginning of the file may take longer
than 2500ms, so increase the timeout to 5000ms and don't start the failure timer
until playback begins.

  • media/video-ended-event-negative-playback-expected.txt:
  • media/video-ended-event-negative-playback.html:
  • platform/mac-wk1/TestExpectations:
5:37 PM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
5:22 PM Changeset in webkit [276335] by Alan Coon
  • 2 edits in branches/safari-612.1.11-branch/Source/ThirdParty/ANGLE

Cherry-pick r276286. rdar://problem/76641662

Build ANGLE dylib into WK_OVERRIDE_FRAMEWORKS_DIR in builds that use it
https://bugs.webkit.org/show_bug.cgi?id=224785
<rdar://76641662>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-19
Reviewed by Alexey Proskuryakov.

  • Configurations/ANGLE-dynamic.xcconfig:

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

5:20 PM Changeset in webkit [276334] by Alan Coon
  • 8 edits in branches/safari-612.1.11-branch/Source

Versioning.

WebKit-7612.1.11.2

5:14 PM Changeset in webkit [276333] by Devin Rousso
  • 21 edits
    1 move in trunk

Parse theme_color in web application manifests and pass it along to -[WKWebView themeColor]
https://bugs.webkit.org/show_bug.cgi?id=224796

Reviewed by Darin Adler.

Source/WebCore:

  • Modules/applicationmanifest/ApplicationManifest.h:

(WebCore::ApplicationManifest::encode const):
(WebCore::ApplicationManifest::decode):

  • Modules/applicationmanifest/ApplicationManifestParser.h:
  • Modules/applicationmanifest/ApplicationManifestParser.cpp:

(WebCore::ApplicationManifestParser::parse):
(WebCore::ApplicationManifestParser::ApplicationManifestParser):
(WebCore::ApplicationManifestParser::parseManifest):
(WebCore::ApplicationManifestParser::logDeveloperWarning):
(WebCore::ApplicationManifestParser::parseColor): Added.

  • loader/cache/CachedApplicationManifest.h:
  • loader/cache/CachedApplicationManifest.cpp:

(WebCore::CachedApplicationManifest::process):
Pass an actual Document instead of a ScriptExecutionContext so that we can notify it
when finished parsing the JSON (Document::processApplicationManifest).

  • dom/Document.h:

(WebCore::Document::themeColor const):

  • dom/Document.cpp:

(WebCore::Document::processMetaElementThemeColor): Added.
(WebCore::Document::themeColorChanged): Added.
(WebCore::Document::processApplicationManifest): Added.
(WebCore::Document::processThemeColor): Deleted.
Use the theme color from <meta name="theme-color"> if valid, falling back to the theme
color from "theme_color" in the web application manifest (if specified). Only notify the
UIProcess of changes to <meta name="theme-color"> or the "theme_color" in the web
application manifest if the new value is the value that would be used.

  • html/HTMLMetaElement.cpp:

(WebCore::HTMLMetaElement::attributeChanged):
(WebCore::HTMLMetaElement::removedFromAncestor):
(WebCore::HTMLMetaElement::process):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
Drive-by: Rename Document::processThemeColor to Document::processMetaElementThemeColor
so that it's more specific to <meta name="theme-color">.

  • page/ChromeClient.h:

(WebCore::ChromeClient::themeColorChanged const):
(WebCore::ChromeClient::pageExtendedBackgroundColorDidChange const):
Drive-by: Remove the Color parameter since it's not actually used in the WebProcess.

Source/WebKit:

  • UIProcess/API/Cocoa/_WKApplicationManifest.h:
  • UIProcess/API/Cocoa/_WKApplicationManifest.mm:

(-[_WKApplicationManifest initWithCoder:]):
(-[_WKApplicationManifest encodeWithCoder:]):
(-[_WKApplicationManifest themeColor]): Added.

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::themeColorChanged const):
(WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange const):
Drive-by: Remove the Color parameter since it's not actually used in the WebProcess.

Tools:

  • TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp:

(ApplicationManifestParserTest::testThemeColor): Added.
(TEST_F.ApplicationManifestParserTest.ThemeColor): Added.

  • TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm:

(TEST.ApplicationManifestBasic):
(TEST.ApplicationManifestCoding):

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewThemeColor.mm: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/HTMLMetaThemeColor.mm.

(TEST.WKWebViewThemeColor.ApplicationManifest):
(TEST.WKWebViewThemeColor.MetaElementOverridesApplicationManifest):
Rename this file now that it also deals with web application manifest (in addition to <meta name="theme-color">).

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
5:08 PM Changeset in webkit [276332] by commit-queue@webkit.org
  • 9 edits in trunk/Source

Lots of spurious -Wnonnull warnings with GCC 11
https://bugs.webkit.org/show_bug.cgi?id=224452

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-04-20
Reviewed by Darin Adler.

Source/WebCore:

  • css/CSSValue.h:

(WebCore::CSSValue::deref):

  • css/StyleRule.h:

(WebCore::StyleRuleBase::deref const):

  • dom/Node.h:

(WebCore::Node::deref const):

Source/WebKit:

  • WebProcess/Plugins/PluginView.cpp:

Source/WTF:

  • wtf/RefPtr.h:

(WTF::DefaultRefDerefTraits::derefIfNotNull):

5:03 PM Changeset in webkit [276331] by Wenson Hsieh
  • 35 edits
    2 moves in trunk/Source

Rename WebCore::SelectionRect to WebCore::SelectionGeometry
https://bugs.webkit.org/show_bug.cgi?id=224820

Reviewed by Megan Gardner.

Source/WebCore:

To prepare for rendering non-rectilinear selection quads on iOS using UIKit, rename WebCore::SelectionRect to
WebCore::SelectionGeometry. In a subsequent patch, this class will be backed by a FloatQuad instead of an
IntRect, and will additionally contain a flag indicating whether it should render using the bounding rect of
the quad (and should additionally be coalesced with surrounding selection rects), or if it should render the
selection quad without coalescing.

No change in behavior.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper textRectsFromMarkers:withText:]):

  • page/DragController.cpp:
  • page/TextIndicator.cpp:

(WebCore::initializeIndicator):

  • platform/ios/SelectionGeometry.cpp: Renamed from Source/WebCore/platform/ios/SelectionRect.cpp.

(WebCore::SelectionGeometry::SelectionGeometry):
(WebCore::SelectionGeometry::setLogicalLeft):
(WebCore::SelectionGeometry::setLogicalWidth):
(WebCore::SelectionGeometry::setLogicalTop):
(WebCore::SelectionGeometry::setLogicalHeight):
(WebCore::operator<<):

  • platform/ios/SelectionGeometry.h: Renamed from Source/WebCore/platform/ios/SelectionRect.h.

(WebCore::SelectionGeometry::rect const):
(WebCore::SelectionGeometry::logicalLeft const):
(WebCore::SelectionGeometry::logicalWidth const):
(WebCore::SelectionGeometry::logicalTop const):
(WebCore::SelectionGeometry::logicalHeight const):
(WebCore::SelectionGeometry::direction const):
(WebCore::SelectionGeometry::minX const):
(WebCore::SelectionGeometry::maxX const):
(WebCore::SelectionGeometry::maxY const):
(WebCore::SelectionGeometry::lineNumber const):
(WebCore::SelectionGeometry::isLineBreak const):
(WebCore::SelectionGeometry::isFirstOnLine const):
(WebCore::SelectionGeometry::isLastOnLine const):
(WebCore::SelectionGeometry::containsStart const):
(WebCore::SelectionGeometry::containsEnd const):
(WebCore::SelectionGeometry::isHorizontal const):
(WebCore::SelectionGeometry::isInFixedPosition const):
(WebCore::SelectionGeometry::isRubyText const):
(WebCore::SelectionGeometry::pageNumber const):
(WebCore::SelectionGeometry::setRect):
(WebCore::SelectionGeometry::setDirection):
(WebCore::SelectionGeometry::setMinX):
(WebCore::SelectionGeometry::setMaxX):
(WebCore::SelectionGeometry::setMaxY):
(WebCore::SelectionGeometry::setLineNumber):
(WebCore::SelectionGeometry::setIsLineBreak):
(WebCore::SelectionGeometry::setIsFirstOnLine):
(WebCore::SelectionGeometry::setIsLastOnLine):
(WebCore::SelectionGeometry::setContainsStart):
(WebCore::SelectionGeometry::setContainsEnd):
(WebCore::SelectionGeometry::setIsHorizontal):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::collectSelectionGeometries):
(WebCore::RenderImage::collectSelectionRects): Deleted.

  • rendering/RenderImage.h:
  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::collectSelectionGeometries):
(WebCore::RenderLineBreak::collectSelectionRects): Deleted.

  • rendering/RenderLineBreak.h:
  • rendering/RenderObject.cpp:

(WebCore::RenderObject::collectSelectionGeometries):
(WebCore::adjustLineHeightOfSelectionGeometries):
(WebCore::coalesceSelectionGeometries):
(WebCore::RenderObject::collectSelectionGeometriesWithoutUnionInteriorLines):
(WebCore::RenderObject::collectSelectionGeometriesInternal):
(WebCore::RenderObject::collectSelectionRects): Deleted.
(WebCore::adjustLineHeightOfSelectionRects): Deleted.
(WebCore::coalesceSelectionRects): Deleted.
(WebCore::RenderObject::collectSelectionRectsWithoutUnionInteriorLines): Deleted.
(WebCore::RenderObject::collectSelectionRectsInternal): Deleted.

  • rendering/RenderObject.h:
  • rendering/RenderSelectionInfo.cpp:

(WebCore::RenderSelectionInfo::RenderSelectionInfo):

  • rendering/RenderText.cpp:

(WebCore::RenderText::collectSelectionGeometries):
(WebCore::RenderText::collectSelectionGeometriesForLineBoxes):
(WebCore::RenderText::selectionRectForRepaint):
(WebCore::RenderText::collectSelectionRects): Deleted.
(WebCore::RenderText::collectSelectionRectsForLineBoxes): Deleted.

  • rendering/RenderText.h:

Source/WebKit:

See WebCore/ChangeLog for more details.

  • Scripts/webkit/messages.py:

(headers_for_type):

  • Shared/EditorState.cpp:

(WebKit::EditorState::PostLayoutData::encode const):
(WebKit::EditorState::PostLayoutData::decode):
(WebKit::operator<<):

  • Shared/EditorState.h:
  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<SelectionGeometry>::encode):
(IPC::ArgumentCoder<SelectionGeometry>::decode):
(IPC::ArgumentCoder<SelectionRect>::encode): Deleted.
(IPC::ArgumentCoder<SelectionRect>::decode): Deleted.

  • Shared/WebCoreArgumentCoders.h:
  • Shared/ios/InteractionInformationAtPosition.h:
  • Shared/ios/InteractionInformationRequest.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(WebKit::WKSelectionDrawingInfo::WKSelectionDrawingInfo):
(WebKit::operator==):
(WebKit::operator<<):
(-[WKContentView _pointIsInsideSelectionRect:outBoundingRect:]):
(-[WKContentView _shouldToggleSelectionCommandsAfterTapAt:]):
(-[WKContentView webSelectionRectsForSelectionGeometries:]):
(-[WKContentView webSelectionRects]):
(-[WKContentView _lookupForWebView:]):
(-[WKContentView _shareForWebView:]):
(-[WKContentView _translateForWebView:]):
(-[WKContentView _addShortcutForWebView:]):
(-[WKContentView _showDictionary:]):
(-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
(-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
(-[WKContentView selectedTextRange]):
(-[WKContentView webSelectionRectsForSelectionRects:]): Deleted.

  • UIProcess/ios/WKTextSelectionRect.h:
  • UIProcess/ios/WKTextSelectionRect.mm:

(-[WKTextSelectionRect initWithCGRect:]):
(-[WKTextSelectionRect initWithSelectionGeometry:]):
(-[WKTextSelectionRect rect]):
(-[WKTextSelectionRect writingDirection]):
(-[WKTextSelectionRect containsStart]):
(-[WKTextSelectionRect containsEnd]):
(-[WKTextSelectionRect isVertical]):
(-[WKTextSelectionRect initWithSelectionRect:]): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::requestRectsForGranularityWithSelectionOffset):
(WebKit::WebPageProxy::requestRectsAtSelectionOffsetWithText):
(WebKit::WebPageProxy::selectionBoundingRectInRootViewCoordinates const):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::convertContentToRootView):
(WebKit::WebPage::getPlatformEditorState const):
(WebKit::WebPage::getRectsForGranularityWithSelectionOffset):
(WebKit::WebPage::getRectsAtSelectionOffsetWithText):
(WebKit::WebPage::requestAutocorrectionData):
(WebKit::convertContentToRootViewSelectionRects): Deleted.

Source/WebKitLegacy/ios:

  • WebCoreSupport/WebFrameIOS.mm:

(-[WebFrame selectionRectsForCoreRange:]):

4:58 PM Changeset in webkit [276330] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur Debug ] http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin.html is a flakey timeout
https://bugs.webkit.org/show_bug.cgi?id=224842

Unreviewed test gardening.

  • platform/mac/TestExpectations: Updated test expectations to Pass Timeout while test is reviewed.
4:57 PM Changeset in webkit [276329] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

-Warray-bounds warning in AirAllocateRegistersByGraphColoring.cpp with GCC 11
https://bugs.webkit.org/show_bug.cgi?id=224782

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-04-20
Reviewed by Darin Adler.

These warnings don't make any sense to me. Suppress them.

  • b3/air/AirAllocateRegistersByGraphColoring.cpp:
4:44 PM Changeset in webkit [276328] by timothy_horton@apple.com
  • 5 edits
    1 add in trunk/Tools

MacCatalyst tests crash on NSInternalInconsistencyException, reason: NSApplication has not been created yet
https://bugs.webkit.org/show_bug.cgi?id=224606

Reviewed by Wenson Hsieh.

  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:

Link UIKitMacHelper in macCatalyst builds.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/ios/UIKitMacHelperSPI.h: Added.
  • TestWebKitAPI/ios/mainIOS.mm:

(main):
Call UINSApplicationInstantiate to keep the tests limping along until we create an actual UIApp.

  • TestWebKitAPI/Configurations/TestWTF.xcconfig:

Also, fix the TestWTF configuration to not link Cocoa in macCatalyst builds.

4:21 PM Changeset in webkit [276327] by weinig@apple.com
  • 19 edits
    1 copy
    1 add in trunk

Separated models don't get opacity set on them at all
https://bugs.webkit.org/show_bug.cgi?id=224763

Reviewed by Tim Horton.

Source/WebCore:

Test: model-element/model-element-graphics-layers-opacity.html

This certainly won't be the way things land once separated/optimized
layer semantics are better understood, but for now, it is useful to
explicitly propogate the opacity of the owing layer to the content
layer if the content layer is a model layer. In the future, we may want
to do this for any separated child (and conversely, only to the content
layer if it is separated), but this will allow us to play a bit futher
in our experimentation.

Also adds support for dumping the opacity of a content layer to make
this testable.

  • platform/graphics/GraphicsLayerClient.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setContentsToModel):
(WebCore::GraphicsLayerCA::purposeNameForInnerLayer const):
(WebCore::GraphicsLayerCA::dumpInnerLayer const):

  • testing/Internals.cpp:

(WebCore::toPlatformLayerTreeFlags):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

Add new test which use the macOS/iOS only platformLayerTreeAsText
internals function to show that opacity is getting set on the content
layer.

  • model-element/model-element-graphics-layers-opacity-expected.txt: Added.
  • model-element/model-element-graphics-layers-opacity.html: Added.
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
  • platform/win/TestExpectations:
  • compositing/video/video-object-position-expected.txt:
  • compositing/visible-rect/mask-layer-coverage-expected.txt:
  • fullscreen/full-screen-layer-dump-expected.txt:
  • platform/ios/compositing/video/video-object-position-expected.txt:
  • platform/ios/compositing/visible-rect/mask-layer-coverage-expected.txt:
  • platform/mac/compositing/images/direct-image-object-fit-expected.txt:
  • platform/mac/compositing/reflections/direct-image-object-fit-reflected-expected.txt:
  • platform/mac/compositing/video/video-object-fit-expected.txt:

Update results for update content layer type dumping.

4:11 PM Changeset in webkit [276326] by Kate Cheney
  • 12 edits
    4 adds in trunk

Preconnect tasks and preflight checks do not correctly mark app-bound context string
https://bugs.webkit.org/show_bug.cgi?id=224779
<rdar://problem/76738879>

Reviewed by Brent Fulgham.

Source/WebCore:

Tests: http/tests/in-app-browser-privacy/context-string-preconnect.html

http/tests/in-app-browser-privacy/context-string-preflight.html

  • loader/CrossOriginAccessControl.cpp:

(WebCore::createAccessControlPreflightRequest):
CORS preflight case.

Source/WebKit:

We are using request.firstPartyForCookies() to set the app-bound request
context as of https://bugs.webkit.org/show_bug.cgi?id=224311. Some
cases like preconnect tasks and CORS preflight requests don't set this
value because it is not needed for cookie purposes. Since we are now
using it for app-bound requests, and the context is needed for all
network connections, even those that don't send bytes, we should set
the firstPartyForCookies for these cases.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::preconnectTo):
This is the code path for preconnecting to the main resource load, so
we can use the given URL as the first party.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::preconnectTo):
This is the code path for sub resources. We should use the document
firstPartyForCookies value.

Tools:

We should clear data between tests to avoid flakiness or failures.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::clearAppBoundNavigationData):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::clearAppBoundNavigationData):

LayoutTests:

Layout test coverage.

  • http/tests/in-app-browser-privacy/context-string-for-subframe.html:

Drive by fix to create the subframe with JS so we can add a dummy
parameter to avoid caching and causing flakiness. Found this while
testing for flakiness in new tests.

  • http/tests/in-app-browser-privacy/context-string-preconnect-expected.txt: Added.
  • http/tests/in-app-browser-privacy/context-string-preconnect.html: Added.
  • http/tests/in-app-browser-privacy/context-string-preflight-expected.txt: Added.
  • http/tests/in-app-browser-privacy/context-string-preflight.html: Added.

Test an unsuccessful preflight request so a real request doesn't
override the stored context data for testing purposes.

3:45 PM Changeset in webkit [276325] by Aditya Keerthi
  • 9 edits in trunk/Source

[iOS][FCR] Update date/time picker appearance
https://bugs.webkit.org/show_bug.cgi?id=224794
<rdar://problem/76785859>

Reviewed by Wenson Hsieh.

Source/WebCore:

  • en.lproj/Localizable.strings:

Remove now unused string.

  • platform/LocalizedStrings.cpp:
  • platform/LocalizedStrings.h:
  • platform/cocoa/LocalizedStringsCocoa.mm:

(WebCore::formControlDoneButtonTitle):

Moved definition out of PLATFORM(WATCHOS) in LocalizedStrings.cpp and
into LocalizedStringsCocoa, so that the "Done" string can be used by
PLATFORM(IOS_FAMILY).

Source/WebKit:

Date/time pickers should have a system material background and should
avoid obscuring the associated element when possible.

  • Platform/spi/ios/UIKitSPI.h:

Add new SPI declarations to support date/time picker modifications.

  • UIProcess/ios/WKContentViewInteraction.mm:

(createTargetedPreview):
(createFallbackTargetedPreview):
(-[WKContentView _createTargetedContextMenuHintPreviewForFocusedElement]):

Set the UITargetedPreview background color to clearColor when
presenting a date/time picker, so that the presented picker has a
visible material effect. Without this change, the picker would have a
solid white or black background.

  • UIProcess/ios/forms/WKDateTimeInputControl.mm:

(-[WKDateTimePickerViewController initWithDelegate:]):
(-[WKDateTimePickerViewController viewDidLoad]):

Add a system material background to the date picker using
UIVisualEffectView.

(-[WKDateTimePickerViewController datePickerChanged:]):
(-[WKDateTimePickerViewController resetButtonPressed:]):
(-[WKDateTimePickerViewController doneButtonPressed:]):
(-[WKDateTimePickerViewController datePickerInsets]):
(-[WKDateTimePickerViewController preferredDatePickerSize]):
(-[WKDateTimePickerViewController preferredContentSize]):
(-[WKDateTimePickerViewController date]):
(-[WKDateTimePickerViewController setDate:]):
(-[WKDateTimePickerViewController setDatePickerMode:]):
(-[WKDateTimePickerViewController timeZone]):
(-[WKDateTimePickerViewController setTimeZone:]):
(-[WKDateTimePickerViewController calendar]):
(-[WKDateTimePicker initWithView:datePickerMode:]):
(-[WKDateTimePicker _preferredEdgeInsetsForDateTimePicker]):

Attempt to present the date picker in a way that does not obscure the
element.

(-[WKDateTimePicker _contextMenuInteraction:styleForMenuWithConfiguration:]):
(-[WKDateTimePicker contextMenuInteraction:configurationForMenuAtLocation:]):
(-[WKDateTimePicker dateTimePickerViewControllerDidChangeDate:]):
(-[WKDateTimePicker dateTimePickerViewControllerDidPressResetButton:]):
(-[WKDateTimePicker dateTimePickerViewControllerDidPressDoneButton:]):
(-[WKDateTimePicker shouldForceGregorianCalendar]):
(-[WKDateTimePicker dealloc]):
(-[WKDateTimePicker _timeZoneOffsetFromGMT:]):
(-[WKDateTimePicker _sanitizeInputValueForFormatter:]):
(-[WKDateTimePicker dateFormatterForPicker]):
(-[WKDateTimePicker _dateChangedSetAsNumber]):
(-[WKDateTimePicker _dateChangedSetAsString]):
(-[WKDateTimePicker setDateTimePickerToInitialValue]):
(-[WKDateTimePicker controlView]):

Updated this method to return nil, matching other form controls that
do not present a keyboard input view (example: <select>).

(-[WKDateTimePicker controlBeginEditing]):
(-[WKDateTimePicker controlEndEditing]):
(-[WKDateTimePicker calendarType]):
(-[WKDateTimePicker hour]):
(-[WKDateTimePicker minute]):
(-[WKDateTimePicker setHour:minute:]):

3:42 PM Changeset in webkit [276324] by keith_miller@apple.com
  • 13 edits in trunk/Source

FullGCActivityCallback should use the percentage of pages uncompressed in RAM to determine deferral.
https://bugs.webkit.org/show_bug.cgi?id=224817

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Right now we try to determine if too many pages are paged out by
dereferencing them and bailing out of the GC if we go over a
deadline. While this works if the only goal is to avoid causing
extensive thrashing on spinny disks (HDD), it doesn't prevent
thrashing when access to disk is fast (e.g. SSD). This is because
on fast disks the proportional time to load the memory from disk
is much lower. Additionally, on SSDs in particular we don't want
to load the pages into RAM then bail as that will force a
different page onto disk, increasing wear.

This patch switches to asking the OS if each MarkedBlock is paged
out. Then if we are over a threshold we wait until we would have
GC'd anyway. This patch uses the (maxVMGrowthFactor - 1) as the
percentage of "slow" pages (paged out or compressed) needed to
defer the GC. The idea behind that threshold is that if we add
that many pages then the same number of pages would be forced
out of RAM for us to do a GC anyway (in the limit).

  • heap/BlockDirectory.cpp:

(JSC::BlockDirectory::updatePercentageOfPagedOutPages):
(JSC::BlockDirectory::isPagedOut): Deleted.

  • heap/BlockDirectory.h:
  • heap/FullGCActivityCallback.cpp:

(JSC::FullGCActivityCallback::doCollection):

  • heap/Heap.cpp:

(JSC::Heap::isPagedOut):

  • heap/Heap.h:
  • heap/MarkedSpace.cpp:

(JSC::MarkedSpace::isPagedOut):

  • heap/MarkedSpace.h:
  • runtime/OptionsList.h:

Source/WebKit:

Add mincore to the acceptable syscall list.

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

Source/WTF:

Add a noexcept flavor of FunctionTraits. On Linux mincore (and probably other syscalls) are marked noexcept so the existing overloads don't work.

  • wtf/FunctionTraits.h:
3:37 PM Changeset in webkit [276323] by basuke.suzuki@sony.com
  • 2 edits in trunk/Tools

[PlayStation] Remove warnings for unused parameter.
https://bugs.webkit.org/show_bug.cgi?id=224830

Reviewed by Darin Adler.

  • MiniBrowser/playstation/main.cpp:

(main):

3:33 PM Changeset in webkit [276322] by Cameron McCormack
  • 1 edit
    2 adds in trunk/LayoutTests

Add test for line breaking around inline-blocks.
https://bugs.webkit.org/show_bug.cgi?id=224832

Reviewed by Alan Bujtas.

  • fast/css/inline-block-line-break-expected.html: Added.
  • fast/css/inline-block-line-break.html: Added.
3:25 PM Changeset in webkit [276321] by Ruben Turcios
  • 1 copy in tags/Safari-612.1.11.1

Tag Safari-612.1.11.1.

3:13 PM Changeset in webkit [276320] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebKit

Platform Key registration does not prompt for user password when in biometric lockout
https://bugs.webkit.org/show_bug.cgi?id=224828
<rdar://76907840>

Reviewed by Brent Fulgham.

Covered by manul tests.

  • UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:

(WebKit::LocalConnection::verifyUser):

3:06 PM Changeset in webkit [276319] by commit-queue@webkit.org
  • 5 edits in trunk

gtest.a exports symbols, causing link-time warning: direct access in function ... means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
https://bugs.webkit.org/show_bug.cgi?id=224812

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-20
Reviewed by Alexey Proskuryakov.

Compile and use gtest as a static library that does not export any symbols.
Fixes link-time warnings about mismatch of symbol visibility. The error occurs when
gtest.a is compiled exporting symbols with default visibility, but the clients use the library
and hide the symbols via ld flags.

Source/ThirdParty:

  • gtest/xcode/Config/StaticLibraryTarget.xcconfig:

Compile the static gtest with GTEST_API_=

Tools:

  • TestWebKitAPI/Configurations/TestWTF.xcconfig:
  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:

Compile the gtest clients with GTEST_API_=

2:45 PM Changeset in webkit [276318] by commit-queue@webkit.org
  • 2 edits in trunk/Source/ThirdParty/ANGLE

MacCatalyst ANGLE is linked with @loader_path/../../../libANGLE-shared.dylib
https://bugs.webkit.org/show_bug.cgi?id=224602

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-20
Reviewed by Alexey Proskuryakov.

  • Configurations/ANGLE-dynamic.xcconfig:
1:21 PM Changeset in webkit [276317] by Fujii Hironori
  • 4 edits in trunk

editing/execCommand/insert-image-in-composed-list.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=224801

Reviewed by Don Olmstead.

Source/WebCore:

This crash were happened for Release builds of GTK port compiled
by GCC and WinCairo port compiled by Clang 12.

As per the comment of Position::containerNode(), it returns null
in some cases.

  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::removeRedundantBlocks): Added
null checking for the return value of Position::containerNode().

LayoutTests:

  • platform/gtk/TestExpectations: Unmarked it.
1:19 PM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
1:16 PM Changeset in webkit [276316] by don.olmstead@sony.com
  • 12 edits in trunk

[CMake] Don't use FORWARDING_HEADERS_DIR for JSC GLib headers
https://bugs.webkit.org/show_bug.cgi?id=224821

Reviewed by Michael Catanzaro.

.:

Create CMake variables JavaScriptCoreGLib_FRAMEWORK_HEADERS_DIR and
JavaScriptCoreGLib_DERIVED_SOURCES_DIR to represent where the JavaScriptCore GLib headers
and derived sources will reside. The names and locations set then follow along with the
conventions used for the other frameworks.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/JavaScriptCore:

Use JavaScriptCoreGLib_FRAMEWORK_HEADERS_DIR and JavaScriptCoreGLib_DERIVED_SOURCES_DIR
for GLib JSC headers instead of FORWARDING_HEADERS_DIR and DERIVED_SOURCES_DIR.

  • GLib.cmake:
  • PlatformGTK.cmake:

Source/WebKit:

Use JavaScriptCoreGLib_FRAMEWORK_HEADERS_DIR and JavaScriptCoreGLib_DERIVED_SOURCES_DIR
for GLib JSC headers instead of FORWARDING_HEADERS_DIR and DERIVED_SOURCES_DIR.

  • PlatformGTK.cmake:

Tools:

Use JavaScriptCoreGLib_FRAMEWORK_HEADERS_DIR and JavaScriptCoreGLib_DERIVED_SOURCES_DIR
for GLib JSC headers instead of FORWARDING_HEADERS_DIR and DERIVED_SOURCES_DIR.

  • MiniBrowser/wpe/CMakeLists.txt:
  • TestWebKitAPI/glib/CMakeLists.txt:
  • TestWebKitAPI/glib/PlatformWPE.cmake:
1:02 PM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
12:29 PM Changeset in webkit [276315] by aakash_jain@apple.com
  • 5 edits in trunk/Tools

Switch commit-queue back to git.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=224762

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/factories.py:

(CommitQueueFactory.init): Use git.webkit.org for Commit-Queue.

  • CISupport/ews-build/factories_unittest.py:

(TestCommitQueueFactory.test_commit_queue_factory): Updated unit-tests.

  • CISupport/ews-build/steps.py:

(CheckOutSource.init):
(PushCommitToWebKitRepo.evaluateCommand):

11:38 AM Changeset in webkit [276314] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[macOS] Add additional logging to help identify SSO dialog dismissals
https://bugs.webkit.org/show_bug.cgi?id=224703
<rdar://problem/76783787>

Reviewed by Maciej Stachowiak.

Add logging around the SSO sheet life cycle to help identify edge cases..."

  • UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm:

(WebKit::SOAuthorizationSession::presentViewController):
(WebKit::SOAuthorizationSession::dismissViewController):

11:27 AM Changeset in webkit [276313] by Ruben Turcios
  • 5 edits
    2 copies
    1 add in branches/safari-612.1.11-branch/Source/WebCore

Cherry-pick r275907. rdar://problem/76907146

[WebIDL] includes for Conditional dictionary members should also be guarded
https://bugs.webkit.org/show_bug.cgi?id=224501
<rdar://problem/76598492>

Reviewed by Tim Horton.

WebKitAdditions sometimes needs to conditionally include IDL files and in those cases the
generated JS*.h might not get created even though the wrapped C++ type does exist. In
these cases, we should also guard the #include JS*.h (in addition to the already guarded
usage of the wrapped C++ type in convertDictionary).

  • bindings/scripts/CodeGeneratorJS.pm: (GenerateDictionaryImplementationContent):
  • bindings/scripts/test/TestDictionary.idl: Added.
  • bindings/scripts/test/JS/JSTestDictionary.h: Added.
  • bindings/scripts/test/JS/JSTestDictionary.cpp: Added.
  • bindings/scripts/test/TestDictionaryWithOnlyConditionalMembers.idl:
  • bindings/scripts/test/JS/JSTestDictionaryWithOnlyConditionalMembers.cpp:
  • bindings/scripts/test/SupplementalDependencies.dep:

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

11:02 AM Changeset in webkit [276312] by Wenson Hsieh
  • 3 edits in trunk/Source/WebKit

[Mac Catalyst] Adopt UIView API to avoid showing focus rings around WKContentView
https://bugs.webkit.org/show_bug.cgi?id=224819

Reviewed by Tim Horton.

Replace our usage of the deprecated -[UIView _setFocusRingType:] method with API on UIView that achieves
the same effect.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _commonInitializationWithProcessPool:configuration:]):

10:19 AM Changeset in webkit [276311] by commit-queue@webkit.org
  • 5 edits in trunk

Fix use-after-move introduced in r275407
https://bugs.webkit.org/show_bug.cgi?id=224045

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-20
Reviewed by Darin Adler.

Source/WebKit:

  • UIProcess/ios/WKGeolocationProviderIOS.mm:

(-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Geolocation.mm:

(-[FakeWebGeolocationPolicyDecider receivedRequest]):
(-[FakeWebGeolocationPolicyDecider decidePolicyForGeolocationRequestFromOrigin:requestingURL:window:listener:]):
(fakeWebGeolocationPolicyDecider):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/ios/UIKitSPI.h:
10:17 AM Changeset in webkit [276310] by Razvan Caliman
  • 11 edits in trunk/Source/WebInspectorUI

Web Inspector: Tree Outlines: ondetach can be called without onattach ever being called
https://bugs.webkit.org/show_bug.cgi?id=224652
<rdar://problem/76746385>

Reviewed by Devin Rousso.

Ensure TreeElement.ondetach() cannot be called if the conditions
for previously calling TreeElement.onattach() have not been met.

  • UserInterface/Views/TreeElement.js:

(WI.TreeElement.prototype._detach):

10:13 AM Changeset in webkit [276309] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[WPE] QML WPEView dynamic loading fails
https://bugs.webkit.org/show_bug.cgi?id=224814

Patch by Marco Felsch <m.felsch@pengutronix.de> on 2021-04-20
Reviewed by Philippe Normand.

The scene graph can be initialized when we receive window handle change
notification and so we will not receive a scenegraph initialization
notification. In such case we need to initzialize it ourself.

No new tests. Testing can be done if the WPEView is moved to a
QML component which gets loaded later on demand.

  • UIProcess/API/wpe/qt/WPEQtView.cpp:

(WPEQtView::configureWindow):

9:50 AM Changeset in webkit [276308] by commit-queue@webkit.org
  • 7 edits in trunk

[WPE][Qt] Fix build failure after r270690
https://bugs.webkit.org/show_bug.cgi?id=223070

Patch by Marco Felsch <m.felsch@pengutronix.de> on 2021-04-20
Reviewed by Philippe Normand.

Source/WebKit:

WPE fails to build with -DENABLE_WPE_QT_API=ON after adapting the
visibility for linked frameworks done by r270690.

The reason for that is that the visibility is now more strict and we
have to add the WTF dependecy or drop the WTF fast-allocate mechanism.

Adding the WTF dependency is a bit odd since this would staticly link
the WTF lib into a small wrapper lib. Also this lib has nothing to do
with Webkit at all. It is just a QT adaption library.

No new tests, it can be build again.

  • UIProcess/API/wpe/qt/WPEQtView.cpp:

(WPEQtView::notifyLoadChangedCallback):
(WPEQtView::notifyLoadFailedCallback):
(WPEQtView::runJavaScript):

  • UIProcess/API/wpe/qt/WPEQtViewBackend.cpp:

(WPEQtViewBackend::create):

  • UIProcess/API/wpe/qt/WPEQtViewBackend.h:
  • UIProcess/API/wpe/qt/WPEQtViewLoadRequest.h:

Drop WTF usage and use system allocator since the lib has nothing to do
with Webkit at all.

Tools:

  • Scripts/webkitpy/style/checker.py:

Add exception for WPE QT wrapper library to use system alloc instead
of WTF.

9:16 AM Changeset in webkit [276307] by Aditya Keerthi
  • 5 edits in trunk

REGRESSION (r275523): [iOS] Opaque system fill colors are incorrect in dark mode
https://bugs.webkit.org/show_bug.cgi?id=224800
<rdar://problem/76878335>

Reviewed by Darin Adler.

Source/WebCore:

r275523 updated form control backgrounds to use opaque variants of
system colors. This change was implemented by blending the system
colors over a white background. However, in dark mode, the colors
should be blended over a black background, to retain a dark appearance.

Updated an existing test to validate the colors in light and dark mode.

  • rendering/RenderThemeIOS.mm:

(WebCore::systemColorFromCSSValueSystemColorInformation):

Added a useDarkAppearance parameter, so that the system color can be
blended over black when necessary.

(WebCore::systemColorFromCSSValueID):
(WebCore::RenderThemeIOS::cssValueToSystemColorMap const):

LayoutTests:

  • fast/css/ios/system-color-for-css-value-expected.txt:
  • fast/css/ios/system-color-for-css-value.html:
8:47 AM Changeset in webkit [276306] by basuke.suzuki@sony.com
  • 14 edits in trunk/Source

Remove UNUSED warnings based on the configuration.
https://bugs.webkit.org/show_bug.cgi?id=224787

Reviewed by Darin Adler.

Added UNUSED_VARIABLE or its variant to suppress warnings based on the configuration.

Source/WebCore:

No new tests because it just for suppression of the warnings.

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::willSendRequestInternal):

  • page/PageConsoleClient.cpp:

(WebCore::snapshotCanvas):

  • page/PerformanceLogging.cpp:

(WebCore::PerformanceLogging::didReachPointOfInterest):

  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::FontCache::systemFallbackForCharacters):

  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

Source/WebKit:

  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:

(WebKit::ResourceLoadStatisticsStore::debugLogDomainsInBatches):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::prepareToSuspend):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestStorageSpace):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):

  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::installServiceWorker):

  • WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:

(WebKit::pageIDFromWebFrame):
(WebKit::frameIDFromWebFrame):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::prepareToSuspend):

8:45 AM Changeset in webkit [276305] by Chris Dumez
  • 5 edits in trunk/Source

Make sure we don't exit the GPUProcess too frequently while under memory pressure
https://bugs.webkit.org/show_bug.cgi?id=224798

Reviewed by Darin Adler.

Source/WebKit:

We've recently started to exit the GPUProcess if idle and under memory pressure, in order
to save memory. This is great but we wouldn't want to repeatedly exit and relaunch the
GPUProcess while under memory pressure either. To address this, I am adding a condition to
GPUProcess::canExitUnderMemoryPressure() to make sure we don't exit the GPUProcess if it's
been running for less than 5 seconds.

To avoid generating flakiness in our benchmarks and API tests, I am disabling this condition
if the memory pressure is simulated (via notifyutil -p org.WebKit.lowMemory).

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::canExitUnderMemoryPressure const):

  • GPUProcess/GPUProcess.h:

Source/WTF:

Add member function to the MemoryPressureHandler to indicate if we're currently simulating memory
pressure or not.

  • wtf/MemoryPressureHandler.h:

(WTF::MemoryPressureHandler::isSimulatingMemoryPressure const):

7:51 AM Changeset in webkit [276304] by Chris Dumez
  • 5 edits in trunk/Source/WebKit

Unreviewed, reverting r276271.

It did not fix the Canvas-Arcs subtest on the bots

Reverted changeset:

"MotionMark's Canvas-Arcs subtest is broken if the GPUProcess
is not yet running"
https://bugs.webkit.org/show_bug.cgi?id=224778
https://commits.webkit.org/r276271

7:48 AM Changeset in webkit [276303] by Darin Adler
  • 25 edits
    1 add in trunk/Source

Refactor sorted array mapping machinery in LocaleToScriptMapping.cpp for reuse elsewhere
https://bugs.webkit.org/show_bug.cgi?id=224733

Reviewed by Yusuke Suzuki.

Source/WebCore:

  • Modules/indexeddb/client/IDBConnectionToServer.h: Removed unneeded includes.
  • Modules/mediastream/RTCRtpSFrameTransformer.h: Ditto.
  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h: Ditto.
  • Modules/webauthn/AuthenticatorCoordinatorClient.h: Ditto.
  • Modules/websockets/WebSocketChannel.cpp: Ditto.
  • Modules/websockets/WebSocketDeflater.cpp: Ditto.
  • bindings/IDLTypes.h: Ditto.
  • bridge/jsc/BridgeJSC.h: Ditto.
  • contentextensions/DFANode.h: Ditto.
  • contentextensions/NFAToDFA.cpp: Ditto.
  • contentextensions/Term.h: Ditto.
  • css/typedom/StylePropertyMap.h: Ditto.
  • css/typedom/StylePropertyMapReadOnly.cpp: Ditto.
  • cssjit/SelectorCompiler.cpp: Ditto.
  • platform/text/LocaleToScriptMapping.cpp:

(WebCore::scriptNameToCode): Refactor to use SortedArrayMap. Also changed to take StringView.
(WebCore::localeToScriptCodeForFontSelection): Ditto. Cut down on memory allocation by using
StringView instead of String while looping through substrings.

  • platform/text/LocaleToScriptMapping.h: Changed scriptNameToCode to take StringView.

Source/WebKit:

  • NetworkProcess/PrivateClickMeasurementManager.h: Removed unused include of HashMap.h.
  • NetworkProcess/cache/NetworkCacheSubresourcesEntry.h: Ditto.
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::createSelectorExceptionMap): Deleted.
(WebKit::commandNameForSelectorName): Use SortedArrayMap instead of HashMap.

Source/WTF:

  • WTF.xcodeproj/project.pbxproj: Added SortedArrayMap.h.
  • wtf/CMakeLists.txt: Ditto.
  • wtf/SortedArrayMap.h: Added. Builds on the idiom in LocalToScriptMapping, and to be

generic uses std::pair instead of custom structures. Includes the ComparableASCIILiteral
structure for maps that are keyed by case-sensitive ASCII strings.

  • wtf/StdLibExtras.h:

(WTF::binarySearchImpl): Use auto in one place to make this a bit more generic.

7:07 AM Changeset in webkit [276302] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC] Implement Box::isSizeContainmentBox()
https://bugs.webkit.org/show_bug.cgi?id=224799

Reviewed by Antti Koivisto.

This is part of https://www.w3.org/TR/css-contain-2/#containment-size

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::isSizeContainmentBox const):

  • layout/layouttree/LayoutBox.h:
4:38 AM Changeset in webkit [276301] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

AudioSourceProviderAVFObjC uses atomic variables but also locks with mutex
https://bugs.webkit.org/show_bug.cgi?id=224543

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-20
Reviewed by Darin Adler.

Remove the use of std::atomic, the variables are already protected by the
mutex.

  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:

(WebCore::AudioSourceProviderAVFObjC::provideInput):
(WebCore::AudioSourceProviderAVFObjC::process):

4:29 AM Changeset in webkit [276300] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebKit

WebGL GPU Process implementation should use thread safety annotations
https://bugs.webkit.org/show_bug.cgi?id=224752

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-20
Reviewed by Kenneth Russell.

Make WebGL GPU process implementation use thread safety analysis.

Mark up the guarded variables in IPC Stream implementation using
clang thread safety analysis annotations.

  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::paintImageDataToImageBuffer):

  • Platform/IPC/StreamConnectionWorkQueue.cpp:

(IPC::StreamConnectionWorkQueue::dispatch):
(IPC::StreamConnectionWorkQueue::addStreamConnection):
(IPC::StreamConnectionWorkQueue::removeStreamConnection):
(IPC::StreamConnectionWorkQueue::processStreams):

  • Platform/IPC/StreamConnectionWorkQueue.h:
  • Platform/IPC/StreamServerConnection.cpp:

(IPC::StreamServerConnectionBase::enqueueMessage):

  • Platform/IPC/StreamServerConnection.h:

(IPC::StreamServerConnection<Receiver>::startReceivingMessages):
(IPC::StreamServerConnection<Receiver>::stopReceivingMessages):
(IPC::StreamServerConnection<Receiver>::dispatchStreamMessages):
(IPC::StreamServerConnection<Receiver>::dispatchOutOfStreamMessage):

3:54 AM Changeset in webkit [276299] by Martin Robinson
  • 5 edits in trunk/Source/WebCore

Re-land: Eliminate ScrollAnimatorGeneric::m_smoothAnimation
https://bugs.webkit.org/show_bug.cgi?id=222588

Reviewed by Žan Doberšek.

No new tests. This change should not change behavior.

Eliminate the extra ScrollAnimationSmooth in ScrollAnimatorGeneric. The base
class already knows how to do scroll animations for programmatic scrolls,
so we can reuse that animation for doing ScrollAnimator::scroll(...). This
makes the code easier to understand and should simplify managing interactions
between the different animations in the future.

Changes since first version: Now only update the current position of the animation
if it is not active. This is the behavior that was used in ScrollAnimatorGeneric
and is the correct behavior when using ScrollAnimationSmooth.

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::ScrollAnimator): Renamed m_animationProgrammaticScroll
to m_scrollAnimation. The more generic name reflects the fact that it is also
used for doing scrolling from UI interaction now.
(WebCore::ScrollAnimator::scroll): Use the ScrollAnimationSmooth member to do
animated scrolls when necessary.
(WebCore::ScrollAnimator::scrollToPositionWithoutAnimation): Make sure the animation
is up to date with the current position when scrolling without it. This is
how ScrollAnimatorGeneric treated its ScrollAnimationSmooth.
(WebCore::ScrollAnimator::scrollToPositionWithAnimation): Rename member.
(WebCore::ScrollAnimator::cancelAnimations): Ditto.
(WebCore::ScrollAnimator::willEndLiveResize): Ditto.
(WebCore::ScrollAnimator::didAddVerticalScrollbar): Ditto.
(WebCore::ScrollAnimator::didAddHorizontalScrollbar): Ditto.

  • platform/ScrollAnimator.h: Ditto.
  • platform/generic/ScrollAnimatorGeneric.cpp:

(WebCore::ScrollAnimatorGeneric::ScrollAnimatorGeneric): Eliminate ScrollAnimationSmooth.
(WebCore::ScrollAnimatorGeneric::scrollToPositionWithoutAnimation): Ditto.
(WebCore::ScrollAnimatorGeneric::didAddVerticalScrollbar): Ditto.
(WebCore::ScrollAnimatorGeneric::didAddHorizontalScrollbar): Ditto.
(WebCore::ScrollAnimatorGeneric::ensureSmoothScrollingAnimation): Deleted.
(WebCore::ScrollAnimatorGeneric::scroll): Deleted.
(WebCore::ScrollAnimatorGeneric::willEndLiveResize): Deleted.

  • platform/generic/ScrollAnimatorGeneric.h:
3:53 AM WebKitGTK/2.32.x edited by Philippe Normand
(diff)
3:25 AM Changeset in webkit [276298] by ysuzuki@apple.com
  • 2 edits in trunk/JSTests

[JSC] Limit memory allocation size of JSTests/stress/early-return-from-builtin.js
https://bugs.webkit.org/show_bug.cgi?id=224803
<rdar://problem/75597901>

Reviewed by Ryosuke Niwa.

Add limit to JSTests/stress/early-return-from-builtin.js to avoid infinite allocation.

  • stress/early-return-from-builtin.js:

(let.iter.Symbol.iterator):

3:24 AM Changeset in webkit [276297] by Manuel Rego Casasnovas
  • 2 edits
    3 adds in trunk/LayoutTests

[WPE] Update expectations for 2 :focus-visible tests
https://bugs.webkit.org/show_bug.cgi?id=224808

Unreviewed test gardening.

The failures on these tests are related to the lack of support for <input type="color"> in WPE.

  • platform/wpe/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/css/selectors/focus-visible-003-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/css/selectors/focus-visible-004-expected.txt: Added.
3:19 AM Changeset in webkit [276296] by cathiechen
  • 10 edits
    7 adds in trunk/LayoutTests

Update html/rendering/replaced-elements/attributes-for-embedded-content-and-images/ tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=224748

Reviewed by Rob Buis.

LayoutTests/imported/w3c:

Update the tests for "mapping attribute width and height as the implicit aspect ratio" which are based on the latest agreement
from WPT commit 19445e7b39.

  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/canvas-aspect-ratio-expected.txt:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/canvas-aspect-ratio.html:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio-expected.txt:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/number-placeholder-right-aligned-expected.html: Added.
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/number-placeholder-right-aligned.html: Added.
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/picture-aspect-ratio-expected.txt: Added.
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/picture-aspect-ratio.html: Added.
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js: Added.

(test_computed_style_aspect_ratio):

  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/w3c-import.log: Added.
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio-expected.txt:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio.html:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/w3c-import.log:

LayoutTests:

picture-aspect-ratio.html is flaky.

2:50 AM Changeset in webkit [276295] by Chris Lord
  • 2 edits in trunk/Source/WebCore

Don't use the full CSS parser for CSSFontFaceSet
https://bugs.webkit.org/show_bug.cgi?id=224749

Reviewed by Darin Adler.

Replace use of the full CSS parser in CSSFontFaceSet with
CSSPropertyParserWorkerSafe::parseFont to parse font shorthands. This
makes CSSFontFaceSet safe to use in a Worker (required for
OffscreenCanvas) and ought also to be faster, at the cost of a slight
increase in lines of code.

No new tests, covered by existing tests.

  • css/CSSFontFaceSet.cpp:

(WebCore::computeFontSelectionRequest):
(WebCore::CSSFontFaceSet::matchingFacesExcludingPreinstalledFonts):

2:22 AM Changeset in webkit [276294] by Carlos Garcia Campos
  • 2 edits in trunk

[WPE] Switch to libsoup3 by default
https://bugs.webkit.org/show_bug.cgi?id=224802

Reviewed by Žan Doberšek.

  • Source/cmake/OptionsWPE.cmake:
2:14 AM Changeset in webkit [276293] by commit-queue@webkit.org
  • 11 edits in trunk

Implement CSS display property 2-value syntax
https://bugs.webkit.org/show_bug.cgi?id=224574

Patch by Tim Nguyen <ntim@apple.com> on 2021-04-20
Reviewed by Darin Adler.

Except for list-item which doesn't have layout support for different variants.
Also fix a WPT to expect the most backwards-compatible form for display: flow computed value.

Test: web-platform-tests/css/css-display/parsing/display-valid.html

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-display/parsing/display-valid-expected.txt:
  • web-platform-tests/html/rendering/widgets/button-layout/computed-style-expected.txt:
  • web-platform-tests/html/rendering/widgets/button-layout/computed-style.html:
  • web-platform-tests/html/rendering/widgets/button-layout/display-other-expected.txt:

Source/WebCore:

  • css/CSSValueKeywords.in:
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeDisplay):
(WebCore::CSSPropertyParser::parseSingleValue):

LayoutTests:

  • platform/mac-wk1/imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/computed-style-expected.txt:
1:46 AM Changeset in webkit [276292] by Ben Nham
  • 2 edits in trunk/Source/JavaScriptCore

LinkBuffer fails to build when MALLOC_HEAP_BREAKDOWN is enabled
https://bugs.webkit.org/show_bug.cgi?id=224722

Reviewed by Yusuke Suzuki.

When ENABLE_MALLOC_HEAP_BREAKDOWN is set, LinkBuffer causes a build failure at link time
since it never defines its debugHeap. Fix that.

  • assembler/LinkBuffer.cpp:
12:44 AM Changeset in webkit [276291] by Diego Pino Garcia
  • 3 edits
    2 deletes in trunk/LayoutTests

[WPE] Unreviewed test gardening. Update baselines and test expectations of recent failures.

  • platform/wpe/TestExpectations:
  • platform/wpe/fast/canvas/webgl/index-validation-with-subsequent-draws-expected.txt: Removed.
  • platform/wpe/fast/encoding/utf-16-little-endian-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/resource-timing/resource_timing.worker-expected.txt: Removed.
12:26 AM Changeset in webkit [276290] by ysuzuki@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Use FixedVector for LLIntPrototypeLoadAdaptiveStructureWatchpoint vector
https://bugs.webkit.org/show_bug.cgi?id=224729

Reviewed by Darin Adler.

Replace Vector<LLIntPrototypeLoadAdaptiveStructureWatchpoint> with FixedVector.

  • bytecode/CodeBlock.h:
  • bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp:

(JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::LLIntPrototypeLoadAdaptiveStructureWatchpoint):
(JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::initialize):

  • bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setupGetByIdPrototypeCache):

12:14 AM Changeset in webkit [276289] by Diego Pino Garcia
  • 3 edits
    2 adds in trunk/LayoutTests

[GTK][WPE] Unreviewed test gardening. Emit new port baselines after r276193.

  • platform/gtk/TestExpectations:
  • platform/gtk/security/block-test-expected.txt: Added.
  • platform/wpe/security/block-test-expected.txt:
12:12 AM Changeset in webkit [276288] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

REGRESSION(r224516): Remote WebGL Context is not create due to RemoteRenderingBackend not being created
https://bugs.webkit.org/show_bug.cgi?id=224751

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-20
Reviewed by Chris Dumez.

Fix WebGL GPU process after r275922.

RemoteRenderingBackend must be created so that RemoteGraphicsContextGL
can take a reference of it.

Fixes layout test failures when run with --gpu-process.

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::ensureBackendCreated):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::createGraphicsContextGL const):

Apr 19, 2021:

11:33 PM Changeset in webkit [276287] by Antti Koivisto
  • 16 edits in trunk

Render tree updates for Text node content mutations should happen during rendering update
https://bugs.webkit.org/show_bug.cgi?id=222406
<rdar://problem/74822830>

Reviewed by Simon Fraser.

Source/WebCore:

Calls to Text.insertData and similar should not mutate render tree synchronously.
Instead render tree should be updated during the next rendering update along with
any style changes.

These updates already go via RenderTreeUpdater. We just need to save the information
about which nodes need updating so the next rendering update can pick them up.

This seems to help with some performance benchmarks.

  • dom/CharacterData.cpp:

(WebCore::CharacterData::parserAppendData):
(WebCore::CharacterData::setDataAndUpdate):

Move in-tree check to the updateRendererAfterContentChange and make it use isConnected().

  • dom/Document.cpp:

(WebCore::Document::removedLastRef):
(WebCore::Document::resolveStyle):

Include the text update when updating the render tree.

(WebCore::Document::updateTextRenderer):

Create a text update that will get flushed during the next rendering update.

(WebCore::Document::needsStyleRecalc const):

We need to recalc if there are pending text updates.

  • dom/Document.h:
  • dom/Text.cpp:

(WebCore::Text::splitText):

Use updateRendererAfterContentChange instead of poking render tree directly.

(WebCore::Text::updateRendererAfterContentChange):

  • rendering/updating/RenderTreeUpdater.cpp:
  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::TreeResolver):
(WebCore::Style::TreeResolver::resolve):

  • style/StyleTreeResolver.h:

(WebCore::Style::TreeResolver::TreeResolver):

  • style/StyleUpdate.cpp:

(WebCore::Style::Update::addText):

Merge text updates.

(WebCore::Style::Update::addPossibleRoot):

  • style/StyleUpdate.h:

(WebCore::Style::Update::roots const):
(WebCore::Style::Update:: const): Deleted.

Refcount the nodes since this now has longer lifetime.

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::deleteInsignificantText):

Ensure we leave deleteInsignificantText with updated render tree. Clients expect that.
Do layout (instead of just style update) for consistency, deleteInsignificantText does one anyway in beginning.

  • editing/markup.cpp:

(WebCore::replaceChildrenWithFragment):

Pending text update may ref the node so this refcount assert is not correct.

  • style/StyleUpdate.cpp:

(WebCore::Style::Update::addText):

LayoutTests:

These are progressions.

  • fast/text/splitText-dirty-lines-expected.txt:
  • fast/text/text-combine-surroundContents-crash-expected.txt:
  • imported/blink/fast/css/first-letter-range-insert-expected.txt:

Here we were actually drawing text that didn't exist in DOM anymore.

10:19 PM Changeset in webkit [276286] by commit-queue@webkit.org
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Build ANGLE dylib into WK_OVERRIDE_FRAMEWORKS_DIR in builds that use it
https://bugs.webkit.org/show_bug.cgi?id=224785
<rdar://76641662>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-19
Reviewed by Alexey Proskuryakov.

  • Configurations/ANGLE-dynamic.xcconfig:
10:15 PM Changeset in webkit [276285] by ysuzuki@apple.com
  • 8 edits in trunk/JSTests

[JSC] Rebaseline test results for new ICU
https://bugs.webkit.org/show_bug.cgi?id=224792

Reviewed by Mark Lam.

This patch updates some intl- tests' expectation since it is changed because of ICU CLDR data change.

  • stress/intl-datetimeformat-formatrange-relevant-extensions-ja.js:

(shouldBeOneOfThem):
(vm.icuVersion):

  • stress/intl-datetimeformat-formatrange-relevant-extensions.js:

(shouldBeOneOfThem):

  • stress/intl-datetimeformat-formatrange-should-not-handle-gregorian-change-date.js:

(shouldBe):
(vm.icuHeaderVersion):

  • stress/intl-datetimeformat-formatrangetoparts-relevant-extensions-ja.js:

(normalize):
(shouldBe):
(compareParts):
(shouldBeOneOfParts):
(shouldBeParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeOneOfParts.fmt5.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.vm.icuVersion):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeOneOfParts.fmt7.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeOneOfParts.fmt9.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeOneOfParts.fmt11.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeOneOfParts.fmt13.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeParts.fmt13.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeOneOfParts.fmt14.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeOneOfParts.fmt15.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.shouldBeOneOfParts.fmt16.formatRangeToParts):
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt1.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt2.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt3.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt4.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt5.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt6.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt7.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt8.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt9.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt10.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt11.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt12.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt13.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt14.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt15.formatRangeToParts): Deleted.
(Intl.DateTimeFormat.prototype.formatRangeToParts.compareParts.fmt16.formatRangeToParts): Deleted.

  • stress/intl-datetimeformat-formatrangetoparts-relevant-extensions.js:

(normalize):
(shouldBe):
(compareParts):
(shouldBeOneOfParts):
(shouldBeParts):

  • stress/intl-datetimeformat-formatrangetoparts-should-not-handle-gregorian-change-date.js:

(shouldBe):

  • stress/intl-datetimeformat.js:

(shouldBeOneOfThem):

9:49 PM Changeset in webkit [276284] by Chris Dumez
  • 5 edits in trunk

REGRESSION (r276189): GPUProcess.WebProcessTerminationAfterTooManyGPUProcessCrashes is crashing
https://bugs.webkit.org/show_bug.cgi?id=224790
<rdar://problem/76869318>

Reviewed by Darin Adler.

Source/WebKit:

GPUProcess.WebProcessTerminationAfterTooManyGPUProcessCrashes is intentionally repeatedly
killing the GPUProcess. As a result, the GPUProcess may get killed very shortly after
a relaunch and the RemoteAudioDestinationManager::StartAudioDestination synchronous IPC
may fail if it is ongoing at the time of the crash. This would cause m_destinationID to
not get initialized and then get sent as IPC parameter, thus crashing.

pre-r276189, we were not crashing because m_destinationID was not reset on crash and we
would thus send IPC for a destination that does not exist but at least the destinationID
would not be 0. This patch makes sure we don't try and send IPC at all when m_destinationID
is 0.

  • WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:

(WebKit::RemoteAudioDestinationProxy::connection):
(WebKit::RemoteAudioDestinationProxy::startRendering):
(WebKit::RemoteAudioDestinationProxy::stopRendering):
(WebKit::RemoteAudioDestinationProxy::storageChanged):

  • WebProcess/GPU/media/RemoteAudioDestinationProxy.h:

Tools:

Re-enable API test now that it is no longer crashing.

  • TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:

(TEST):

9:45 PM Changeset in webkit [276283] by Said Abou-Hallawa
  • 3 edits in trunk/Source/WebCore

cachedCGColor() and nsColor() are not thread-safe
https://bugs.webkit.org/show_bug.cgi?id=223033

Reviewed by Chris Dumez.

These functions will break if they are used by a worker thread.

  • platform/graphics/cg/ColorCG.cpp:

(WebCore::cachedCGColor):

  • platform/graphics/mac/ColorMac.mm:

(WebCore::nsColor):

8:26 PM Changeset in webkit [276282] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Gardened flaky failures after r224791.

  • platform/glib/TestExpectations:
7:26 PM Changeset in webkit [276281] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Media playback continues after backgrounding hosting application
https://bugs.webkit.org/show_bug.cgi?id=224776
<rdar://75707807>

Reviewed by Eric Carlson.

Tested by existing API test: WKWebViewPausePlayingAudioTests.OutOfWindow

When the MediaSessionHelperIOS was moved into the GPU process, no object remains listening for the
UIApplication{Will,Did}Enter{Foreground,Background}Notification rebroadcasted by WebPageIOS.

Rather than just rebroadcast the UIKit notification to all listeners within the WebContent process,
which may or may not be listening, just tell the current PlatformMediaSessionManager directly.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::applicationWillResignActive):
(WebKit::WebPage::applicationDidEnterBackground):
(WebKit::WebPage::applicationWillEnterForeground):
(WebKit::WebPage::applicationDidBecomeActive):

6:02 PM Changeset in webkit [276280] by Chris Dumez
  • 2 edits in trunk/Tools

Unreviewed, temporarily disable GPUProcess.DISABLED_WebProcessTerminationAfterTooManyGPUProcessCrashes
https://bugs.webkit.org/show_bug.cgi?id=224790

It is crashing. I will renable it with the fix at Bug 224790.

  • TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:

(TEST):

5:54 PM Changeset in webkit [276279] by Diego Pino Garcia
  • 5 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Update baselines and test expectations after r224791.

  • platform/glib/TestExpectations:
  • platform/glib/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/xhr/send-entity-body-none-expected.txt:
  • platform/glib/security/block-test-no-port-expected.txt:
5:18 PM Changeset in webkit [276278] by Patrick Angle
  • 3 edits in trunk/Source/WebInspectorUI

REGRESSION (r268691 && r270134): Web Inspector: Clicking on go-to arrow in Computed panel no longer works
https://bugs.webkit.org/show_bug.cgi?id=224774

Reviewed by Devin Rousso.

The Styles panel will not always be part of the same sidebar as the Computed panel as of r268691, so we should
look for the Styles panel in WI.detailsSidebar, which will report all of the panels it manages across multiple
sidebars. Additionally, as of r270134, there is no longer a private _visible property for
WI.StyleDetailsPanel, so it can not be used by WI.SpreadsheetRulesStyleDetailsPanel. Instead, visibility
should be determined by checking if the panel is attached and not pending layout.

  • UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:

(WI.ComputedStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty):

  • UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:

(WI.SpreadsheetRulesStyleDetailsPanel.prototype.scrollToSectionAndHighlightProperty):

4:37 PM Changeset in webkit [276277] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Enabled detailed error log when unit-tests fails
https://bugs.webkit.org/show_bug.cgi?id=224789

Unreviewed minor unit-test fix.

  • CISupport/ews-build/factories_unittest.py:

(TestCase): Set maxDiff to None.

4:03 PM Changeset in webkit [276276] by BJ Burg
  • 3 edits
    1 add in trunk/Tools

Can't use Web Inspector on web views made by TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=147073
<rdar://problem/76708379>

Reviewed by Devin Rousso.

It is necessary to spin a nested run loop at the point in the test where you would
like to remote inspect a WebView. Messages from the remote connection are dispatched
through UIProcess, so if lldb has paused UIProcess, WebInspectorUI will not be able to
get any data from the inspected WebView.

  • TestWebKitAPI/DebugUtilities.h: Added.

Add macros to wait for a remote inspector to attach or detach, then drop into
the debugger when it has done so.

  • TestWebKitAPI/PlatformUtilities.h: Add missing #pragma once.
  • TestWebKitAPI/WTFStringUtilities.h: Force the build to fail noisily if we have

attempted to redefine WTF_STRINGTYPEADAPTER_COPIED_WTF_STRING. Force the correct
ordering between "WTFStringUtilities.h" and <wtf/text/StringConcatenate.h>.

3:20 PM Changeset in webkit [276275] by Wenson Hsieh
  • 6 edits in trunk

Rename FloatQuad::isEmpty() to boundingBoxIsEmpty() and reimplement isEmpty()
https://bugs.webkit.org/show_bug.cgi?id=224769

Reviewed by Tim Horton.

Source/WebCore:

The existing isEmpty() method on FloatQuad only checks that the bounding box of the quad is empty (as
indicated by the comment above the method declaration). This means isEmpty() returns false in cases where
the quad consists of one or more non-rectilinear line segments, even though the quad contains no area.

To address this, we rename the existing isEmpty() helper to boundingBoxIsEmpty() and reintroduce an
isEmpty() method that accounts for quads which are equivalent to non-rectilinear line segments.

No change in behavior.

  • inspector/InspectorOverlay.cpp:

(WebCore::drawFragmentHighlight):

  • platform/graphics/FloatQuad.cpp:
  • platform/graphics/FloatQuad.h:

(WebCore::FloatQuad::isEmpty const): Deleted.
(WebCore::FloatQuad::boundingBoxIsEmpty const):

Tools:

Add an API test to exercise the new FloatQuad::isEmpty() method.

  • TestWebKitAPI/Tests/WebCore/FloatQuadTests.cpp:

(TestWebKitAPI::checkIsEmpty):
(TestWebKitAPI::TEST):

2:18 PM Changeset in webkit [276274] by Patrick Angle
  • 2 edits in trunk/Source/WebCore

Web Inspector: Grid overlay column line label placement copy/paste error
https://bugs.webkit.org/show_bug.cgi?id=224777

Reviewed by Devin Rousso.

In grid overlays, a typo meant for all column line labels after the initial line, only the start of the line was
used for placement, where it is more accurate to use the start and end points to match the behavior of the first
line. This had no visual impact because subsequent lines do not currently have their labels adjusted further into
the grid, only flipped into the grid but still referencing the same point. This patch corrects the value of
gapLabelLine to always be a line on which the label can be placed, instead of a single point.

  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::buildGridOverlay):

2:10 PM Changeset in webkit [276273] by youenn@apple.com
  • 3 edits in trunk/LayoutTests

[mac-wk2] LayoutTest fast/mediastream/getUserMedia-webaudio.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=170960

Reviewed by Eric Carlson.

Update test to check for noise for more iterations.
Remove timeout expectation since it is no longer timing out in bots.

  • fast/mediastream/getUserMedia-webaudio.html:
  • platform/mac-wk2/TestExpectations:
1:45 PM Changeset in webkit [276272] by Devin Rousso
  • 8 edits
    2 adds in trunk

Web Inspector: Graphics: add support for steps()/spring() CSS timing functions
https://bugs.webkit.org/show_bug.cgi?id=224654

Reviewed by BJ Burg.

Source/WebInspectorUI:

  • UserInterface/Models/Geometry.js:

(WI.StepsFunction): Added.
(WI.StepsFunction.fromString): Added.
(WI.StepsFunction.prototype.get type): Added.
(WI.StepsFunction.prototype.get count): Added.
(WI.StepsFunction.prototype.copy): Added.
(WI.StepsFunction.prototype.toString): Added.
Create a model object for steps() CSS timing function.

  • UserInterface/Models/Animation.js:

(WI.Animation.prototype._updateEffect):
Also support effect.timingFunction/keyframe.easing being a steps()/spring() CSS timing function.

  • UserInterface/Views/AnimationContentView.js:

(WI.AnimationContentView.prototype._refreshPreview):
Create a UI for steps()/spring() CSS timing functions.

LayoutTests:

  • inspector/animation/lifecycle-web-animation.html:
  • inspector/animation/lifecycle-web-animation-expected.txt:
  • inspector/animation/resources/lifecycle-utilities.js:
  • inspector/unit-tests/geometry.html: Added.
  • inspector/unit-tests/geometry-expected.txt: Added.
1:35 PM Changeset in webkit [276271] by Chris Dumez
  • 5 edits in trunk/Source/WebKit

MotionMark's Canvas-Arcs subtest is broken if the GPUProcess is not yet running
https://bugs.webkit.org/show_bug.cgi?id=224778

Reviewed by Simon Fraser.

I recently made changes so that the GPUProcess is only launched when it is needed. This means
that until MotionMark's Canvas-Arcs subtest, the GPUProcess is usually not yet running. As a
result, RemoteRenderingBackendProxy::createImageBuffer() ends up launching the GPUProcess
and sending the GPUConnectionToWebProcess::CreateRenderingBackend and
RemoteRenderingBackend::CreateImageBuffer IPC right away. We seem to have a synchronization
issue because when this happens, the rendering for the Canvas-Arcs subtest is visibly broken
and its score is very low (< 6, instead of > 600).

Making the GPUConnectionToWebProcess::CreateRenderingBackend synchronous again (I made it
async recently) seems to address the synchronization issue and restores correct behavior on
MotionMark. I am therefore making this IPC synchronous again in this patch to get benchmark
coverage again while I investigate the root cause offline.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::createRenderingBackend):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/GPUConnectionToWebProcess.messages.in:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::ensureGPUProcessConnection):

1:16 PM Changeset in webkit [276270] by timothy_horton@apple.com
  • 2 edits in trunk/Tools

Fix the macCatalyst TestWebKitAPI build
https://bugs.webkit.org/show_bug.cgi?id=224780

  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:

Unreviewed build fix; link PDFKit since we now enable it.

1:09 PM Changeset in webkit [276269] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[LFC][IFC] LineCandidate.inlineContent should be ignored when reverting
https://bugs.webkit.org/show_bug.cgi?id=224771
<rdar://76760857>

Reviewed by Antti Koivisto.

Source/WebCore:

LineCandidate.inlineContent is a set of candidate runs for the line and when the line breaker says "please revert" (move back to an earlier position on the line)
these runs should all be ignored as they did not make it to the line.
(inlineContentIsFullyCommitted flag got confused when the number of candidate runs matched the number of runs we managed to put on the line as part of the revert. It did not take the "revert" bit into account.)

Test: fast/inline/crash-when-revert-has-trailing-line-break.html

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::placeInlineContent):

LayoutTests:

  • fast/inline/crash-when-revert-has-trailing-line-break-expected.txt: Added.
  • fast/inline/crash-when-revert-has-trailing-line-break.html: Added.
12:42 PM Changeset in webkit [276268] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[ wk2 ] http/tests/security/contentSecurityPolicy/report-only-connect-src-xmlhttprequest-redirect-to-blocked.py is a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=224626

Unreviewed test gardening

  • platform/wk2/TestExpectations: Updating expectations as a fix is being worked on.
11:55 AM Changeset in webkit [276267] by Chris Dumez
  • 4 edits in trunk

SVG Images launch the GPUProcess unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=224770

Reviewed by Eric Carlson.

Source/WebCore:

Make sure MediaPlayer::supportsType() returns early for MIME types that can definitely
not be media, to avoid launch the GPUProcess unnecessarily.

  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::supportsType):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:

(TEST):

11:52 AM Changeset in webkit [276266] by msaboff@apple.com
  • 13 edits in trunk/Source/bmalloc

[bmalloc] Enable Adaptive Scavenger for Mac
https://bugs.webkit.org/show_bug.cgi?id=224706

Reviewed by Filip Pizlo.

Enabled the adaptive scavenger code paths for macOS.
The original reason that the partial scavenging paths were kept for macOS was due
to regression on power tests. To alleviate the power regression, this patch splits
out the adaptive scavenger parameters with macOS specific values.

The parameters are:

The multiplier used to compute the next scavenging wait time based on the

time needed for the prior scavenging.

Minimum wait time between scavenging.
Maximum wait time between scavenging.

The values in the current code are:

Wait time Multiplier: 150
Minimum wait time: 100ms
Maximum wait time: 10,000ms (10 seconds)

The proposed values for macOS, determined using empirical testing.

Wait time Multiplier: 300
Minimum wait time: 750ms
Maximum wait time: 20,000ms (20 seconds)


When tested on various mac variants, this change:

  • Provides a 3-5% reduction in memory use on RAMification.
  • It is neutral on JetStream2.
  • It is neutral to a slight regression on Speedometer2, but there is some variability in those results.

Since macOS was the only platform still using the partial scavenging code path,
the partial scavenging code paths were deleted.

  • bmalloc/BPlatform.h:
  • bmalloc/Heap.cpp:

(bmalloc::Heap::scavenge):
(bmalloc::Heap::allocateSmallChunk):
(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::allocateLarge):
(bmalloc::Heap::scavengeToHighWatermark): Deleted.

  • bmalloc/Heap.h:
  • bmalloc/IsoDirectory.h:
  • bmalloc/IsoDirectoryInlines.h:

(bmalloc::passedNumPages>::takeFirstEligible):
(bmalloc::passedNumPages>::scavenge):
(bmalloc::passedNumPages>::scavengeToHighWatermark): Deleted.

  • bmalloc/IsoHeapImpl.h:
  • bmalloc/IsoHeapImplInlines.h:

(bmalloc::IsoHeapImpl<Config>::scavengeToHighWatermark): Deleted.

  • bmalloc/LargeMap.cpp:

(bmalloc::LargeMap::add):

  • bmalloc/LargeRange.h:

(bmalloc::LargeRange::LargeRange):
(bmalloc::LargeRange::setUsedSinceLastScavenge):
(bmalloc::merge):
(): Deleted.

  • bmalloc/Scavenger.cpp:

(bmalloc::Scavenger::Scavenger):
(bmalloc::Scavenger::scavenge):
(bmalloc::Scavenger::threadRunLoop):
(bmalloc::Scavenger::timeSinceLastPartialScavenge): Deleted.
(bmalloc::Scavenger::partialScavenge): Deleted.

  • bmalloc/Scavenger.h:
  • bmalloc/SmallPage.h:

(bmalloc::SmallPage::setUsedSinceLastScavenge):

11:21 AM Changeset in webkit [276265] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(?): Network: Request (Object Tree) is sometimes empty
https://bugs.webkit.org/show_bug.cgi?id=224768
<rdar://problem/76783636>

Reviewed by BJ Burg.

  • UserInterface/Views/LocalJSONContentView.js:

(WI.LocalJSONContentView.prototype.renderRemoteObject):
If the WI.RemoteObject is simple enough to be rendered inline, WI.ObjectTreeView won't
show a WI.TreeOutline by default. We have to tell it to use a WI.TreeOutline by passing
forceExpanding = true into the constructor.

  • UserInterface/Views/ObjectTreeView.js:

(WI.ObjectTreeView.prototype.showOnlyJSON):
Add some console.assert to help prevent this from happening again.

10:59 AM Changeset in webkit [276264] by Manuel Rego Casasnovas
  • 27 edits
    1 delete in trunk

[selectors] Script focus and :focus-visible
https://bugs.webkit.org/show_bug.cgi?id=224598

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update expectations as the tests pass now.

  • web-platform-tests/css/selectors/focus-visible-008-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-009-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-010-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-014-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-script-focus-001-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-script-focus-002.tentative-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-script-focus-003.tentative-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-script-focus-004-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-script-focus-005-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-script-focus-006.tentative-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-script-focus-007.tentative-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-script-focus-012-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-script-focus-013-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-script-focus-014-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-script-focus-015-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-script-focus-016.tentative-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-script-focus-017.tentative-expected.txt:

Source/WebCore:

Implement :focus-visible behavior when a script moves focus.
An element will match :focus-visible when a script move focus if the last focused element was not focused via mouse click.

This patch makes WebKit behaves like Chromium and Firefox and pass all the related tests.

There's an ongoing discussion about 6 tests that are marked as ".tentative" in the following issue:
https://github.com/web-platform-tests/wpt/issues/28505

Test: web-platform-tests/css/selectors/focus-visible-script-focus-*

  • dom/Document.cpp:

(WebCore::Document::adjustFocusedNodeOnNodeRemoval): Just update FocusOptions initializer.
(WebCore::Document::setFocusedElement): Store if the last element has been focused by mouse click or not.

  • dom/Document.h: New member m_latestFocusTrigger.

(WebCore::Document::wasLastFocusByClick const): Method to check status of m_latestFocusTrigger.

  • dom/Element.cpp:

(WebCore::Element::focus): When there's a script focus, this checks if the last element was focused
by mouse click in order to make it match :focus-visible.

  • dom/FocusOptions.h: Add FocusTrigger enum to know if an element has been focused via mouse click or not.

This refers to the "focus trigger" concept on the HTML spec (see https://html.spec.whatwg.org/multipage/interaction.html).

  • page/EventHandler.cpp:

(WebCore::EventHandler::dispatchMouseEvent): Pass FocusTrigger:Click in setFocusedElement() call.

LayoutTests:

Update expectations for tests, most of them are passing on Mac. On iOS a bunch timeout so they're skipped, as other :focus-visible tests.

  • platform/ios/TestExpectations:
  • platform/mac/imported/w3c/web-platform-tests/css/selectors/focus-visible-009-expected.txt: Removed as test passes now.
  • platform/mac/TestExpectations:
10:53 AM Changeset in webkit [276263] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Fix races in LibWebRTCCodecs introduced in r276214
https://bugs.webkit.org/show_bug.cgi?id=224758

Reviewed by Youenn Fablet.

After r276214, LibWebRTCCodecs's createDecoder() / createEncoder() may hop to the main
thread to initialize the connection to the GPUProcess. If releaseDecoder() / releaseEncoder()
were to get called very shortly after, they may win the race and have no decoder / encoder
to release, since they are dispatched directly to the background thread. To address the issue,
we now call ensureGPUProcessConnectionAndDispatchToThread() in releaseDecoder(), releaseEncoder()
and initializeEncoder().

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:

(WebKit::LibWebRTCCodecs::releaseDecoder):
(WebKit::LibWebRTCCodecs::releaseEncoder):
(WebKit::LibWebRTCCodecs::initializeEncoder):

10:51 AM Changeset in webkit [276262] by Darin Adler
  • 10 edits in trunk

Nullptr crash in CSSCalcValue::category() via HTMLConverterCaches::floatPropertyValueForNode
https://bugs.webkit.org/show_bug.cgi?id=221392

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-values/minmax-length-percent-serialize-expected.txt:

Updated to reflect 8 tests passing that were failing before.

Source/WebCore:

  • css/CSSCalculationValue.cpp:

(WebCore::CSSCalcOperationNode::createCalcExpression const): Pass in a destination category
when creating a CalcExpressionOperation.
(WebCore::createCSS): Pass the destination category from the CalcExpressionOperation when
creating a CSSCalcOperationNode.

  • css/CSSCalculationValue.h: Moved the CalculationCategory enumeration from here to

CalculationValue.h.

  • platform/CalculationValue.cpp:

(WebCore::operator==): Include destination category when comparing.

  • platform/CalculationValue.h: Moved CalculationCategory here. Added a destination

category constructor argument, data members, and getter function to the
CalcExpressionOperation class.

LayoutTests:

  • fast/css/calc-parsing-expected.txt: Updated for change below.
  • fast/css/calc-parsing.html: Added more test cases so this covers the affected cases of computed

style for calc expressions that mix percentages and numbers. Alternatively, we could remove this
entire test case because the web platform tests also cover this pretty well.

10:20 AM WebKitGTK/2.32.x edited by clopez@igalia.com
(diff)
10:17 AM Changeset in webkit [276261] by Chris Gambrell
  • 12 edits
    2 adds
    2 deletes in trunk/LayoutTests

[LayoutTests] Convert http/tests/blink convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=224702
<rdar://problem/76783504>

Reviewed by Darin Adler.

  • http/tests/blink/sendbeacon/beacon-cookie-expected.txt:
  • http/tests/blink/sendbeacon/beacon-cookie.html:
  • http/tests/blink/sendbeacon/beacon-cross-origin-expected.txt:
  • http/tests/blink/sendbeacon/beacon-cross-origin.html:
  • http/tests/blink/sendbeacon/beacon-cross-origin.https-expected.txt:
  • http/tests/blink/sendbeacon/beacon-cross-origin.https.html:
  • http/tests/blink/sendbeacon/beacon-same-origin-expected.txt:
  • http/tests/blink/sendbeacon/beacon-same-origin.html:
  • http/tests/blink/sendbeacon/resources/check-beacon.php: Removed.
  • http/tests/blink/sendbeacon/resources/check-beacon.py: Added.

(extensive_strip):

  • http/tests/blink/sendbeacon/resources/save-beacon.php: Removed.
  • http/tests/blink/sendbeacon/resources/save-beacon.py: Added.

(prettify):
(decode_multipart):

  • http/tests/resources/portabilityLayer.py:

(get_post_data):
(get_request):

  • platform/ios/http/tests/blink/sendbeacon/beacon-same-origin-expected.txt:
  • platform/mac/http/tests/blink/sendbeacon/beacon-same-origin-expected.txt:
10:08 AM Changeset in webkit [276260] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

CSSValuePool should be non-copyable
https://bugs.webkit.org/show_bug.cgi?id=224764

Reviewed by Alan Bujtas.

  • css/CSSValuePool.h:
9:59 AM Changeset in webkit [276259] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Build fix for Debug -O3 after r276162.
https://bugs.webkit.org/show_bug.cgi?id=224681
rdar://76698113

Not reviewed.

  • runtime/JSObject.cpp:
9:53 AM Changeset in webkit [276258] by Philippe Normand
  • 2 edits in trunk/LayoutTests

Unreviewed, GLIB gardening

  • platform/glib/TestExpectations: Flag a few more media tests to skip or as flaky crash.
9:46 AM Changeset in webkit [276257] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Add more GPUProcess release logging to facilitate debugging
https://bugs.webkit.org/show_bug.cgi?id=224761

Reviewed by Darin Adler.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::GPUProcess):
(WebKit::GPUProcess::createGPUConnectionToWebProcess):
(WebKit::GPUProcess::removeGPUConnectionToWebProcess):
(WebKit::GPUProcess::initializeGPUProcess):

9:45 AM Changeset in webkit [276256] by Philippe Normand
  • 2 edits in trunk/LayoutTests

Unreviewed, GLIB gardening

  • platform/glib/TestExpectations: Flag imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit.html as flaky crash.
8:41 AM Changeset in webkit [276255] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] The layout containment box establishes an absolute positioning containing block and a fixed positioning containing block
https://bugs.webkit.org/show_bug.cgi?id=224754

Reviewed by Antti Koivisto.

https://www.w3.org/TR/css-contain-2/#containment-layout.

"The layout containment box establishes an absolute positioning containing block and a fixed positioning containing block."

  • layout/layouttree/LayoutBox.h:

(WebCore::Layout::Box::isContainingBlockForFixedPosition const):
(WebCore::Layout::Box::isContainingBlockForOutOfFlowPosition const):

8:21 AM Changeset in webkit [276254] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] Layout containment box establishes an independent formatting context
https://bugs.webkit.org/show_bug.cgi?id=224753

Reviewed by Antti Koivisto.

https://www.w3.org/TR/css-contain-2/#containment-layout.

"The layout containment box establishes an independent formatting context."

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::establishesIndependentFormattingContext const):

8:18 AM Changeset in webkit [276253] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Silence various -Wreturn-type warnings
https://bugs.webkit.org/show_bug.cgi?id=224756

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-04-19
Reviewed by Don Olmstead.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::mixColorComponents):

  • inspector/InspectorOverlay.cpp:

(WebCore::expectedSizeForLayoutLabel):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::usedClear):
(WebCore::RenderStyle::usedFloat):

7:16 AM Changeset in webkit [276252] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix the build after r276181
<rdar://problem/76832595>

Add a couple of missing forward declarations for IntRect and IntPoint.

  • page/ContextMenuClient.h:
6:54 AM Changeset in webkit [276251] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

Add assertions to check for no memory allocation in AudioMediaStreamTrackRendererUnit rendering thread
https://bugs.webkit.org/show_bug.cgi?id=224674

Reviewed by Eric Carlson.

Add ForbidMallocUseForCurrentThreadScope in audio rendering code path to prevent memory allocation.
Rename inputProc to renderingCallback.
Remove use of AudioMediaStreamTrackRendererUnit::singleton and instead use the pointer given to renderingCallback.
This is safe as AudioMediaStreamTrackRendererUnit destructor stops the audio unit.

  • platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.cpp:

(WebCore::AudioMediaStreamTrackRendererUnit::createAudioUnitIfNeeded):
(WebCore::AudioMediaStreamTrackRendererUnit::render):
(WebCore::AudioMediaStreamTrackRendererUnit::renderingCallback):
(WebCore::AudioMediaStreamTrackRendererUnit::inputProc): Deleted.

  • platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.h:
6:43 AM Changeset in webkit [276250] by Philippe Normand
  • 2 edits in trunk/Tools

Unreviewed, WPE Minibrowser build warning fix.

  • MiniBrowser/wpe/main.cpp: No need to use typedef for this struct declaration.
6:28 AM Changeset in webkit [276249] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC] Implement Box::isLayoutContainmentBox
https://bugs.webkit.org/show_bug.cgi?id=224740

Reviewed by Antti Koivisto.

This is part of https://www.w3.org/TR/css-contain-2/#containment-layout

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::isLayoutContainmentBox const):
(WebCore::Layout::Box::isInternalTableBox const):

  • layout/layouttree/LayoutBox.h:

(WebCore::Layout::Box::isInternalRubyBox const):

6:22 AM Changeset in webkit [276248] by Philippe Normand
  • 4 edits
    39 moves
    15 adds in trunk/LayoutTests

Unreviewed, WPE gardening

Share more media tests baselines between the GTK and WPE ports.

  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit-expected.txt.
  • platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-negative-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-negative-expected.txt.
  • platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-without-codecs-parameter-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-without-codecs-parameter-expected.txt.
  • platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-duration-boundaryconditions-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-duration-boundaryconditions-expected.txt.
  • platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-getvideoplaybackquality-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-getvideoplaybackquality-expected.txt.
  • platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-is-type-supported-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-is-type-supported-expected.txt.
  • platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-remove-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-remove-expected.txt.
  • platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-removesourcebuffer-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-removesourcebuffer-expected.txt.
  • platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-sourcebuffer-mode-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-sourcebuffer-mode-expected.txt.
  • platform/glib/media/W3C/video/canPlayType/canPlayType_codecs_order_1-expected.txt: Renamed from LayoutTests/platform/gtk/media/W3C/video/canPlayType/canPlayType_codecs_order_1-expected.txt.
  • platform/glib/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_1-expected.txt: Renamed from LayoutTests/platform/gtk/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_1-expected.txt.
  • platform/glib/media/W3C/video/canPlayType/canPlayType_two_implies_one_1-expected.txt: Renamed from LayoutTests/platform/gtk/media/W3C/video/canPlayType/canPlayType_two_implies_one_1-expected.txt.
  • platform/glib/media/W3C/video/canPlayType/canPlayType_two_implies_one_2-expected.txt: Renamed from LayoutTests/platform/gtk/media/W3C/video/canPlayType/canPlayType_two_implies_one_2-expected.txt.
  • platform/glib/media/audio-controls-rendering-expected.png: Renamed from LayoutTests/platform/gtk/media/audio-controls-rendering-expected.png.
  • platform/glib/media/audio-repaint-expected.png: Renamed from LayoutTests/platform/gtk/media/audio-repaint-expected.png.
  • platform/glib/media/context-menu-actions-expected.txt: Renamed from LayoutTests/platform/gtk/media/context-menu-actions-expected.txt.
  • platform/glib/media/controls-after-reload-expected.png: Renamed from LayoutTests/platform/gtk/media/controls-after-reload-expected.png.
  • platform/glib/media/controls-layout-direction-expected.png: Renamed from LayoutTests/platform/gtk/media/controls-layout-direction-expected.png.
  • platform/glib/media/controls-strict-expected.png: Renamed from LayoutTests/platform/gtk/media/controls-strict-expected.png.
  • platform/glib/media/controls-styling-expected.png: Renamed from LayoutTests/platform/gtk/media/controls-styling-expected.png.
  • platform/glib/media/controls-styling-strict-expected.png: Renamed from LayoutTests/platform/gtk/media/controls-styling-strict-expected.png.
  • platform/glib/media/controls-without-preload-expected.png: Renamed from LayoutTests/platform/gtk/media/controls-without-preload-expected.png.
  • platform/glib/media/media-can-play-ogg-expected.txt: Renamed from LayoutTests/platform/gtk/media/media-can-play-ogg-expected.txt.
  • platform/glib/media/media-controls-clone-expected.png: Renamed from LayoutTests/platform/gtk/media/media-controls-clone-expected.png.
  • platform/glib/media/media-document-audio-repaint-expected.png: Renamed from LayoutTests/platform/gtk/media/media-document-audio-repaint-expected.png.
  • platform/glib/media/media-fullscreen-inline-expected.txt: Renamed from LayoutTests/platform/gtk/media/media-fullscreen-inline-expected.txt.
  • platform/glib/media/media-fullscreen-not-in-document-expected.txt: Renamed from LayoutTests/platform/gtk/media/media-fullscreen-not-in-document-expected.txt.
  • platform/glib/media/media-source/media-source-resize-expected.txt: Renamed from LayoutTests/platform/gtk/media/media-source/media-source-resize-expected.txt.
  • platform/glib/media/video-canvas-alpha-expected.png: Renamed from LayoutTests/platform/gtk/media/video-canvas-alpha-expected.png.
  • platform/glib/media/video-controls-rendering-expected.png: Renamed from LayoutTests/platform/gtk/media/video-controls-rendering-expected.png.
  • platform/glib/media/video-display-toggle-expected.png: Renamed from LayoutTests/platform/gtk/media/video-display-toggle-expected.png.
  • platform/glib/media/video-empty-source-expected.png: Renamed from LayoutTests/platform/gtk/media/video-empty-source-expected.png.
  • platform/glib/media/video-no-audio-expected.png: Renamed from LayoutTests/platform/gtk/media/video-no-audio-expected.png.
  • platform/glib/media/video-playing-and-pause-expected.png: Renamed from LayoutTests/platform/gtk/media/video-playing-and-pause-expected.png.
  • platform/glib/media/video-playing-and-pause-expected.txt: Renamed from LayoutTests/platform/gtk/media/video-playing-and-pause-expected.txt.
  • platform/glib/media/video-volume-slider-expected.png: Renamed from LayoutTests/platform/gtk/media/video-volume-slider-expected.png.
  • platform/glib/media/video-zoom-controls-expected.png: Renamed from LayoutTests/platform/gtk/media/video-zoom-controls-expected.png.
  • platform/glib/media/video-zoom-expected.png: Renamed from LayoutTests/platform/gtk/media/video-zoom-expected.png.
  • platform/glib/media/video-zoom-expected.txt: Renamed from LayoutTests/platform/gtk/media/video-zoom-expected.txt.
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
  • platform/wpe/media/video-aspect-ratio-expected.txt: Added.
  • platform/wpe/media/video-canvas-createPattern-expected.png: Added.
  • platform/wpe/media/video-colorspace-yuv420-expected.png: Added.
  • platform/wpe/media/video-colorspace-yuv420-expected.txt: Added.
  • platform/wpe/media/video-colorspace-yuv422-expected.png: Added.
  • platform/wpe/media/video-colorspace-yuv422-expected.txt: Added.
  • platform/wpe/media/video-frame-accurate-seek-expected.png: Added.
  • platform/wpe/media/video-frame-accurate-seek-expected.txt: Added.
  • platform/wpe/media/video-layer-crash-expected.txt: Added.
  • platform/wpe/media/video-transformed-expected.txt: Added.
6:12 AM Changeset in webkit [276247] by commit-queue@webkit.org
  • 24 edits
    3 adds in trunk

Enable -Wthread-safety, add attributes to custom lock classes, and provide macros to declare guards
https://bugs.webkit.org/show_bug.cgi?id=221614
<rdar://problem/74396781>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-19
Reviewed by David Kilzer.

PerformanceTests:

Add -Wthread-safety to compile flags.

  • DecoderTest/Configurations/Base.xcconfig:

Source/bmalloc:

Add -Wthread-safety to compile flags.

  • Configurations/Base.xcconfig:

Source/JavaScriptCore:

Add -Wthread-safety to compile flags.

  • Configurations/Base.xcconfig:

Source/WebCore:

Add -Wthread-safety to compile flags.

  • Configurations/Base.xcconfig:

Source/WebCore/PAL:

Add -Wthread-safety to compile flags.

  • Configurations/Base.xcconfig:

Source/WebInspectorUI:

Add -Wthread-safety to compile flags.

  • Configurations/Base.xcconfig:

Source/WebKit:

Add -Wthread-safety to compile flags.

  • Configurations/Base.xcconfig:

Source/WebKitLegacy/mac:

Add -Wthread-safety to compile flags.

  • Configurations/Base.xcconfig:

Source/WTF:

Implement rudimentary support for clang thread safety analysis.
The added macros can be used to declare which member variables or
global variables are locked by which mutexes. The compiler will
check statically that the mutexes are held correctly. The checking
is intra procedural, not global.

  • Configurations/Base.xcconfig:

Add -Wthread-safety to compile flags.

  • wtf/CheckedLock.h: Added.

Add CheckedLock, a Lock variant that is amenable to static
analysis.
Add a Locker specialization for CheckedLock that is amenable to
static analysis.

Locker<CheckedLock> is a std::scoped_lock. The scoped_lock cannot be aliased,
since it appears that (Apple's) libcxx is not compiled with thread safety
analysis support enabled by default.

New types are needed due Locker move constructor and conditional locking.
The Locker has default usage pattern of:

auto locker = holdLock(m_lock);

This forces dynamism that removes the possibility of simple statical
analysis that thread safety analysis capabilities "mutex" and "scoped_lock"
currently implement. Most likely large fraction of call sites is due to historical
lack of CTAD and as such can be converted to less general form.
Once the pattern is not used by default, CheckedLock can be deleted
and the move dynamism bits of Locker can be moved to some more specific type
("UncheckedLocker").

  • wtf/ThreadSafetyAnalysis.h: Added.

Add macro wrappers around clang "mutex" and "scoped_lock" capability attributes.

Tools:

  • TestWebKitAPI/Configurations/Base.xcconfig:

Add -Wthread-safety to compile flags.

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/CheckedLock.cpp: Added.

(TestWebKitAPI::TEST):
Implement a test for testing that CheckedLock compiles.

4:55 AM Changeset in webkit [276246] by Carlos Garcia Campos
  • 2 edits in trunk

[GTK] Switch to libsoup3 by default
https://bugs.webkit.org/show_bug.cgi?id=224741

Reviewed by Sergio Villar Senin.

  • Source/cmake/OptionsGTK.cmake:
3:28 AM Changeset in webkit [276245] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Make RealtimeIncomingAudioSourceCocoa preallocate audio buffer
https://bugs.webkit.org/show_bug.cgi?id=224672

Reviewed by Eric Carlson.

Instead of allocating the buffer on valid data, we wait for data to be of the correct sample rate.
We preallocate the buffer accordingly in constructor to avoid allocation in the webrtc audio thread.
Default is 1 channel since mono is what webrtc encoders mostly do these days.
Covered by existing tests.

  • platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:

(WebCore::RealtimeIncomingAudioSourceCocoa::RealtimeIncomingAudioSourceCocoa):
(WebCore::RealtimeIncomingAudioSourceCocoa::OnData):

2:56 AM Changeset in webkit [276244] by youenn@apple.com
  • 4 edits in trunk/Source/WebCore

Move from RecursiveLock to Lock in RealtimeMediaSource
https://bugs.webkit.org/show_bug.cgi?id=224671

Reviewed by Eric Carlson.

RecursiveLock is more expensive as it allocates memory and not useful here.
Covered by existing tests.

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeOutgoingAudioSource.h:
  • platform/mediastream/RealtimeOutgoingVideoSource.h:
2:53 AM Changeset in webkit [276243] by youenn@apple.com
  • 9 edits in trunk/Source/WebCore

Reduce crackling at start of playing a live audio track
https://bugs.webkit.org/show_bug.cgi?id=218898
<rdar://problem/71625010>

Reviewed by Eric Carlson.

We often hear crackles at the beginning of playing a MediaStreamTrack.
This is due to starting at a point where there is not enough data, so we start rendering and quickly run short of data.
Our heuristic to start was not good since we were not accounting to LibWebRTC audio module which sends audio samples by batch of 5 samples.
So we would have needed to at least have 6 samples to be sure to not run out of data.

What this patch does:

  • Add an extra parameter to AudioSampleDataSource so that we do not start until we have at least been pushed a given number of sample count.
  • Change LibWebRTAudioModule to send audio samples by batch of 3 (hence 30 ms) instead of 5
  • Set this new parameter to 2 for local tracks and 4 for remote tracks
  • Add a new boolean to AudioSampleDataSource to know whether we start the track for the first time or not. If we start it, use the new parameter to buffer enough data. Otherwise, use current heuristic.

We also reduce the AudioSampleDataSource buffer to 0.5 seconds instead of 2 seconds, since 2 seconds is too much for real time audio.

Manually tested.

  • platform/audio/cocoa/AudioSampleDataSource.h:
  • platform/audio/cocoa/AudioSampleDataSource.mm:

(WebCore::AudioSampleDataSource::create):
(WebCore::AudioSampleDataSource::AudioSampleDataSource):
(WebCore::AudioSampleDataSource::pullSamplesInternal):

  • platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp:

(WebCore::LibWebRTCAudioModule::pollFromSource):

  • platform/mediastream/libwebrtc/LibWebRTCAudioModule.h:
  • platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp:

(WebCore::pollSamplesCount):
(WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples):

  • platform/mediastream/mac/MediaStreamTrackAudioSourceProviderCocoa.cpp:

(WebCore::MediaStreamTrackAudioSourceProviderCocoa::MediaStreamTrackAudioSourceProviderCocoa):

  • platform/mediastream/mac/WebAudioSourceProviderCocoa.h:
  • platform/mediastream/mac/WebAudioSourceProviderCocoa.mm:

(WebCore::WebAudioSourceProviderCocoa::prepare):

2:49 AM Changeset in webkit [276242] by youenn@apple.com
  • 5 edits
    13 moves
    17 adds
    2 deletes in trunk/LayoutTests

Migrate some WebRTC encoded transform tests to WPT
https://bugs.webkit.org/show_bug.cgi?id=224604

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc-encoded-transform/routines.js: Added.

(async createConnections):
(waitFor):

  • web-platform-tests/webrtc-encoded-transform/script-audio-transform-worker.js: Added.

(MockRTCRtpTransformer):
(MockRTCRtpTransformer.prototype.start):
(MockRTCRtpTransformer.prototype.process):
(onrtctransform):

  • web-platform-tests/webrtc-encoded-transform/script-audio-transform.https-expected.txt: Added.
  • web-platform-tests/webrtc-encoded-transform/script-audio-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/audio-script-transform.html.
  • web-platform-tests/webrtc-encoded-transform/script-change-transform-worker.js: Renamed from LayoutTests/http/wpt/webrtc/change-encoded-transform.js.
  • web-platform-tests/webrtc-encoded-transform/script-change-transform.https-expected.txt: Added.
  • web-platform-tests/webrtc-encoded-transform/script-change-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/change-encoded-transform.html.
  • web-platform-tests/webrtc-encoded-transform/script-late-transform.https-expected.txt: Added.
  • web-platform-tests/webrtc-encoded-transform/script-late-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/webrtc-late-transform.html.
  • web-platform-tests/webrtc-encoded-transform/script-metadata-transform-worker.js: Renamed from LayoutTests/http/wpt/webrtc/metadata-transform-worker.js.
  • web-platform-tests/webrtc-encoded-transform/script-metadata-transform.https-expected.txt: Added.
  • web-platform-tests/webrtc-encoded-transform/script-metadata-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/metadata-transform.html.
  • web-platform-tests/webrtc-encoded-transform/script-transform-worker.js: Renamed from LayoutTests/http/wpt/webrtc/script-transform.js.
  • web-platform-tests/webrtc-encoded-transform/script-transform.https-expected.txt: Added.
  • web-platform-tests/webrtc-encoded-transform/script-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/webrtc-transform.html.
  • web-platform-tests/webrtc-encoded-transform/script-write-twice-transform-worker.js: Renamed from LayoutTests/http/wpt/webrtc/write-twice-transform.js.
  • web-platform-tests/webrtc-encoded-transform/script-write-twice-transform.https-expected.txt: Added.
  • web-platform-tests/webrtc-encoded-transform/script-write-twice-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/write-twice-transform.html.
  • web-platform-tests/webrtc-encoded-transform/sframe-keys.https-expected.txt: Added.
  • web-platform-tests/webrtc-encoded-transform/sframe-keys.https.html: Added.
  • web-platform-tests/webrtc-encoded-transform/sframe-transform-buffer-source-expected.txt: Added.
  • web-platform-tests/webrtc-encoded-transform/sframe-transform-buffer-source.html: Added.
  • web-platform-tests/webrtc-encoded-transform/sframe-transform-expected.txt: Added.
  • web-platform-tests/webrtc-encoded-transform/sframe-transform-in-worker.https-expected.txt: Added.
  • web-platform-tests/webrtc-encoded-transform/sframe-transform-in-worker.https.html: Renamed from LayoutTests/http/wpt/webrtc/sframe-transform-in-worker.html.
  • web-platform-tests/webrtc-encoded-transform/sframe-transform-readable-expected.txt: Added.
  • web-platform-tests/webrtc-encoded-transform/sframe-transform-readable.html: Added.
  • web-platform-tests/webrtc-encoded-transform/sframe-transform-worker.js: Renamed from LayoutTests/http/wpt/webrtc/sframe-transform.js.
  • web-platform-tests/webrtc-encoded-transform/sframe-transform.html: Renamed from LayoutTests/http/wpt/webrtc/sframe-transform.html.

LayoutTests:

  • http/wpt/webrtc/sframe-transform-readable-crash.html: Removed.
  • platform/glib/TestExpectations:
  • platform/ios-wk1/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • webrtc/script-transform.js: Removed.
2:03 AM Changeset in webkit [276241] by imanol
  • 3 edits in trunk/Source/WebCore

Enable GL_ANGLE_instanced_arrays WebGL extension in WPE
https://bugs.webkit.org/show_bug.cgi?id=224438

Reviewed by Darin Adler.

Tested by WebGL WPT.

  • html/canvas/ANGLEInstancedArrays.cpp:

(WebCore::ANGLEInstancedArrays::supported):

  • platform/graphics/opengl/ExtensionsGLOpenGLES.cpp:

(WebCore::ExtensionsGLOpenGLES::supportsExtension):

1:58 AM CSSContainment edited by rwlbuis@webkit.org
(diff)
1:39 AM Changeset in webkit [276240] by commit-queue@webkit.org
  • 4 edits in trunk

[css-flexbox] Table layout disregards overriding height
https://bugs.webkit.org/show_bug.cgi?id=224665

Patch by Felipe Erias <Felipe Erias> on 2021-04-19
Reviewed by Sergio Villar Senin.

Source/WebCore:

Update table layout to take into account the overriding height set by the element's parent.
This was causing several WPT tests to fail.

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::layout):
During layout, set the computed height so that it is at least as large as the overriding height
provided by the element's parent (if any) minus the height that will be taken up by captions.
This additional height will be distributed among the table's sections so its total height matches
the overriding value.

LayoutTests:

1:23 AM Changeset in webkit [276239] by Martin Robinson
  • 4 edits in trunk/Source/WebCore

[css-scroll-snap] Properly support fractional scroll steps in WebCore::ScrollAnimator::scroll
https://bugs.webkit.org/show_bug.cgi?id=224176

Reviewed by Simon Fraser.

Stop using the ScrollableArea's position to calculate scroll snap positions in ScrollAnimator::snap.
The position stored in ScrollAnimator is a floating point position, while the one stored in ScrollableArea
is an integer position. This currently isn't an issue, because all callers of ScrollAnimator::scroll
use integer scroll offsets, but this will allow this function to be used in the future for precise
scrolling delta.

No new tests. This doesn't change any behavior, since all callers currently use
integer scroll offsets, but a future change will make use of this fix.

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::scroll): Get the current scroll position from the ScrollAnimator,
which stores it in floating point. Also, only call into the scroll snap code if we actually
have scroll offsets.
(WebCore::ScrollAnimator::offsetFromPosition): Added this helper.
(WebCore::ScrollAnimator::positionFromOffset): Ditto.
(WebCore::ScrollAnimator::deltaFromStep): Return a delta instead of a position so this helper
can be used with offsets or positions.
(WebCore::ScrollAnimator::positionFromStep): Deleted.

  • platform/ScrollAnimator.h:
  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::scroll): Use the new helper.j

1:16 AM Changeset in webkit [276238] by Philippe Normand
  • 11 edits in trunk

[WPE][GTK] Enable AVIF decoder as experimental feature and unskip tests
https://bugs.webkit.org/show_bug.cgi?id=224663

Reviewed by Xabier Rodriguez-Calvar.

.:

Make the USE_AVIF option public and enable it as experimental feature.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

Refactor the AVIF build options out of the GTK port so they can be reused by other CMake ports.

  • PlatformGTK.cmake:
  • platform/ImageDecoders.cmake:
  • platform/image-decoders/avif/AVIFImageDecoder.cpp:
  • platform/image-decoders/avif/AVIFImageReader.cpp:
  • platform/image-decoders/avif/AVIFUniquePtr.h:

LayoutTests:

  • platform/gtk/TestExpectations: Unskip avif tests.
12:46 AM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
Note: See TracTimeline for information about the timeline view.