Timeline



Oct 23, 2021:

9:31 PM Changeset in webkit [284754] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Null check in traverseNodesForSerialization
https://bugs.webkit.org/show_bug.cgi?id=230704

Patch by Rob Buis <rbuis@igalia.com> on 2021-10-23
Reviewed by Wenson Hsieh.

Source/WebCore:

Pass startNode by value instead of by pointer to
traverseNodesForSerialization.

Test: editing/pasteboard/copy-with-shadow-tree-crash.html

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::serializeNodes):
(WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):

LayoutTests:

  • editing/pasteboard/copy-with-shadow-tree-crash-expected.txt: Added.
  • editing/pasteboard/copy-with-shadow-tree-crash.html: Added.
8:02 PM Changeset in webkit [284753] by Alan Bujtas
  • 4 edits in trunk/Source

Addressing post-commit review (r284744).

Source/WebCore:

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::midWordBreak):

Source/WTF:

  • wtf/unicode/CharacterNames.h:
7:56 PM Changeset in webkit [284752] by Cameron McCormack
  • 8 edits in trunk/LayoutTests

LayoutTests/imported/w3c:
Tweak test tolerance
https://bugs.webkit.org/show_bug.cgi?id=231959
<rdar://problem/84417651>

Unreviewed.

  • web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-drawImage.html:
  • web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html:

LayoutTests:
Update WPT test tolerance and mark some failures as simulator-only
https://bugs.webkit.org/show_bug.cgi?id=231959
<rdar://problem/84417651>

Unreviewed test gardening.

The ipad failures are really iPad simulator failures.

  • platform/ios-simulator/TestExpectations:
  • platform/ipad/TestExpectations:
  • platform/mac/TestExpectations:
5:47 PM Changeset in webkit [284751] by commit-queue@webkit.org
  • 48 edits
    14 moves
    12 adds in trunk/JSTests

update test262
https://bugs.webkit.org/show_bug.cgi?id=232005

Patch by Phillip Mates <Phillip Mates> on 2021-10-23
Reviewed by Yusuke Suzuki.

  • test262/expectations.yaml:
  • test262/latest-changes-summary.txt:
  • test262/test/built-ins/Array/prototype/concat/Array.prototype.concat_large-typed-array.js:

(concatTypedArray):

  • test262/test/built-ins/Array/prototype/concat/Array.prototype.concat_small-typed-array.js:

(concatTypedArray):

  • test262/test/built-ins/Array/prototype/copyWithin/non-negative-target-and-start.js:
  • test262/test/built-ins/Function/internals/Call/class-ctor-realm.js:
  • test262/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-44.js:
  • test262/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-49.js:
  • test262/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-2.js:
  • test262/test/built-ins/ShadowRealm/prototype/evaluate/globalthis-available-properties.js: Added.
  • test262/test/built-ins/ShadowRealm/prototype/evaluate/globalthis-config-only-properties.js: Added.

(const.remainingNames.names.filter.name.esNonConfigValues.includes):
(hasOwn.call):

  • test262/test/built-ins/ShadowRealm/prototype/evaluate/globalthis-orginary-object.js: Added.
  • test262/test/built-ins/ShadowRealm/prototype/evaluate/throws-error-from-ctor-realm.js: Added.
  • test262/test/built-ins/ShadowRealm/prototype/evaluate/validates-realm-object.js:
  • test262/test/built-ins/ShadowRealm/prototype/evaluate/wrapped-function-proto-from-caller-realm.js:

(checkArgWrapperFn.realm.evaluate.string_appeared_here.assert.sameValue.checkArgWrapperFn):

  • test262/test/built-ins/ShadowRealm/prototype/importValue/not-constructor.js:
  • test262/test/built-ins/Temporal/PlainDate/prototype/since/largestunit-higher-units.js:
  • test262/test/built-ins/Temporal/PlainMonthDay/prototype/toPlainDate/basic.js:
  • test262/test/intl402/NumberFormat/prototype/format/signDisplay-currency-de-DE.js:
  • test262/test/intl402/NumberFormat/prototype/format/signDisplay-currency-en-US.js:
  • test262/test/intl402/NumberFormat/prototype/format/signDisplay-currency-ja-JP.js:
  • test262/test/intl402/NumberFormat/prototype/format/signDisplay-currency-ko-KR.js:
  • test262/test/intl402/NumberFormat/prototype/format/signDisplay-currency-zh-TW.js:
  • test262/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-currency-de-DE.js:
  • test262/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-currency-en-US.js:
  • test262/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-currency-ja-JP.js:
  • test262/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-currency-ko-KR.js:
  • test262/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-currency-zh-TW.js:
  • test262/test/intl402/Temporal/Instant/prototype/toLocaleString/locales-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/Instant/prototype/toLocaleString/locales-undefined.js.
  • test262/test/intl402/Temporal/Instant/prototype/toLocaleString/options-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/Instant/prototype/toLocaleString/options-undefined.js.
  • test262/test/intl402/Temporal/PlainDate/prototype/toLocaleString/locales-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/toLocaleString/locales-undefined.js.
  • test262/test/intl402/Temporal/PlainDate/prototype/toLocaleString/options-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/toLocaleString/options-undefined.js.
  • test262/test/intl402/Temporal/PlainDateTime/prototype/toLocaleString/locales-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/toLocaleString/locales-undefined.js.
  • test262/test/intl402/Temporal/PlainDateTime/prototype/toLocaleString/options-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/toLocaleString/options-undefined.js.
  • test262/test/intl402/Temporal/PlainMonthDay/prototype/toLocaleString/locales-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainMonthDay/prototype/toLocaleString/locales-undefined.js.
  • test262/test/intl402/Temporal/PlainMonthDay/prototype/toLocaleString/options-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainMonthDay/prototype/toLocaleString/options-undefined.js.
  • test262/test/intl402/Temporal/PlainTime/prototype/toLocaleString/locales-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/toLocaleString/locales-undefined.js.
  • test262/test/intl402/Temporal/PlainTime/prototype/toLocaleString/options-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/toLocaleString/options-undefined.js.
  • test262/test/intl402/Temporal/PlainYearMonth/prototype/toLocaleString/locales-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/toLocaleString/locales-undefined.js.
  • test262/test/intl402/Temporal/PlainYearMonth/prototype/toLocaleString/options-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/toLocaleString/options-undefined.js.
  • test262/test/intl402/Temporal/ZonedDateTime/prototype/toLocaleString/locales-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/ZonedDateTime/prototype/toLocaleString/locales-undefined.js.
  • test262/test/intl402/Temporal/ZonedDateTime/prototype/toLocaleString/options-undefined.js: Renamed from JSTests/test262/test/built-ins/Temporal/ZonedDateTime/prototype/toLocaleString/options-undefined.js.
  • test262/test/language/computed-property-names/basics/number.js:
  • test262/test/language/computed-property-names/basics/string.js:
  • test262/test/language/computed-property-names/basics/symbol.js:
  • test262/test/language/computed-property-names/class/method/generator.js:
  • test262/test/language/computed-property-names/class/method/number.js:
  • test262/test/language/computed-property-names/class/method/string.js:
  • test262/test/language/computed-property-names/class/method/symbol.js:
  • test262/test/language/computed-property-names/object/method/generator.js:
  • test262/test/language/computed-property-names/object/method/number.js:
  • test262/test/language/computed-property-names/object/method/string.js:
  • test262/test/language/computed-property-names/object/method/symbol.js:
  • test262/test/language/computed-property-names/to-name-side-effects/numbers-object.js:
  • test262/test/language/computed-property-names/to-name-side-effects/object.js:
  • test262/test/language/identifiers/part-unicode-14.0.0-escaped.js: Added.
  • test262/test/language/identifiers/part-unicode-14.0.0.js: Added.
  • test262/test/language/identifiers/start-unicode-14.0.0-escaped.js: Added.
  • test262/test/language/identifiers/start-unicode-14.0.0.js: Added.
  • test262/test/language/rest-parameters/arrow-function.js:
  • test262/test/language/rest-parameters/no-alias-arguments.js:

(f):

  • test262/test/language/rest-parameters/with-new-target.js:

(Base):
(Child):

  • test262/test/language/statements/class/definition/fn-length-static-precedence-order.js:
  • test262/test/language/statements/class/definition/fn-name-static-precedence-order.js:
  • test262/test/language/statements/class/static-init-arguments-functions.js:
  • test262/test/language/statements/class/static-init-arguments-methods.js:
  • test262/test/language/statements/class/subclass/builtin-objects/Array/contructor-calls-super-multiple-arguments.js:
  • test262/test/language/statements/class/subclass/builtin-objects/Array/regular-subclassing.js:
  • test262/test262-Revision.txt:
4:58 PM Changeset in webkit [284750] by dino@apple.com
  • 2 edits in trunk/Source/WebKit

Disable PiP when HAVE(UIKIT_WEBKIT_INTERNALS)
https://bugs.webkit.org/show_bug.cgi?id=232206
rdar://84516632

Reviewed by Tim Horton.

In preparation for moving to AVPictureInPictureController, disable
PiP when HAVE(UIKIT_WEBKIT_INTERNALS) is true so that we are
no longer creating an AVPlayerViewController. The rationale for the
move is to use API rather than SPI, and this will allow changes to
be made to AVPlayerViewController in this special configuration.

  • WebProcess/cocoa/VideoFullscreenManager.mm:

(WebKit::VideoFullscreenManager::supportsVideoFullscreen const): Only support regular
fullscreen, not PiP.
(WebKit::VideoFullscreenManager::supportsVideoFullscreenStandby const): Don't support
"video fullscreen standby", which is another name for PiP.

3:26 PM Changeset in webkit [284749] by Chris Dumez
  • 19 edits
    2 adds in trunk

Add support for rel="noopener/noreferrer" on <form> elements
https://bugs.webkit.org/show_bug.cgi?id=232170

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are now passing.

  • web-platform-tests/html/semantics/forms/form-submission-target/rel-base-target-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-target/rel-button-target-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-target/rel-form-target-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-target/rel-input-target-expected.txt:

Source/WebCore:

Add support for rel="opener/noopener/noreferrer" on <form> elements:

This patch also adds support for the rel and relList attributes on <form>.

Test: fast/forms/form-relList.html

  • html/HTMLFormElement.cpp:

(WebCore::parseFormRelAttributes):
(WebCore::HTMLFormElement::submit):
(WebCore::HTMLFormElement::parseAttribute):
(WebCore::HTMLFormElement::relList):

  • html/HTMLFormElement.h:
  • html/HTMLFormElement.idl:
  • loader/FormSubmission.h:

(WebCore::FormSubmission::newFrameOpenerPolicy const):
(WebCore::FormSubmission::setNewFrameOpenerPolicy):
(WebCore::FormSubmission::referrerPolicy const):
(WebCore::FormSubmission::setReferrerPolicy):

  • loader/NavigationScheduler.cpp:

LayoutTests:

  • fast/forms/form-relList-expected.txt: Added.
  • fast/forms/form-relList.html: Added.

Add test coverage for the new form.relList attribute.

  • http/tests/navigation/resources/target-blank-opener-post-window.py:
  • http/tests/navigation/target-blank-opener-post-expected.txt:
  • http/tests/navigation/target-blank-opener-post.html:

Update existing layout test to reflect behavior change.

  • platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:

Rebaseline WPT tests now that more checks are passing.

2:35 PM Changeset in webkit [284748] by ysuzuki@apple.com
  • 8 edits
    1 add
    3 deletes in trunk

[WTF] Replace current LLVM flang's Int128 with abseil-cpp's Int128
https://bugs.webkit.org/show_bug.cgi?id=232129

Reviewed by Darin Adler.

Source/WTF:

We found that flang's signed Int128 implementation is not tested,
and it has several issues about sign extension and division.

Instead, we import abseil-cpp[1]'s int128 implementation.
abseil-cpp is more battle-tested, and abseil is already used
in WebKit too (ANGLE and libwebrtc use abseil-cpp as their utility
library).

For Apple readers, abseil-cpp for WebKit is approved in OSS-351.

[1]: https://github.com/abseil/abseil-cpp

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/Int128.cpp: Added.

(WTF::UInt128Impl::UInt128Impl):
(WTF::operator/):
(WTF::operator%):
(WTF::operator<<):
(WTF::Int128Impl::Int128Impl):

  • wtf/Int128.h:

(WTF::UInt128Max):
(std::numeric_limits<WTF::UInt128Impl>::min):
(std::numeric_limits<WTF::UInt128Impl>::lowest):
(std::numeric_limits<WTF::UInt128Impl>::max):
(std::numeric_limits<WTF::UInt128Impl>::epsilon):
(std::numeric_limits<WTF::UInt128Impl>::round_error):
(std::numeric_limits<WTF::UInt128Impl>::infinity):
(std::numeric_limits<WTF::UInt128Impl>::quiet_NaN):
(std::numeric_limits<WTF::UInt128Impl>::signaling_NaN):
(std::numeric_limits<WTF::UInt128Impl>::denorm_min):
(WTF::Int128Max):
(WTF::Int128Min):
(std::numeric_limits<WTF::Int128Impl>::min):
(std::numeric_limits<WTF::Int128Impl>::lowest):
(std::numeric_limits<WTF::Int128Impl>::max):
(std::numeric_limits<WTF::Int128Impl>::epsilon):
(std::numeric_limits<WTF::Int128Impl>::round_error):
(std::numeric_limits<WTF::Int128Impl>::infinity):
(std::numeric_limits<WTF::Int128Impl>::quiet_NaN):
(std::numeric_limits<WTF::Int128Impl>::signaling_NaN):
(std::numeric_limits<WTF::Int128Impl>::denorm_min):
(WTF::MakeUInt128):
(WTF::UInt128Impl::operator=):
(WTF::UInt128Impl::operator<<=):
(WTF::UInt128Impl::operator>>=):
(WTF::UInt128Impl::operator+=):
(WTF::UInt128Impl::operator-=):
(WTF::UInt128Impl::operator*=):
(WTF::UInt128Impl::operator/=):
(WTF::UInt128Impl::operator%=):
(WTF::UInt128Low64):
(WTF::UInt128High64):
(WTF::UInt128Impl::UInt128Impl):
(WTF::UInt128Impl::operator bool const):
(WTF::UInt128Impl::operator char const):
(WTF::UInt128Impl::operator signed char const):
(WTF::UInt128Impl::operator unsigned char const):
(WTF::UInt128Impl::operator char16_t const):
(WTF::UInt128Impl::operator char32_t const):
(WTF::UInt128Impl::operator ABSL_INTERNAL_WCHAR_T const):
(WTF::UInt128Impl::operator short const):
(WTF::UInt128Impl::operator unsigned short const):
(WTF::UInt128Impl::operator int const):
(WTF::UInt128Impl::operator unsigned int const):
(WTF::UInt128Impl::operator long const):
(WTF::UInt128Impl::operator unsigned long const):
(WTF::UInt128Impl::operator long long const):
(WTF::UInt128Impl::operator unsigned long long const):
(WTF::UInt128Impl::operator float const):
(WTF::UInt128Impl::operator double const):
(WTF::UInt128Impl::operator long double const):
(WTF::operator==):
(WTF::operator!=):
(WTF::operator<):
(WTF::operator>):
(WTF::operator<=):
(WTF::operator>=):
(WTF::operator+):
(WTF::operator-):
(WTF::operator!):
(WTF::operator~):
(WTF::operator|):
(WTF::operator&):
(WTF::operator):
(WTF::UInt128Impl::operator|=):
(WTF::UInt128Impl::operator&=):
(WTF::UInt128Impl::operator
=):
(WTF::operator<<):
(WTF::operator>>):
(WTF::int128_internal::AddResult):
(WTF::int128_internal::SubstructResult):
(WTF::operator*):
(WTF::UInt128Impl::operator++):
(WTF::UInt128Impl::operator--):
(WTF::MakeInt128):
(WTF::Int128Impl::operator=):
(WTF::Int128Impl::operator+=):
(WTF::Int128Impl::operator-=):
(WTF::Int128Impl::operator*=):
(WTF::Int128Impl::operator/=):
(WTF::Int128Impl::operator%=):
(WTF::Int128Impl::operator|=):
(WTF::Int128Impl::operator&=):
(WTF::Int128Impl::operator=):
(WTF::Int128Impl::operator<<=):
(WTF::Int128Impl::operator>>=):
(WTF::int128_internal::BitCastToSigned):
(WTF::Int128Low64):
(WTF::Int128High64):
(WTF::Int128Impl::Int128Impl):
(WTF::Int128Impl::operator bool const):
(WTF::Int128Impl::operator char const):
(WTF::Int128Impl::operator signed char const):
(WTF::Int128Impl::operator unsigned char const):
(WTF::Int128Impl::operator char16_t const):
(WTF::Int128Impl::operator char32_t const):
(WTF::Int128Impl::operator ABSL_INTERNAL_WCHAR_T const):
(WTF::Int128Impl::operator short const):
(WTF::Int128Impl::operator unsigned short const):
(WTF::Int128Impl::operator int const):
(WTF::Int128Impl::operator unsigned int const):
(WTF::Int128Impl::operator long const):
(WTF::Int128Impl::operator unsigned long const):
(WTF::Int128Impl::operator long long const):
(WTF::Int128Impl::operator unsigned long long const):
(WTF::Int128Impl::operator float const):
(WTF::Int128Impl::operator double const):
(WTF::Int128Impl::operator long double const):
(WTF::int128_internal::SignedAddResult):
(WTF::int128_internal::SignedSubstructResult):
(WTF::Int128Impl::operator++):
(WTF::Int128Impl::operator--):
(WTF::Int128Impl::operator+ const): Deleted.
(WTF::Int128Impl::operator~ const): Deleted.
(WTF::Int128Impl::operator- const): Deleted.
(WTF::Int128Impl::operator! const): Deleted.
(WTF::Int128Impl::operator std::uint64_t const): Deleted.
(WTF::Int128Impl::operator std::int64_t const): Deleted.
(WTF::Int128Impl::high const): Deleted.
(WTF::Int128Impl::low const): Deleted.
(WTF::Int128Impl::operator& const): Deleted.
(WTF::Int128Impl::operator | const): Deleted.
(WTF::Int128Impl::operator
const): Deleted.
(WTF::Int128Impl::operator<< const): Deleted.
(WTF::Int128Impl::operator>> const): Deleted.
(WTF::Int128Impl::operator* const): Deleted.
(WTF::Int128Impl::operator/ const): Deleted.
(WTF::Int128Impl::operator% const): Deleted.
(WTF::Int128Impl::operator< const): Deleted.
(WTF::Int128Impl::operator<= const): Deleted.
(WTF::Int128Impl::operator== const): Deleted.
(WTF::Int128Impl::operator!= const): Deleted.
(WTF::Int128Impl::operator>= const): Deleted.
(WTF::Int128Impl::operator> const): Deleted.
(WTF::Int128Impl::leadingZeroes const): Deleted.

  • wtf/LeadingZeroBitCount.cpp: Removed.
  • wtf/LeadingZeroBitCount.h: Removed.

Tools:

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/Int128.cpp:

(TestWebKitAPI::TYPED_TEST):
(TestWebKitAPI::TEST):
(TestWebKitAPI::ToNativeUInt128):
(TestWebKitAPI::FromNativeUInt128):
(TestWebKitAPI::ToNativeInt128):
(TestWebKitAPI::FromNativeInt128):
(TestWebKitAPI::TestBinaryUInt128):
(TestWebKitAPI::TestBinaryInt128):
(TestWebKitAPI::TestVsNativeUInt128):
(TestWebKitAPI::TestVsNativeInt128):
(TestWebKitAPI::TestUnary): Deleted.
(TestWebKitAPI::TestBinary): Deleted.
(TestWebKitAPI::ToNative): Deleted.
(TestWebKitAPI::FromNative): Deleted.
(TestWebKitAPI::TestVsNative): Deleted.

  • TestWebKitAPI/Tests/WTF/LeadingZeroBitCount.cpp: Removed.
2:05 PM Changeset in webkit [284747] by Alan Bujtas
  • 6 edits in trunk

LFC][IFC] Unexpected content wrap when the containing block width is relative (take 2)
https://bugs.webkit.org/show_bug.cgi?id=232192

Reviewed by Antti Koivisto.

Source/WebCore:

This is a more generic workaround (see r279678) for the block vs. inline measuring issue
where the block width is stored in a LayoutUnit while the inline layout uses float exclusively.
The implicit float flooring at computing the block width may produce an unexpectedly short available space.
e.g

<div style="font-family: Monospace; width: 3ch; overflow-wrap: anywhere">foobar</div>

assume the resolved 3ch is: 17.79999999px (float).
It should allow us to put [foo] on the first line.
However during a float -> LayoutUnit conversion, the resolved value becomes 17.79px.
This floored value leads to an early, unexpected breaking position at [fo].

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processInlineContent):
(WebCore::Layout::InlineContentBreaker::processOverflowingContentWithText const):

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::handleFloatContent):
(WebCore::Layout::availableWidth):
(WebCore::Layout::LineBuilder::handleInlineContent):
(WebCore::Layout::LineBuilder::rebuildLineForTrailingSoftHyphen):

LayoutTests:

1:18 PM Changeset in webkit [284746] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

WebContent crash when sending invalid IPC message using IPC testing API
https://bugs.webkit.org/show_bug.cgi?id=232060

Patch by Brandon Stewart <Brandon> on 2021-10-23
Reviewed by Wenson Hsieh.

Source/WebKit:

Do not trigger a crash in WebContent Process when sending an invalid IPC message using the
IPC testing API.

Test: ipc/send-invalid-message.html

  • Platform/IPC/Connection.cpp:

(IPC::Connection::dispatchSyncMessage):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeConnection):

LayoutTests:

Add IPC test to verify that an invalid IPC message will not cause a crash in WebContent Process
when using the IPC testing API.

  • TestExpectations:
  • ipc/send-invalid-message-expected.txt: Added.
  • ipc/send-invalid-message.html: Added.
9:35 AM Changeset in webkit [284745] by Chris Dumez
  • 6 edits in trunk

anchor.relList.supports("opener") should return true
https://bugs.webkit.org/show_bug.cgi?id=232182

Reviewed by Darin Adler.

Source/WebCore:

anchor.relList.supports("opener") should return true since we support "opener" on
anchor elements.

No new tests, updated existing test.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::relList):

LayoutTests:

Add layout test coverage.

  • fast/dom/DOMTokenList-supports-expected.txt:
  • fast/dom/DOMTokenList-supports.html:
8:54 AM Changeset in webkit [284744] by Alan Bujtas
  • 4 edits in trunk/Source

[LFC][IFC] Breaking before hyphen is only allowed when line-break is loose
https://bugs.webkit.org/show_bug.cgi?id=232191

Reviewed by Antti Koivisto.

Source/WebCore:

This is in preparation for enabling the fix for webkit.org/b/232192.

Two hyphenation related WPT tests (line-break-normal-hyphens-002.html, line-break-strict-hyphens-002.html)
simply pass because of a LayoutUnit (block width) vs. float (measured text width) precision mismatching bug.
This precision issue makes the line breaking code believe that fewer characters fit the line
producing the expected results for those two tests.
Let's fix the line breaking logic first by adding "breaks before hyphens" rules,
so that when webkit.org/b/232192 is addressed, we won't be seeing any WPT regressions.

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::midWordBreak):

Source/WTF:

  • wtf/unicode/CharacterNames.h:
8:21 AM Changeset in webkit [284743] by ddkilzer@apple.com
  • 4 edits in trunk/Source/WebCore

WebAVPlayerController should use WeakPtr<> for C++ instance variables
<https://webkit.org/b/231919>

Reviewed by Eric Carlson.

  • platform/ios/PlaybackSessionInterfaceAVKit.h:

(WebCore::PlaybackSessionInterfaceAVKit):

  • Make RefCounted-class also subclass CanMakeWeakPtr<>.
  • platform/ios/WebAVPlayerController.h:
  • Add comments that delegate and playbackSessionInterface instance variables are held weakly. The compiler won't allow weak to be used on non-Objective-C types, though.
  • platform/ios/WebAVPlayerController.mm:
  • Add WeakPtr<> instance variables for delegate and playbackSessionInterface properties.

(-[WebAVPlayerController delegate]): Add.
(-[WebAVPlayerController setDelegate:]): Add.
(-[WebAVPlayerController playbackSessionInterface]): Add.
(-[WebAVPlayerController setPlaybackSessionInterface:]): Add.

  • Implement getter/setter methods for delegate and playbackSessionInterface properties that use WeakPtr<> instance variables.
12:46 AM Changeset in webkit [284742] by Chris Fleizach
  • 10 edits
    1 move
    2 deletes in trunk/Source

AX: Unify speech synthesizer platform usage for Mac/iOS
https://bugs.webkit.org/show_bug.cgi?id=231895
<rdar://problem/84372479>

Reviewed by Andres Gonzalez.

Source/WebCore:

AVSpeechSynthesizer has been fully supported on macOS for a number of years. This allows us to unify platform usage.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/cocoa/PlatformSpeechSynthesizerCocoa.mm: Renamed from Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm.

(getAVSpeechUtteranceDefaultSpeechRate):
(getAVSpeechUtteranceMaximumSpeechRate):
(-[WebSpeechSynthesisWrapper initWithSpeechSynthesizer:]):
(-[WebSpeechSynthesisWrapper mapSpeechRateToPlatformRate:]):
(-[WebSpeechSynthesisWrapper speakUtterance:]):
(-[WebSpeechSynthesisWrapper pause]):
(-[WebSpeechSynthesisWrapper resume]):
(-[WebSpeechSynthesisWrapper cancel]):
(-[WebSpeechSynthesisWrapper speechSynthesizer:didStartSpeechUtterance:]):
(-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeechUtterance:]):
(-[WebSpeechSynthesisWrapper speechSynthesizer:didPauseSpeechUtterance:]):
(-[WebSpeechSynthesisWrapper speechSynthesizer:didContinueSpeechUtterance:]):
(-[WebSpeechSynthesisWrapper speechSynthesizer:didCancelSpeechUtterance:]):
(-[WebSpeechSynthesisWrapper speechSynthesizer:willSpeakRangeOfSpeechString:utterance:]):
(WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
(WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
(WebCore::PlatformSpeechSynthesizer::pause):
(WebCore::PlatformSpeechSynthesizer::resume):
(WebCore::PlatformSpeechSynthesizer::speak):
(WebCore::PlatformSpeechSynthesizer::cancel):
(WebCore::PlatformSpeechSynthesizer::resetState):

  • platform/mac/PlatformSpeechSynthesizerMac.mm: Removed.

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/cocoa/AVFoundationSoftLink.h:
  • pal/cocoa/AVFoundationSoftLink.mm:
  • pal/spi/cocoa/AXSpeechManagerSPI.h:
  • pal/spi/mac/SpeechSynthesisSPI.h: Removed.

Source/WTF:

  • wtf/PlatformHave.h:

Oct 22, 2021:

10:58 PM Changeset in webkit [284741] by Jean-Yves Avenard
  • 15 edits
    2 adds in trunk

video appears blank with only audio playing if video element isn't appended to the dom tree
https://bugs.webkit.org/show_bug.cgi?id=232124
rdar://83438282

Reviewed by Eric Carlson.

Source/WebCore:

If the renderer isn't accelerated, the current playback policity is to
not have the video tracks visible on screen.
The HTMLMediaElement could only check if the renderer was accelerated if
it was part of the DOM.
On iPhone, for historical reasons, inline playback isn't allowed but
will play fullscreen instead.

This is a temporary workaround until bug 232125 is comlpeted which would provide
a more elegant and universal solution.

Test: media/video-element-fullscreen-not-in-dom-accelerated-iphone.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerRenderingCanBeAccelerated):

  • html/HTMLMediaElement.h:
  • testing/Internals.cpp:

(WebCore::Internals::mediaPlayerRenderingCanBeAccelerated):

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

Source/WebKit:

Ensure that we inform the GPU process whenever
MediaPlayer::renderingCanBeAccelerated value could have changed.

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::load):
(WebKit::MediaPlayerPrivateRemote::readyStateChanged):
(WebKit::MediaPlayerPrivateRemote::checkAcceleratedRenderingState):
(WebKit::MediaPlayerPrivateRemote::updateConfiguration):
(WebKit::MediaPlayerPrivateRemote::setVideoFullscreenLayer):
(WebKit::MediaPlayerPrivateRemote::setVideoFullscreenGravity):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:

LayoutTests:

  • TestExpectations:
  • media/remove-video-element-in-pip-from-document-expected.txt:
  • media/remove-video-element-in-pip-from-document.html: update test to improve coverage.
  • media/video-element-fullscreen-not-in-dom-accelerated-iphone-expected.txt: Added.
  • media/video-element-fullscreen-not-in-dom-accelerated-iphone.html: Added.
  • platform/ios/TestExpectations:
  • platform/ipad/TestExpectations:
9:07 PM Changeset in webkit [284740] by Said Abou-Hallawa
  • 3 edits
    2 adds in trunk

[GPU Process] REGRESSION: Drawing a large SVG image on a canvas may take too much memory
https://bugs.webkit.org/show_bug.cgi?id=230886
rdar://83628607

Reviewed by Simon Fraser.

Source/WebCore:

For the GPUProcess rendering on a canvas, we have to draw the SVGImage to
a temporary ImageBuffer, get a NativeImage from this ImageBuffer and send
it to GPUProcess through a DrawNativeImage display list item.

The fix is:

  1. Make sure the size of temporary ImageBuffer is scaled to the Graphics Context CTM.
  2. Clamp the scaled size to the MaxClampedArea. So ImageBuffer::create() returns a valid ImageBuffer.
  3. Scale the destination GraphicsContext to the reciprocal of the scaling factor before drawing the NativeImage.

Test: fast/canvas/canvas-draw-large-svg-image.html

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::drawAsNativeImage):

LayoutTests:

  • fast/canvas/canvas-draw-large-svg-image-expected.html: Added.
  • fast/canvas/canvas-draw-large-svg-image.html: Added.
8:57 PM Changeset in webkit [284739] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Source/WebCore:
https://bugs.webkit.org/show_bug.cgi?id=232177
Check if start and end positions are still valid after updating them through mergeEndWithNextIfIdentical

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-10-22
Reviewed by Alan Bujtas.

We currently check if start and end positions are still valid after
updating them through mergeEndWithNextIfIdentical, but not through
mergeStartWithPreviousIfIdentical. Add this check to avoid trying to
deref a nullptr in ApplyStyleCommand::mergeEndWithNextIfIdentical.

Test: fast/editing/create-link-inline-style-change-crash-001.html

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::applyInlineStyle):

LayoutTests:
Check if start and end positions are still valid after updating them through mergeStartWithPreviousIfIdentical
https://bugs.webkit.org/show_bug.cgi?id=232177

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-10-22
Reviewed by Alan Bujtas.

  • fast/editing/create-link-inline-style-change-crash-001-expected.txt: Added.
  • fast/editing/create-link-inline-style-change-crash-001.html: Added.
8:25 PM Changeset in webkit [284738] by Simon Fraser
  • 16 edits
    1 add in trunk

Content offset in this codepen when switching tabs
https://bugs.webkit.org/show_bug.cgi?id=231989

Reviewed by Tim Horton.

Source/WebCore:

There were two problems that occurred with async-scrollable iframes when their associated
WKWebView was removed and re-added to the view hierarchy (e.g. when switching tabs).
These resulted in misplaced position:fixed content, and the first user scroll in the
iframe causing the scroll position to jump back to the top.

The positon:fixed issue was caused by an ordering problem in
ScrollingTreeFrameScrollingNode::commitStateBeforeChildren() which resulted in the layout
viewport being computed incorrectly; we called updateViewportForCurrentScrollPosition()
before setting the min and max scroll position, so we'd always clamp the layout viewport to
a location of 0,0.

The second scroll position reset issue was caused by the ScrollingTreeScrollingNode's
m_currentScrollPosition reverting to a stale after re-attaching the iframe's scrolling
subtree. ScrollingTreeScrollingNode::commitStateBeforeChildren() has code to set
m_currentScrollPosition from the state tree node's scroll position on first commit;
the issue was that ScrollingStateScrollingNode's scrollPosition() was not updated on every
scroll, only when something triggered a scrolling tree commit.

Fix by updating ScrollingStateScrollingNode's scrollPosition() for frame nodes on detach
(overflow scrolling nodes have their scroll positions updated eagerly).

Both fixes are tested by the ScrollingCoordinatorTests.ScrollingTreeAfterDetachReattach API test.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::frameViewWillBeDetached):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::frameViewWillBeDetached):

  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::hasScrollPositionRequest const):

  • page/scrolling/ScrollingStateScrollingNode.h:
  • page/scrolling/ScrollingStateTree.cpp:

(WebCore::ScrollingStateTree::insertNode):

  • page/scrolling/ScrollingTreeFrameScrollingNode.cpp:

(WebCore::ScrollingTreeFrameScrollingNode::commitStateBeforeChildren):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeScrollingNode::dumpProperties const):

  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::detachRootLayer):

Tools:

API test that scrolls an iframe via wheel events, then detached and re-attaches the view.

The two wheel scrolls are necessary to exercise the "stale ScrollingStateScrollingNode
scroll position" issue.

The scrolling tree dumps validate the layout viewport part of the fix.

Also correct some functions where the sense of 'isWaitingForJavaScript' was flipped.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/mac/ScrollingCoordinatorTests.mm: Added.

(TestWebKitAPI::synthesizeWheelEvents):
(TestWebKitAPI::waitForScrollEventAndReturnScrollY):
(TestWebKitAPI::scrollingTreeElidingLastCommittedScrollPosition):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[WKWebView objectByEvaluatingJavaScript:]):
(-[WKWebView objectByEvaluatingJavaScriptWithUserGesture:]):
(-[WKWebView objectByCallingAsyncFunction:withArguments:error:]):

LayoutTests:

New baselines.

  • tiled-drawing/scrolling/clamp-out-of-bounds-scrolls-expected.txt:
  • tiled-drawing/scrolling/scrolling-tree-after-scroll-expected.txt:
7:34 PM Changeset in webkit [284737] by eric.carlson@apple.com
  • 6 edits in trunk/Source/WebCore

[Cocoa] Fairplay encrypted video fails to play when loaded in a display:none element
https://bugs.webkit.org/show_bug.cgi?id=232155
rdar://83419159

Reviewed by Jer Noble.

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::currentRenderingMode const): MediaRenderingMode
was changed from an enum to an enum class so its values can be logged.
(WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode const): Only return
MediaRenderingMode::MediaRenderingToContext if we have been asked to paint once
readyState is HaveMetadata or higher.
(WebCore::MediaPlayerPrivateAVFoundation::setUpVideoRendering): MediaRenderingMode change.
(WebCore::MediaPlayerPrivateAVFoundation::setNeedsRenderingModeChanged): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::prepareForRendering): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::setPageIsVisible): Ditto.
(WebCore::convertEnumerationToString): MediaRenderingMode logging function.

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:

(WebCore::MediaPlayerPrivateAVFoundation::haveBeenAskedToPaint const):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame const): MediaRenderingMode change.
(WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer): Set m_haveBeenAskedToPaint.

6:54 PM Changeset in webkit [284736] by commit-queue@webkit.org
  • 42 edits
    3 adds in trunk/Source

Add a module map file for PrivateFrameworks/WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=230735

Patch by Ian Anderson <iana@apple.com> on 2021-10-22
Reviewed by David Kilzer.

Source/WebCore:

Change a few quoted includes to framework style angle includes to
support modularization.
Make sure to define the TARGET_ macros before using them.

  • platform/ios/WebItemProviderPasteboard.h:
  • platform/ios/wak/WAKAppKitStubs.h:
  • platform/ios/wak/WAKResponder.h:
  • platform/ios/wak/WAKView.h:
  • platform/ios/wak/WAKWindow.h:
  • platform/ios/wak/WKContentObservation.h:
  • platform/ios/wak/WebCoreThreadMessage.h:

Source/WebKitLegacy:

Add module map files for WebKitLegacy. The public module is empty
because there are no public headers. The private module map sets
PrivateHeaders as the umbrella directory because there isn't an umbrella
header already. Then it makes an explicit submodule for each header so
as to mimic the non-modular environment.

  • Modules/WebKitLegacy.modulemap: Added.
  • Modules/WebKitLegacy.private.modulemap: Added.
  • WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/ios:

WebGeolocationCoreLocationProvider.h is an Objective-C++ header, but the
WebKitLegacy module should be usable by plain Objective-C clients. Add
C++ guards so that it can be included in the module.
Add a missing include to WebFixedPositionContent.h.

  • Misc/WebGeolocationCoreLocationProvider.h:
  • WebCoreSupport/WebFixedPositionContent.h:

Source/WebKitLegacy/mac:

Define modules for the Cocoa Touch environment. macOS can't define
modules in WebKitLegacy because it's a nested framework on that
platform.
Set up the modules verifier tool for Apple Internal (it's not supported
in the public Xcode). Don't enable it yet because some of the Safari
builders use too old of an Xcode.
Add the Apple Internal guards for NSURLDownload from WebDownload.h
NSURLDownloadSPI.h so it can be included in the module.
WebCreateFragmentInternal.h is an Objective-C++ header, but the
WebKitLegacy module should be usable by plain Objective-C clients.
C++ guards so that it can be included in the module.
Switch a few quoted includes to framework style angle includes, which
are required for modules.
Add some missing includes.

  • Configurations/WebKitLegacy.xcconfig:
  • DOM/DOMEventListener.h:
  • DOM/DOMEventTarget.h:
  • DOM/DOMNodeFilter.h:
  • DOM/DOMXPathNSResolver.h:
  • DOM/WebDOMOperationsPrivate.h:
  • History/WebHistoryItemPrivate.h:
  • Misc/NSURLDownloadSPI.h:
  • Misc/WebCache.h:
  • Misc/WebDownload.h:
  • Misc/WebKitErrorsPrivate.h:
  • Misc/WebLocalizableStrings.h:
  • Misc/WebUserContentURLPattern.h:
  • Plugins/Hosted/WebKitPluginHostTypes.h:
  • Plugins/WebPlugin.h:
  • Plugins/WebPluginContainer.h:
  • Storage/WebDatabaseManagerPrivate.h:
  • Storage/WebDatabaseQuotaManager.h:
  • Storage/WebStorageManagerPrivate.h:
  • WebCoreSupport/WebCreateFragmentInternal.h:
  • WebCoreSupport/WebSecurityOriginPrivate.h:
  • WebView/WebDeviceOrientation.h:
  • WebView/WebDeviceOrientationProvider.h:
  • WebView/WebDeviceOrientationProviderMock.h:
  • WebView/WebEditingDelegatePrivate.h:
  • WebView/WebFormDelegatePrivate.h:
  • WebView/WebGeolocationPosition.h:
  • WebView/WebResourceLoadDelegatePrivate.h:
6:25 PM Changeset in webkit [284735] by Kocsen Chung
  • 1 copy in tags/Safari-612.3.2.1.1

Tag Safari-612.3.2.1.1.

6:22 PM Changeset in webkit [284734] by Kocsen Chung
  • 10 edits in branches/safari-612.3.2.1-branch

Cherry-pick r284692. rdar://problem/84553142

Followup to r284652: ensure file handle is closed in web process
https://bugs.webkit.org/show_bug.cgi?id=232127

Reviewed by Youenn Fablet.

Source/WebCore:

Covered by test: storage/filesystemaccess/sync-access-handle-close-worker.html

  • Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp: (WebCore::FileSystemSyncAccessHandle::~FileSystemSyncAccessHandle): make sure file handle is closed when FileSystemSyncAccessHandle is destroyed. (WebCore::FileSystemSyncAccessHandle::closeInternal): (WebCore::FileSystemSyncAccessHandle::close):
  • Modules/filesystemaccess/FileSystemSyncAccessHandle.h:

Source/WebKit:

  • NetworkProcess/storage/FileSystemStorageHandle.cpp: (WebKit::FileSystemStorageHandle::~FileSystemStorageHandle): (WebKit::FileSystemStorageHandle::createSyncAccessHandle): (WebKit::FileSystemStorageHandle::close):
  • NetworkProcess/storage/FileSystemStorageHandle.h:
  • Platform/IPC/cocoa/SharedFileHandleCocoa.cpp: an extra fd is created here and does not get closed. (IPC::SharedFileHandle::decode):

LayoutTests:

  • storage/filesystemaccess/resources/sync-access-handle-close.js: (testSyncFunction): (async testAsyncFunction): (async testFunctions): (async testMultipleHandles): (async test):
  • storage/filesystemaccess/sync-access-handle-close-worker-expected.txt:

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

6:22 PM Changeset in webkit [284733] by Kocsen Chung
  • 7 edits
    3 adds in branches/safari-612.3.2.1-branch

Cherry-pick r284652. rdar://problem/84517013

FileSystemSyncAccessHandle should close platform file handle on close()
https://bugs.webkit.org/show_bug.cgi?id=232067
<rdar://problem/84517013>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker-expected.txt:

Source/WebCore:

This patch also ensures no request is sent after close() is called.

Test: storage/filesystemaccess/sync-access-handle-close-worker.html

  • Modules/filesystemaccess/FileSystemFileHandle.cpp: (WebCore::FileSystemFileHandle::createSyncAccessHandle):
  • Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp: (WebCore::FileSystemSyncAccessHandle::FileSystemSyncAccessHandle): (WebCore::FileSystemSyncAccessHandle::~FileSystemSyncAccessHandle): (WebCore::FileSystemSyncAccessHandle::isClosingOrClosed const): (WebCore::FileSystemSyncAccessHandle::truncate): (WebCore::FileSystemSyncAccessHandle::getSize): (WebCore::FileSystemSyncAccessHandle::flush): (WebCore::FileSystemSyncAccessHandle::close): (WebCore::FileSystemSyncAccessHandle::didClose): (WebCore::FileSystemSyncAccessHandle::read): (WebCore::FileSystemSyncAccessHandle::write):
  • Modules/filesystemaccess/FileSystemSyncAccessHandle.h:

LayoutTests:

  • storage/filesystemaccess/resources/sync-access-handle-close.js: Added. (finishTest): (async testFunctions): (async test):
  • storage/filesystemaccess/sync-access-handle-close-worker-expected.txt: Added.
  • storage/filesystemaccess/sync-access-handle-close-worker.html: Added.

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

5:58 PM Changeset in webkit [284732] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

Updated test expectations for imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-perfect-negotiation-stress-glare.https.html.
https://bugs.webkit.org/show_bug.cgi?id=229569.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
5:49 PM Changeset in webkit [284731] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

REGRESSION: [Win] fast/ruby/generated-before-counter-doesnt-crash.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=232188

Unreviewed test gardening.

  • platform/win/TestExpectations: Mark test as flaky.
5:19 PM Changeset in webkit [284730] by Chris Dumez
  • 3 edits in trunk/Source

Preconnect to link's target on click
https://bugs.webkit.org/show_bug.cgi?id=232147

Reviewed by Alex Christensen.

Preconnect to link's target on click, for reduced page load time. This is a confirmed
progression on some of our page load time benchmarks.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::handleClick):

5:04 PM Changeset in webkit [284729] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 Debug ] ASSERTION FAILED: sockets.empty().
https://bugs.webkit.org/show_bug.cgi?id=231451

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
4:51 PM Changeset in webkit [284728] by commit-queue@webkit.org
  • 42 edits
    1 delete in trunk/Source

Unreviewed, reverting r284713.
https://bugs.webkit.org/show_bug.cgi?id=232187

Broke some Apple internal builds

Reverted changeset:

"Add a module map file for PrivateFrameworks/WebKitLegacy"
https://bugs.webkit.org/show_bug.cgi?id=230735
https://commits.webkit.org/r284713

4:50 PM Changeset in webkit [284727] by Ayumi Kojima
  • 4 edits in trunk/LayoutTests

[ iOS macOS Debug ] imported/w3c/web-platform-tests/html/dom/idlharness.worker.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231030

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
4:31 PM Changeset in webkit [284726] by Justin Michaud
  • 3 edits in trunk/Source/JavaScriptCore

Fix nits from 232019
https://bugs.webkit.org/show_bug.cgi?id=232180

Reviewed by Saam Barati.

We only need one write barrier, since we only need to guarantee that we read the status of the write barrier before we read from the structure cache.
If we are delayed in watching the watchpoint, it does not change any of the interleavings.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

4:21 PM Changeset in webkit [284725] by commit-queue@webkit.org
  • 6 edits
    8 adds in trunk

Integer interpolation in animations should be rounded towards positive infinity, not away from zero.
https://bugs.webkit.org/show_bug.cgi?id=232013

Currently, interpolation of <integer> is rounding away from 0.
The interpolation's result should be rounded according to the spec,
https://drafts.csswg.org/css-values-4/#combine-integers, which is

"the result is converted to an <integer> by rounding
to the nearest integer, with values halfway between
adjacent integers rounded towards positive infinity."

LayoutTests/imported/w3c:

Patch by Joonghun Park <pjh0718@gmail.com> on 2021-10-22
Reviewed by Darin Adler.

  • web-platform-tests/css/css-values/integer_interpolation_round_half_towards_positive_infinity_order-expected.txt: Added.
  • web-platform-tests/css/css-values/integer_interpolation_round_half_towards_positive_infinity_order.html: Added.
  • web-platform-tests/css/css-values/integer_interpolation_round_half_towards_positive_infinity_z_index-expected.txt: Added.
  • web-platform-tests/css/css-values/integer_interpolation_round_half_towards_positive_infinity_z_index.html: Added.

Source/WebCore:

This patch also removes redundant static_cast<double>s
and potential overflow(e.g.'to' is the maximum integer and 'from' is
the minimum integer) from blend in AnimationUtilities.h.

Patch by Joonghun Park <pjh0718@gmail.com> on 2021-10-22
Reviewed by Darin Adler.

Tests: animations/animation-order-overflow.html

animations/animation-z-order-overflow.html
imported/w3c/web-platform-tests/css/css-values/integer_interpolation_round_half_towards_positive_infinity_order.html
imported/w3c/web-platform-tests/css/css-values/integer_interpolation_round_half_towards_positive_infinity_z_index.html

  • platform/animation/AnimationUtilities.h:

(WebCore::blend):

Source/WTF:

Patch by Joonghun Park <pjh0718@gmail.com> on 2021-10-22
Reviewed by Darin Adler.

  • wtf/MathExtras.h:

(roundTowardsPositiveInfinity):

LayoutTests:

This patch also removes redundant static_cast<double>s
and potential overflow(e.g.'to' is the maximum integer and 'from' is
the minimum integer) from blend in AnimationUtilities.h.

Patch by Joonghun Park <pjh0718@gmail.com> on 2021-10-22
Reviewed by Darin Adler.

  • animations/animation-order-overflow-expected.txt: Added.
  • animations/animation-order-overflow.html: Added.
  • animations/animation-z-order-overflow-expected.txt: Added.
  • animations/animation-z-order-overflow.html: Added.
4:20 PM Changeset in webkit [284724] by Chris Dumez
  • 4 edits in trunk/LayoutTests

Regression (r284610?): [ iOS BigSur wk2 ]imported/w3c/web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=232184
<rdar://problem/84567378>

LayoutTests/imported/w3c:

Unreviewed, rebaseline test.

  • web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox.https-expected.txt:

LayoutTests:

Unreviewed, dump CONSOLE messages to stderr to address flakiness.

3:53 PM Changeset in webkit [284723] by Chris Dumez
  • 4 edits in trunk/LayoutTests

Regression (r284610): [ iOS BigSur wk2 ] http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html is failing
https://bugs.webkit.org/show_bug.cgi?id=232151
<rdar://problem/84552682>

Reviewed by Ryan Haddad.

The test expects a CONSOLE message to get logged to indicate that a load was blocked.
Rely on internals.setConsoleMessageListener to wait for this CONSOLE message instead
of using a timer in order the address the flakiness.

  • http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html:
  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
3:44 PM Changeset in webkit [284722] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[iOS EWS] imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=232181

Unreviewed test gardening.

  • platform/ios/TestExpectations: Mark test as flaky.
3:32 PM Changeset in webkit [284721] by Ryan Haddad
  • 2 edits in trunk/Tools

[ iOS15 EWS ] TestWebKitAPI.AppPrivacyReport.LoadSimulatedRequest tests are timing out
https://bugs.webkit.org/show_bug.cgi?id=232166

Unreviewed test gardening.

  • TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: Disable these tests.
3:27 PM Changeset in webkit [284720] by Alan Coon
  • 1 copy in tags/Safari-612.3.2.0.1

Tag Safari-612.3.2.0.1.

3:26 PM Changeset in webkit [284719] by Alan Coon
  • 8 edits in branches/safari-612.3.2.1-branch/Source

Versioning.

WebKit-7612.3.2.1.1

3:17 PM Changeset in webkit [284718] by commit-queue@webkit.org
  • 19 edits
    1 move in trunk/Source/WebCore

Rename ClipPathOperation to PathOperation
https://bugs.webkit.org/show_bug.cgi?id=232167

Patch by Kiet Ho <Kiet Ho> on 2021-10-22
Reviewed by Simon Fraser.

No functional changes, no tests required.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):

  • css/CSSBasicShapes.cpp:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • rendering/PathOperation.h: Renamed from Source/WebCore/rendering/ClipPathOperation.h.

(WebCore::PathOperation::operator!= const):
(WebCore::PathOperation::isSameType const):
(WebCore::PathOperation::PathOperation):

  • rendering/ReferencedSVGResources.cpp:

(WebCore::ReferencedSVGResources::referencedSVGResourceIDs):
(WebCore::ReferencedSVGResources::referencedClipperRenderer):

  • rendering/ReferencedSVGResources.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::hitTestClipPath const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::willCompositeClipPath const):
(WebCore::RenderLayer::computeClipPath const):
(WebCore::RenderLayer::setupClipPath):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateMaskingLayerGeometry):
(WebCore::RenderLayerBacking::updateMaskingLayer):

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

(WebCore::RenderStyle::clipPath const):
(WebCore::RenderStyle::initialClipPath):
(WebCore::RenderStyle::setClipPath):

  • rendering/style/StyleRareNonInheritedData.h:
  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::isPointInCSSClippingArea):
(WebCore::SVGRenderSupport::clipContextToCSSClippingArea):
(WebCore::SVGRenderSupport::pointInClippingArea):

  • rendering/svg/SVGRenderTreeAsText.cpp:

(WebCore::writeResources):

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::prepareToRenderSVGContent):

  • rendering/svg/SVGResources.cpp:

(WebCore::SVGResources::buildCachedResources):

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertClipPath):

3:05 PM Changeset in webkit [284717] by Alan Coon
  • 1 copy in branches/safari-612.3.2.1-branch

New branch.

2:56 PM Changeset in webkit [284716] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] GetTypedArrayLengthAsInt52 must be inserted only when we ensure that input is TypedArray via array-mode-based filtering
https://bugs.webkit.org/show_bug.cgi?id=232168
rdar://84366658

Reviewed by Robin Morisset.

JSTests:

  • stress/gettypedarraylengthasint52-must-be-emitted-for-typedarray.js: Added.

(foo):

Source/JavaScriptCore:

GetTypedArrayLengthAsInt52 works only when input is TypedArray, which should be validated via array-mode (and already inserted checks in fixup).
Accidentally we were inserting it without checking typed-array condition in SSA lowering phase. This patch adds a condition which ensures it
is TypedArray.

  • dfg/DFGSSALoweringPhase.cpp:

(JSC::DFG::SSALoweringPhase::handleNode):
(JSC::DFG::SSALoweringPhase::lowerBoundsCheck):

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

Change Heap::writeBarrier() to do the cheaper check first.
https://bugs.webkit.org/show_bug.cgi?id=232172

Reviewed by Robin Morisset.

It's cheaper to do a check using incoming args (which are already loaded in
registers) than to do a check which requires memory loads.

  • heap/HeapInlines.h:

(JSC::Heap::writeBarrier):

2:40 PM Changeset in webkit [284714] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS Debug ] fast/selectors/ backtracking tests are timing out.
https://bugs.webkit.org/show_bug.cgi?id=230988

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
2:28 PM Changeset in webkit [284713] by commit-queue@webkit.org
  • 42 edits
    3 adds in trunk/Source

Add a module map file for PrivateFrameworks/WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=230735

Patch by Ian Anderson <iana@apple.com> on 2021-10-22
Reviewed by David Kilzer.

Source/WebCore:

Change a few quoted includes to framework style angle includes to
support modularization.
Make sure to define the TARGET_ macros before using them.

  • platform/ios/WebItemProviderPasteboard.h:
  • platform/ios/wak/WAKAppKitStubs.h:
  • platform/ios/wak/WAKResponder.h:
  • platform/ios/wak/WAKView.h:
  • platform/ios/wak/WAKWindow.h:
  • platform/ios/wak/WKContentObservation.h:
  • platform/ios/wak/WebCoreThreadMessage.h:

Source/WebKitLegacy:

Add module map files for WebKitLegacy. The public module is empty
because there are no public headers. The private module map sets
PrivateHeaders as the umbrella directory because there isn't an umbrella
header already. Then it makes an explicit submodule for each header so
as to mimic the non-modular environment.

  • Modules/WebKitLegacy.modulemap: Added.
  • Modules/WebKitLegacy.private.modulemap: Added.
  • WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/ios:

WebGeolocationCoreLocationProvider.h is an Objective-C++ header, but the
WebKitLegacy module should be usable by plain Objective-C clients. Add
C++ guards so that it can be included in the module.
Add a missing include to WebFixedPositionContent.h.

  • Misc/WebGeolocationCoreLocationProvider.h:
  • WebCoreSupport/WebFixedPositionContent.h:

Source/WebKitLegacy/mac:

Define modules for the Cocoa Touch environment. macOS can't define
modules in WebKitLegacy because it's a nested framework on that
platform.
Enable the modules verifier tool for Apple Internal (it's not supported
in the public Xcode).
Add the Apple Internal guards for NSURLDownload from WebDownload.h to
NSURLDownloadSPI.h so it can be included in the module.
WebCreateFragmentInternal.h is an Objective-C++ header, but the
WebKitLegacy module should be usable by plain Objective-C clients. Add
C++ guards so that it can be included in the module.
Switch a few quoted includes to framework style angle includes, which
are required for modules.
Add some missing includes.

  • Configurations/WebKitLegacy.xcconfig:
  • DOM/DOMEventListener.h:
  • DOM/DOMEventTarget.h:
  • DOM/DOMNodeFilter.h:
  • DOM/DOMXPathNSResolver.h:
  • DOM/WebDOMOperationsPrivate.h:
  • History/WebHistoryItemPrivate.h:
  • Misc/NSURLDownloadSPI.h:
  • Misc/WebCache.h:
  • Misc/WebDownload.h:
  • Misc/WebKitErrorsPrivate.h:
  • Misc/WebLocalizableStrings.h:
  • Misc/WebUserContentURLPattern.h:
  • Plugins/Hosted/WebKitPluginHostTypes.h:
  • Plugins/WebPlugin.h:
  • Plugins/WebPluginContainer.h:
  • Storage/WebDatabaseManagerPrivate.h:
  • Storage/WebDatabaseQuotaManager.h:
  • Storage/WebStorageManagerPrivate.h:
  • WebCoreSupport/WebCreateFragmentInternal.h:
  • WebCoreSupport/WebSecurityOriginPrivate.h:
  • WebView/WebDeviceOrientation.h:
  • WebView/WebDeviceOrientationProvider.h:
  • WebView/WebDeviceOrientationProviderMock.h:
  • WebView/WebEditingDelegatePrivate.h:
  • WebView/WebFormDelegatePrivate.h:
  • WebView/WebGeolocationPosition.h:
  • WebView/WebResourceLoadDelegatePrivate.h:
1:45 PM Changeset in webkit [284712] by Chris Fleizach
  • 2 edits in trunk/Source/WebKit

AX: Inform AX when the injected bundle sends a synchronous message
https://bugs.webkit.org/show_bug.cgi?id=232159

Reviewed by Andres Gonzalez.

When an injected bundle sends a synchronous message we need to inform accessibility clients, so they don't get
stuck trying to message the WebContent process. This is already handled for synchronous messages
generated from the WebPage.

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::postSynchronousMessage):

1:22 PM Changeset in webkit [284711] by aboya@igalia.com
  • 8 edits in trunk

[MSE][GStreamer] Honor MP4 edit lists, bis
https://bugs.webkit.org/show_bug.cgi?id=231019

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

This patch takes into consideration the GstSegment attached to a
sample to offset the PTS and DTS. This ensures accurate timestamps are
obtained for MP4 files containing edit lists (commonly necessary for
files containing video with B frames to have PTS starting at zero).

Before this was implemented, a workaround was in place based on a
heuristic (DTS = 0 && PTS > 0 && PTS < 0.1). The workaround is
preserved for the sake of content without proper edit lists, but
any edit list takes preference.

The time fudge factor has been modified from 0.083 seconds up to
0.100 seconds to accomodate the size of the empty edit in test.mp4
used by Web Platform Tests.

This test fixes improves expectation results and fixes two subtests in
imported/w3c/web-platform-tests/media-source/mediasource-remove.html.

This is a reworked version that avoids using gst_sample_set_buffer()
which is not available on GStreamer 1.14, and fixes an issue where
frames that would get a negative DTS were not being enqueued properly.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::currentTimeFudgeFactor):

  • platform/graphics/SourceBufferPrivate.h:

(WebCore::SourceBufferPrivate::timeFudgeFactor const):

  • platform/graphics/gstreamer/GStreamerCommon.h:

(WebCore::toGstClockTime):

  • platform/graphics/gstreamer/MediaSampleGStreamer.cpp:

(WebCore::MediaSampleGStreamer::MediaSampleGStreamer):

  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:

(WebCore::bufferTimeToStreamTime):
(WebCore::AppendPipeline::appsinkNewSample):

LayoutTests:

Update expectations for mediasource-remove.html in the GStreamer
ports, as a couple subtests get fixed.

  • platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-remove-expected.txt:
12:50 PM Changeset in webkit [284710] by commit-queue@webkit.org
  • 19 edits in trunk/Source/WebKit

Use C++17 nested namespace syntax for WebKit::PCM
https://bugs.webkit.org/show_bug.cgi?id=232162

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-22
Reviewed by Yusuke Suzuki.

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementClientImpl.cpp:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementConnection.cpp:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDaemonClient.cpp:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDaemonClient.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDebugInfo.cpp:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDebugInfo.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManagerInterface.cpp:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManagerProxy.cpp:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementNetworkLoader.cpp:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementNetworkLoader.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.cpp:
  • NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementConnectionCocoa.mm:
  • NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementNetworkLoaderCocoa.mm:
  • NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementXPCUtilities.h:
  • NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementXPCUtilities.mm:
  • Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonConnectionSet.mm:
12:22 PM Changeset in webkit [284709] by Chris Dumez
  • 2 edits
    2 deletes in trunk/LayoutTests

Unreviewed, drop custom iOS expectations for noopener-noreferrer-sizing.window.html.

It looks like the test is now passing on iOS/iPhone too, not just macOS and iOS/iPad.

  • platform/ios-wk2/TestExpectations:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-sizing.window-expected.txt: Removed.
  • platform/ipad/imported/w3c/web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-sizing.window-expected.txt: Removed.
12:19 PM Changeset in webkit [284708] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

Update test expectations for imported/w3c/web-platform-tests/content-security-policy/script-src/script-src-multiple-policies-multiple-hashing-algorithms.html.
https://bugs.webkit.org/show_bug.cgi?id=232120.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
12:00 PM Changeset in webkit [284707] by Alan Coon
  • 3 edits
    3 adds in branches/safari-612-branch

Cherry-pick r283952. rdar://problem/84558050

[COOP] Crash under ReportingEndpointsCache::addEndpointFromDictionary()
https://bugs.webkit.org/show_bug.cgi?id=231537
<rdar://83530643>

Reviewed by Geoffrey Garen.

Source/WebCore:

Make sure we don't crash under addEndpointFromDictionary() when the Report-To HTTP header
contains more than one endpoint URL for a given group.

The loop inside addEndpointFromDictionary() should bail as soon as we find a viable
endpoint URL (since we don't currently support having several URLs for a given group).
The crash was due to a use-after-move of the |group|.

Test: http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints.html

  • loader/ReportingEndpointsCache.cpp: (WebCore::ReportingEndpointsCache::addEndpointFromDictionary):

LayoutTests:

Add layout test coverage.

  • http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints-expected.txt: Added.
  • http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints.html: Added.
  • http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints.html.headers: Added.

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

11:57 AM Changeset in webkit [284706] by Eric Hutchison
  • 3 edits in trunk/LayoutTests

http/wpt/fetch/fetch-response-body-stop-in-worker.html is failing on iOS15 was well.
https://bugs.webkit.org/show_bug.cgi?id=225528.

Unreviewed test gardening.

  • platform/ios-14-wk2/TestExpectations:
  • platform/ios-wk2/TestExpectations:
11:55 AM Changeset in webkit [284705] by Alan Coon
  • 8 edits in branches/safari-612-branch/Source

Versioning.

WebKit-7612.3.3

11:53 AM Changeset in webkit [284704] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

webkitpy/autoinstalled/pyobjc_frameworks.py should install wheel distribution
https://bugs.webkit.org/show_bug.cgi?id=232156

Patch by Roy Reapor <rreapor@apple.com> on 2021-10-22
Reviewed by Stephanie Lewis.

Install wheel version of framweorks.

  • Scripts/webkitpy/autoinstalled/pyobjc_frameworks.py:
11:41 AM Changeset in webkit [284703] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Add required syscall
https://bugs.webkit.org/show_bug.cgi?id=232153
<rdar://84523250>

Reviewed by Brent Fulgham.

Add required syscall to WP sandbox on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
11:35 AM Changeset in webkit [284702] by commit-queue@webkit.org
  • 9 edits
    39 adds in trunk

Change WebAssembly module import linking time to evaluate step.
https://bugs.webkit.org/show_bug.cgi?id=231114

Patch by Asumu Takikawa <asumu@igalia.com> on 2021-10-22
Reviewed by Yusuke Suzuki.

JSTests:

Added test cases based on Wasm/ESM proposal examples from:

https://github.com/WebAssembly/esm-integration/blob/main/proposals/esm-integration/EXAMPLES.md

The new tests cases cover the bindings made for both JS<->Wasm
and Wasm<->JS cyclic module cases, and importing values from JS
into Wasm modules. The tests do not cover importing memory values
as this does not work yet.

  • wasm/modules/wasm-js-cycle.js:
  • wasm/modules/wasm-js-cycle/entry-global.wasm:
  • wasm/modules/wasm-js-cycle/entry-global.wat:
  • wasm/modules/wasm-js-cycle/entry-table.wasm:
  • wasm/modules/wasm-js-cycle/entry-table.wat:
  • wasm/modules/wasm-js-cycle/global.js:

(from.string_appeared_here.export.incrementGlobal): Deleted.

  • wasm/modules/wasm-js-cycle/table.js:

(from.string_appeared_here.export.setTable): Deleted.

  • wasm/modules/js-wasm-cycle.js:

(then):

  • wasm/modules/js-wasm-cycle/entry-function.js: Added.

(f):

  • wasm/modules/js-wasm-cycle/entry-i32-global.js: Added.
  • wasm/modules/js-wasm-cycle/entry-i32-value.js: Added.
  • wasm/modules/js-wasm-cycle/entry-memory.js: Added.
  • wasm/modules/js-wasm-cycle/entry-table.js: Added.
  • wasm/modules/js-wasm-cycle/entry-wasm-global.js: Added.

(f):

  • wasm/modules/js-wasm-cycle/entry-wasm-memory.js: Added.

(f):

  • wasm/modules/js-wasm-cycle/entry-wasm-table.js: Added.

(f):

  • wasm/modules/js-wasm-cycle/function.wasm: Added.
  • wasm/modules/js-wasm-cycle/function.wat: Added.
  • wasm/modules/js-wasm-cycle/i32-global.wasm: Added.
  • wasm/modules/js-wasm-cycle/i32-global.wat: Added.
  • wasm/modules/js-wasm-cycle/i32-value.wasm: Added.
  • wasm/modules/js-wasm-cycle/i32-value.wat: Added.
  • wasm/modules/js-wasm-cycle/memory.wasm: Added.
  • wasm/modules/js-wasm-cycle/memory.wat: Added.
  • wasm/modules/js-wasm-cycle/table.wasm: Added.
  • wasm/modules/js-wasm-cycle/table.wat: Added.
  • wasm/modules/js-wasm-cycle/wasm-global.wasm: Added.
  • wasm/modules/js-wasm-cycle/wasm-global.wat: Added.
  • wasm/modules/js-wasm-cycle/wasm-memory.wasm: Added.
  • wasm/modules/js-wasm-cycle/wasm-memory.wat: Added.
  • wasm/modules/js-wasm-cycle/wasm-table.wasm: Added.
  • wasm/modules/js-wasm-cycle/wasm-table.wat: Added.
  • wasm/modules/wasm-imports-js-exports.js:
  • wasm/modules/wasm-imports-js-exports/global.js: Added.
  • wasm/modules/wasm-imports-js-exports/global.wasm: Added.
  • wasm/modules/wasm-imports-js-exports/global.wat: Added.
  • wasm/modules/wasm-imports-js-exports/table.js: Added.
  • wasm/modules/wasm-imports-js-exports/table.wasm: Added.
  • wasm/modules/wasm-imports-js-exports/table.wat: Added.
  • wasm/modules/wasm-js-cycle.js:
  • wasm/modules/wasm-js-cycle/entry-global.wasm: Added.
  • wasm/modules/wasm-js-cycle/entry-global.wat: Added.
  • wasm/modules/wasm-js-cycle/entry-memory.wasm: Added.
  • wasm/modules/wasm-js-cycle/entry-memory.wat: Added.
  • wasm/modules/wasm-js-cycle/entry-table.wasm: Added.
  • wasm/modules/wasm-js-cycle/entry-table.wat: Added.
  • wasm/modules/wasm-js-cycle/global.js: Added.

(export.incrementGlobal):

  • wasm/modules/wasm-js-cycle/memory.js: Added.

(from.string_appeared_here.export.setMemory):

  • wasm/modules/wasm-js-cycle/table.js: Added.

(export.setTable):

Source/JavaScriptCore:

Moves the Wasm module import linking code to execute in the
module evaluation step, which is the behavior specified in the
Wasm/ESM-integration proposal:

https://github.com/WebAssembly/esm-integration/tree/main/proposals/esm-integration#evaluate

  • runtime/AbstractModuleRecord.cpp:

(JSC::AbstractModuleRecord::link):
(JSC::AbstractModuleRecord::evaluate):

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::finalizeCreation):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::initializeImportsAndExports):
(JSC::WebAssemblyModuleRecord::linkImpl): Deleted.

  • wasm/js/WebAssemblyModuleRecord.h:
11:35 AM Changeset in webkit [284701] by Ayumi Kojima
  • 3 edits in trunk/LayoutTests

Regression (r284610): [ iOS BigSur wk2 ] http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=232151

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
11:31 AM Changeset in webkit [284700] by commit-queue@webkit.org
  • 8 edits in trunk/Source/JavaScriptCore

[JSC][32bit] Re-enable compileEnumeratorGetByVal fast path
https://bugs.webkit.org/show_bug.cgi?id=232052

Patch by Mikhail R. Gadelha <Mikhail R. Gadelha> on 2021-10-22
Reviewed by Yusuke Suzuki.

In https://bugs.webkit.org/show_bug.cgi?id=229543, the compileEnumeratorGetByVal
fast path had to be disabled in 32 bits due to not having enough registers.
There are enough registers available now, so we can re-enable the fast path and
removed the speculation that the baseEdge of both enumeratorGetByVal and
getByVal is a Cell in 32 bits.

I've also updated the 32 bits version of compileGetByVal to be closer to the 64
bits version: using DFG_CRASH instead of RELEASE_ASSERT_NOT_REACHED, using nullptr
instead of 0, and removed some whitespaces.

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

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

(JSC::DFG::SpeculativeJIT::compileEnumeratorGetByVal):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByVal):
(JSC::DFG::SpeculativeJIT::compileEnumeratorGetByVal): Deleted.

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileEnumeratorGetByVal): Deleted.

11:23 AM Changeset in webkit [284699] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

canDoFastSpread should also check that the Structure is from the global object we're watching
https://bugs.webkit.org/show_bug.cgi?id=231976
<rdar://84340372>

Reviewed by Keith Miller.

Just reorder the checks for clarity.

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::canDoFastSpread):

11:22 AM Changeset in webkit [284698] by Takashi.Komori@sony.com
  • 3 edits in trunk/Source/WebKit

WKErrorRef.h does't have some error definitions
https://bugs.webkit.org/show_bug.cgi?id=232116

Reviewed by Alex Christensen.

Add error definitions which exist in APIrror.h but do not exist in WKErrorRef.h

kWKErrorCodeCancelled
kWKErrorCodeFileDoesNotExist

No test as this patch does not change code behavior.

  • Shared/API/c/WKErrorRef.cpp:

(WKErrorGetErrorCode):

  • Shared/API/c/WKErrorRef.h:
11:11 AM Changeset in webkit [284697] by Alan Coon
  • 3 edits
    3 adds in branches/safari-612.3.2.0-branch

Cherry-pick r283952. rdar://problem/84533339

[COOP] Crash under ReportingEndpointsCache::addEndpointFromDictionary()
https://bugs.webkit.org/show_bug.cgi?id=231537
<rdar://83530643>

Reviewed by Geoffrey Garen.

Source/WebCore:

Make sure we don't crash under addEndpointFromDictionary() when the Report-To HTTP header
contains more than one endpoint URL for a given group.

The loop inside addEndpointFromDictionary() should bail as soon as we find a viable
endpoint URL (since we don't currently support having several URLs for a given group).
The crash was due to a use-after-move of the |group|.

Test: http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints.html

  • loader/ReportingEndpointsCache.cpp: (WebCore::ReportingEndpointsCache::addEndpointFromDictionary):

LayoutTests:

Add layout test coverage.

  • http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints-expected.txt: Added.
  • http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints.html: Added.
  • http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints.html.headers: Added.

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

11:09 AM Changeset in webkit [284696] by Alan Coon
  • 8 edits in branches/safari-612.3.2.0-branch/Source

Versioning.

WebKit-7612.3.2.0.1

11:09 AM Changeset in webkit [284695] by Wenson Hsieh
  • 10 edits in trunk/Source/WebKit

RemoteRenderingBackend::CreateImageBuffer should be an async IPC stream message
https://bugs.webkit.org/show_bug.cgi?id=231970

Reviewed by Kimmo Kinnunen.

This patch reverts the changes in r284476, which worked around a race when adding receive queues for newly
created IPC stream destinations and simultaneously dispatching IPC messages to those destinations. Rather than
making the IPC message that creates and adds the new image buffer's RemoteDisplayListRecorder synchronous, we
instead keep that message async and make adjustments to ensure that incoming out-of-stream IPC messages for
RemoteDisplayListRecorder can always be mapped to an appropriate receive queue. See below for more details.

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::startListeningForIPC):

Move the main runloop bounce down to StreamServerConnectionBase::startReceivingMessagesImpl() instead (to deal
with the fact that addMessageReceiveQueue currently needs to be invoked on the main runloop). This allows us
to call StreamServerConnection::startReceivingMessages() from the processing queue while creating a remote
image buffer, which (in turn) ensures that incoming out-of-stream messages from the IPC thread will be sent to
the correct RemoteDisplayListRecorder destination by the time they're dispatched on the work queue thread.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::startListeningForIPC):
(WebKit::RemoteRenderingBackend::stopListeningForIPC):

Additionally register a "0-destination" receiver to ensure that all RemoteDisplayListRecorder messages (even
without pre-existing destinations) will be enqueued on the same IPC stream connection as this remote rendering
backend.

(WebKit::RemoteRenderingBackend::createImageBuffer):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteRenderingBackend.messages.in:

Make CreateImageBuffer an async stream message once again.

  • Platform/IPC/StreamConnectionWorkQueue.cpp:

(IPC::StreamConnectionWorkQueue::processStreams):

  • Platform/IPC/StreamConnectionWorkQueue.h:

Change m_connections into a HashCountedSet (from a HashSet), to ensure that the same server connection object
can be added to and removed from the work queue multiple times, without removing the connection from the map
early.

  • Platform/IPC/StreamServerConnection.cpp:

(IPC::StreamServerConnectionBase::startReceivingMessagesImpl):
(IPC::StreamServerConnectionBase::stopReceivingMessagesImpl):

  • Platform/IPC/StreamServerConnection.h:

(IPC::StreamServerConnection::startReceivingMessages):
(IPC::StreamServerConnection::stopReceivingMessages):

Add new methods to start and stop receiving all messages for a given ReceiverName, regardless of incoming
destination ID. RemoteRenderingBackend now uses this to register a "catch-all" listener for all
RemoteDisplayListRecorder messages.

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::createRemoteImageBuffer):

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

Remove release assertion in MediaResourceClient::responseReceived
https://bugs.webkit.org/show_bug.cgi?id=232121

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-22
Reviewed by David Kilzer.

I tried and was unable to reproduce this, even with multipart responses which can call didReceiveResponse multiple times in the same load.
In any case, it's clear where the crash is and that this assertion can be hit. Not continuing with the response is better than crashing.
Keep the debug assertion because if it is hit, we want to notice.

  • platform/network/cocoa/RangeResponseGenerator.mm:
9:56 AM Changeset in webkit [284693] by Antti Koivisto
  • 38 edits in trunk/Source/WebCore

Factor style resolver context arguments into a struct
https://bugs.webkit.org/show_bug.cgi?id=232137

Reviewed by Antoine Quint.

Add Style::ResolutionContext struct and use it to consistently pass around all context argument needed
for resolving style instead of just passing around individual arguments as separate function parameter.

An immediately benefit is that we can remove the stateful setOverrideDocumentElementStyle hack.
This also makes the style system more flexible and extensible for future work.

Most of the patch is mechanically replacing a parent style argument in various places with a context
struct argument.

  • animation/AnimationEffect.h:
  • animation/CSSAnimation.cpp:

(WebCore::CSSAnimation::create):

  • animation/CSSAnimation.h:
  • animation/CSSTransition.cpp:

(WebCore::CSSTransition::create):
(WebCore::CSSTransition::resolve):

  • animation/CSSTransition.h:
  • animation/DeclarativeAnimation.cpp:

(WebCore::DeclarativeAnimation::initialize):

  • animation/DeclarativeAnimation.h:
  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::updateBlendingKeyframes):
(WebCore::KeyframeEffect::computeDeclarativeAnimationBlendingKeyframes):
(WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
(WebCore::KeyframeEffect::apply):
(WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):

  • animation/KeyframeEffect.h:
  • animation/KeyframeEffectStack.cpp:

(WebCore::KeyframeEffectStack::applyKeyframeEffects):

  • animation/KeyframeEffectStack.h:
  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::resolve):
(WebCore::WebAnimation::commitStyles):

  • animation/WebAnimation.h:
  • css/MediaQueryMatcher.cpp:

(WebCore::MediaQueryMatcher::documentElementUserAgentStyle const):

  • css/StyleMedia.cpp:

(WebCore::StyleMedia::matchMedium const):

  • dom/Document.cpp:

(WebCore::Document::styleForElementIgnoringPendingStylesheets):

  • dom/Element.cpp:

(WebCore::Element::resolveStyle):
(WebCore::Element::resolveCustomStyle):

  • dom/Element.h:
  • html/HTMLTitleElement.cpp:

(WebCore::HTMLTitleElement::computedTextWithDirection):

  • html/shadow/DateTimeFieldElement.cpp:

(WebCore::DateTimeFieldElement::resolveCustomStyle):

  • html/shadow/DateTimeFieldElement.h:
  • html/shadow/SliderThumbElement.cpp:

(WebCore::SliderThumbElement::resolveCustomStyle):
(WebCore::SliderContainerElement::resolveCustomStyle):

  • html/shadow/SliderThumbElement.h:
  • html/shadow/TextControlInnerElements.cpp:

(WebCore::TextControlInnerContainer::resolveCustomStyle):
(WebCore::TextControlInnerElement::resolveCustomStyle):
(WebCore::TextControlInnerTextElement::resolveCustomStyle):
(WebCore::TextControlPlaceholderElement::resolveCustomStyle):
(WebCore::SearchFieldResultsButtonElement::resolveCustomStyle):
(WebCore::SearchFieldCancelButtonElement::resolveCustomStyle):

  • html/shadow/TextControlInnerElements.h:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::computeFirstLineStyle const):
(WebCore::RenderElement::getUncachedPseudoStyle const):

  • rendering/style/KeyframeList.cpp:

(WebCore::KeyframeList::fillImplicitKeyframes):

  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::Resolver):
(WebCore::Style::Resolver::styleForElement):
(WebCore::Style::Resolver::styleForKeyframe):
(WebCore::Style::Resolver::keyframeStylesForAnimation):
(WebCore::Style::Resolver::pseudoStyleForElement):

  • style/StyleResolver.h:

(WebCore::Style::Resolver::overrideDocumentElementStyle const): Deleted.
(WebCore::Style::Resolver::setOverrideDocumentElementStyle): Deleted.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::Scope::Scope):
(WebCore::Style::TreeResolver::Scope::~Scope):
(WebCore::Style::TreeResolver::styleForStyleable):
(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::resolvePseudoStyle):
(WebCore::Style::TreeResolver::makeResolveContext):
(WebCore::Style::TreeResolver::makeResolveContextForPseudoElement):
(WebCore::Style::TreeResolver::parentBoxStyleForPseudoElement const):
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
(WebCore::Style::TreeResolver::parentBoxStyleForPseudo const): Deleted.

  • style/StyleTreeResolver.h:
  • style/Styleable.cpp:

(WebCore::Styleable::updateCSSAnimations const):
(WebCore::updateCSSTransitionsForStyleableAndProperty):

  • style/Styleable.h:

(WebCore::Styleable::applyKeyframeEffects const):

  • svg/SVGElement.cpp:

(WebCore::SVGElement::resolveCustomStyle):

  • svg/SVGElement.h:
  • svg/SVGElementRareData.h:

(WebCore::SVGElementRareData::overrideComputedStyle):

  • testing/Internals.cpp:

(WebCore::Internals::highlightPseudoElementColor):

9:52 AM Changeset in webkit [284692] by sihui_liu@apple.com
  • 10 edits in trunk

Followup to r284652: ensure file handle is closed in web process
https://bugs.webkit.org/show_bug.cgi?id=232127

Reviewed by Youenn Fablet.

Source/WebCore:

Covered by test: storage/filesystemaccess/sync-access-handle-close-worker.html

  • Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp:

(WebCore::FileSystemSyncAccessHandle::~FileSystemSyncAccessHandle): make sure file handle is closed when
FileSystemSyncAccessHandle is destroyed.
(WebCore::FileSystemSyncAccessHandle::closeInternal):
(WebCore::FileSystemSyncAccessHandle::close):

  • Modules/filesystemaccess/FileSystemSyncAccessHandle.h:

Source/WebKit:

  • NetworkProcess/storage/FileSystemStorageHandle.cpp:

(WebKit::FileSystemStorageHandle::~FileSystemStorageHandle):
(WebKit::FileSystemStorageHandle::createSyncAccessHandle):
(WebKit::FileSystemStorageHandle::close):

  • NetworkProcess/storage/FileSystemStorageHandle.h:
  • Platform/IPC/cocoa/SharedFileHandleCocoa.cpp: an extra fd is created here and does not get closed.

(IPC::SharedFileHandle::decode):

LayoutTests:

  • storage/filesystemaccess/resources/sync-access-handle-close.js:

(testSyncFunction):
(async testAsyncFunction):
(async testFunctions):
(async testMultipleHandles):
(async test):

  • storage/filesystemaccess/sync-access-handle-close-worker-expected.txt:
9:47 AM Changeset in webkit [284691] by Alan Coon
  • 1 copy in branches/safari-612.3.2.0-branch

New branch.

9:36 AM Changeset in webkit [284690] by rmorisset@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

--reportBytecodeCompileTimes=1 should correctly report the bytecode size
https://bugs.webkit.org/show_bug.cgi?id=232118

Reviewed by Michael Saboff.

generate() calls m_writer.finalize() which moves m_instructions, so when we later query its size we get 0.
The solution is simply to put the size in an out-parameter just before calling finalize().

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::generate):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::generate):

9:31 AM Changeset in webkit [284689] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (Safari 15 - iOS15): [WebRTC] Increased audio latency while playing webrtc audio stream over audio element
https://bugs.webkit.org/show_bug.cgi?id=230903
<rdar://problem/83692944>

Reviewed by Eric Carlson.

We used to render audio tracks in process and are now doing rendering in GPU process.
Current implementation requests data with a fixed chunk size, that we were setting as the max of preferred buffer size and web audio chunk size.
If we are reading too close to the end of data in AudioSampleDataSource, we will delay reading the data by this buffer size. This triggers delay but allows getting a consistent rendering.
To reduce delay, we are now using the maximum of web audio chunk size and 10 ms chunk size, as WebRTC tracks are usually manipulating 10 ms chunks.

Manually tested.

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:
9:27 AM Changeset in webkit [284688] by guijemont@igalia.com
  • 2 edits in trunk

Add Guillaume Emont's github username to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=232144

Unreviewed.

  • metadata/contributors.json:
9:23 AM Changeset in webkit [284687] by Ayumi Kojima
  • 14 edits in trunk/Source/WebCore

Unreviewed, reverting r284606.

Reverting because this commit caused accessibility/ios-
simulator/accessibility-aria-table-children.html to fail

Reverted changeset:

"AX: Any addition of children should funnel through
AccessibilityObject::addChild"
https://bugs.webkit.org/show_bug.cgi?id=231914
https://commits.webkit.org/r284606

9:05 AM Changeset in webkit [284686] by Chris Dumez
  • 4 edits in trunk/LayoutTests

[ iOS15 iPad Debug ] imported/w3c/web-platform-tests/webmessaging/MessagePort_onmessage_start.any.worker.html is a flaky failure (reached unreachable code)
https://bugs.webkit.org/show_bug.cgi?id=231609
<rdar://problem/84164701>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Merge https://github.com/web-platform-tests/wpt/pull/31317 from upstream WPT to address
test flakiness.

  • web-platform-tests/webmessaging/MessagePort_onmessage_start.any.js:

(async_test):

LayoutTests:

Unskip test that should no longer be flaky.

  • platform/ipad/TestExpectations:
9:04 AM Changeset in webkit [284685] by Ayumi Kojima
  • 15 edits
    1 delete in trunk

Unreviewed, reverting r284654.

Reverting because this commit caused scrolling tests to fail

Reverted changeset:

"Content offset in this codepen when switching tabs"
https://bugs.webkit.org/show_bug.cgi?id=231989
https://commits.webkit.org/r284654

8:50 AM Changeset in webkit [284684] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

Do GrpahicsContext and EventRegion clipping-related save/restore via RAII objects
https://bugs.webkit.org/show_bug.cgi?id=231985

Reviewed by Antti Koivisto.

Remove all but one of the bare context.save() calls in RenderLayer by passing a
GraphicsContextStateSaver to clipToRect() and setupClipPath().

Also pass a EventRegionContextStateSaver for the equivalent save/restore on EventRegionContext.

This allows us to remove restoreClip() entirely.

  • rendering/EventRegion.h:

(WebCore::EventRegionContextStateSaver::EventRegionContextStateSaver):
(WebCore::EventRegionContextStateSaver::~EventRegionContextStateSaver):
(WebCore::EventRegionContextStateSaver::pushClip):
(WebCore::EventRegionContextStateSaver::context const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::clipToRect):
(WebCore::RenderLayer::paintLayerWithEffects):
(WebCore::RenderLayer::setupClipPath):
(WebCore::RenderLayer::applyFilters):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintTransformedLayerIntoFragments):
(WebCore::RenderLayer::paintBackgroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
(WebCore::RenderLayer::paintOutlineForFragments):
(WebCore::RenderLayer::paintMaskForFragments):
(WebCore::RenderLayer::paintChildClippingMaskForFragments):
(WebCore::RenderLayer::paintOverflowControlsForFragments):
(WebCore::RenderLayer::restoreClip): Deleted.

  • rendering/RenderLayer.h:
8:17 AM Changeset in webkit [284683] by Alan Bujtas
  • 4 edits in trunk

[LFC][IFC] Check the parent style for content wrapping when collecting wrap opportunities
https://bugs.webkit.org/show_bug.cgi?id=232056

Reviewed by Antti Koivisto.

Source/WebCore:

See the comment in LineBuilder::handleInlineContent.

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::handleInlineContent):

LayoutTests:

7:53 AM Changeset in webkit [284682] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Add needed syscall
https://bugs.webkit.org/show_bug.cgi?id=232110
<rdar://84519690>

Reviewed by Brent Fulgham.

Add required syscall in WP sandbox.

  • WebProcess/com.apple.WebProcess.sb.in:
7:38 AM Changeset in webkit [284681] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

StreamConnectionWorkQueue::processStreams() has a incorrect protection ref
https://bugs.webkit.org/show_bug.cgi?id=232070

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-10-22
Reviewed by Wenson Hsieh.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::~RemoteRenderingBackend):
Additionally remove redundant protection ref from RemoteRenderingBackend
cleanup task. Since m_workQueue->stop() is run after dispatching the
task, and since stop() waits until queue has executed the
all the tasks, the m_workQueue ref outlives the protection ref.

  • Platform/IPC/StreamConnectionWorkQueue.cpp:

(IPC::StreamConnectionWorkQueue::processStreams):
Remove the redundant protection ref so it does not cause confusion.
The protection ref cannot hold the last ref, as that would mean
that the StreamConnectionWorkQueue thread would run the code to
destroy the work queue itself. There has to be a external ref for
queue->stop() that outlives the protection ref, as the stop() will
wait until the queue thread stops.

(IPC::StreamConnectionWorkQueue::stopAndWaitForCompletion):
(IPC::StreamConnectionWorkQueue::stop): Deleted.

  • Platform/IPC/StreamConnectionWorkQueue.h:

Rename stop() to stopAndWaitForCompletion() to signify what
the function does.

7:31 AM Changeset in webkit [284680] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[LFC][IFC] Add missing isAtSoftWrapOpportunity check when between two whitespace inline items
https://bugs.webkit.org/show_bug.cgi?id=232055

Reviewed by Antti Koivisto.

Source/WebCore:

Due to the isWrappingAllowed checks in isAtSoftWrapOpportunity() to speed up line breaking,
we may end up with adjacent whitespace content with different wrapping styles (embedded in separate inline boxes).
e.g. <span style="white-space: no-wrap">XXX </span><span style="white-space: normal"> X</span

Test: fast/inline/white-space-nowrap-and-normal-inline-box.html

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::isVisuallyEmptyWhitespaceContent):

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::isAtSoftWrapOpportunity):

LayoutTests:

  • fast/inline/white-space-nowrap-and-normal-inline-box-expected.html: Added.
  • fast/inline/white-space-nowrap-and-normal-inline-box.html: Added.
6:48 AM Changeset in webkit [284679] by berto@igalia.com
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix typo in the WebKitWebInspector documentation.

  • UIProcess/API/gtk/WebKitWebInspector.cpp:
6:44 AM Changeset in webkit [284678] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Add support for checking leading collapsible whitespace in InlineContentBreaker::processOverflowingContent
https://bugs.webkit.org/show_bug.cgi?id=232091

Reviewed by Antti Koivisto.

This patch ensures that the leading collapsible whitespace on the continuous run is taken
into account when checking if the otherwise overflowing content may fit the line.
e.g.
<span style="white-space: nowrap">no_wrap </span><span> yes_wrap</span>
The " yes_wrap" content has a collapsible leading whitespace here.
(This is also a preparation for fixing a regression and a WPT test.)

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::isVisuallyEmptyWhitespaceContent):
(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::append):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::reset):

  • layout/formattingContexts/inline/InlineContentBreaker.h:

(WebCore::Layout::InlineContentBreaker::ContinuousContent::leadingCollapsibleWidth const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::trailingCollapsibleWidth const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::hasCollapsibleContent const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::isFullyCollapsible const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::collapsibleLogicalWidth const): Deleted.
(WebCore::Layout::InlineContentBreaker::ContinuousContent::nonCollapsibleLogicalWidth const): Deleted.
(WebCore::Layout::InlineContentBreaker::ContinuousContent::hasTrailingCollapsibleContent const): Deleted.

6:24 AM Changeset in webkit [284677] by Alan Bujtas
  • 4 edits in trunk

FontCascade::widthForSimpleText fails to produce matching measured width for monospace font
https://bugs.webkit.org/show_bug.cgi?id=232104
<rdar://83991027>

Reviewed by Antti Koivisto.

Source/WebCore:

Adjust widthForSimpleText to match WidthIterator's logic as the comment says:

"This is needed only to match the result of the slow path

Same glyph widths but different floating point arithmetic can produce different run width."

(see r213008)

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::widthForSimpleText const):

LayoutTests:

  • platform/ios-wk2/TestExpectations:
3:05 AM Changeset in webkit [284676] by Carlos Garcia Campos
  • 4 edits in trunk

[GTK][a11y] Localized role name doesn't work with ATSPI enabled
https://bugs.webkit.org/show_bug.cgi?id=232136

Reviewed by Adrian Perez de Castro.

Source/WebCore:

I switched to use SortedArrayMap in AccessibilityAtspi::localizedRoleName() but I didn't realize the array was
not actually sorted. We just need to sort it for SortedArrayMap to work as expected.

  • accessibility/atspi/AccessibilityAtspi.cpp:

Tools:

Add a few tests for localized role name.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(testAccessibleBasicHierarchy):

1:51 AM Changeset in webkit [284675] by Carlos Garcia Campos
  • 17 edits
    1 add in trunk

[GTK][a11y] Add implementation of text interface when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=230258

Reviewed by Adrian Perez de Castro.

Source/WebCore:

  • SourcesGTK.txt:
  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::postTextStateChangeNotification):
(WebCore::AXObjectCache::postTextReplacementNotification):
(WebCore::AXObjectCache::postTextReplacementNotificationForTextControl):
(WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):

  • accessibility/AXObjectCache.h:
  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::textIteratorBehaviorForTextRange const):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::indexForVisiblePosition const):

  • accessibility/atspi/AXObjectCacheAtspi.cpp:

(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
(WebCore::AXObjectCache::postTextReplacementPlatformNotificationForTextControl):
(WebCore::AXObjectCache::postTextReplacementPlatformNotification):
(WebCore::AXObjectCache::nodeTextChangePlatformNotification): Deleted.

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::textChanged):
(WebCore::AccessibilityAtspi::textAttributesChanged):
(WebCore::AccessibilityAtspi::textCaretMoved):
(WebCore::AccessibilityAtspi::textSelectionChanged):

  • accessibility/atspi/AccessibilityAtspi.h:
  • accessibility/atspi/AccessibilityAtspiEnums.h:
  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::roleIsTextType):
(WebCore::AccessibilityObjectAtspi::interfacesForObject):
(WebCore::AccessibilityObjectAtspi::path):
(WebCore::AccessibilityObjectAtspi::buildInterfaces const):

  • accessibility/atspi/AccessibilityObjectAtspi.h:
  • accessibility/atspi/AccessibilityObjectTextAtspi.cpp: Added.

(WebCore::AccessibilityObjectAtspi::atspiBoundaryToTextGranularity):
(WebCore::AccessibilityObjectAtspi::atspiGranularityToTextGranularity):
(WebCore::offsetMapping):
(WebCore::UTF16OffsetToUTF8):
(WebCore::UTF8OffsetToUTF16):
(WebCore::AccessibilityObjectAtspi::text const):
(WebCore::AccessibilityObject::getLengthForTextRange const):
(WebCore::AccessibilityObject::allowsTextRanges const):
(WebCore::AccessibilityObjectAtspi::textInserted):
(WebCore::AccessibilityObjectAtspi::textDeleted):
(WebCore::AccessibilityObjectAtspi::boundaryOffset const):
(WebCore::AccessibilityObjectAtspi::textAtOffset const):
(WebCore::AccessibilityObjectAtspi::characterAtOffset const):
(WebCore::AccessibilityObjectAtspi::boundsForRange const):
(WebCore::AccessibilityObjectAtspi::textExtents const):
(WebCore::AccessibilityObjectAtspi::offsetAtPoint const):
(WebCore::AccessibilityObjectAtspi::boundsForSelection const):
(WebCore::AccessibilityObjectAtspi::selectedRange const):
(WebCore::AccessibilityObjectAtspi::selectionBounds const):
(WebCore::AccessibilityObjectAtspi::setSelectedRange):
(WebCore::AccessibilityObjectAtspi::selectRange):
(WebCore::AccessibilityObjectAtspi::selectionChanged):
(WebCore::AccessibilityObjectAtspi::textAttributes const):
(WebCore::AccessibilityObjectAtspi::textAttributesWithUTF8Offset const):
(WebCore::AccessibilityObjectAtspi::textAttributesChanged):
(WebCore::AccessibilityObjectAtspi::scrollToMakeVisible const):
(WebCore::AccessibilityObjectAtspi::scrollToPoint const):

  • editing/atspi/FrameSelectionAtspi.cpp:

(WebCore::FrameSelection::notifyAccessibilityForSelectionChange):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setInnerTextValue):

Tools:

Add unit tests for the text interface.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(AtspiTextRangeDeleter::operator() const):
(AccessibilityTest::startEventMonitor):
(AccessibilityTest::stopEventMonitor):
(AccessibilityTest::findEvent):
(testTextBasic):
(testTextSurrogatePair):
(testTextIterator):
(testTextExtents):
(testTextSelections):
(testTextAttributes):
(testTextStateChanged):
(beforeAll):

1:44 AM Changeset in webkit [284674] by youenn@apple.com
  • 18 edits in trunk/Source

Audio over peer connection becomes latent when changing the output
https://bugs.webkit.org/show_bug.cgi?id=231110
<rdar://problem/84049005>

Reviewed by Eric Carlson.

Source/WebCore:

Add support for detecting change of timeline by looking at sample times. This happens when changing audio output.
Make AudioMediaStreamTrackRendererInternalUnit call a callback to let the unit deal with it.
When switching output, audio data is kept growing but is not read for some time by the remote unit, even though the remote unit is running.
The unit can ask its sources to update their offset to not keep extra buffered data.

Manually tested.

  • platform/audio/cocoa/AudioSampleDataSource.h:
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererCocoa.cpp:
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererCocoa.h:
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererInternalUnit.cpp:
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererInternalUnit.h:
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.cpp:
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.h:

Source/WebKit:

When detecting an audio timeline change, send it from GPUProcess to WebProcess.
Let the WebProcess reset the sources to properly restart.

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:
  • WebProcess/GPU/GPUProcessConnection.cpp:
  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/GPU/GPUProcessConnection.messages.in:
  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRendererInternalUnitManager.cpp:
  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRendererInternalUnitManager.h:
  • WebProcess/WebProcess.cpp:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:
1:44 AM Changeset in webkit [284673] by commit-queue@webkit.org
  • 9 edits
    1 move in trunk

.:
Enable logging under non-systemd linux distros
https://bugs.webkit.org/show_bug.cgi?id=232080

Patch by Pablo Correa Gómez <ablocorrea@hotmail.com> on 2021-10-22
Reviewed by Michael Catanzaro.

  • Source/cmake/FindJournald.cmake: Renamed from Source/cmake/FindSystemd.cmake.
  • Source/cmake/OptionsGTK.cmake: Replace USE_SYSTEMD for

ENABLE_JOURNALD_LOG

  • Source/cmake/OptionsWPE.cmake: Replace USE_SYSTEMD for

ENABLE_JOURNALD_LOG

Source/WTF:
Enable logging in under non-systemd linux distros
https://bugs.webkit.org/show_bug.cgi?id=232080

Patch by Pablo Correa Gómez <ablocorrea@hotmail.com> on 2021-10-22
Reviewed by Michael Catanzaro.

  • wtf/Assertions.h: Rename USE(JOURNALD) to ENABLE(JOURNALD_LOG)
  • wtf/Logger.h:

(WTF::Logger::willLog const): Rename USE(JOURNALD) to
ENABLE(JOURNALD_LOG)

  • wtf/PlatformGTK.cmake: Use renamed Journald library
  • wtf/PlatformWPE.cmake: Use renamed Journald library
1:19 AM Changeset in webkit [284672] by Antti Koivisto
  • 3 edits in trunk/Source/WebCore

Remove Style::Resolver::m_isDeleted
https://bugs.webkit.org/show_bug.cgi?id=232089

Reviewed by Kimmo Kinnunen.

Not useful anymore.

  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::~Resolver):
(WebCore::Style::Resolver::styleForElement):
(WebCore::Style::Resolver::styleForKeyframe):
(WebCore::Style::Resolver::styleForPage):

  • style/StyleResolver.h:
1:18 AM Changeset in webkit [284671] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

StreamConnectionWorkQueue is not thread-safe
https://bugs.webkit.org/show_bug.cgi?id=232068

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-10-22
Reviewed by Wenson Hsieh.

Make StreamConnectionWorkQueue thread-safe so that
addStreamConnection works from multiple threads.
In the future, this will be called when a new RemoteDisplayListRecorder is
added during the StreamConnectionWorkQueue message processing
invocation for RemoteRenderingBackend::createRemoteImageBuffer.

  • Platform/IPC/StreamConnectionWorkQueue.cpp:

(IPC::StreamConnectionWorkQueue::~StreamConnectionWorkQueue):
(IPC::StreamConnectionWorkQueue::dispatch):
(IPC::StreamConnectionWorkQueue::addStreamConnection):
(IPC::StreamConnectionWorkQueue::removeStreamConnection):
Change semantics so that adding and removing connections during
shutdown is ok. This is required for simpler code since
during stop we must dispatch all pending messages, but during
message code we might have unconditional start listening when
the message creates a new RemoteDisplayListRecorder.
As a consequence it's not an error to add a connection,
stop and destroy the work queue without removing it.
(IPC::StreamConnectionWorkQueue::stop):
(IPC::StreamConnectionWorkQueue::startProcessingThread):
(IPC::StreamConnectionWorkQueue::wakeUpProcessingThread): Deleted.

  • Platform/IPC/StreamConnectionWorkQueue.h:
1:07 AM Changeset in webkit [284670] by Patrick Griffis
  • 3 edits in trunk/Source/WebCore

[GTK] Rewrite LowPowerModeNotifier to use GPowerProfileMonitor
https://bugs.webkit.org/show_bug.cgi?id=231958

Reviewed by Carlos Garcia Campos.

This replaces the previous direct use of UPower with some advantages:

  • Fixes support while being sandboxed without UPower DBus access
  • Respects a system-wide low power mode rather than only being enabled when the battery is low

I decided to remove the old behavior entirely as it is a very
different behavior than the new one and subjectively worse.

  • platform/LowPowerModeNotifier.h:
  • platform/glib/LowPowerModeNotifierGLib.cpp:

(WebCore::LowPowerModeNotifier::LowPowerModeNotifier):
(WebCore::LowPowerModeNotifier::powerSaverEnabledNotifyCallback):
(WebCore::LowPowerModeNotifier::~LowPowerModeNotifier):

12:35 AM Changeset in webkit [284669] by commit-queue@webkit.org
  • 9 edits
    2 adds in trunk

WebGL low-power and high-performance contexts should use different ANGLE Metal EGLDisplays
https://bugs.webkit.org/show_bug.cgi?id=231012
<rdar://problem/83971417>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-10-22
Reviewed by Dean Jackson.

Source/WebCore:

Use per-power preference EGLDisplay when creating Metal
contexts.

Adds a new API test.

  • platform/RuntimeApplicationChecks.cpp:

(WebCore::setAuxiliaryProcessTypeForTesting):

  • platform/RuntimeApplicationChecks.h:

Add a test function to reset the process type after test has set a specific type and then
run to completion. process for the duration of the test. The volatile context flag in

GraphicsContextGLOpenGL depends on condition isWebProcess
isGPUProcess.
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::releaseThreadResources):

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::initializeEGLDisplay):
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
(WebCore::GraphicsContextGLOpenGL::setContextVisibility):
(WebCore::GraphicsContextGLOpenGL::displayWasReconfigured):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:

Tools:

Add a API test to test GraphicsContextGLOpenGL
Cocoa implementation regarding the bug where
the GraphicsContextGLOpenGL instances would use
the GPU that was selected by the first instance.

  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLOpenGLCocoa.mm: Added.

(TestWebKitAPI::WebCore::TestedGraphicsContextGLOpenGL::create):
(TestWebKitAPI::WebCore::TestedGraphicsContextGLOpenGL::TestedGraphicsContextGLOpenGL):
(TestWebKitAPI::hasMultipleGPUs):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/WebCoreUtilities.h: Added.

(TestWebKitAPI::ScopedSetAuxiliaryProcessTypeForTesting::ScopedSetAuxiliaryProcessTypeForTesting):
(TestWebKitAPI::ScopedSetAuxiliaryProcessTypeForTesting::~ScopedSetAuxiliaryProcessTypeForTesting):
Add a utility state setter to set the process type for the
duration of a test.

12:19 AM Changeset in webkit [284668] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Remove unneeded Heap::m_vm.
https://bugs.webkit.org/show_bug.cgi?id=232132

Reviewed by Yusuke Suzuki.

Heap::vm() already computes the associated VM& using offset math. This entails
subtracting a constant from Heap's this pointer, which is faster than loading from
a field.

  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::lastChanceToFinalize):
(JSC::Heap::releaseDelayedReleasedObjects):
(JSC::Heap::protect):
(JSC::Heap::unprotect):
(JSC::Heap::finalizeUnconditionalFinalizers):
(JSC::Heap::completeAllJITPlans):
(JSC::Heap::iterateExecutingAndCompilingCodeBlocks):
(JSC::Heap::gatherJSStackRoots):
(JSC::Heap::gatherScratchBufferRoots):
(JSC::Heap::removeDeadCompilerWorklistEntries):
(JSC::Heap::gatherExtraHeapData):
(JSC::Heap::deleteAllCodeBlocks):
(JSC::Heap::deleteAllUnlinkedCodeBlocks):
(JSC::Heap::finishChangingPhase):
(JSC::Heap::collectInMutatorThread):
(JSC::Heap::finishRelinquishingConn):
(JSC::Heap::deleteSourceProviderCaches):
(JSC::Heap::didFinishCollection):
(JSC::Heap::isValidAllocation):
(JSC::Heap::addCoreConstraints):

  • heap/Heap.h:

Oct 21, 2021:

10:05 PM Changeset in webkit [284667] by cathiechen
  • 7 edits
    2 adds in trunk

The intrisic size of picture image inside a template is always zero
https://bugs.webkit.org/show_bug.cgi?id=227682

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/embedded-content/the-img-element/adoption-expected.txt:

Source/WebCore:

When the picture element is inside a template element, it belongs to a template document which does not
have frame or RenderView, this would affect the source selection and size calculation. Though it calls
sourcesChanged to adjust the source in HTMLPictureElement::didMoveToNewDocument, but at this point
the image element is still inside the template document, so it does not help with this scenario. To
fix it, call sourcesChanged in HTMLImageElement::didMoveToNewDocument instead.

Test: fast/picture/picture-inside-template.html

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::didMoveToNewDocument):

  • html/HTMLPictureElement.cpp:

(WebCore::HTMLPictureElement::didMoveToNewDocument): Deleted.

  • html/HTMLPictureElement.h:

LayoutTests:

  • fast/picture/picture-inside-template-expected.txt: Added.
  • fast/picture/picture-inside-template.html: Added.
9:57 PM Changeset in webkit [284666] by eric.carlson@apple.com
  • 2 edits in trunk

Add GitHub name to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=232131

Add my github username to contributors.json

Unreviewed.

  • metadata/contributors.json:
9:52 PM Changeset in webkit [284665] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Two null box iterators from different paths fail to compare equal
https://bugs.webkit.org/show_bug.cgi?id=232093

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-10-21
Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/clip/clip-hit-null-iterator-path-comparison.html

  • layout/integration/InlineIteratorBox.cpp:

(WebCore::InlineIterator::BoxIterator::operator== const):

LayoutTests:

  • fast/clip/clip-hit-null-iterator-path-comparison-expected.txt: Added.
  • fast/clip/clip-hit-null-iterator-path-comparison.html: Added.
9:31 PM Changeset in webkit [284664] by sbarati@apple.com
  • 11 edits in trunk/Source

Clean up some code around checking the state of Watchpoints
https://bugs.webkit.org/show_bug.cgi?id=232111

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

No need to have state() and stateOnJSThread(), since they're now the same.
Also, there is no need to check the allocation watchpoint twice for the
function/internal function allocation profiles.

  • bytecode/Watchpoint.h:

(JSC::WatchpointSet::isStillValid const):
(JSC::WatchpointSet::stateOnJSThread const): Deleted.
(JSC::WatchpointSet::isStillValidOnJSThread const): Deleted.
(JSC::InlineWatchpointSet::stateOnJSThread const): Deleted.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::handleCreateInternalFieldObject):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • runtime/ArrayPrototype.cpp:

(JSC::speciesWatchpointIsValid):
(JSC::canUseDefaultArrayJoinForToString):

  • runtime/InferredValue.h:

(JSC::InferredValue::notifyWrite):
(JSC::InferredValue::stateOnJSThread const): Deleted.

  • runtime/JSArrayBufferPrototypeInlines.h:

(JSC::speciesWatchpointIsValid):

  • runtime/ObjectPropertyChangeAdaptiveWatchpoint.h:

Source/WebCore:

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::getOwnPropertySlot):

7:15 PM Changeset in webkit [284663] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Remove an unused field: Heap::m_copyingRememberedSet.
https://bugs.webkit.org/show_bug.cgi?id=232119

Reviewed by Robin Morisset.

  • heap/Heap.h:
6:32 PM Changeset in webkit [284662] by commit-queue@webkit.org
  • 2 edits
    1 add in trunk/Source/WebKit

Add webpushd plist
https://bugs.webkit.org/show_bug.cgi?id=231981

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-21
Reviewed by Brady Eidson.

This can be done once rdar://83086960 is approved.

  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/com.apple.webkit.webpushd.plist: Added.
5:46 PM Changeset in webkit [284661] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

Unreviewed, reverting r284570.

No longer needed

Reverted changeset:

"Remove com.apple.webkit.adattributiond.plist from build
temporarily"
https://bugs.webkit.org/show_bug.cgi?id=232045
https://commits.webkit.org/r284570

5:46 PM Changeset in webkit [284660] by Chris Dumez
  • 3 edits
    2 adds in trunk

Form submission should be cancelled if the form gets detached from inside the formdata event handler
https://bugs.webkit.org/show_bug.cgi?id=232114

Reviewed by Alex Christensen.

Source/WebCore:

Per the HTML specification [1], form submission should abort if the form cannot navigate (which is true
when the form is detached). The algorithm in the specification does the check twice, once at the very
beginning (Step 1 in the spec), and again after calling the "constructing the entry list" algorithm
(step 9 in the spec). The reason we need to do the check again is that the "constructing the entry list"
algorithm fires the "formdata" event and may thus run JavaScript and the JS can detach the form element.

In HTMLFormElement::submit(), we were doing only the "form is connected" check only at the beginning
of the function and failing to do so after constructing the FormSubmission object (which ends up constructing
the entry list). This patch fixes that.

[1] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-form-submit

Test: fast/forms/remove-form-inside-formdata-event.html

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::submit):

LayoutTests:

Add layout test coverage.

  • fast/forms/remove-form-inside-formdata-event-expected.txt: Added.
  • fast/forms/remove-form-inside-formdata-event.html: Added.
5:33 PM Changeset in webkit [284659] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ iOS15 Sim EWS ]imported/w3c/web-platform-tests/content-security-policy/script-src/script-src-multiple-policies-multiple-hashing-algorithms.html is a text failure.
https://bugs.webkit.org/show_bug.cgi?id=232120.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
5:11 PM Changeset in webkit [284658] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, add bug number for skipped test in TestExpectations.

5:10 PM Changeset in webkit [284657] by Ryan Haddad
  • 3 edits in trunk/Tools

WebGL bot should run tests with GPU Process enabled
https://bugs.webkit.org/show_bug.cgi?id=232107

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/config.json:
  • CISupport/build-webkit-org/factories_unittest.py:
5:09 PM Changeset in webkit [284656] by Chris Dumez
  • 3 edits
    2 adds in trunk

RELEASE_ASSERT(result) under FormSubmission::create()
https://bugs.webkit.org/show_bug.cgi?id=232112

Reviewed by Geoffrey Garen.

Source/WebCore:

form.submit() should early return if the form's |constructing entry list| flag is true, as per:

We were missing this check. As a result, we would call FormSubmission::create(), which would call
form.constructEntryList(). This would end up returning an unexpected nullptr because the
form's |constructing entry list| flag is set and we would hit the RELEASE_ASSERT(result) in
FormSubmission::create().

Test: fast/forms/submit-form-inside-formdata-event.html

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::submit):

  • loader/FormSubmission.cpp:

(WebCore::FormSubmission::create):

LayoutTests:

Add layout test coverage.

  • fast/forms/submit-form-inside-formdata-event-expected.txt: Added.
  • fast/forms/submit-form-inside-formdata-event.html: Added.
5:08 PM Changeset in webkit [284655] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

REGRESSION (r275641): [ iPad Debug ] accessibility/ios-simulator/scroll-in-overflow-div.html is asserting
https://bugs.webkit.org/show_bug.cgi?id=228622

Reviewed by Alan Bujtas.

The test was hitting ASSERT(!m_visibleContentStatusDirty). It seems harmless to clear
repaint rects when m_visibleContentStatusDirty is true.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::clearRepaintRects):

4:58 PM Changeset in webkit [284654] by Simon Fraser
  • 15 edits
    1 add in trunk

Content offset in this codepen when switching tabs
https://bugs.webkit.org/show_bug.cgi?id=231989

Reviewed by Tim Horton.

Source/WebCore:

There were two problems that occurred with async-scrollable iframes when their associated
WKWebView was removed and re-added to the view hierarchy (e.g. when switching tabs).
These resulted in misplaced position:fixed content, and the first user scroll in the
iframe causing the scroll position to jump back to the top.

The positon:fixed issue was caused by an ordering problem in
ScrollingTreeFrameScrollingNode::commitStateBeforeChildren() which resulted in the layout
viewport being computed incorrectly; we called updateViewportForCurrentScrollPosition()
before setting the min and max scroll position, so we'd always clamp the layout viewport to
a location of 0,0.

The second scroll position reset issue was caused by the ScrollingTreeScrollingNode's
m_currentScrollPosition reverting to a stale after re-attaching the iframe's scrolling
subtree. ScrollingTreeScrollingNode::commitStateBeforeChildren() has code to set
m_currentScrollPosition from the state tree node's scroll position on first commit;
the issue was that ScrollingStateScrollingNode's scrollPosition() was not updated on every
scroll, only when something triggered a scrolling tree commit.

Fix by silently updating ScrollingStateScrollingNode's scrollPosition() when we get
notifications back from the scrolling thread that a scroll happened.

Both fixes are tested by the ScrollingCoordinatorTests.ScrollingTreeAfterDetachReattach API test.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):

  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::syncScrollPosition):
(WebCore::ScrollingStateScrollingNode::hasScrollPositionRequest const):

  • page/scrolling/ScrollingStateScrollingNode.h:
  • page/scrolling/ScrollingStateTree.cpp:

(WebCore::ScrollingStateTree::insertNode):

  • page/scrolling/ScrollingTreeFrameScrollingNode.cpp:

(WebCore::ScrollingTreeFrameScrollingNode::commitStateBeforeChildren): We need to check
state.hasScrollPositionRequest(), otherwise the "cancel animated scroll request" that comes
out of Page::stopKeyboardScrollAnimation() prevents scroll position restoration.

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeScrollingNode::dumpProperties const):

  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded):

Tools:

API test that scrolls an iframe via wheel events, then detached and re-attaches the view.

The two wheel scrolls are necessary to exercise the "stale ScrollingStateScrollingNode
scroll position" issue.

The scrolling tree dumps validate the layout viewport part of the fix.

Also correct some functions where the sense of 'isWaitingForJavaScript' was flipped.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/mac/ScrollingCoordinatorTests.mm: Added.

(TestWebKitAPI::synthesizeWheelEvents):
(TestWebKitAPI::waitForScrollEventAndReturnScrollY):
(TestWebKitAPI::scrollingTreeElidingLastCommittedScrollPosition):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[WKWebView objectByEvaluatingJavaScript:]):
(-[WKWebView objectByEvaluatingJavaScriptWithUserGesture:]):
(-[WKWebView objectByCallingAsyncFunction:withArguments:error:]):

LayoutTests:

New baselines.

  • tiled-drawing/scrolling/clamp-out-of-bounds-scrolls-expected.txt:
  • tiled-drawing/scrolling/scrolling-tree-after-scroll-expected.txt:
4:46 PM Changeset in webkit [284653] by wilander@apple.com
  • 2 edits in trunk/LayoutTests

PCM: Change expectation to pass so we can investigate http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window.html
https://bugs.webkit.org/show_bug.cgi?id=232115

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:

Removed expectation added in https://trac.webkit.org/changeset/284572/webkit.

4:13 PM Changeset in webkit [284652] by sihui_liu@apple.com
  • 7 edits
    3 adds in trunk

FileSystemSyncAccessHandle should close platform file handle on close()
https://bugs.webkit.org/show_bug.cgi?id=232067
<rdar://problem/84517013>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker-expected.txt:

Source/WebCore:

This patch also ensures no request is sent after close() is called.

Test: storage/filesystemaccess/sync-access-handle-close-worker.html

  • Modules/filesystemaccess/FileSystemFileHandle.cpp:

(WebCore::FileSystemFileHandle::createSyncAccessHandle):

  • Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp:

(WebCore::FileSystemSyncAccessHandle::FileSystemSyncAccessHandle):
(WebCore::FileSystemSyncAccessHandle::~FileSystemSyncAccessHandle):
(WebCore::FileSystemSyncAccessHandle::isClosingOrClosed const):
(WebCore::FileSystemSyncAccessHandle::truncate):
(WebCore::FileSystemSyncAccessHandle::getSize):
(WebCore::FileSystemSyncAccessHandle::flush):
(WebCore::FileSystemSyncAccessHandle::close):
(WebCore::FileSystemSyncAccessHandle::didClose):
(WebCore::FileSystemSyncAccessHandle::read):
(WebCore::FileSystemSyncAccessHandle::write):

  • Modules/filesystemaccess/FileSystemSyncAccessHandle.h:

LayoutTests:

  • storage/filesystemaccess/resources/sync-access-handle-close.js: Added.

(finishTest):
(async testFunctions):
(async test):

  • storage/filesystemaccess/sync-access-handle-close-worker-expected.txt: Added.
  • storage/filesystemaccess/sync-access-handle-close-worker.html: Added.
3:45 PM Changeset in webkit [284651] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Call to [NSURL URLByAppendingPathComponent:] under NetworkSessionCocoa() may be inefficient
https://bugs.webkit.org/show_bug.cgi?id=232098

Reviewed by Alex Christensen.

Call [NSURL URLByAppendingPathComponent:isDirectory:] whenever possible instead of
[NSURL URLByAppendingPathComponent], as it is more efficient.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • UIProcess/Cocoa/WKShareSheet.mm:

(+[WKShareSheet createRandomSharingDirectoryForFile:]):
(+[WKShareSheet writeFileToShareableURL:data:temporaryDirectory:]):

3:35 PM Changeset in webkit [284650] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

[WebXR] WebXR on Cocoa doesn't work with multisampled contexts
https://bugs.webkit.org/show_bug.cgi?id=226687
<rdar://problem/78910868>

Reviewed by Tim Horton.

If the WebXR session requested an anti-aliased context, we'd
end up with an incomplete framebuffer because we were never
initialising the multisample buffers. This would assert on
debug builds and produce no output on release builds.

Fix this by initialising the multisample buffers, ensuring
we're targeting them in startFrame, and do the resolution
in endFrame.

  • Modules/webxr/WebXROpaqueFramebuffer.cpp:

(WebCore::WebXROpaqueFramebuffer::startFrame):
(WebCore::WebXROpaqueFramebuffer::endFrame): While here, use NEAREST
sampling on the multisample resolution, the way we do in WebGL.

3:28 PM Changeset in webkit [284649] by wilander@apple.com
  • 2 edits in trunk/Source/WebKit

PCM: Add temporary logging when isRunningTest() assertion is about to fail to be able to investigate
https://bugs.webkit.org/show_bug.cgi?id=232108

Unreviewed. Just adding logging for test-only functionality.

This patch adds logging to when we are about to fail the assert of isRunningTest() in
WebKit::NetworkSession::setPrivateClickMeasurementAppBundleIDForTesting)(). This is
added to help investigate https://bugs.webkit.org/show_bug.cgi?id=232048.

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::setPrivateClickMeasurementAppBundleIDForTesting):

2:49 PM Changeset in webkit [284648] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] http/wpt/service-workers/skipFetchEvent.https.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=230374

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
2:43 PM Changeset in webkit [284647] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

REGRESSION: [iOS] ASSERTION FAILED: !m_messageReceiverMapCount under WebKit::RemoteAudioHardwareListener::~RemoteAudioHardwareListener().
https://bugs.webkit.org/show_bug.cgi?id=228038

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations: Removed test expectations.
2:40 PM Changeset in webkit [284646] by ysuzuki@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Make GetTypedArrayLengthAsInt52 and GetTypedArrayByteOffsetAsInt52 NodeResultInt52
https://bugs.webkit.org/show_bug.cgi?id=232100

Reviewed by Robin Morisset.

This patch makes GetTypedArrayLengthAsInt52 and GetTypedArrayByteOffsetAsInt52 have NodeResultInt52 by default.
And DFG validation should skip Int52 validation before fixup phase, as we are doing for double results.

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNodeType.h:
  • dfg/DFGSSALoweringPhase.cpp:

(JSC::DFG::SSALoweringPhase::handleNode):
(JSC::DFG::SSALoweringPhase::lowerBoundsCheck):

  • dfg/DFGValidate.cpp:
2:40 PM Changeset in webkit [284645] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] media/modern-media-controls/media-documents/media-document-video-with-initial-audio-layout.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=232106

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
2:33 PM Changeset in webkit [284644] by Simon Fraser
  • 2 edits in trunk/Source/WebKit

Rare crash under DisplayLink::displayLinkCallback()
https://bugs.webkit.org/show_bug.cgi?id=232101
<rdar://84153991>

Reviewed by Tim Horton.

The crash was a divide by zero under m_currentUpdate.nextUpdate(), indicating that
m_currentUpdate.updatesPerSecond was zero. Previous assumptions that this was caused
by weird display configs were wrong. The actual issue is a race condition where
the callback can fire while we're still inside CVDisplayLinkStart(), or at least
before we've updated m_currentUpdate.

The fix is to initialize m_currentUpdate before we call CVDisplayLinkStart().

  • UIProcess/mac/DisplayLink.cpp:

(WebKit::DisplayLink::addObserver):

2:22 PM Changeset in webkit [284643] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ macOS wk2 ] imported/w3c/web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-to-same-origin.https.html is a flaky failure/ crashing.
https://bugs.webkit.org/show_bug.cgi?id=232105

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:48 PM Changeset in webkit [284642] by commit-queue@webkit.org
  • 15 edits in trunk

[css-contain] Support contain:style for counters
https://bugs.webkit.org/show_bug.cgi?id=226458

Patch by Rob Buis <rbuis@igalia.com> on 2021-10-21
Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Update improved test results.

  • web-platform-tests/css/css-contain/content-visibility/content-visibility-026-expected.txt:
  • web-platform-tests/css/css-contain/parsing/contain-computed-expected.txt:
  • web-platform-tests/css/css-contain/parsing/contain-valid-expected.txt:

Source/WebCore:

Parse contain: style and use it (if set) to scope
counter-increment to the element's sub-tree [1].

Tests: imported/w3c/web-platform-tests/css/css-contain/contain-style-counters-001.html

imported/w3c/web-platform-tests/css/css-contain/contain-style-counters-002.html
imported/w3c/web-platform-tests/css/css-contain/contain-style-counters-003.html
imported/w3c/web-platform-tests/css/css-contain/contain-style-counters-004.html

[1] https://drafts.csswg.org/css-contain-2/#containment-style

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeContain):

  • rendering/RenderCounter.cpp:

(WebCore::ancestorStyleContainmentObject):
(WebCore::previousInPreOrder):
(WebCore::previousSiblingOrParentElement):
(WebCore::makeCounterNode):
(WebCore::RenderCounter::rendererSubtreeAttached):

  • rendering/RenderObject.cpp:

(WebCore::shouldApplyStyleContainment):

  • rendering/RenderObject.h:
  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::containsStyle const):

  • rendering/style/RenderStyleConstants.h:
  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyValueContain):

LayoutTests:

Unskip tests that now pass.

1:36 PM Changeset in webkit [284641] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Launch Services database is not always sent to GPUP
https://bugs.webkit.org/show_bug.cgi?id=232047
<rdar://problem/84480229>

Unreviewed, address post commit review feedback.

Address review feedback. Also rename a data member which had a misleading name.

  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::didFinishLaunching):
(WebKit::GPUProcessProxy::addSession):

  • UIProcess/GPU/GPUProcessProxy.h:
1:34 PM Changeset in webkit [284640] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ iOS15 EWS ] http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority.html crashed.
https://bugs.webkit.org/show_bug.cgi?id=232102.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
1:27 PM Changeset in webkit [284639] by Ayumi Kojima
  • 3 edits in trunk/LayoutTests

[ iOS macOS Debug ] imported/w3c/web-platform-tests/html/dom/idlharness.worker.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231030

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac/TestExpectations:
1:21 PM Changeset in webkit [284638] by Fujii Hironori
  • 2 edits in trunk/Tools

[Win] TestWTF.FileSystemTest.* are timing out if run-api-tests is run by a normal user
https://bugs.webkit.org/show_bug.cgi?id=232065

Reviewed by Jonathan Bedard.

run-api-tests script didn't pass TEMP and TMP env vars to
TestWTF.exe. Then, generateTemporaryPath in
wtf/win/FileSystemWin.cpp never finished because a normal user
can't create a file in the Windows system directory.

  • Scripts/webkitpy/port/win.py:

(WinPort.environment_for_api_tests): Added TEMP and TMP to the env
var list to inherit.

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

[Win Python] REGRESSION(r284398): run-api-tests: FileNotFoundError raised: [WinError 2] The system cannot find the file specified
https://bugs.webkit.org/show_bug.cgi?id=232037

Reviewed by Jonathan Bedard.

r284398 temporarily copied TestWTF program to ToBeListed to list
test cases. However, on Windows, TestWTF.exe is just a wrapper
program loading TestWTFLib.dll. If I just rename TestWTF.exe to
ToBeListed.exe, ToBeListed.exe tries to load ToBeListedLib.dll.

  • Scripts/webkitpy/api_tests/manager.py:

(Manager._collect_tests): Do not copy the test program to
ToBeListed on Windows.

12:42 PM Changeset in webkit [284636] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ iOS15 EWS ] imported/w3c/web-platform-tests/websockets/Close-1000.any.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=232099.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
12:29 PM Changeset in webkit [284635] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] Inserted GetTypedArrayLengthAsInt52 for PutByVal should have NodeResultInt52
https://bugs.webkit.org/show_bug.cgi?id=232059

Reviewed by Saam Barati.

JSTests:

  • stress/inserted-gettypedarraylengthasint52-should-have-int52-result-for-put-by-val.js: Added.

(foo.bar):
(foo):

Source/JavaScriptCore:

When inserting GetTypedArrayLengthAsInt52 after fixup phase, we must set NodeResultInt52.

  • dfg/DFGSSALoweringPhase.cpp:

(JSC::DFG::SSALoweringPhase::handleNode):

12:18 PM Changeset in webkit [284634] by Aditya Keerthi
  • 2 edits in trunk/Source/WTF

[Cocoa] Enable accent-color by default
https://bugs.webkit.org/show_bug.cgi?id=232032
rdar://84474404

Reviewed by Wenson Hsieh.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Enable only on Cocoa platforms, as other platforms do not support
painting accent colors yet.

11:59 AM Changeset in webkit [284633] by Kocsen Chung
  • 1 copy in tags/Safari-613.1.6.1

Tag Safari-613.1.6.1.

11:57 AM Changeset in webkit [284632] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 ] webrtc/multi-video.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=232097

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:26 AM Changeset in webkit [284631] by Kate Cheney
  • 9 edits
    1 add in trunk/LayoutTests

http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=231971
<rdar://problem/84270108>

Reviewed by John Wilander.

Update ITP tests to wait for resetCookies() to finish before ending
the test. Flaky timeouts were being caused by resetCookies() being
partially finished which resets the top loading frame checked in
TestRunner::notifyDone().

  • http/tests/cookies/resources/delete-cookie.py: Added.

(delete_cookie):

  • http/tests/resourceLoadStatistics/operating-dates-all-but-cookies-not-removed-with-user-interaction-6-days-ago.html:
  • http/tests/resourceLoadStatistics/operating-dates-all-but-cookies-removed-with-user-interaction-7-days-ago.html:
  • http/tests/resourceLoadStatistics/operating-dates-all-website-data-removed.html:
  • http/tests/resourceLoadStatistics/resources/util.js:

(async resetCookiesITP.setUp):
(async resetCookiesITP):

  • http/tests/resourceLoadStatistics/standalone-web-application-exempt-from-website-data-deletion.html:
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html:
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-with-user-interaction.html:
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-without-user-interaction.html:
11:25 AM Changeset in webkit [284630] by Darin Adler
  • 41 edits
    1 delete in trunk/Source

[Cocoa] Merge and simplify the nsColor family of functions
https://bugs.webkit.org/show_bug.cgi?id=231992

Reviewed by Anders Carlsson.

Source/WebCore:

  • Added a CocoaColor type that is NS/UIColor.
  • Renamed platformColor to cocoaColor to be less vague.
  • Removed nsColor.
  • Added cocoaColorOrNil.
  • Merged colorFromNSColor and colorFromUIColor into a single colorFromCocoaColor function.
  • WebCore.xcodeproj/project.pbxproj: Removed ColorIOS.h.
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(AXAttributeStringSetStyle): Use cocoaColor instead of nsColor.

  • editing/cocoa/FontAttributesCocoa.mm:

(WebCore::FontAttributes::createDictionary const): Use cocoaColor
instead of platformColor.

  • editing/cocoa/FontShadowCocoa.mm:

(WebCore::FontShadow::createShadow const): Ditto.

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::_colorForElement): Use cocoaColor instead of
platformColor.
(WebCore::editingAttributedString): Use cocoaColor instead of
nsColor.

  • platform/cocoa/DragImageCocoa.mm:

(WebCore::createDragImageForLink): Use colorFromCocoaColor
instead of colorFromNSColor.
(WebCore::createDragImageForColor): Use cocoaColor instead of
nsColor.

  • platform/graphics/cocoa/ColorCocoa.h: Added an include of

"Color.h" so this functions as an addition to that header
instead of something independent. Added a WebCore::CocoaColor
type, like the one we already have in WebKit, to cut down on
the need to do #if and #else so much. Renamed the
platformColor function to cocoaColor, added a
cocoaColorOrNil function, and renamed both colorFromNSColor
and colorFromUIColor to colorFromCocoaColor and moved here.

  • platform/graphics/cocoa/ColorCocoa.mm:

(WebCore::cocoaColor): Renamed the iOS platformColor to this.
(WebCore::cocoaColorOrNil): Added.

  • platform/graphics/mac/ColorMac.h: Include of "ColorCocoa.h"

instead of "Color.h" here. Moved colorFromNSColor and nsColor.

  • platform/graphics/mac/ColorMac.mm:

(WebCore::colorFromCocoaColor): Renamed from colorFromNSColor.
(WebCore::cocoaColor): Renamed from nsColor.

  • platform/ios/ColorIOS.h: Removed.
  • platform/ios/ColorIOS.mm:

(WebCore::colorFromCocoaColor): Renamed from colorFromUIColor.

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::setColor): Use cocoaColor instead
of +[UIColor colorWithCGColor:] and cachedCGColor.

  • platform/mac/LocalDefaultSystemAppearance.mm:

(WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance):
Use cocoaColor instead of nsColor.

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::color): Use colorFromCocoaColor
instead of colorFromNSColor.
(WebCore::PlatformPasteboard::setColor): Use cocoaColor instead
of nsColor.

  • platform/mac/ThemeMac.mm:

(WebCore::drawCellFocusRingWithFrameAtTime): Use colorFromCocoaColor
instead of colorFromNSColor.

  • platform/mac/WebCoreNSFontManagerExtras.mm:

(WebCore::computedFontAttributeChanges): DItto.

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::systemFocusRingColor): Use
colorFromCocoaColor instead of colorFromUIColor.
(WebCore::attachmentActionColor): Use cocoaColor instead of
+[UIColor colorWithCGColor:] and cachedCGColor and return a
RetainPtr to avoid autorelease.
(WebCore::RenderAttachmentInfo::RenderAttachmentInfo): Update for
the user of the RetainPtr.

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::platformActiveSelectionBackgroundColor const):
Use colorFromCocoaColor instead of colorFromNSColor.
(WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor const): Ditto.
(WebCore::RenderThemeMac::platformActiveSelectionForegroundColor const): Ditto.
(WebCore::RenderThemeMac::platformInactiveSelectionForegroundColor const): Ditto.
(WebCore::RenderThemeMac::platformActiveListBoxSelectionBackgroundColor const): Ditto.
(WebCore::RenderThemeMac::platformInactiveListBoxSelectionBackgroundColor const): Ditto.
(WebCore::RenderThemeMac::platformActiveListBoxSelectionForegroundColor const): Ditto.
(WebCore::RenderThemeMac::platformInactiveListBoxSelectionForegroundColor const): Ditto.
(WebCore::RenderThemeMac::platformFocusRingColor const): Ditto.
(WebCore::RenderThemeMac::platformTextSearchHighlightColor const): Ditto.
(WebCore::RenderThemeMac::platformDefaultButtonTextColor const): Ditto.
(WebCore::titleTextColorForAttachment): Ditto.
(WebCore::AttachmentLayout::layOutTitle): Removed incorrect cast that said it
was casting a CGColorRef to an NSColor *, which are not toll-free bridged. This
code just needs a CGColorRef in a dictionary, so we just need to cast to id,
not to a NSColor *.
(WebCore::AttachmentLayout::layOutSubtitle): Ditto.
(WebCore::paintAttachmentTitleBackground): Use colorFromCocoaColor instead of
colorFromNSColor.

Source/WebKit:

  • Shared/Cocoa/ArgumentCodersCocoa.mm:

(IPC::encodeColorInternal): Merged the NSColor and UIColor
implementations into a single one that uses CocoaColor.
(IPC::decodeColorInternal): Ditto.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView themeColor]): Use cocoaColorOrNil instead
of isValid and platformColor.
(-[WKWebView underPageBackgroundColor]): Use cocoaColor
instead of platformColor.
(-[WKWebView _pageExtendedBackgroundColor]): Use cocoaColorOrNil
instead of isValid and platformColor.
(-[WKWebView _sampledPageTopColor]): Ditto.

  • UIProcess/API/Cocoa/_WKApplicationManifest.mm:

(-[_WKApplicationManifest themeColor]): Use cocoaColor instead
of platformColor.

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _updateScrollViewBackground]): Use cocoaColor instead
of -[UIColor initWithCGColor:] and cachedCGColor.

  • UIProcess/API/ios/WKWebViewTestingIOS.mm:

(-[WKWebView _serializedSelectionCaretBackgroundColorForTesting]):
Use colorFromCocoaColor instead of colorFromUIColor.

  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKTextTouchBarItemController _wkChangeColor:]): Use cocoaColor
instead of nsColor.
(WebKit::WebViewImpl::updateTextTouchBar): Use colorFromCocoaColor
instead of colorFromNSColor.
(WebKit::WebViewImpl::setUnderlayColor): Use cocoaColorOrNil instead
of isValid and nsColor.
(WebKit::WebViewImpl::underlayColor const): Ditto.
(WebKit::WebViewImpl::pageExtendedBackgroundColor const): Ditto.
(WebKit::WebViewImpl::changeFontColorFromSender): Ditto.
(WebKit::extractUnderlines): Use colorFromCocoaColor instead of
colorFromNSColor.

  • UIProcess/ios/DragDropInteractionState.mm:

(WebKit::DragDropInteractionState::deliverDelayedDropPreview): Use
cocoaColor instead of +[UIColor colorWithCGColor:] and cachedCGColor.
(WebKit::DragDropInteractionState::previewForDragItem const): Ditto.

  • UIProcess/ios/ViewGestureControllerIOS.mm:

(WebKit::ViewGestureController::beginSwipeGesture): Use cocoaColor
instead of -[UIColor initWithCGColor:] and cachedCGColor.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _updateTapHighlight]): Use cocoaColor instead of
-[UIColor initWithCGColor:] and cachedCGColor.
(-[WKContentView _cascadeInteractionTintColor]): Use cocoaColor
instead of +[UIColor colorWithCGColor:] and cachedCGColor.
(compositionHighlights): Use colorFromCocoaColor instead of
colorFromUIColor.
(-[WKContentView _createTargetedContextMenuHintPreviewIfPossible]): Use
cocoaColor instead of +[UIColor colorWithCGColor:] and cachedCGColor.

  • UIProcess/ios/forms/WKFormColorControl.mm:

(-[WKColorPicker focusedElementSuggestedColors]): Use createNSArray
and cocoaColor instead of +[NSMutableArray array], a for loop,
-[NSMutableArray addObject:], +[UIColor colorWithCGColor:], and cachedCGColor
(-[WKColorPicker updateColorPickerState]): Use cocoaColor instead of
+[UIColor colorWithCGColor:] and cachedCGColor.

  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::accentColor): Use cocoaColor instead of nsColor.

  • UIProcess/mac/WebColorPickerMac.mm:

(WebKit::WebColorPickerMac::setSelectedColor): Use cocoaColor instead of nsColor.
(WebKit::WebColorPickerMac::showColorPicker): Ditto.
(-[WKColorPopoverMac setAndShowPicker:withColor:suggestions:]): Ditto.
(-[WKColorPopoverMac didChooseColor:]): Ditto.

  • WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:

(WebKit::PDFPluginChoiceAnnotation::createAnnotationElement): Use
colorFromCocoaColor instead of colorFromNSColor

  • WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:

(WebKit::PDFPluginTextAnnotation::createAnnotationElement): Ditto.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::setAccentColor): Use cocoaColorOrNil instead of
isValid and nsColor.

Source/WebKitLegacy/mac:

  • DOM/DOMRGBColor.mm:

(-[DOMRGBColor color]): Use cocoaColor instead of nsColor.

  • Misc/WebKitNSStringExtras.mm:

(-[NSString _web_drawAtPoint:font:textColor:]): Use colorFromCocoaColor
instead of colorFromNSColor.

  • WebView/WebFrame.mm:

(-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]): Use
colorFromCocoaColor instead of colorFromNSColor.
(-[WebFrame _bodyBackgroundColor]): Use cocoaColor instead of
nsColor.

  • WebView/WebHTMLView.mm:

(extractUnderlines): Use colorFromCocoaColor instead of
colorFromNSColor.

  • WebView/WebView.mm:

(-[WebUITextIndicatorData initWithImage:textIndicatorData:scale:]):
Use cocoaColor instead of -[UIColor initWithCGColor:] and cachedCGColor.
(-[WebTextTouchBarItemController _webChangeColor:]): Use colorFromCocoaColor
instead of colorFromNSColor.
(-[WebView updateTextTouchBar]): Use cocoaColor instead of nsColor.

11:22 AM Changeset in webkit [284629] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS macOS wk2 ]compositing/video/video-border-radius-clipping.html is a flakey image failure.
https://bugs.webkit.org/show_bug.cgi?id=224690

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:17 AM Changeset in webkit [284628] by Devin Rousso
  • 36 edits
    2 adds in trunk

[css-values-4] Support small (sv*), large (lv*) and dynamic (dv*) viewport units
https://bugs.webkit.org/show_bug.cgi?id=219287
<rdar://problem/71857370>

Reviewed by Simon Fraser.

Source/WebCore:

Spec: <https://drafts.csswg.org/css-values-4/#viewport-variants>

Tests: CSSViewportUnits.AllSame

CSSViewportUnits.EmptyUnobscuredSizeOverrides
CSSViewportUnits.SameUnobscuredSizeOverrides
CSSViewportUnits.DifferentUnobscuredSizeOverrides

  • css/CSSUnits.h:
  • css/CSSUnits.cpp:

(WebCore::operator<<):

  • css/CSSPrimitiveValue.h:

(WebCore::CSSPrimitiveValue::isViewportPercentageLength):
(WebCore::CSSPrimitiveValue::isViewportPercentageWidth): Deleted.
(WebCore::CSSPrimitiveValue::isViewportPercentageHeight): Deleted.
(WebCore::CSSPrimitiveValue::isViewportPercentageMax): Deleted.
(WebCore::CSSPrimitiveValue::isViewportPercentageMin): Deleted.

  • css/CSSPrimitiveValue.cpp:

(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::isStringType):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::computeUnzoomedNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::unitTypeString):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
(WebCore::CSSPrimitiveValue::equals const):

  • css/CSSToLengthConversionData.h:
  • css/CSSToLengthConversionData.cpp:

(WebCore::CSSToLengthConversionData::defaultViewportFactor const): Added.
(WebCore::CSSToLengthConversionData::smallViewportFactor const): Added.
(WebCore::CSSToLengthConversionData::largeViewportFactor const): Added.
(WebCore::CSSToLengthConversionData::dynamicViewportFactor const): Added.
(WebCore::CSSToLengthConversionData::viewportWidthFactor const): Deleted.
(WebCore::CSSToLengthConversionData::viewportHeightFactor const): Deleted.
(WebCore::CSSToLengthConversionData::viewportMinFactor const): Deleted.
(WebCore::CSSToLengthConversionData::viewportMaxFactor const): Deleted.

  • css/parser/CSSParserToken.cpp:

(WebCore::cssPrimitiveValueUnitFromTrie):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeLengthRawWithKnownTokenTypeDimension):

  • css/calc/CSSCalcCategoryMapping.cpp:

(WebCore::calcUnitCategory):
(WebCore::calculationCategoryForCombination):
(WebCore::hasDoubleValue):
Add support for parsing the following and converting them to their underlying value:

  • svw "small viewport width" is the width of the viewport if all UA interfaces are maximized
  • svh "small viewport height" is the height of the viewport if all UA interfaces are maximized
  • svmin "small viewport small dimension" is min(svw, svh)
  • svmax "small viewport large dimension" is max(svw, svh)
  • lvw "large viewport width" is the width of the viewport if all UA interfaces are minimized
  • lvh "large viewport height" is the height of the viewport if all UA interfaces are minimized
  • lvmin "large viewport small dimension" is min(lvw, lvh)
  • lvmax "large viewport large dimension" is max(lvw, lvh)
  • dvw "dynamic viewport width" is the width of the viewport with all UA interfaces being in whatever state they are currently in
  • dvh "dynamic viewport height" is the height of the viewport with all UA interfaces being in whatever state they are currently in
  • dvmin "dynamic viewport small dimension" is min(dvw, dvh)
  • dvmax "dynamic viewport large dimension" is max(dvw, dvh)

The existing vw/vh/vmin/vmax correspond to the "UA-default viewport", which WebKit
considers equivalent to the "large viewport" lvw/lvh/lvmin/lvmax.

  • page/FrameView.h:
  • page/FrameView.cpp:

(WebCore::FrameView::unobscuredContentSizeChanged):
(WebCore::FrameView::performSizeToContentAutoSize):
(WebCore::FrameView::enableAutoSizeMode):
(WebCore::FrameView::clearSizeOverrideForCSSSmallViewportUnits): Added.
(WebCore::FrameView::setSizeForCSSSmallViewportUnits): Added.
(WebCore::FrameView::overrideWidthForCSSSmallViewportUnits): Added.
(WebCore::FrameView::resetOverriddenWidthForCSSSmallViewportUnits): Added.
(WebCore::FrameView::overrideSizeForCSSSmallViewportUnits): Added.
(WebCore::FrameView::sizeForCSSSmallViewportUnits const): Added.
(WebCore::FrameView::clearSizeOverrideForCSSLargeViewportUnits): Renamed from clearViewportSizeOverrideForCSSViewportUnits.
(WebCore::FrameView::setSizeForCSSLargeViewportUnits): Renamed from setViewportSizeForCSSViewportUnits.
(WebCore::FrameView::overrideWidthForCSSLargeViewportUnits): Renamed from overrideViewportWidthForCSSViewportUnits.
(WebCore::FrameView::resetOverriddenWidthForCSSLargeViewportUnits): Renamed from resetOverriddenViewportWidthForCSSViewportUnits.
(WebCore::FrameView::overrideSizeForCSSLargeViewportUnits): Renamed from overrideViewportSizeForCSSViewportUnits.
(WebCore::FrameView::sizeForCSSLargeViewportUnits const): Renamed from viewportSizeForCSSViewportUnits.
(WebCore::FrameView::calculateSizeForCSSViewportUnitsOverride const): Added.
(WebCore::FrameView::sizeForCSSDynamicViewportUnits const): Added.
(WebCore::FrameView::sizeForCSSDefaultViewportUnits const): Added.

  • rendering/RenderView.h:
  • rendering/RenderView.cpp:

(WebCore::RenderView::sizeForCSSSmallViewportUnits const): Added.
(WebCore::RenderView::sizeForCSSLargeViewportUnits const): Renamed from viewportSizeForCSSViewportUnits.
(WebCore::RenderView::sizeForCSSDynamicViewportUnits const): Added.
(WebCore::RenderView::sizeForCSSDefaultViewportUnits const): Added.
For "small viewport" svw/svh/svmin/svmax, add support for a new IntSize member
that is propagated from the UIProcess. If not set, fall back to "UA-default viewport" vw/vh/vmin/vmax.
For "large viewport" lvw/lvh/lvmin/lvmax, use the same value as "UA-default viewport" vw/vh/vmin/vmax.
For "dynamic viewport" dvw/dvh/dvmin/dvmax, use the same value as window.inner*.
Drive-by: Rename viewportSizeForCSSViewportUnits to sizeForCSSLargeViewportUnits for clarity.

  • platform/graphics/FloatSize.h:

(WebCore::FloatSize::minDimension const): Added.
(WebCore::FloatSize::maxDimension const): Added.

  • platform/graphics/IntSize.h:

(WebCore::IntSize::minDimension const): Added.
(WebCore::IntSize::maxDimension const): Added.
Add utility/helper methods for returning the minimum/maximum of the width vs height.

  • css/DeprecatedCSSOMPrimitiveValue.cpp:

(WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType const):
Don't ASSERT_NOT_REACHED now that there are new unit types.

Source/WebInspectorUI:

  • UserInterface/Models/CSSCompletions.js:

Source/WebKit:

Spec: <https://drafts.csswg.org/css-values-4/#viewport-variants>

Tests: CSSViewportUnits.AllSame

CSSViewportUnits.EmptyUnobscuredSizeOverrides
CSSViewportUnits.SameUnobscuredSizeOverrides
CSSViewportUnits.DifferentUnobscuredSizeOverrides

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _processWillSwapOrDidExit]):
(-[WKWebView _dispatchSetMinimumUnobscuredSize:]): Added.
(-[WKWebView _frameOrBoundsChanged]):
(activeMinimumUnobscuredSize): Added.
(-[WKWebView _didCompleteAnimatedResize]):
(-[WKWebView _minimumUnobscuredSizeOverride]): Added.
(-[WKWebView _setMinimumUnobscuredSizeOverride:]): Added.
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]):
(-[WKWebView _clearOverrideLayoutParameters]):
When this value is set from -[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]
it should be used as the value for "small viewport" svw/svh/svmin/svmax, but only
from that codepath. Dynamic viewport changes should not update it as they don't necessarily
represent a change in the minimum/maximum viewport size, just the current size.
"large viewport" lvw/lvh/lvmin/lvmax and "dynamic viewport" dvw/dvh/dvmin/dvmax
(as well as the existing "UA-default viewport" vw/vh/vmin/vmax) can be derived from
existing logic.
See the WebCore ChangeLog for more information.

  • Shared/WebPageCreationParameters.h:
  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::creationParameters):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::setMinimumUnobscuredSize): Added.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage):
(WebKit::WebPage::setViewportSizeForCSSViewportUnits):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::setMinimumUnobscuredSize): Added.
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
Add piping from the UIProcess to the WebProcess for the new minimum unobscured size override.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
Drive-by: Rename setViewportSizeForCSSViewportUnits to setSizeForCSSLargeViewportUnits for clarity.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm: Added.

(evaluateForInt):
(getElementHeight):
(TEST.CSSViewportUnits.AllSame):
(TEST.CSSViewportUnits.EmptyUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.SameUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.DifferentUnobscuredSizeOverrides):

  • TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.html: Added.
  • TestWebKitAPI/Tests/WebCore/FloatSizeTests.cpp:

(TEST.FloatSize.MinDimension): Added.
(TEST.FloatSize.MaxDimension): Added.

  • TestWebKitAPI/Tests/WebCore/IntSizeTests.cpp:

(TEST.IntSize.MinDimension): Added.
(TEST.IntSize.MaxDimension): Added.
Add utility/helper methods for returning the minimum/maximum of the width vs height.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
11:16 AM Changeset in webkit [284627] by commit-queue@webkit.org
  • 102 edits in trunk/LayoutTests

[GTK] Update test baselines after r284521
https://bugs.webkit.org/show_bug.cgi?id=232094

Many render tree dumps need to change upper case tag names to lower
case.

Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-10-21

  • platform/glib/fast/block/float/013-expected.txt:
  • platform/glib/fast/block/float/016-expected.txt:
  • platform/glib/fast/block/float/clamped-right-float-expected.txt:
  • platform/glib/fast/body-propagation/background-color/002-expected.txt:
  • platform/glib/fast/body-propagation/background-color/003-expected.txt:
  • platform/glib/fast/body-propagation/background-color/004-expected.txt:
  • platform/glib/fast/body-propagation/background-color/006-expected.txt:
  • platform/glib/fast/body-propagation/background-color/007-expected.txt:
  • platform/glib/fast/body-propagation/background-color/008-expected.txt:
  • platform/glib/fast/body-propagation/background-image/002-expected.txt:
  • platform/glib/fast/body-propagation/background-image/003-expected.txt:
  • platform/glib/fast/body-propagation/background-image/004-expected.txt:
  • platform/glib/fast/body-propagation/background-image/006-expected.txt:
  • platform/glib/fast/body-propagation/background-image/007-expected.txt:
  • platform/glib/fast/body-propagation/background-image/008-expected.txt:
  • platform/glib/fast/body-propagation/overflow/001-expected.txt:
  • platform/glib/fast/body-propagation/overflow/002-expected.txt:
  • platform/glib/fast/body-propagation/overflow/003-expected.txt:
  • platform/glib/fast/body-propagation/overflow/004-expected.txt:
  • platform/glib/fast/body-propagation/overflow/006-expected.txt:
  • platform/glib/fast/body-propagation/overflow/007-expected.txt:
  • platform/glib/fast/css/line-height-font-order-expected.txt:
  • platform/glib/fast/table/011-expected.txt:
  • platform/glib/svg/custom/svg-fonts-with-no-element-reference-expected.txt:
  • platform/gtk/compositing/color-matching/pdf-image-match-expected.txt:
  • platform/gtk/compositing/repaint/content-into-overflow-expected.txt:
  • platform/gtk/compositing/repaint/overflow-into-content-expected.txt:
  • platform/gtk/editing/selection/selection-display-block-sibling-expected.txt:
  • platform/gtk/editing/selection/selection-display-flex-expected.txt:
  • platform/gtk/fast/block/positioning/inline-block-relposition-expected.txt:
  • platform/gtk/fast/body-propagation/background-color/001-expected.txt:
  • platform/gtk/fast/body-propagation/background-color/005-expected.txt:
  • platform/gtk/fast/body-propagation/background-image/001-expected.txt:
  • platform/gtk/fast/body-propagation/background-image/005-expected.txt:
  • platform/gtk/fast/body-propagation/background-image/009-expected.txt:
  • platform/gtk/fast/body-propagation/background-image/010-expected.txt:
  • platform/gtk/fast/body-propagation/overflow/005-expected.txt:
  • platform/gtk/fast/forms/search-styled-expected.txt:
  • platform/gtk/fast/forms/select-background-none-expected.txt:
  • platform/gtk/fast/repaint/text-selection-rect-in-overflow-2-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background-color-applied-to-rounded-inline-element-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background-color-border-box-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background-repeat-space-padding-box-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background-size-002-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background-size-applies-to-block-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background_color_padding_box-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background_position_three_four_values-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background_properties_greater_than_images-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background_repeat_space_border_box-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/background_repeat_space_content_box-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-002-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-003-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-005-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-006-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-007-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-008-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-009-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-010-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-011-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-012-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-013-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-014-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-015-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-016-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-017-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-clip-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-clip-002-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-content-edge-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-initial-value-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-not-inherited-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-shorthand-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-style-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-style-002-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-style-003-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-style-004-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-style-005-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-002-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-with-three-values-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-radius-with-two-values-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-top-left-radius-values-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-top-left-radius-values-002-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-top-left-radius-values-003-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-top-left-radius-values-004-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/border-top-right-radius-values-004-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/box-shadow-001-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/box-shadow-002-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/box-shadow-003-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/box-shadow-004-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/color-behind-images-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/none-as-image-layer-expected.txt:
  • platform/gtk/ietestcenter/css3/bordersbackgrounds/order-of-images-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-001-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-003-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-004-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-005-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-006-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-007-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-008-expected.txt:
  • platform/gtk/ietestcenter/css3/text/textshadow-010-expected.txt:
11:05 AM Changeset in webkit [284626] by Aditya Keerthi
  • 4 edits in trunk/Source/WebCore

[macOS] Update appearance of <datalist> indicator
https://bugs.webkit.org/show_bug.cgi?id=232031
rdar://84474135

Reviewed by Wenson Hsieh.

Source/WebCore:

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::paintListButtonForInput):

Use CoreUI to paint the indicator on Big Sur and Monterey.

Source/WebCore/PAL:

  • pal/spi/mac/CoreUISPI.h:
10:58 AM Changeset in webkit [284625] by Devin Rousso
  • 2 edits in trunk/Source/WebKit

[iOS] Zooming out should use the page's background color instead of fading
https://bugs.webkit.org/show_bug.cgi?id=232036
<rdar://problem/81926190>

Reviewed by Tim Horton.

  • UIProcess/API/ios/WKWebViewIOS.mm:

(scrollViewBackgroundColor):

10:55 AM Changeset in webkit [284624] by Devin Rousso
  • 19 edits
    3 copies
    1 add in trunk

REGRESSION(r283864): Apple Pay named images are missing
https://bugs.webkit.org/show_bug.cgi?id=232050
<rdar://problem/84413831>

Reviewed by Andy Estes.

Source/WebCore:

NamedImageGeneratedImage already does a translate before calling into drawNamedImage, so
there's no reason to pass along the location of the named image. Instead, just pass the size.

Tests: fast/css/webkit-named-image/apple-pay-logo-black/offset.html

fast/css/webkit-named-image/apple-pay-logo-white/offset.html

  • platform/Theme.h:
  • platform/Theme.cpp:

(WebCore::Theme::drawNamedImage const):

  • platform/cocoa/ThemeCocoa.h:
  • platform/cocoa/ThemeCocoa.mm:

(WebCore::drawApplePayButton):
(WebCore::ThemeCocoa::drawNamedImage const):

  • platform/graphics/NamedImageGeneratedImage.cpp:

(WebCore::NamedImageGeneratedImage::draw):
(WebCore::NamedImageGeneratedImage::drawPattern):

LayoutTests:

  • fast/css/webkit-named-image/apple-pay-logo-black/offset.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/offset-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/offset.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/offset-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/background-size-centered.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/background-size-centered-expected-mismatch.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/background-size.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/background-size-expected-mismatch.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/basic.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/basic-expected-mismatch.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/container-larger-height.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/container-larger-height-expected-mismatch.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/container-larger-width.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/container-larger-width-expected-mismatch.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/mask.html:
  • fast/css/webkit-named-image/apple-pay-logo-white/mask-expected-mismatch.html:

Drive-by: fix these to also have background-color: black; in the -expected-mismatch.html.

10:54 AM Changeset in webkit [284623] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Add missing overflow check to DFGIntegerRangeOptimizationPhase::filterConstant()
https://bugs.webkit.org/show_bug.cgi?id=232058

Reviewed by Robin Morisset.

Added overflow check.

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
10:40 AM Changeset in webkit [284622] by Kate Cheney
  • 3 edits in trunk/LayoutTests

crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-leading-zero.html is a constant timeout
https://bugs.webkit.org/show_bug.cgi?id=232038
<rdar://problem/80333758>

Reviewed by Chris Dumez.

The modulus n in the existing test was not the result of two primes
p and q (it ends with 0x66 0x67 0x68). This patch updates the modulus
which I calculated using SubtleCrypto's generateKey() function then
prepended some zeros to test the intended functionality.

  • crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-leading-zero.html:
  • platform/mac/TestExpectations:
10:34 AM Changeset in webkit [284621] by Alan Coon
  • 1 copy in tags/Safari-612.3.2

Tag Safari-612.3.2.

10:32 AM Changeset in webkit [284620] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r284201. rdar://problem/83670287

[AppleWin] Controls are not being rendered
https://bugs.webkit.org/show_bug.cgi?id=231769
<rdar://problem/83670287>

Reviewed by Fujii Hironori.

Controls are not being rendered because the LocalWindowsContext destructor is no longer blitting the bitmap contents to the hdc.
The test in GraphicsContext::getWindowsContext needs to match the test in GraphicsContext::releaseWindowsContext.

  • platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::getWindowsContext):

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

10:30 AM Changeset in webkit [284619] by Alan Coon
  • 8 edits in branches/safari-612-branch/Source

Versioning.

WebKit-7612.3.2

10:14 AM Changeset in webkit [284618] by Aditya Keerthi
  • 2 edits in trunk/Source/WTF

[Cocoa] Enable 'accent-color' by default
https://bugs.webkit.org/show_bug.cgi?id=232032
rdar://84474404

Reviewed by Wenson Hsieh.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
10:12 AM Changeset in webkit [284617] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Followup: Fix crash when calling setUsernameForLocalCredentialWithID
https://bugs.webkit.org/show_bug.cgi?id=232057
<rdar://problem/84507268>

Patch by John Pascoe <J Pascoe> on 2021-10-21
Reviewed by David Kilzer.

Follow up to address David's comment.

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(getAllLocalAuthenticatorCredentialsImpl):
(+[_WKWebAuthenticationPanel deleteLocalAuthenticatorCredentialWithID:]):
(+[_WKWebAuthenticationPanel setUsernameForLocalCredentialWithID:username:]):

  • Use <wtf/cocoa/TypeCastsCocoa.h>
10:04 AM Changeset in webkit [284616] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

Regression(r284439): [ iPad ] fast/canvas/canvas-createPattern-video-loading.html and imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/canvas-createImageBitmap-video-resize.html are failing.
https://bugs.webkit.org/show_bug.cgi?id=232090

Unreviewed test gardening.

  • platform/ipad/TestExpectations:
10:03 AM Changeset in webkit [284615] by Alan Coon
  • 1 copy in tags/Safari-612.2.9.1.30

Tag Safari-612.2.9.1.30.

9:58 AM Changeset in webkit [284614] by Alan Coon
  • 2 edits in branches/safari-612.2.9.1-branch/Source/WebCore

Cherry-pick r284201. rdar://problem/83670287

[AppleWin] Controls are not being rendered
https://bugs.webkit.org/show_bug.cgi?id=231769
<rdar://problem/83670287>

Reviewed by Fujii Hironori.

Controls are not being rendered because the LocalWindowsContext destructor is no longer blitting the bitmap contents to the hdc.
The test in GraphicsContext::getWindowsContext needs to match the test in GraphicsContext::releaseWindowsContext.

  • platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::getWindowsContext):

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

9:56 AM Changeset in webkit [284613] by Alan Coon
  • 8 edits in branches/safari-612.2.9.1-branch/Source

Versioning.

WebKit-7612.2.9.1.30

9:49 AM Changeset in webkit [284612] by commit-queue@webkit.org
  • 6 edits
    1 copy in trunk

AX: Remove redundant insert of autofill button child in AccessibilityRenderObject::addTextFieldChildren
https://bugs.webkit.org/show_bug.cgi?id=232033

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-21
Reviewed by Chris Fleizach.

Source/WebCore:

Autofill buttons are represented in the DOM, so there's no reason
to also insert it in AccessibilityRenderObject::addTextFieldChildren.
This results in duplicate objects for this button in the AX tree.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::addTextFieldChildren):
Remove redundant insertion of autofill button element into the
accessibility tree.

LayoutTests:

  • accessibility/auto-fill-crash-expected.txt:
  • accessibility/auto-fill-crash.html:
  • platform/glib/accessibility/auto-fill-crash-expected.txt:

Expect one less child because we no longer insert a redundant button
into the accessibility tree. Also add an expectation confirming the
autofill button is actually a part of the accessibility tree.

  • platform/win/accessibility/auto-fill-crash-expected.txt: Added.
9:49 AM Changeset in webkit [284611] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, drop test from TestExpectations that no longer exists.

  • platform/ios-wk2/TestExpectations:
9:47 AM Changeset in webkit [284610] by Chris Dumez
  • 34 edits in trunk

WebKit should process-swap for initial navigation of a popup if it has no opener
https://bugs.webkit.org/show_bug.cgi?id=231990
<rdar://84425504>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/html/cross-origin-opener-policy/coop-coep-sandbox.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coop-sandbox.https-expected.txt:

Rebaseline tests due to minor logging differences.

Source/WebKit:

WebKit should process-swap for initial navigation of a popup if it has no opener, even if the navigation is
same-site. Swapping process is not Web-observable here since there is no opener relationship. However, swapping
processes has benefits here since we don't want to end up with too many tabs sharing the same process.

This impacts Google Drive where double-clicking a document will open Google Docs in a new tab and in the same
WebProcess as Google Drive.

No new tests, updated existing API tests and this is not Web-observable.

  • Shared/FrameInfoData.cpp:

(WebKit::FrameInfoData::encode const):
(WebKit::FrameInfoData::decode):

  • Shared/FrameInfoData.h:
  • Shared/LoadParameters.cpp:

(WebKit::LoadParameters::encode const):
(WebKit::LoadParameters::decode):

  • Shared/LoadParameters.h:
  • Shared/NavigationActionData.cpp:

(WebKit::NavigationActionData::encode const):
(WebKit::NavigationActionData::decode):

  • Shared/NavigationActionData.h:
  • UIProcess/API/APINavigation.h:

(API::Navigation::effectiveSandboxFlags const):

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::cancel):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::loadRequestWithNavigationShared):
(WebKit::WebPageProxy::loadSimulatedRequest):
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::processForNavigation):
(WebKit::WebProcessPool::processForNavigationInternal):

  • UIProcess/WebProcessPool.h:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::info const):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadRequest):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

(-[PSONUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(-[PSONUIDelegate webViewDidClose:]):
Updated existing API tests to reflect behavior change.
Also extend an API test to make sure that a popup opened by JS can still close itself
via JS (by calling window.close()), even in the case where we process swap.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):
(WTR::InjectedBundle::outputText):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.h:
  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::dump):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::createOtherPage):
(WTR::TestController::didReceivePageMessageFromInjectedBundle):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
We have some tests that open a new popup with 'noopener' and the popup would be the
one to call testRunner.notifyDone(). This used to work fine when the popup would
end up in the same WebProcess because the injected bundle would know which page is
the main test page and use that one. However, now that we process-swap, the popup
page would think it is the main test page and try to dump its own output. However,
the UIProcess wasn't listening for messages from auxiliary pages' injected bundles.
The UIProcess now listens for those messages and asks the main test page to dump
its output when an auxiliary page in another process says the test is done.

LayoutTests:

  • fast/dom/open-and-close-by-DOM.html:

The test is relying on testRunner.windowCount(), which is only able to count windows inside the
current WebProcess. Add rel=opener to the link so that the new window keep opening in the same
process, so that testRunner.windowCount() actually keeps working as expected.
I added an API test to cover to make sure that windows opened by DOM can still close themselves
in the case where we swap processes.

9:34 AM Changeset in webkit [284609] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

Regression(r284439): [ iPad ] fast/canvas/canvas-createPattern-video-loading.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=232090

Unreviewed test gardening.

  • platform/ipad/TestExpectations:
9:32 AM Changeset in webkit [284608] by Kocsen Chung
  • 8 edits in branches/safari-613.1.6-branch/Source

Versioning.

WebKit-7613.1.6.1

9:31 AM Changeset in webkit [284607] by Kocsen Chung
  • 3 edits in branches/safari-613.1.6-branch/Source/WebKit

Build fix reviewed by Wenson Hsieh and David Kilzer

9:27 AM Changeset in webkit [284606] by commit-queue@webkit.org
  • 14 edits in trunk/Source/WebCore

AX: Any addition of children should funnel through AccessibilityObject::addChild
https://bugs.webkit.org/show_bug.cgi?id=231914

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-21
Reviewed by Chris Fleizach.

All addition of children now goes through
AccessibilityObject::addChild. This is good for two reasons:

  1. It ensures we aren't inserting ignored elements into the tree.

insertChild (downstream of addChild) checks this. Prior to this
patch, there were cases where we could insert ignored children into the
tree because no check was made.

  1. We can reliably set state on the child based on the state of the

parent at insertion time. For example, children can set a flag if
any of their ancestors have an application or document role, which can
be useful for some AX clients.

  • accessibility/AccessibilityARIAGrid.cpp:

(WebCore::AccessibilityARIAGrid::addTableCellChild):
(WebCore::AccessibilityARIAGrid::addChildren):

  • accessibility/AccessibilityListBox.cpp:

(WebCore::AccessibilityListBox::addChildren):

  • accessibility/AccessibilityMenuList.cpp:

(WebCore::AccessibilityMenuList::addChildren):

  • accessibility/AccessibilityMenuListPopup.cpp:

(WebCore::AccessibilityMenuListPopup::addChildren):

  • accessibility/AccessibilityObject.cpp:

(WebCore::isAutofillButton):
(WebCore::isTableComponent):
(WebCore::AccessibilityObject::insertChild):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::addImageMapChildren):
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
(WebCore::AccessibilityRenderObject::addRemoteSVGChildren):

  • accessibility/AccessibilityScrollView.cpp:

(WebCore::AccessibilityScrollView::addChildScrollbar):

  • accessibility/AccessibilitySlider.cpp:

(WebCore::AccessibilitySlider::addChildren):

  • accessibility/AccessibilitySpinButton.cpp:

(WebCore::AccessibilitySpinButton::addChildren):

  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::addChildren):
(WebCore::AccessibilityTable::addTableCellChild):

  • accessibility/AccessibilityTableColumn.cpp:

(WebCore::AccessibilityTableColumn::addChildren):

  • accessibility/AccessibilityTableHeaderContainer.cpp:

(WebCore::AccessibilityTableHeaderContainer::addChildren):

  • accessibility/AccessibilityTableRow.cpp:

(WebCore::AccessibilityTableRow::addChildren):

9:17 AM Changeset in webkit [284605] by Simon Fraser
  • 2 edits in trunk/Tools

run-webkit-tests --ios-simulator --print-expectations fails
https://bugs.webkit.org/show_bug.cgi?id=232035

Reviewed by Jonathan Bedard.

self._port.supported_device_types(), which _collect_tests() uses (despite its argument)
returns a different set of devices than self._port.DEFAULT_DEVICE_TYPES which caused
using those as hash keys to throw. So have print_expectations() and print_summary()
just use self._port.supported_device_types().

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager.print_expectations):
(Manager.print_summary):

7:29 AM Changeset in webkit [284604] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

Move Style::Resolver::State out of header
https://bugs.webkit.org/show_bug.cgi?id=232074

Reviewed by Antoine Quint.

It is an implementation detail.

  • style/PageRuleCollector.cpp:

(WebCore::Style::PageRuleCollector::isLeftPage const):

  • style/PageRuleCollector.h:

(WebCore::Style::PageRuleCollector::PageRuleCollector):

Provide just the root text direction instead of the State.

  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::State::State):
(WebCore::Style::Resolver::State::element const):
(WebCore::Style::Resolver::State::setStyle):
(WebCore::Style::Resolver::State::style const):
(WebCore::Style::Resolver::State::takeStyle):
(WebCore::Style::Resolver::State::setParentStyle):
(WebCore::Style::Resolver::State::parentStyle const):
(WebCore::Style::Resolver::State::rootElementStyle const):
(WebCore::Style::Resolver::State::userAgentAppearanceStyle const):
(WebCore::Style::Resolver::State::setUserAgentAppearanceStyle):
(WebCore::Style::Resolver::styleForPage):

  • style/StyleResolver.h:

(WebCore::Style::Resolver::State::State): Deleted.
(WebCore::Style::Resolver::State::element const): Deleted.
(WebCore::Style::Resolver::State::style const): Deleted.
(WebCore::Style::Resolver::State::takeStyle): Deleted.
(WebCore::Style::Resolver::State::parentStyle const): Deleted.
(WebCore::Style::Resolver::State::rootElementStyle const): Deleted.
(WebCore::Style::Resolver::State::userAgentAppearanceStyle const): Deleted.
(WebCore::Style::Resolver::State::setUserAgentAppearanceStyle): Deleted.

7:09 AM Changeset in webkit [284603] by Chris Lord
  • 8 edits in trunk

[WPE][GTK] Enable smooth scrolling by default
https://bugs.webkit.org/show_bug.cgi?id=220512

Reviewed by Carlos Garcia Campos.

.:

Build smooth scrolling by default on WPE to match other platforms.

  • Source/cmake/OptionsWPE.cmake:

Source/WebKit:

Enable smooth scrolling by default on GTK and WPE platforms.

  • UIProcess/API/glib/WebKitSettings.cpp:

(webkit_settings_class_init):

Source/WTF:

Enable smooth scrolling by default on GTK and WPE platforms.

  • Scripts/Preferences/WebPreferences.yaml:

Tools:

Smooth scrolling is default on on GTK now, so reverse the logic in the
test for the efficacy of the related setting.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:

(testWebKitSettings):

5:40 AM Changeset in webkit [284602] by graouts@webkit.org
  • 3 edits
    2 adds in trunk

CSSPropertyZoom needs wrapper that ensures it's always blended into a positive value.
https://bugs.webkit.org/show_bug.cgi?id=232020
<rdar://problem/84469930>

Reviewed by Antti Koivisto.

Source/WebCore:

Test: webanimations/zoom-animation-crash.html

The "zoom" CSS property is expected to be always larger than 0, so let's ensure we do not allow
values <= 0 while blending. To do so we repurpose NonNegativeFloatPropertyWrapper to now take
an argument specifying if the blended value should be non-negative or positive.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::FloatPropertyWrapper::FloatPropertyWrapper):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
(WebCore::NonNegativeFloatPropertyWrapper::NonNegativeFloatPropertyWrapper): Deleted.

LayoutTests:

Add a test that would crash prior to the source change.

  • webanimations/zoom-animation-crash-expected.txt: Added.
  • webanimations/zoom-animation-crash.html: Added.
5:28 AM Changeset in webkit [284601] by eocanha@igalia.com
  • 4 edits in trunk/LayoutTests

REGRESSION(r282059) [GStreamer] Test media/media-source/media-source-stalled-holds-sleep-assertion.html timeouts
https://bugs.webkit.org/show_bug.cgi?id=229979

Reviewed by Xabier Rodriguez-Calvar.

Detect stall by monitoring currentTime instead of listening to the 'stall' event. This is needed after
removing emission of 'stall' event in GStreamer ports after https://bugs.webkit.org/show_bug.cgi?id=226882

Also remove initial seek, which is irrelevant to the test purpose and causes troubles in GStreamer ports.

  • media/media-source/media-source-stalled-holds-sleep-assertion-expected.txt: Updated expectations.
  • media/media-source/media-source-stalled-holds-sleep-assertion.html: Monitor currentTime instead of stall event, remove initial seek.
  • platform/glib/TestExpectations: Removed timeout expectation.
4:51 AM Changeset in webkit [284600] by graouts@webkit.org
  • 12 edits in trunk/Source/WebCore

Pass CompositeOperation to CSSPropertyAnimation::blendProperties and through more blending functions
https://bugs.webkit.org/show_bug.cgi?id=232069

Reviewed by Antti Koivisto.

In preparation for support of CompositeOperation when blending, we need to pass it down from blendProperties()
to other blending functions. Currently we only ever pass Replace so there is no change in behavior.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyBlendingContext::CSSPropertyBlendingContext):
(WebCore::AnimationPropertyWrapperBase::canInterpolate const):
(WebCore::CSSPropertyAnimation::blendProperties):
(WebCore::CSSPropertyAnimation::canPropertyBeInterpolated):

  • animation/CSSPropertyAnimation.h:
  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):

  • platform/LengthSize.h:

(WebCore::blend):

  • platform/animation/AnimationUtilities.h:

(WebCore::BlendingContext::BlendingContext):

  • platform/graphics/transforms/AffineTransform.cpp:

(WebCore::AffineTransform::blend):

  • platform/graphics/transforms/AffineTransform.h:
  • platform/graphics/transforms/RotateTransformOperation.cpp:

(WebCore::RotateTransformOperation::blend):

  • platform/graphics/transforms/TransformOperation.h:
  • platform/graphics/transforms/TransformationMatrix.cpp:

(WebCore::blendFloat):
(WebCore::TransformationMatrix::blend2):
(WebCore::TransformationMatrix::blend4):
(WebCore::TransformationMatrix::blend):

  • platform/graphics/transforms/TransformationMatrix.h:
3:50 AM Changeset in webkit [284599] by ddkilzer@apple.com
  • 3 edits in trunk/Source/ThirdParty/libwebrtc

[WebRTC] Simplify libwebtc Xcode project
<https://webkit.org/b/232044>
<rdar://problem/82743710>

Reviewed by Youenn Fablet.

  • Configurations/libwebm.xcconfig:

(INSTALL_HEADERS_PATH):
(LIBWEBM_HEADERS_FOLDER_PATH):
(LIBWEBM_HEADERS_FOLDER_PATH_NO):
(LIBWEBM_HEADERS_FOLDER_PATH_YES):

  • Remove variables used by now-removed build phase scripts.

(PUBLIC_HEADERS_FOLDER_PATH): Add.

  • This determines where webm public headers are installed.
  • libwebrtc.xcodeproj/project.pbxproj:

(Recovered References): Remove.

  • The two source files were added back at the correct path elsewhere, so these references can be removed.

(webm target):

  • Remove "Copy webm headers" and "Copy common headers" build phase scripts since headers are installed by Xcode's built-in "Headers" phase.
  • Remove duplicate C++ source files (noticed after reviewing "Recovered References" files).
  • Install webm headers as public headers since their is no subdirectory structure, and this fixes the bug in the radar where webm headers were not installed consistently.
3:21 AM Changeset in webkit [284598] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.34.1

WPE WebKit 2.34.1

3:21 AM Changeset in webkit [284597] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.34

Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.34.1 release

.:

  • Source/cmake/OptionsWPE.cmake: Bump version numbers.

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.34.1.
2:53 AM Changeset in webkit [284596] by Chris Lord
  • 7 edits in trunk/Source/WebCore

[GTK] Slow scrolling (not matching GTK native scroll amount)
https://bugs.webkit.org/show_bug.cgi?id=197100

Reviewed by Simon Fraser.

Fix up behaviour with interrupting smooth scrolling, mainly on
keyboard-initiated scrolling, but also for the mouse-wheel. When
interrupting a smooth scroll, the animation curve is now changed from
ease-in-out to ease-out and the duration is recalculated.

No new tests, covered by existing tests.

  • platform/ScrollAnimation.h:

(WebCore::ScrollAnimation::destinationOffset const):

  • platform/ScrollAnimationSmooth.cpp:

(WebCore::ScrollAnimationSmooth::ScrollAnimationSmooth):
(WebCore::ScrollAnimationSmooth::startAnimatedScrollToDestination):
(WebCore::ScrollAnimationSmooth::retargetActiveAnimation):
(WebCore::ScrollAnimationSmooth::animateScroll):
(WebCore::ScrollAnimationSmooth::startOrRetargetAnimation): Deleted.

  • platform/ScrollAnimationSmooth.h:
  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::scroll):

  • platform/ScrollingEffectsController.cpp:

(WebCore::ScrollingEffectsController::retargetAnimatedScrollBy):
(WebCore::ScrollingEffectsController::handleWheelEvent):

  • platform/ScrollingEffectsController.h:
2:48 AM Changeset in webkit [284595] by Sam Sneddon
  • 4 edits
    2 moves in trunk/Tools

Move layout_test_finder to layout_test_finder_legacy
https://bugs.webkit.org/show_bug.cgi?id=232018

Reviewed by Darin Adler.

This is a simple rename; no further changes.

  • Scripts/open-layout-test:
  • Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy.py: Renamed from Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py.

(_is_reference_html_file):
(_has_supported_extension):
(LayoutTestFinder):
(LayoutTestFinder.init):
(LayoutTestFinder.find_tests):
(LayoutTestFinder.find_tests_by_path):
(LayoutTestFinder._expanded_paths):
(LayoutTestFinder._real_tests):
(LayoutTestFinder._is_test_file):
(LayoutTestFinder._is_w3c_resource_file):
(LayoutTestFinder._strip_test_dir_prefixes):
(LayoutTestFinder._strip_test_dir_prefix):
(LayoutTestFinder._read_test_names_from_file):
(LayoutTestFinder._strip_comments):

  • Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py: Renamed from Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder_unittest.py.

(MockLayoutTestFinder):
(MockLayoutTestFinder._real_tests):
(LayoutTestFinderTests):
(LayoutTestFinderTests.make_finder):
(LayoutTestFinderTests.test_supported_test_extensions):
(LayoutTestFinderTests.test_is_reference_html_file):
(LayoutTestFinderTests.test_find_no_paths_specified):
(LayoutTestFinderTests.test_find_one_test):
(LayoutTestFinderTests.test_find_glob):
(LayoutTestFinderTests.test_find_with_skipped_directories):
(LayoutTestFinderTests.test_find_with_skipped_directories_2):
(LayoutTestFinderTests.test_is_test_file):
(LayoutTestFinderTests.test_is_w3c_resource_file):

  • Scripts/webkitpy/layout_tests/controllers/manager.py:
  • Scripts/webkitpy/tool/commands/queries.py:
1:46 AM Changeset in webkit [284594] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.34.1

WebKitGTK 2.34.1

1:45 AM Changeset in webkit [284593] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.34

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.34.1 release

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.34.1.
12:21 AM Changeset in webkit [284592] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix GTK build with old version of ATSPI after r284367.

There's not API to check ATSPI version, so check if ATSPI_SCROLLTYPE_COUNT is defined to know if component
scroll API is available.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(beforeAll):

Oct 20, 2021:

11:51 PM Changeset in webkit [284591] by beidson@apple.com
  • 22 edits
    3 adds in trunk

WebKit Managed Notifications: Skeleton NotificationProvider
https://bugs.webkit.org/show_bug.cgi?id=231786

Reviewed by Alex Christensen.

Source/WebCore:

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setBuiltInNotificationsEnabled):
(WebCore::RuntimeEnabledFeatures::builtInNotificationsEnabled const):

Source/WebKit:

Currently, notification messages route from WebContent to the UI process.

When "WebKit-managed built-in notifications" are enabled, notification requests will route from
WebContent to Networking instead.

From there they will head off to webpushd to be handled.

This patch just sets up the switch where messages can optionally head off to the Networking
process instead of the UIProcess.

(It also lays the SPI groundwork for the webpushd mach service name)

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::~NetworkSession):

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

  • NetworkProcess/NetworkSessionCreationParameters.h:
  • NetworkProcess/Notifications/NetworkNotificationManager.cpp: Added.

(WebKit::NetworkNotificationManager::NetworkNotificationManager):
(WebKit::NetworkNotificationManager::showNotification):
(WebKit::NetworkNotificationManager::cancelNotification):
(WebKit::NetworkNotificationManager::clearNotifications):
(WebKit::NetworkNotificationManager::didDestroyNotification):

  • NetworkProcess/Notifications/NetworkNotificationManager.h: Added.
  • NetworkProcess/WebStorage/LocalStorageDatabase.cpp: Unified build fixup.
  • Sources.txt:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:

(-[_WKWebsiteDataStoreConfiguration webPushMachServiceName]):
(-[_WKWebsiteDataStoreConfiguration setWebPushMachServiceName:]):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:

(WebKit::WebsiteDataStoreConfiguration::setWebPushMachServiceName):
(WebKit::WebsiteDataStoreConfiguration::webPushMachServiceName const):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Notifications/WebNotificationManager.cpp:

(WebKit::sendNotificationMessage):
(WebKit::WebNotificationManager::show):
(WebKit::WebNotificationManager::cancel):
(WebKit::WebNotificationManager::clearNotifications):
(WebKit::WebNotificationManager::didDestroyNotification):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • wtf/PlatformEnableCocoa.h:

Tools:

  • WebKitTestRunner/TestOptions.cpp:

(WTR::TestOptions::defaults): Disable BuiltInNotificationsEnabled for now.

11:27 PM Changeset in webkit [284590] by ysuzuki@apple.com
  • 10 edits in trunk/Source/JavaScriptCore

*IsSane API's could take in the Structure's we're consulting, or they can be out parameters, so we don't rely on the CPU's memory ordering
https://bugs.webkit.org/show_bug.cgi?id=231996

Reviewed by Filip Pizlo.

objectPrototypeIsSane, arrayPrototypeChainIsSane, and stringPrototypeChainIsSane reloads structures from prototype objects while the caller
is already getting them and validating them. This introduces a race condition where structure transition happens just before calling these
APIs and we will see different structures which are already validated. This is simply wrong: if we validate one structure, then we should
continue using that and we should put a watchpoint on this structure. We should not reload structures from the prototype again.

We add Concurrently postfix to these functions, and passing structures to these APIs to continue using these structures instead of reloading
it from prototype objects. This eliminate the race condition we had, and this removes the necessity of load-load-fence on watchpoint state
retrieval.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGArrayMode.cpp:

(JSC::DFG::ArrayMode::refine const):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::setSaneChainIfPossible):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByValOnString):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileStringCharAtImpl):

  • runtime/JSGlobalObject.h:
  • runtime/JSGlobalObjectInlines.h:

(JSC::JSGlobalObject::objectPrototypeIsSane):
(JSC::JSGlobalObject::arrayPrototypeChainIsSaneConcurrently):
(JSC::JSGlobalObject::stringPrototypeChainIsSaneConcurrently):
(JSC::JSGlobalObject::arrayPrototypeChainIsSane):
(JSC::JSGlobalObject::stringPrototypeChainIsSane):

11:15 PM Changeset in webkit [284589] by Antti Koivisto
  • 4 edits in trunk/LayoutTests

[ iOS ] fast/inline/inline-background-clip-text-multiline.html is image failing
https://bugs.webkit.org/show_bug.cgi?id=231961
<rdar://problem/84418611>

Unreviewed.

Fix the test to not depend on font rendering details.

  • fast/inline/inline-background-clip-text-multiline-expected.html:
  • fast/inline/inline-background-clip-text-multiline.html:
  • platform/ios-wk2/TestExpectations:
5:03 PM Changeset in webkit [284588] by commit-queue@webkit.org
  • 10 edits
    5 adds in trunk

URLParser should reject hosts with C0 control characters or U+007F
https://bugs.webkit.org/show_bug.cgi?id=232034

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

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-origin-expected.txt:
  • web-platform-tests/url/a-element-origin-xhtml-expected.txt:
  • web-platform-tests/url/failure-expected.txt:
  • web-platform-tests/url/resources/urltestdata.json:
  • web-platform-tests/url/url-character-sets.any-expected.txt: Added.
  • web-platform-tests/url/url-character-sets.any.html: Added.
  • web-platform-tests/url/url-character-sets.any.js: Added.

(cp.test):

  • web-platform-tests/url/url-character-sets.any.worker-expected.txt: Added.
  • web-platform-tests/url/url-character-sets.any.worker.html: Added.
  • web-platform-tests/url/url-origin.any-expected.txt:
  • web-platform-tests/url/url-origin.any.worker-expected.txt:
  • web-platform-tests/url/url-setters-stripping.any.js:

Source/WTF:

This matches Chrome and Firefox and was proposed to the standard at
https://github.com/whatwg/url/issues/627

  • wtf/URLParser.cpp:

(WTF::isC0Control):
(WTF::isForbiddenHostCodePoint):

5:02 PM Changeset in webkit [284587] by Russell Epstein
  • 1 copy in tags/Safari-613.1.6

Tag Safari-613.1.6.

5:01 PM Changeset in webkit [284586] by Russell Epstein
  • 1 delete in tags/Safari-613.1.6

Delete tag.

5:00 PM Changeset in webkit [284585] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] ArithAbs should care about INT32_MIN
https://bugs.webkit.org/show_bug.cgi?id=232051
rdar://84338648

Reviewed by Michael Saboff.

ArithAbs (without overflow check) can return negative value if the input is INT32_MIN with Int32Use.

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
4:51 PM Changeset in webkit [284584] by Russell Epstein
  • 1 edit in branches/safari-613.1.6-branch/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h

Unreviewed buld fix.

RemoteRenderingBackendProxy.cpp:81:34: error: use of undeclared identifier 'makeWeakPtr'

4:08 PM Changeset in webkit [284583] by Russell Epstein
  • 1 copy in tags/Safari-613.1.6

Tag Safari-613.1.6.

4:07 PM Changeset in webkit [284582] by pvollan@apple.com
  • 5 edits in trunk/Source/WebKit

Launch Services database is not always sent to GPUP
https://bugs.webkit.org/show_bug.cgi?id=232047
<rdar://problem/84480229>

Reviewed by Brent Fulgham.

Currently, the XPC endpoint for receiving the Launch Services database is being sent to GPUP in GPUProcessProxy::addSession.
If GPUP has not finished launching at that point, the endpoint will not be sent on the first page load. This is addressed by
sending the XPC endpoint in GPUProcessProxy::didFinishLaunching, since the XPC connection over which the XPC endpoint is
being sent is available then.

  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::didFinishLaunching):
(WebKit::GPUProcessProxy::addSession):

  • UIProcess/GPU/GPUProcessProxy.h:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::sendNetworkProcessXPCEndpointToProcess const):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
4:05 PM Changeset in webkit [284581] by Adrian Perez de Castro
  • 2 edits
    1 add in releases/WebKitGTK/webkit-2.32/Source/WebKit

Merge r284451 - Update seccomp filters with latest changes from flatpak
https://bugs.webkit.org/show_bug.cgi?id=231479

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-10-19
Reviewed by Adrian Perez de Castro.

Additionally, let's fix a minor inconsistency in our error-handling code: all but one of
our codepaths carefully free and close resources, but the process is about to crash so
there's not really any reason to do so. The code is slightly simpler if we don't bother.

The seemingly-extraneous include order changes are required to placate the style checker.

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::seccompStrerror):
(WebKit::setupSeccomp):

  • UIProcess/Launcher/glib/Syscalls.h: Added.
4:05 PM Changeset in webkit [284580] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source

Merge r281384 - IndexedDB: crash when triggering IDBOpenRequest completion back on a worker thread
https://bugs.webkit.org/show_bug.cgi?id=229375

Source/WebCore:

Reviewed by Brady Eidson.

Client may dispatch custom events to an IDBRequest, and we should only change request state based on events
created internally.

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::dispatchEvent):

Source/WTF:

Protect callee in CrossThreadTask if it inherits from ThreadSafeRefCounted<T>.

Reviewed by Brady Eidson.

  • wtf/CrossThreadTask.h:
4:04 PM Changeset in webkit [284579] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r279832 - Unreviewed, partial revert of r279661 to address crashes on iOS Debug.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::removeAllEventListeners):

3:34 PM Changeset in webkit [284578] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ macOS ] imported/w3c/web-platform-tests/xhr/event-upload-progress-crossorigin.any.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=223804

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:15 PM Changeset in webkit [284577] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[TestExpectation] Re-group css-text WPT failures
https://bugs.webkit.org/show_bug.cgi?id=232027

Reviewed by Antti Koivisto.

3:08 PM Changeset in webkit [284576] by Justin Michaud
  • 6 edits in trunk/Source/JavaScriptCore

We should watch isHavingABadTime if we read from the structureCache
https://bugs.webkit.org/show_bug.cgi?id=232019

Reviewed by Yusuke Suzuki.

We should lock the structure cache when we clear it, and the compiler thread should
watch isHavingABadTime in the case that the cache might get cleared.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::haveABadTime):

  • runtime/StructureCache.cpp:

(JSC::StructureCache::clear):

  • runtime/StructureCache.h:

(JSC::StructureCache::clear): Deleted.

2:50 PM Changeset in webkit [284575] by commit-queue@webkit.org
  • 25 edits
    2 adds in trunk

macOS key-driven smooth scrolling does not stop when focus changes
https://bugs.webkit.org/show_bug.cgi?id=228302

Patch by Beth Dakin <Beth Dakin> and Dana Estra <destra@apple.com> on 2021-10-20
Reviewed by Simon Fraser.

Source/WebCore:

Call stopKeyboardScrollAnimation() on the old FrameView after changing Frame focus.

  • page/FocusController.cpp:

(WebCore::FocusController::setFocusedFrame):

Call stopKeyboardScrollAnimation() when the window visibility / active state changes.

  • page/Page.cpp:

(WebCore::Page::setActivityState):
(WebCore::Page::stopKeyboardScrollAnimation):

  • page/Page.h:

Plumbing to get to ScrollingEffectsController, which can invoke keyUp.

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::stopKeyboardScrollAnimation):

  • platform/ScrollAnimator.h:
  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::stopKeyboardScrollAnimation):

  • platform/ScrollableArea.h:

Tools:

This patch adds support for rawKeyUp and rawKeyDown to the macOS versions of WKTR and DRT.

  • DumpRenderTree/mac/EventSendingController.mm:

(+[EventSendingController initialize]):
(+[EventSendingController isSelectorExcludedFromWebScript:]):
(+[EventSendingController webScriptNameForSelector:]):
(-[EventSendingController rawKeyDown:withModifiers:withLocation:]):
(-[EventSendingController rawKeyDownWrapper:withModifiers:withLocation:]):
(-[EventSendingController rawKeyUp:withModifiers:withLocation:]):
(-[EventSendingController rawKeyUpWrapper:withModifiers:withLocation:]):

  • WebKitTestRunner/EventSenderProxy.h:
  • WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
  • WebKitTestRunner/InjectedBundle/EventSendingController.cpp:

(WTR::createRawKeyDownMessageBody):
(WTR::createRawKeyUpMessageBody):
(WTR::EventSendingController::rawKeyDown):
(WTR::EventSendingController::rawKeyUp):

  • WebKitTestRunner/InjectedBundle/EventSendingController.h:
  • WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm:

(WTR::EventSenderProxy::rawKeyDown):
(WTR::EventSenderProxy::rawKeyUp):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::didReceiveRawKeyDownMessageFromInjectedBundle):
(WTR::TestController::didReceiveRawKeyUpMessageFromInjectedBundle):
(WTR::TestController::didReceiveMessageFromInjectedBundle):
(WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:

(WTR::EventSenderProxy::rawKeyDown):
(WTR::EventSenderProxy::rawKeyUp):

  • WebKitTestRunner/mac/EventSenderProxy.mm:

(WTR::EventSenderProxy::rawKeyDown):
(WTR::EventSenderProxy::rawKeyUp):

  • WebKitTestRunner/win/EventSenderProxyWin.cpp:

(WTR::EventSenderProxy::rawKeyDown):
(WTR::EventSenderProxy::rawKeyUp):

  • WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:

(WTR::EventSenderProxy::rawKeyDown):
(WTR::EventSenderProxy::rawKeyUp):

LayoutTests:

EventHandlerDrivenSmoothKeyboardScrollingEnabled keys are WK2 only right now, so skip the new
test in general.

New test that verifies this bug is resolved.

  • fast/scrolling/unfocusing-page-while-keyboard-scrolling-expected.txt: Added.
  • fast/scrolling/unfocusing-page-while-keyboard-scrolling.html: Added.

Do run the test for mac-wk2. rawKeyDown / rawKeyUp are currently not implemented
elsewhere.

  • platform/mac-wk2/TestExpectations:

New support for rawKeyDown in order to simulate holding the key down.

  • resources/ui-helper.js:

(window.UIHelper.rawKeyDown):
(window.UIHelper.rawKeyUp):

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

Fix crash when calling setUsernameForLocalCredentialWithID
https://bugs.webkit.org/show_bug.cgi?id=231986
<rdar://problem/84425279>

Patch by John Pascoe <J Pascoe> on 2021-10-20
Reviewed by David Kilzer.

Using a copy here results in a crash when the NSData deallocs because the
[NSData dataWithBytesNoCopy] was used a buffer that was not allocated with malloc.
This is fixed by instead using [NSData initWithBytes] and RetainPtr.

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(+[_WKWebAuthenticationPanel setUsernameForLocalCredentialWithID:username:]):

2:45 PM Changeset in webkit [284573] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Add missing overflow checks to DFGIntegerRangeOptimizationPhase::isEquivalentTo()
https://bugs.webkit.org/show_bug.cgi?id=232024

Reviewed by Tadeu Zagallo.

Added overflow check before comparing for equality.

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
2:42 PM Changeset in webkit [284572] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ iOS15 EWS ] http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window.html is crashing.
https://bugs.webkit.org/show_bug.cgi?id=232048.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
2:39 PM Changeset in webkit [284571] by Russell Epstein
  • 3 edits in branches/safari-613.1.6-branch/Source/WebKit

Cherry-pick r284570. rdar://problem/84479714

Remove com.apple.webkit.adattributiond.plist from build temporarily
https://bugs.webkit.org/show_bug.cgi?id=232045

Reviewed by Tim Horton.

There are some problems with the internal verifiers that will take some time to resolve.
Until they are resolved, don't install the plist and don't tell the network process to connect to the daemon registered by the plist.

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: (WebKit::WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration):
  • WebKit.xcodeproj/project.pbxproj:

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

2:35 PM Changeset in webkit [284570] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

Remove com.apple.webkit.adattributiond.plist from build temporarily
https://bugs.webkit.org/show_bug.cgi?id=232045

Reviewed by Tim Horton.

There are some problems with the internal verifiers that will take some time to resolve.
Until they are resolved, don't install the plist and don't tell the network process to connect to the daemon registered by the plist.

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:

(WebKit::WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration):

  • WebKit.xcodeproj/project.pbxproj:
2:32 PM Changeset in webkit [284569] by Russell Epstein
  • 16 edits in branches/safari-613.1.6-branch/Source/WebKit

Revert r284079. rdar://problem/84478842

2:26 PM Changeset in webkit [284568] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ BigSure wk1 Debug ] fast/selectors/pseudo-element-inside-any.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=232046.

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
2:13 PM Changeset in webkit [284567] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ macOS wk1 ] imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=232042

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
2:07 PM Changeset in webkit [284566] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

The code decoding std::optional<ImagePaintingOptions> can't be compiled by PlayStation due to the ImagePaintingOptions template constructor
https://bugs.webkit.org/show_bug.cgi?id=231980

Reviewed by Ross Kirsling.

PlayStation clang can't compile the following code.

std::optional<ImagePaintingOptions> val;
decoder >> val;

It reports the following error.

include\type_traits:3825:31: error: no member named 'value' in 'std::is_convertible<optional<WebCore::ImagePaintingOptions> &, WebCore::ImagePaintingOptions>'

  • platform/graphics/ImagePaintingOptions.h:

(WebCore::ImagePaintingOptions::ImagePaintingOptions): Use SFINAE
for the first template constructor not to conflict with the second
one.

1:57 PM Changeset in webkit [284565] by Ayumi Kojima
  • 3 edits in trunk/LayoutTests

[ iOS macOS wk2 ]webanimations/marker-opacity-animation-no-effect.html is a flaky image failure.
https://bugs.webkit.org/show_bug.cgi?id=232040

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
1:32 PM Changeset in webkit [284564] by beidson@apple.com
  • 11 edits
    5 adds in trunk/Source/WebKit

Factor out some Notifications-specific messages from WebPageProxy messages
https://bugs.webkit.org/show_bug.cgi?id=232021

Reviewed by Alex Christensen.

In a future patch, there will be a runtime switch where WebContent sometimes sends these Notification
related messages to an objecting in Networking, and othertimes sends them to a WebPageProxy in the UIProcess.

To accomodate this switch, let's split them out into their own Notifications specific object and messages.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • Shared/Notifications/NotificationManagerMessageHandler.h: Added.
  • Shared/Notifications/NotificationManagerMessageHandler.messages.in: Added.
  • UIProcess/Notifications/WebNotificationManagerMessageHandler.cpp: Added.

(WebKit::WebNotificationManagerMessageHandler::WebNotificationManagerMessageHandler):
(WebKit::WebNotificationManagerMessageHandler::showNotification):
(WebKit::WebNotificationManagerMessageHandler::cancelNotification):
(WebKit::WebNotificationManagerMessageHandler::clearNotifications):
(WebKit::WebNotificationManagerMessageHandler::didDestroyNotification):

  • UIProcess/Notifications/WebNotificationManagerMessageHandler.h: Added.
  • UIProcess/WebPageProxy.cpp:

(WebKit::m_notificationManagerMessageHandler):
(WebKit::WebPageProxy::addAllMessageReceivers):
(WebKit::WebPageProxy::removeAllMessageReceivers):
(WebKit::WebPageProxy::launchProcess):
(WebKit::WebPageProxy::swapToProvisionalPage):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::commitProvisionalPage):
(WebKit::m_limitsNavigationsToAppBoundDomains): Deleted.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/Notifications/WebNotificationManager.cpp:

(WebKit::WebNotificationManager::show):
(WebKit::WebNotificationManager::cancel):
(WebKit::WebNotificationManager::clearNotifications):
(WebKit::WebNotificationManager::didDestroyNotification):

12:55 PM Changeset in webkit [284563] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ iOS15 gpuprocess ] 2 css/color-filter tests are image-only failing.
https://bugs.webkit.org/show_bug.cgi?id=232030.

Unreviewed test gardening.

  • gpu-process/TestExpectations:
12:40 PM Changeset in webkit [284562] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ iOS15 GPUProcess ] Multiple compositing tests are constant image-only failures.
https://bugs.webkit.org/show_bug.cgi?id=232022.

Unreviewed test gardening.

  • gpu-process/TestExpectations:
12:24 PM Changeset in webkit [284561] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ iOS15 gpuprocess ] 2 css/color-filter tests are image-only failing.
https://bugs.webkit.org/show_bug.cgi?id=232030.

Unreviewed test gardening.

  • gpu-process/TestExpectations:
12:01 PM Changeset in webkit [284560] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

Update test expectations for compositing/scrolling/async-overflow-scrolling/overflow-scroll-paint-order-sibling.html.
https://bugs.webkit.org/show_bug.cgi?id=232022.

Unreviewed test gardening.

  • gpu-process/TestExpectations:
11:59 AM Changeset in webkit [284559] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WebKitLegacy/ios

WebPDFViewPlaceholder should use a weak delegate
<https://webkit.org/b/231927>

Reviewed by Tim Horton.

  • WebView/WebPDFViewPlaceholder.h:

(WebPDFViewPlaceholder.delegate):

  • Mark property as weak instead of assign.
  • WebView/WebPDFViewPlaceholder.mm:

(WebPDFViewPlaceholder._dataSource):
(WebPDFViewPlaceholder._delegate):

  • Mark instance variables as as _weak to match delegate property and based on comment for _dataSource.
11:56 AM Changeset in webkit [284558] by ddkilzer@apple.com
  • 5 edits in trunk/Source/WebKit

WebKit Objective-C classes should use weak delegates
<https://webkit.org/b/231956>
<rdar://problem/84416233>

Reviewed by Brent Fulgham.

  • UIProcess/API/Cocoa/WKConnection.h:
  • UIProcess/API/Cocoa/WKProcessGroup.h:
  • UIProcess/API/mac/WKScrollViewMac.h:
  • Change delegate property from assign to weak to document that WeakObjCPtr<> is used to store the value.
  • UIProcess/ios/forms/WKFileUploadPanel.h:
  • Change delegate property from assign to weak to make the instance variable weak.
11:51 AM Changeset in webkit [284557] by achristensen@apple.com
  • 6 edits in trunk/Tools

REGRESSION (r284418): [iOS] TestWebKitAPI.HSTS.Basic, TestWebKitAPI.HSTS.CrossOriginRedirect, TestWebKitAPI.HSTS.ThirdParty, and TestWebKitAPI.WebKit.RedirectToPlaintextHTTPSUpgrade timing out
https://bugs.webkit.org/show_bug.cgi?id=232003

Reviewed by Chris Dumez.

I observed that sometimes the framer's nw_framer_input_handler_t is called after calling nw_framer_pass_through_input.
To fix this, I instead call nw_framer_deliver_input_no_copy myself to pass through the data inside my nw_framer_input_handler_t.

  • TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:

(TEST):

  • TestWebKitAPI/cocoa/HTTPServer.mm:

(TestWebKitAPI::proxyDefinition):

11:50 AM Changeset in webkit [284556] by commit-queue@webkit.org
  • 2 edits
    1 add in trunk/Tools

Benchmarks harness could fail if pyobjc-core module is upgraded without upgrading other pyobjc-frameworks
https://bugs.webkit.org/show_bug.cgi?id=231983

Patch by Roy Reapor <rreapor@apple.com> on 2021-10-20
Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:

(OSXBrowserDriver.prepare_env): Use autoinstalled Quartz module
(OSXBrowserDriver._terminate_processes): Use autoinstalled AppKit module

11:42 AM Changeset in webkit [284555] by Ayumi Kojima
  • 3 edits in trunk/LayoutTests

[ iOS macOS wk2 ] imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=232028

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
11:35 AM Changeset in webkit [284554] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ iOS15 GPUProcess ] compositing/shared-backing/sharing-child-contributes-to-overlap.html is a constant image-only failure.
https://bugs.webkit.org/show_bug.cgi?id=232022.

Unreviewed test gardening.

  • gpu-process/TestExpectations:
11:31 AM Changeset in webkit [284553] by Eric Hutchison
  • 1 edit
    1 delete in trunk/LayoutTests

Unreviewed, reverting r284551.

TestExpectations file not recognized

Reverted changeset:

https://commits.webkit.org/r284551

11:19 AM Changeset in webkit [284552] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS Release ] media/media-can-play-mpeg-audio.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=232025

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:19 AM Changeset in webkit [284551] by Eric Hutchison
  • 2 adds in trunk/LayoutTests/gpu-process/iOS

Created TestExpectations document for gpuprocess/iOS and updated.
https://bugs.webkit.org/show_bug.cgi?id=232022.

Unreviewed test gardening.

  • gpu-process/iOS/TestExpectations: Added.
10:52 AM Changeset in webkit [284550] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebCore

Remove useless definition from IDBDatabase.idl
https://bugs.webkit.org/show_bug.cgi?id=231997

Reviewed by Chris Dumez.

DOMStringList is also iterable in WebKit now, so we don't need to keep this definition for compatibility (see
https://github.com/w3c/IndexedDB/issues/85#issuecomment-272587319).

Covered by existing test storage/indexeddb/transaction-basics.html, which verifies that DOMStringList can be
argument for IDBDatabase.transaction().

  • Modules/indexeddb/IDBDatabase.idl:
10:51 AM Changeset in webkit [284549] by sihui_liu@apple.com
  • 3 edits in trunk/Source/WebCore

Share code between JSDOMIterator and JSDOMAsyncIterator
https://bugs.webkit.org/show_bug.cgi?id=231437
<rdar://problem/84306323>

Reviewed by Youenn Fablet.

  • bindings/js/JSDOMAsyncIterator.h:

(WebCore::jsPair): Deleted.
(WebCore::iteratorCreate): Deleted.

  • bindings/js/JSFileSystemDirectoryHandleIterator.h:
10:35 AM Changeset in webkit [284548] by commit-queue@webkit.org
  • 4 edits in trunk

Fix percentages on orthogonal replaced children
https://bugs.webkit.org/show_bug.cgi?id=46496

Patch by Rob Buis <rbuis@igalia.com> on 2021-10-20
Reviewed by Darin Adler.

Source/WebCore:

Modify computeReplacedLogicalWidthUsing to make it aware of the orthogonal flow case
when dealing with calc/percentages.

This patch also removes an outdated comment from computeReplacedLogicalHeightUsing.

Test: imported/w3c/web-platform-tests/wpt/css/css-writing-modes/sizing-percentages-replaced-orthogonal-001.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeReplacedLogicalWidthUsing const):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing const):

LayoutTests:

10:30 AM Changeset in webkit [284547] by Said Abou-Hallawa
  • 4 edits in trunk/Source/WebKit

[iOS] Ensure the CA transaction has been synchronously committed before snapshotting it
https://bugs.webkit.org/show_bug.cgi?id=230085
<rdar://81800118>

Reviewed by Tim Horton.

Because committing the CA transaction may be an asynchronous operation,
we need to ensure the CALayer is fully updated before snapshotting it.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:

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

10:30 AM Changeset in webkit [284546] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] imported/w3c/web-platform-tests/html/canvas/element/manual tests, fast/canvas/canvas-createPattern-video-modify.html and media/video-canvas-createPattern.html are failing.
https://bugs.webkit.org/show_bug.cgi?id=231959

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
10:26 AM Changeset in webkit [284545] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS Debug ] http/tests/xmlhttprequest tests are flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=232017

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
10:22 AM Changeset in webkit [284544] by Ross Kirsling
  • 18 edits in trunk/Source

Mac CMake build should not need to include iOS headers
https://bugs.webkit.org/show_bug.cgi?id=231998

Reviewed by Alex Christensen.

Source/WebCore:

  • PlatformMac.cmake:
  • platform/ios/WebItemProviderPasteboard.h:

Source/WebCore/PAL:

  • pal/PlatformMac.cmake:

Source/WebKit:

  • GPUProcess/cocoa/GPUConnectionToWebProcessCocoa.mm:
  • PlatformMac.cmake:
  • Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::encode const):
(WebKit::RemoteLayerTreeTransaction::decode):

  • UIProcess/API/Cocoa/WKWebView.mm:
  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm:
  • UIProcess/Cocoa/UIDelegate.mm:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:
  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.h:
10:18 AM Changeset in webkit [284543] by commit-queue@webkit.org
  • 2 edits in trunk

Add ObjC as supported .clang-format language
https://bugs.webkit.org/show_bug.cgi?id=230401

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-10-20
Reviewed by Jonathan Bedard.

Add ObjC and change few properties useful
for ObjC formatting.

  • .clang-format:
10:14 AM Changeset in webkit [284542] by Antti Koivisto
  • 6 edits in trunk

fast/images/text-recognition/mac/select-rotated-transparent-image-overlay.html is failing
https://bugs.webkit.org/show_bug.cgi?id=232008
rdar://84276269

Reviewed by Alan Bujtas.

Source/WebCore:

Other browsers and WPT tests imported/w3c/web-platform-tests/css/css-pseudo/highlight-painting-003.html
and imported/w3c/web-platform-tests/css/css-pseudo/highlight-painting-004.html agree with our new painting
behavior. Change the test instead of changing the behavior back.

Also fix the legacy line layout to have the same painting behavior.

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::Line::blockDirectionPointInLine const):

Fix to use selectionTopForHitTesting as the point needs to be within the hittable line.

  • rendering/LegacyRootInlineBox.cpp:

(WebCore::LegacyRootInlineBox::selectionTop const):

For consistency also make the legacy selection painting behavior match.

LayoutTests:

  • fast/block/line-layout/selection-highlight-overlap.html:

Adopt to the updated legacy behavior.

  • fast/images/text-recognition/mac/select-rotated-transparent-image-overlay.html:

Change the test so it isn't affected by the behavior change.

10:11 AM Changeset in webkit [284541] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

Regression (r282211): [ macOS wk2 ] css3/filters/blur-various-radii.html is a flaky image failure.
https://bugs.webkit.org/show_bug.cgi?id=231090

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
9:37 AM Changeset in webkit [284540] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix iOS build after r284539
https://bugs.webkit.org/show_bug.cgi?id=232003

  • TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm:
9:34 AM Changeset in webkit [284539] by achristensen@apple.com
  • 3 edits in trunk/Tools

Skip timing out tests on iOS while I investigate.
https://bugs.webkit.org/show_bug.cgi?id=232003

These tests are clearly timing out on iOS, but it'll take more than an hour or so to investigate.
Keep the bots green while I look into a better solution.

  • TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm:
9:04 AM Changeset in webkit [284538] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] fast/scrolling/ios/click-events-after-long-press-during-momentum-scroll-in tests are a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=230959

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
8:51 AM Changeset in webkit [284537] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 ] fast/scrolling/ios/scroll-snap-with-relayouts tests are flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=232014

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
8:25 AM Changeset in webkit [284536] by Antti Koivisto
  • 7 edits in trunk/Source

Don't re-evaluate viewport dependent media queries if the viewport doesn't change
https://bugs.webkit.org/show_bug.cgi?id=231949
rdar://77240171

Reviewed by Alan Bujtas.

Source/WebCore:

If there are many viewport dependent rules (some pages have thousands) re-evaluating can take a while.
It is currently done unconditionally before layout.

  • css/MediaQueryEvaluator.cpp:

(WebCore::mediaQueryViewportStateForDocument):

  • css/MediaQueryEvaluator.h:
  • style/StyleScope.cpp:

(WebCore::Style::Scope::evaluateMediaQueriesForViewportChange):

Save the viewport state so we can test if anything that affects media query results has changed since the last time.

  • style/StyleScope.h:

Source/WebKit:

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::handlePreferenceChange):

Remember to signal accessibility settings change on this code path too.

8:24 AM Changeset in webkit [284535] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WebCore

AudioArray should ensure 32byte alignment
https://bugs.webkit.org/show_bug.cgi?id=232011

Reviewed by Eric Carlson.

When enabling libpas on x86[1], we observed occasional test failure in webaudio/AudioNode/tail-processing.html test.
We found that while the input & kernel has the exact same values, vDSP_conv in WebAudio DirectConvolver.cpp generates
slightly different outputs (like a error)! This is because vDSP_conv is switching underlying implementation based on
input & kernel alignments: AVX2 implementation requires 32byte alignment while SSE implementation requires 16byte alignment.
And unfortunately, these implementation has very slightly different results.

Previously we are setting 16byte alignment in bmalloc in AudioArray. But luckily, in many cases, it was getting 32byte
alignment. So we are always taking AVX2 implementation and the result can be identical if the input is the same.
However, by switching to libpas, AudioArray can get 16byte aligned (but 32byte aligned) memory actually, and in that
case, we use different implementation in vDSP_conv. So the result now depends on what alignment the allocated AudioArray gets.
The test is running the same kernel to the same input independently, and comparing the outputs. It should be identical,
however, if one gets 16byte aligned array while the other gets 32byte aligned array, then the result will be different,
which is the observed failure.

We use 32byte alignment, which is our vectorized math's maximum alignment requirement to ensure the result is deterministic
and not depending on the allocated array's alignment.

[1]: https://bugs.webkit.org/show_bug.cgi?id=231815

  • platform/audio/AudioArray.h:

(WebCore::AudioArray::resize):

8:20 AM Changeset in webkit [284534] by Simon Fraser
  • 54 edits in trunk/Source/WebCore

Make ScrollingStateTreeAsTextBehavior an enum class for use with OptionSet<>
https://bugs.webkit.org/show_bug.cgi?id=232002

Reviewed by Alan Bujtas.

Make ScrollingStateTreeAsTextBehavior an enum class, and replace ScrollingStateTreeAsTextBehavior
with OptionSet<ScrollingStateTreeAsTextBehavior>.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText const):
(WebCore::AsyncScrollingCoordinator::scrollingTreeAsText const):

  • page/scrolling/AsyncScrollingCoordinator.h:

(WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText):
(WebCore::AsyncScrollingCoordinator::scrollingTreeAsText):

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::scrollingStateTreeAsText const):
(WebCore::ScrollingCoordinator::scrollingTreeAsText const):

  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::scrollingStateTreeAsText):
(WebCore::ScrollingCoordinator::scrollingTreeAsText):

  • page/scrolling/ScrollingCoordinatorTypes.h:
  • page/scrolling/ScrollingStateFixedNode.cpp:

(WebCore::ScrollingStateFixedNode::dumpProperties const):

  • page/scrolling/ScrollingStateFixedNode.h:
  • page/scrolling/ScrollingStateFrameHostingNode.cpp:

(WebCore::ScrollingStateFrameHostingNode::dumpProperties const):

  • page/scrolling/ScrollingStateFrameHostingNode.h:
  • page/scrolling/ScrollingStateFrameScrollingNode.cpp:

(WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):

  • page/scrolling/ScrollingStateFrameScrollingNode.h:
  • page/scrolling/ScrollingStateNode.cpp:

(WebCore::ScrollingStateNode::dumpProperties const):
(WebCore::ScrollingStateNode::dump const):
(WebCore::ScrollingStateNode::scrollingStateTreeAsText const):

  • page/scrolling/ScrollingStateNode.h:

(WebCore::ScrollingStateNode::scrollingStateTreeAsText):

  • page/scrolling/ScrollingStateOverflowScrollProxyNode.cpp:

(WebCore::ScrollingStateOverflowScrollProxyNode::dumpProperties const):

  • page/scrolling/ScrollingStateOverflowScrollProxyNode.h:
  • page/scrolling/ScrollingStateOverflowScrollingNode.cpp:

(WebCore::ScrollingStateOverflowScrollingNode::dumpProperties const):

  • page/scrolling/ScrollingStateOverflowScrollingNode.h:
  • page/scrolling/ScrollingStatePositionedNode.cpp:

(WebCore::ScrollingStatePositionedNode::dumpProperties const):

  • page/scrolling/ScrollingStatePositionedNode.h:
  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::dumpProperties const):

  • page/scrolling/ScrollingStateScrollingNode.h:
  • page/scrolling/ScrollingStateStickyNode.cpp:

(WebCore::ScrollingStateStickyNode::dumpProperties const):

  • page/scrolling/ScrollingStateStickyNode.h:
  • page/scrolling/ScrollingStateTree.cpp:

(showScrollingStateTree):

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::commitTreeState):
(WebCore::ScrollingTree::scrollingTreeAsText):

  • page/scrolling/ScrollingTree.h:

(WebCore::ScrollingTree::scrollingTreeAsText):

  • page/scrolling/ScrollingTreeFrameHostingNode.cpp:

(WebCore::ScrollingTreeFrameHostingNode::dumpProperties const):

  • page/scrolling/ScrollingTreeFrameHostingNode.h:
  • page/scrolling/ScrollingTreeFrameScrollingNode.cpp:

(WebCore::ScrollingTreeFrameScrollingNode::dumpProperties const):

  • page/scrolling/ScrollingTreeFrameScrollingNode.h:
  • page/scrolling/ScrollingTreeNode.cpp:

(WebCore::ScrollingTreeNode::dumpProperties const):
(WebCore::ScrollingTreeNode::dump const):

  • page/scrolling/ScrollingTreeNode.h:
  • page/scrolling/ScrollingTreeOverflowScrollingNode.cpp:

(WebCore::ScrollingTreeOverflowScrollingNode::dumpProperties const):

  • page/scrolling/ScrollingTreeOverflowScrollingNode.h:
  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::dumpProperties const):

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/cocoa/ScrollingTreeFixedNode.h:
  • page/scrolling/cocoa/ScrollingTreeFixedNode.mm:

(WebCore::ScrollingTreeFixedNode::dumpProperties const):

  • page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.h:
  • page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm:

(WebCore::ScrollingTreeOverflowScrollProxyNode::dumpProperties const):

  • page/scrolling/cocoa/ScrollingTreePositionedNode.h:
  • page/scrolling/cocoa/ScrollingTreePositionedNode.mm:

(WebCore::ScrollingTreePositionedNode::dumpProperties const):

  • page/scrolling/cocoa/ScrollingTreeStickyNode.h:
  • page/scrolling/cocoa/ScrollingTreeStickyNode.mm:

(WebCore::ScrollingTreeStickyNode::dumpProperties const):

  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded):

  • page/scrolling/nicosia/ScrollingTreeFixedNode.cpp:

(WebCore::ScrollingTreeFixedNode::dumpProperties const):

  • page/scrolling/nicosia/ScrollingTreeFixedNode.h:
  • page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.cpp:

(WebCore::ScrollingTreeOverflowScrollProxyNode::dumpProperties const):

  • page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.h:
  • page/scrolling/nicosia/ScrollingTreePositionedNode.cpp:

(WebCore::ScrollingTreePositionedNode::dumpProperties const):

  • page/scrolling/nicosia/ScrollingTreePositionedNode.h:
  • page/scrolling/nicosia/ScrollingTreeStickyNode.cpp:

(WebCore::ScrollingTreeStickyNode::dumpProperties const):

  • page/scrolling/nicosia/ScrollingTreeStickyNode.h:
8:04 AM Changeset in webkit [284533] by commit-queue@webkit.org
  • 24 edits
    1 copy
    2 adds in trunk

Do not use strerror()
https://bugs.webkit.org/show_bug.cgi?id=231913

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-10-20
Reviewed by Chris Dumez.

Source/bmalloc:

  • libpas/src/libpas/pas_page_malloc.c:

(pas_page_malloc_commit):

Source/JavaScriptCore:

  • API/JSScript.mm:

(-[JSScript writeCache:]):

  • API/tests/testapi.mm:

(resolvePathToScripts):

  • jsc.cpp:
  • runtime/BytecodeCacheError.cpp:

(JSC::BytecodeCacheError::StandardError::message const):

  • tools/FunctionAllowlist.cpp:

(JSC::FunctionAllowlist::FunctionAllowlist):

  • tools/FunctionOverrides.cpp:

(JSC::FunctionOverrides::parseOverridesInFile):

  • wasm/WasmMemory.cpp:

(JSC::Wasm::MemoryHandle::~MemoryHandle):
(JSC::Wasm::Memory::tryCreate):
(JSC::Wasm::Memory::growShared):
(JSC::Wasm::Memory::grow):

Source/WebKit:

  • Platform/IPC/unix/ConnectionUnix.cpp:

(IPC::Connection::readyReadHandler):
(IPC::Connection::sendOutputMessage):

  • Platform/unix/SharedMemoryUnix.cpp:

(WebKit::SharedMemory::allocate):

  • Shared/mac/AuxiliaryProcessMac.mm:

(WebKit::setAndSerializeSandboxParameters):
(WebKit::sandboxDataVaultParentDirectory):
(WebKit::ensureSandboxCacheDirectory):
(WebKit::tryApplyCachedSandbox):
(WebKit::applySandbox):

Source/WTF:

Add a new safeStrerror function that we can use without worrying about thread safety.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/SafeStrerror.cpp: Added.

(WTF::safeStrerror):

  • wtf/SafeStrerror.h: Added.
  • wtf/linux/RealTimeThreads.cpp:

(WTF::RealTimeThreads::promoteThreadToRealTime):

  • wtf/playstation/FileSystemPlayStation.cpp:

(WTF::FileSystemImpl::deleteFile):

  • wtf/posix/FileSystemPOSIX.cpp:

(WTF::FileSystemImpl::deleteFile):

  • wtf/posix/ThreadingPOSIX.cpp:

(WTF::Thread::establishHandle):

  • wtf/threads/Signals.cpp:

(WTF::jscSignalHandler):

Tools:

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/Tests/WTF/SafeStrerror.cpp: Added.

(TestWebKitAPI::TEST):

8:01 AM Changeset in webkit [284532] by commit-queue@webkit.org
  • 7 edits in trunk

Source/WebKit:
[WebAuthn] Obtain consent to create new credential when platform authenticator in excludedCredentials
https://bugs.webkit.org/show_bug.cgi?id=219813
<rdar://problem/72484635>

Patch by John Pascoe <J Pascoe> on 2021-10-20
Reviewed by Brent Fulgham.

Currently, whenever the platform authenticator is within excludedCredentials during makeCredential we
always return NotAllowedError and merely flash a consent screen. This does not match the spec per Step 3.1
of makeCredential (https://w3c.github.io/webauthn/#sctn-op-make-cred). Instead, we should always obtain consent
and return a different error depending on consent was obtained.

A fixme to add this was inadvertently removed in https://bugs.webkit.org/attachment.cgi?id=393180&action=prettypatch

Added api test TestWebKitAPI.WebAuthenticationPanel.LADuplicateCredentialWithConsent

  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:

(WebKit::LocalAuthenticator::makeCredential):

Tools:
[WebAuthn] Obtain consent to create new credential when platform authenticator in excludedCredentials
https://bugs.webkit.org/show_bug.cgi?id=219813
<rdar://problem/72484635>

Patch by John Pascoe <J Pascoe> on 2021-10-20
Reviewed by Brent Fulgham.

Currently, whenever the platform authenticator is within excludedCredentials during makeCredential we
always return NotAllowedError and merely flash a consent screen. This does not match the spec per Step 3.1
of makeCredential (https://w3c.github.io/webauthn/#sctn-op-make-cred). Instead, we should always obtain consent
and return a different error depending on consent was obtained.

This adds a test to confirm a different path is taken whenever consent is obtained.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

LayoutTests:
WebAuthn] Obtain consent to create new credential when platform authenticator in excludedCredentials
https://bugs.webkit.org/show_bug.cgi?id=219813
<rdar://problem/72484635>

Patch by John Pascoe <J Pascoe> on 2021-10-20
Reviewed by Brent Fulgham.

Modify layout tests to reflect different exception returned when consent is provided

  • http/wpt/webauthn/public-key-credential-create-failure-local-silent.https.html:
  • http/wpt/webauthn/public-key-credential-create-failure-local.https.html:
7:49 AM Changeset in webkit [284531] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Suppress a -Wreturn-type warning
https://bugs.webkit.org/show_bug.cgi?id=229681
<rdar://81603387>

Unreviewed.

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-10-20

  • wasm/WasmFormat.h:

(JSC::Wasm::typeToString):

6:52 AM Changeset in webkit [284530] by Alan Bujtas
  • 4 edits in trunk

[LFC][IFC] Sometimes "arbitrary mid work break" does not mean "any position"
https://bugs.webkit.org/show_bug.cgi?id=232001

Reviewed by Antti Koivisto.

Source/WebCore:

Add a partial (and oversimplified) (XB/XA) type of line breaking for word-break: break-all.
This is governed by https://unicode.org/reports/tr14/.
We should really implement something similar to Blink's kBreakAllLineBreakClassTable (which is based on WebKit's lineBreakTable).

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::midWordBreak):
(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const):

LayoutTests:

6:34 AM Changeset in webkit [284529] by Carlos Garcia Campos
  • 8 edits in trunk/Source/WebCore

AX: Build with isolated tree enable is broken since r284075
https://bugs.webkit.org/show_bug.cgi?id=231667
<rdar://problem/84191590>

Reviewed by Andres Gonzalez.

The problem seems to be that AXPropertyValueVariant contains the same type twice (in 64 bit systems) AXID
(size_t -> long unsigned int) and uint64_t -> long unsigned int. That's actually allowed but makes the access
ambiguous. Since uint64_t is only used for SessionID, we can explicitly use SessionID instead.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::sessionID const):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::sessionID const):
(WebCore::AXIsolatedObject::sessionIDAttributeValue const):

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/isolatedtree/AXIsolatedTree.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

6:26 AM Changeset in webkit [284528] by youenn@apple.com
  • 34 edits
    30 adds in trunk

Add support for requestVideoFrameCallback API and MediaStreamTrack-based backend support
https://bugs.webkit.org/show_bug.cgi?id=231803

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • resources/import-expectations.json:
  • web-platform-tests/video-rvfc/META.yml: Added.
  • web-platform-tests/video-rvfc/README.md: Added.
  • web-platform-tests/video-rvfc/idlharness.window-expected.txt: Added.
  • web-platform-tests/video-rvfc/idlharness.window.html: Added.
  • web-platform-tests/video-rvfc/idlharness.window.js: Added.
  • web-platform-tests/video-rvfc/request-video-frame-callback-before-xr-session.https-expected.txt: Added.
  • web-platform-tests/video-rvfc/request-video-frame-callback-before-xr-session.https.html: Added.
  • web-platform-tests/video-rvfc/request-video-frame-callback-dom-expected.txt: Added.
  • web-platform-tests/video-rvfc/request-video-frame-callback-dom.html: Added.
  • web-platform-tests/video-rvfc/request-video-frame-callback-during-xr-session.https-expected.txt: Added.
  • web-platform-tests/video-rvfc/request-video-frame-callback-during-xr-session.https.html: Added.
  • web-platform-tests/video-rvfc/request-video-frame-callback-expected.txt: Added.
  • web-platform-tests/video-rvfc/request-video-frame-callback-parallel-expected.txt: Added.
  • web-platform-tests/video-rvfc/request-video-frame-callback-parallel.html: Added.
  • web-platform-tests/video-rvfc/request-video-frame-callback-repeating-expected.txt: Added.
  • web-platform-tests/video-rvfc/request-video-frame-callback-repeating.html: Added.
  • web-platform-tests/video-rvfc/request-video-frame-callback-webrtc.https-expected.txt: Added.
  • web-platform-tests/video-rvfc/request-video-frame-callback-webrtc.https.html: Added.
  • web-platform-tests/video-rvfc/request-video-frame-callback.html: Added.
  • web-platform-tests/video-rvfc/w3c-import.log: Added.

Source/WebCore:

Update WebIDL to expose https://wicg.github.io/video-rvfc/ API.
Put them behind a runtime flag.

Add support for the algorithms, including the integration with the 'update the rendering' algorithm.
Add initial support for video elements backed by MediaStream content.
We expose a limited set of metadata currently, follow-up patches should add support for other video backends and more metadata.
This support should still enable to optimize a bit MediaStreamTrack -> canvas pipelines.

Tests: fast/mediastream/getUserMedia-rvfc.html

imported/w3c/web-platform-tests/video-rvfc/idlharness.window.html
imported/w3c/web-platform-tests/video-rvfc/request-video-frame-callback-before-xr-session.https.html
imported/w3c/web-platform-tests/video-rvfc/request-video-frame-callback-dom.html
imported/w3c/web-platform-tests/video-rvfc/request-video-frame-callback-during-xr-session.https.html
imported/w3c/web-platform-tests/video-rvfc/request-video-frame-callback-parallel.html
imported/w3c/web-platform-tests/video-rvfc/request-video-frame-callback-repeating.html
imported/w3c/web-platform-tests/video-rvfc/request-video-frame-callback-webrtc.https.html
imported/w3c/web-platform-tests/video-rvfc/request-video-frame-callback.html
webrtc/peerConnection-rvfc.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.cpp:
  • dom/Document.h:
  • html/HTMLMediaElement.h:
  • html/HTMLVideoElement+RequestVideoFrameCallback.idl: Added.
  • html/HTMLVideoElement.cpp:
  • html/HTMLVideoElement.h:
  • html/VideoFrameMetadata.idl: Added.
  • html/VideoFrameRequestCallback.h: Added.
  • html/VideoFrameRequestCallback.idl: Added.
  • page/Page.cpp:
  • page/Page.h:
  • platform/VideoFrameMetadata.h: Added.
  • platform/graphics/MediaPlayer.cpp:
  • platform/graphics/MediaPlayer.h:
  • platform/graphics/MediaPlayerPrivate.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

Source/WebKit:

Add temporary getter/setter of rvfc feature flag.

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetRequestVideoFrameCallbackEnabled):
(WKPreferencesGetRequestVideoFrameCallbackEnabled):

  • UIProcess/API/C/WKPreferencesRef.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Tools:

Disable rvfc on tests by default until we implement rvfc for usual video streaming.
WebRTC tests enable rvfc themselves.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(setWebPreferencesForTestOptions):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:

  • TestExpectations:
  • fast/mediastream/getUserMedia-rvfc-expected.txt: Added.
  • fast/mediastream/getUserMedia-rvfc.html: Added.
  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • webrtc/peerConnection-rvfc-expected.txt: Added.
  • webrtc/peerConnection-rvfc.html: Added.
6:14 AM Changeset in webkit [284527] by Carlos Garcia Campos
  • 14 edits in trunk

[WPE] Reenable -fvisibility=hidden and -fvisibility-inlines-hidden
https://bugs.webkit.org/show_bug.cgi?id=222860

Reviewed by Don Olmstead.

.:

  • Source/cmake/OptionsWPE.cmake:

Source/bmalloc:

  • bmalloc/AvailableMemory.h: Export memoryStatus.

Source/WebKit:

  • PlatformWPE.cmake:

Tools:

  • TestRunnerShared/CMakeLists.txt:
  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/glib/CMakeLists.txt:
  • WebKitTestRunner/CMakeLists.txt:
  • WebKitTestRunner/PlatformWPE.cmake:
3:18 AM Changeset in webkit [284526] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.34/Source/WebKit

Merge r284521 - REGRESSION(r276635): [GTK] local HTML file is downloaded instead of displayed if any application has ever called g_desktop_app_info_set_as_default_for_extension(info, "html")
https://bugs.webkit.org/show_bug.cgi?id=230797

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-10-20
Reviewed by Carlos Garcia Campos.

Let's revert this change. Disabling content sniffing prevents WebKit from distinguishing
between different content types with the same file extension, which is something it needs
to be able to do. In this bug report, it is conflating text/html with
application/x-extension-html, but it could just as well confuse text/html with
application/xhtml+xml, causing rendering issues. I don't think we can remove the content
sniffing.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::didGetFileInfo):

1:26 AM Changeset in webkit [284525] by Carlos Garcia Campos
  • 12 edits
    2 adds in trunk/Source

[GTK][WPE] UserInteractive threads are not Real-time in Linux
https://bugs.webkit.org/show_bug.cgi?id=220115

Reviewed by Michael Catanzaro.

Source/WebKit:

Enable real time threads in the web process only when there's a visible page.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::createWebPage):
(WebKit::WebProcess::removeWebPage):
(WebKit::WebProcess::pageActivityStateDidChange):
(WebKit::WebProcess::platformInitializeProcess): Deleted.

  • WebProcess/glib/WebProcessGLib.cpp:

(WebKit::WebProcess::platformInitializeProcess):

  • WebProcess/playstation/WebProcessPlayStation.cpp:

(WebKit::WebProcess::platformInitializeProcess):

  • WebProcess/win/WebProcessWin.cpp:

(WebKit::WebProcess::platformInitializeProcess):

Source/WTF:

Add RealTimeThreads singleton to register real time threads.

  • wtf/PlatformGTK.cmake:
  • wtf/PlatformJSCOnly.cmake:
  • wtf/PlatformWPE.cmake:
  • wtf/Threading.cpp:

(WTF::Thread::setCurrentThreadIsUserInteractive):

  • wtf/generic/WorkQueueGeneric.cpp:

(WTF::WorkQueueBase::platformInitialize):

  • wtf/linux/RealTimeThreads.cpp: Added.

(WTF::RealTimeThreads::singleton):
(WTF::RealTimeThreads::RealTimeThreads):
(WTF::RealTimeThreads::registerThread):
(WTF::RealTimeThreads::setEnabled):
(WTF::RealTimeThreads::promoteThreadToRealTime):
(WTF::RealTimeThreads::demoteThreadFromRealTime):
(WTF::RealTimeThreads::demoteAllThreadsFromRealTime):
(WTF::isRunningInSandbox):
(WTF::realTimeKitGetProperty):
(WTF::RealTimeThreads::realTimeKitMakeThreadRealTime):
(WTF::RealTimeThreads::scheduleDiscardRealTimeKitProxy):
(WTF::RealTimeThreads::discardRealTimeKitProxyTimerFired):

  • wtf/linux/RealTimeThreads.h: Added.
  • wtf/posix/ThreadingPOSIX.cpp:

(WTF::schedPolicy):
(WTF::Thread::establishHandle):

1:24 AM Changeset in webkit [284524] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

AX: Make indexForVisiblePosition consistent with visiblePositionForIndex
https://bugs.webkit.org/show_bug.cgi?id=231950

Reviewed by Andres Gonzalez.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::indexForVisiblePosition const): Use the same early return checks of
visiblePositionForIndex and remove the requirement of node being the highest editable root.

  • editing/Editing.cpp:

(WebCore::indexForVisiblePosition): Return early if given position is null.

1:13 AM Changeset in webkit [284523] by youenn@apple.com
  • 16 edits
    2 adds in trunk

WebRTC p2p call, VP9-SVC only low layer decoded on receiver side
https://bugs.webkit.org/show_bug.cgi?id=231071
<rdar://problem/83763291>

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

In case VP9 SVC is used, fallback to software decoder for now.

  • Source/webrtc/sdk/WebKit/WebKitDecoder.mm:

Source/WebCore:

Add Internals API to check whether VP9 VTB is used or not.

Test: webrtc/vp9-svc.html

  • Modules/mediastream/PeerConnectionBackend.h:
  • Modules/mediastream/RTCPeerConnection.cpp:
  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:
  • Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.h:
  • testing/Internals.cpp:
  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

  • webrtc/vp9-svc-expected.txt: Added.
  • webrtc/vp9-svc.html: Added.
1:08 AM Changeset in webkit [284522] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

Avoid null pointer dereference when creating ImageBitmap from a null image.
https://bugs.webkit.org/show_bug.cgi?id=231794

Patch by John Cunningham <johncunningham@apple.com> on 2021-10-20
Reviewed by Said Abou-Hallawa.

If the image is null, we can reject the promise earlier. Default to sRGB when a
BitmapImage's nativeImage is null.

Source/WebCore:

Test: fast/canvas/createImageBitmap-invalid-image-blob-crash.html

  • html/ImageBitmap.cpp:

(WebCore::ImageBitmap::createFromBuffer):

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::colorSpace):

LayoutTests:

  • fast/canvas/createImageBitmap-invalid-image-blob-crash-expected.txt: Added.
  • fast/canvas/createImageBitmap-invalid-image-blob-crash.html: Added.
12:54 AM Changeset in webkit [284521] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

REGRESSION(r276635): [GTK] local HTML file is downloaded instead of displayed if any application has ever called g_desktop_app_info_set_as_default_for_extension(info, "html")
https://bugs.webkit.org/show_bug.cgi?id=230797

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-10-20
Reviewed by Carlos Garcia Campos.

Let's revert this change. Disabling content sniffing prevents WebKit from distinguishing
between different content types with the same file extension, which is something it needs
to be able to do. In this bug report, it is conflating text/html with
application/x-extension-html, but it could just as well confuse text/html with
application/xhtml+xml, causing rendering issues. I don't think we can remove the content
sniffing.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::didGetFileInfo):

12:37 AM WebKitGTK/DependenciesPolicy edited by Fujii Hironori
(diff)
12:23 AM Changeset in webkit [284520] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk/Tools

It should be possible to format C++ code to project style with WebKit tools
https://bugs.webkit.org/show_bug.cgi?id=230397

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-10-20
Reviewed by Jonathan Bedard.

Add capability to run clang-format for lines changed by
a patch.
Supports workflow of:

webkit-patch format -g HEAD
git commit -a --amend --no-edit

  • Scripts/webkitpy/tool/commands/init.py:
  • Scripts/webkitpy/tool/commands/format.py: Added.

(Format):

  • Scripts/webkitpy/tool/steps/init.py:
  • Scripts/webkitpy/tool/steps/formatcppfiles.py: Added.

(_is_formatted):
(_ranges):
(FormatCppFiles):
(FormatCppFiles.options):
(FormatCppFiles.init):
(FormatCppFiles.run):

  • Scripts/webkitpy/tool/steps/options.py:

(Options):

Oct 19, 2021:

11:41 PM Changeset in webkit [284519] by graouts@webkit.org
  • 7 edits in trunk

Support more CSS properties for ::marker
https://bugs.webkit.org/show_bug.cgi?id=231972

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Mark WPT progressions.

  • web-platform-tests/css/css-pseudo/marker-computed-content-expected.txt:
  • web-platform-tests/css/css-pseudo/marker-default-styles-expected.txt:
  • web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt:
  • web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt:

Source/WebCore:

Support additional text properties for ::marker.

  • style/PropertyAllowlist.cpp:

(WebCore::Style::isValidMarkerStyleProperty):

10:16 PM Changeset in webkit [284518] by Ben Nham
  • 31 edits
    2 copies
    1 move in trunk

Add NetworkProcess stubs for push subscriptions
https://bugs.webkit.org/show_bug.cgi?id=231922

Reviewed by Youenn Fablet.

Source/WebCore:

Both PushManager and PushSubscription now send their subscription requests to NetworkProcess
via ServiceWorkerRegistration => ServiceWorkerContainer => SWClientConnection.

  • Headers.cmake:
  • Modules/push-api/PushManager.cpp:

(WebCore::PushManager::subscribe):
(WebCore::PushManager::getSubscription):
(WebCore::PushManager::permissionState):

  • Modules/push-api/PushPermissionState.h:
  • Modules/push-api/PushSubscription.cpp:

(WebCore::PushSubscription::PushSubscription):
(WebCore::PushSubscription::unsubscribe):

  • Modules/push-api/PushSubscription.h:
  • Modules/push-api/PushSubscriptionData.cpp:

(WebCore::PushSubscriptionData::isolatedCopy const):

  • Modules/push-api/PushSubscriptionData.h:

(WebCore::PushSubscriptionData::encode const):
(WebCore::PushSubscriptionData::decode):

  • Modules/push-api/PushSubscriptionOptions.cpp:

(WebCore::PushSubscriptionOptions::PushSubscriptionOptions):
(WebCore::PushSubscriptionOptions::userVisibleOnly const):

  • Modules/push-api/PushSubscriptionOptions.h:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • testing/Internals.cpp:

(WebCore::Internals::createPushSubscription):

  • testing/Internals.h:
  • testing/Internals.idl:
  • workers/service/SWClientConnection.h:
  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::createPushSubscriptionFromData):
(WebCore::ServiceWorkerContainer::subscribeToPushService):
(WebCore::ServiceWorkerContainer::unsubscribeFromPushService):
(WebCore::ServiceWorkerContainer::getPushSubscription):
(WebCore::ServiceWorkerContainer::getPushPermissionState):

  • workers/service/ServiceWorkerContainer.h:
  • workers/service/ServiceWorkerRegistration.cpp:

(WebCore::ServiceWorkerRegistration::subscribeToPushService):
(WebCore::ServiceWorkerRegistration::unsubscribeFromPushService):
(WebCore::ServiceWorkerRegistration::getPushSubscription):
(WebCore::ServiceWorkerRegistration::getPushPermissionState):

  • workers/service/ServiceWorkerRegistration.h:
  • workers/service/ServiceWorkerRegistration.idl:
  • workers/service/WorkerSWClientConnection.cpp:

(WebCore::WorkerSWClientConnection::~WorkerSWClientConnection):
(WebCore::WorkerSWClientConnection::subscribeToPushService):
(WebCore::WorkerSWClientConnection::unsubscribeFromPushService):
(WebCore::WorkerSWClientConnection::getPushSubscription):
(WebCore::WorkerSWClientConnection::getPushPermissionState):

  • workers/service/WorkerSWClientConnection.h:

Source/WebKit:

Added stubs in NetworkProcess for push subscription-related IPC. Currently the stubs return
that subscribing is unsupported and that there are no active push subscriptions.

  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::subscribeToPushService):
(WebKit::WebSWServerConnection::unsubscribeFromPushService):
(WebKit::WebSWServerConnection::getPushSubscription):
(WebKit::WebSWServerConnection::getPushPermissionState):

  • NetworkProcess/ServiceWorker/WebSWServerConnection.h:
  • NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::subscribeToPushService):
(WebKit::WebSWClientConnection::unsubscribeFromPushService):
(WebKit::WebSWClientConnection::getPushSubscription):
(WebKit::WebSWClientConnection::getPushPermissionState):

  • WebProcess/Storage/WebSWClientConnection.h:

LayoutTests:

Modify PushSubscription tests to pass in a ServiceWorkerRegistration.

  • http/wpt/push-api/emptyWorker.js: Renamed from LayoutTests/http/wpt/push-api/pushManager-worker.js.
  • http/wpt/push-api/pushManager.any.js:

(else.promise_test.async test):

  • http/wpt/push-api/pushSubscription.https.any-expected.txt:
  • http/wpt/push-api/pushSubscription.https.any.js:

(promise_test.async test):
(promise_test):
(test): Deleted.

9:49 PM Changeset in webkit [284517] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Fix build break after r284406 if ENABLE_SERVICE_WORKER=OFF
https://bugs.webkit.org/show_bug.cgi?id=231968

Patch by Jigen Zhou <jigen.zhou@sony.com> on 2021-10-19
Reviewed by Don Olmstead.

r284406 made m_isServiceWorkerPage of WebPageProxy not available if !ENABLE(SERVICE_WORKER),
but the change was incomplete and can cause build failure if ENABLE_SERVICE_WORKER=OFF.
This patch avoids accessing m_isServiceWorkerPage if !ENABLE(SERVICE_WORKER) in WebPageProxy
methods isServiceWorkerPage, loadDataWithNavigationShared, and resetStateAfterProcessExited.

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
8:25 PM Changeset in webkit [284516] by don.olmstead@sony.com
  • 14 edits in trunk/Source

Non-unified build fixes, mid October 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=231915

Unreviewed non-unified build fixes.

Source/WebCore:

  • animation/KeyframeEffectStack.cpp:
  • bindings/js/JSDOMWindowBase.cpp:
  • dom/ActiveDOMObject.cpp:
  • html/DOMFormData.cpp:
  • html/HTMLDialogElement.cpp:
  • html/HTMLOutputElement.cpp:
  • html/ResetInputType.cpp:
  • page/DragController.cpp:
  • page/EventHandler.cpp:
  • rendering/updating/RenderTreeBuilderFirstLetter.cpp:

Source/WebKit:

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementConnection.cpp:
  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
8:03 PM Changeset in webkit [284515] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

r284315 can cause build break.
https://bugs.webkit.org/show_bug.cgi?id=231923

Patch by Jigen Zhou <jigen.zhou@sony.com> on 2021-10-19
Reviewed by Michael Catanzaro.

Class 'WebCore::RenderBlockFlow' was forward declared in header file
InlineIteratorLogicalOrderTraversal.h, but template
leafBoxesInLogicalOrder that was added by r284315 has access to RenderBlockFLow's method
style() and can cause build break in our local webkit build.

The build can be fixed when the concreate declaration of class
RenderBlockFlow is included in InlineIteratorLogicalOrderTraversal.h.

  • layout/integration/InlineIteratorLogicalOrderTraversal.h:
5:58 PM Changeset in webkit [284514] by Alan Coon
  • 1 copy in tags/Safari-612.3.1

Tag Safari-612.3.1.

5:40 PM Changeset in webkit [284513] by Tadeu Zagallo
  • 10 edits in trunk/Source/JavaScriptCore

Address post-landing feedback to wasm exceptions
https://bugs.webkit.org/show_bug.cgi?id=231973

Reviewed by Saam Barati.

Address comments left by Saam in https://bugs.webkit.org/show_bug.cgi?id=229681
after the patch landed. This includes deleting some unused code, and renaming a
couple variables and methods, but the biggest change is copying the callee saves
to VMEntry in the llint rethrow.

  • interpreter/Interpreter.cpp:

(JSC::CatchInfo::CatchInfo):
(JSC::UnwindFunctor::operator() const):

  • interpreter/Interpreter.h:

(JSC::CatchInfo::CatchInfo): Deleted.

  • jit/JSInterfaceJIT.h:

(JSC::JSInterfaceJIT::convertCalleeToVM): Deleted.

  • llint/WebAssembly.asm:
  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::ControlData::ControlData):
(JSC::Wasm::B3IRGenerator::ControlData::tryDepth const):
(JSC::Wasm::B3IRGenerator::connectControlAtEntrypoint):
(JSC::Wasm::B3IRGenerator::addLoop):
(JSC::Wasm::B3IRGenerator::addTry):
(JSC::Wasm::B3IRGenerator::preparePatchpointForExceptions):
(JSC::Wasm::B3IRGenerator::emitCatchImpl):
(JSC::Wasm::B3IRGenerator::addDelegateToUnreachable):
(JSC::Wasm::B3IRGenerator::addThrow):
(JSC::Wasm::B3IRGenerator::addRethrow):
(JSC::Wasm::B3IRGenerator::addEndToUnreachable):
(JSC::Wasm::B3IRGenerator::connectControlEntry): Deleted.

  • wasm/WasmCallee.h:

(JSC::Wasm::Callee::llintFunctionCodeBlock const):
(JSC::Wasm::Callee::functionCodeBlock const): Deleted.

  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::unifyValuesWithBlock):
(JSC::Wasm::LLIntGenerator::addTry):
(JSC::Wasm::LLIntGenerator::addThrow):
(JSC::Wasm::LLIntGenerator::repatch): Deleted.

  • wasm/WasmOperations.cpp:

(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):

  • wasm/WasmOperations.h:
5:30 PM Changeset in webkit [284512] by Ross Kirsling
  • 8 edits in trunk

[CMake] Align OptionsMac with Xcode build
https://bugs.webkit.org/show_bug.cgi?id=231982

Reviewed by Don Olmstead.

.:

  • Source/cmake/OptionsMac.cmake:

Ensure that the listed options (1) are not redundant with the defaults in WebKitFeatures.cmake and
(2) match the options for the Xcode build as closely as possible.

  • Source/cmake/WebKitFeatures.cmake:

Remove an outdated feature, ENABLE_APPLE_PAY_SESSION_V9,
and let ENABLE_MAC_GESTURE_EVENTS be handled by PlatformEnable, since it depends on USE_APPLE_INTERNAL_SDK.

Source/WebCore:

  • PlatformMac.cmake:

Add support for new files.

  • platform/mediastream/cocoa/DisplayCaptureSourceCocoa.cpp:

Fix for r284295 -- ReplayKit is iOS and its headers shouldn't be included on Mac.

Source/WebKit:

  • CMakeLists.txt:

Enable -fobjc-weak to support r284329.

5:16 PM Changeset in webkit [284511] by Ben Nham
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix for non-unified build.

  • Modules/webaudio/RealtimeAnalyser.h:
4:56 PM Changeset in webkit [284510] by Chris Dumez
  • 98 edits
    12 adds
    11 deletes in trunk/LayoutTests

Resync COOP /COEP WPT tests from upstream WPT
https://bugs.webkit.org/show_bug.cgi?id=231746

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Resync COOP /COEP WPT tests from upstream WPT 207e223d74fdc1f1.

  • web-platform-tests/html/cross-origin-embedder-policy/*: Updated.
  • web-platform-tests/html/cross-origin-opener-policy/*: Updated.

LayoutTests:

Resync COOP /COEP WPT tests from upstream WPT 6ccfe6fafab233e.

4:54 PM Changeset in webkit [284509] by Alan Coon
  • 2 edits in branches/safari-613.1.6-branch/Source/WebCore/PAL

Cherry-pick r284494. rdar://problem/84439983

REGRESSION (r284220): [PAL] TCCSPI.h should be a project header, not a private header
<https://webkit.org/b/231977>
<rdar://problem/84425384>

Reviewed by Wenson Hsieh.

  • PAL.xcodeproj/project.pbxproj:
  • Change TCCSPI.h from a private header to a project header. PAL uses a build phase script to install its headers.

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

4:34 PM Changeset in webkit [284508] by Russell Epstein
  • 2 edits in branches/safari-613.1.6-branch/Source/WebKit

Cherry-pick r284489. rdar://problem/84439180

WebAuthn Platform UI callbacks are not guaranteed to happen on the main thread
https://bugs.webkit.org/show_bug.cgi?id=231963
<rdar://84420452>

Patch by Garrett Davidson <garrett_davidson@apple.com> on 2021-10-19
Reviewed by Brent Fulgham.

  • The clearanceHandler is not guaranteed to happen on the main thread, but weakThis.get() needs to happen there.
  • proxy needs to stay alive for the whole transaction, otherwise it will tear down the connection and cancel the request, so explicitly capture it everywhere.
  • Start logging if we get an error from clearanceHandler.

Covered by existing tests.

  • UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm: (WebKit::WebAuthenticatorCoordinatorProxy::performRequest):

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

4:14 PM Changeset in webkit [284507] by ap@apple.com
  • 6 edits in trunk/Source

Eagerly resolve python3 path in Makefiles
https://bugs.webkit.org/show_bug.cgi?id=231979

Reviewed by Jonathan Bedard.

  • DerivedSources.make:
3:48 PM Changeset in webkit [284506] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

canDoFastSpread should also check that the Structure is from the global object we're watching
https://bugs.webkit.org/show_bug.cgi?id=231976
<rdar://84340372>

Reviewed by Keith Miller.

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::canDoFastSpread):

3:37 PM Changeset in webkit [284505] by Adrian Perez de Castro
  • 3 edits in releases/WebKitGTK/webkit-2.34/Source/WebCore

Merge r284239 - [WPE][GTK] Update user agent browser versions
https://bugs.webkit.org/show_bug.cgi?id=231772

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-10-15
Reviewed by Carlos Garcia Campos.

  • platform/UserAgentQuirks.cpp:

(WebCore::UserAgentQuirks::stringForQuirk):

  • platform/glib/UserAgentGLib.cpp:

(WebCore::buildUserAgentString):

3:37 PM Changeset in webkit [284504] by Adrian Perez de Castro
  • 3 edits in releases/WebKitGTK/webkit-2.34/Source/WebCore

Merge r284091 - [GStreamer] Crash in WebCore::MediaPlayerPrivateGStreamer::sourceSetup when loading reddit video
https://bugs.webkit.org/show_bug.cgi?id=231519

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

Since this GStreamer commit:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/52bca104e447309898ca8904b3914211ec7d4114

and starting from GStreamer 1.20, the playbin::source-setup signal is emitted before the
source element is added to the pipeline, so this gave us the opportunity to refactor our
code handling the downloadbuffer configuration, using the existing deep-element-added signal
handler.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
(WebCore::MediaPlayerPrivateGStreamer::configureDownloadBuffer):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
(WebCore::MediaPlayerPrivateGStreamer::uriDecodeBinElementAddedCallback): Deleted.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3:37 PM Changeset in webkit [284503] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.34/Source

Merge r284132 - [GTK] Opening emoji chooser crashes UI process with GTK 3.24.30
https://bugs.webkit.org/show_bug.cgi?id=228664

Reviewed by Michael Catanzaro.

Instead of providing a copy of the emoji chooser widget, use GLib's
introspection features and a little sprinkle of knowledge about how
GTK works in order to obtain the type code of the GtkEmojiChooser
widget included with GTK. This ensures that a working widget is
always used, regardless of the current GTK version.

No new tests needed.

  • UIProcess/API/gtk/WebKitEmojiChooser.cpp:

(webkitEmojiChooserNew):
(): Deleted.
(webkitEmojiChooserAddEmoji): Deleted.
(webkitEmojiChooserAddRecentItem): Deleted.
(emojiActivated): Deleted.
(emojiDataHasVariations): Deleted.
(webkitEmojiChooserShowVariations): Deleted.
(emojiLongPressed): Deleted.
(emojiPressed): Deleted.
(emojiPopupMenu): Deleted.
(verticalAdjustmentChanged): Deleted.
(webkitEmojiChooserSetupSectionBox): Deleted.
(scrollToSection): Deleted.
(webkitEmojiChooserSetupSectionButton): Deleted.
(webkitEmojiChooserSetupRecent): Deleted.
(webkitEmojiChooserEnsureEmptyResult): Deleted.
(webkitEmojiChooserSearchChanged): Deleted.
(webkitEmojiChooserSetupFilters): Deleted.
(webkitEmojiChooserSetupEmojiSections): Deleted.
(webkitEmojiChooserInitializeEmojiMaxWidth): Deleted.
(webkitEmojiChooserConstructed): Deleted.
(webkitEmojiChooserShow): Deleted.
(webkit_emoji_chooser_class_init): Deleted.

  • UIProcess/API/gtk/WebKitEmojiChooser.h:
3:37 PM Changeset in webkit [284502] by Adrian Perez de Castro
  • 2 edits
    1 add in releases/WebKitGTK/webkit-2.34/Source/WebKit

Merge r284451 - Update seccomp filters with latest changes from flatpak
https://bugs.webkit.org/show_bug.cgi?id=231479

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-10-19
Reviewed by Adrian Perez de Castro.

Additionally, let's fix a minor inconsistency in our error-handling code: all but one of
our codepaths carefully free and close resources, but the process is about to crash so
there's not really any reason to do so. The code is slightly simpler if we don't bother.

The seemingly-extraneous include order changes are required to placate the style checker.

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::seccompStrerror):
(WebKit::setupSeccomp):

  • UIProcess/Launcher/glib/Syscalls.h: Added.
3:35 PM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
2:53 PM Changeset in webkit [284501] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WTF

Remove old GCC workaround for Allocator
https://bugs.webkit.org/show_bug.cgi?id=231978

Reviewed by Darin Adler.

This is for old GCC. Since our GCC baseline is 8.3.0, this is no longer necessary.

  • wtf/FastMalloc.h:

(WTF::FastAllocator::deallocate):
(WTF::FastAllocator::construct): Deleted.
(WTF::FastAllocator::destroy): Deleted.
(WTF::FastAllocator::max_size const): Deleted.
(WTF::FastAllocator::select_on_container_copy_construction const): Deleted.

2:46 PM Changeset in webkit [284500] by Russell Epstein
  • 1 copy in tags/Safari-613.1.5.2

Tag Safari-613.1.5.2.

2:46 PM Changeset in webkit [284499] by Alan Coon
  • 5 edits
    4 adds in branches/safari-613.1.6-branch

Cherry-pick r284490. rdar://problem/84434069

Regression(r284336): [ iOS 15 ] system-preview/badge.html is image failing
https://bugs.webkit.org/show_bug.cgi?id=231916

Reviewed by Antti Koivisto.
Source/WebCore:

In r284336 I made clip-path not apply to non-RenderBoxes, which disabled it on inlines,
breaking the system-preview/badge.html test.

The spec says it applies to all elements, so this behavior change was incorrect.

Revert back to using calculateLayerBounds() as the fallback rect to use for inlines, and add
tests for this. This rectangle is obviously incorrect (for example, it's affected by text
shadow), but leave it for now until https://github.com/w3c/csswg-drafts/issues/6383 is
resolved.

I also failed to see that computeClipPath() was already computing the reference box
internally, so clean up the code with some comments to make it more clear that the result of
calculateLayerBounds() is used only as the fallback for inlines, as well as for the buffer
bounds for the applyClippingToContext() code path.

Tests: css3/masking/clip-path-on-inline.html

css3/masking/clip-path-on-split-inline.html

  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::computeClipPath const): (WebCore::RenderLayer::setupClipPath):
  • rendering/RenderLayer.h:
  • rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateMaskingLayerGeometry):

LayoutTests:

Tests for clip-path on a single-box inline, and a split inline.

  • css3/masking/clip-path-on-inline-expected.html: Added.
  • css3/masking/clip-path-on-inline.html: Added.
  • css3/masking/clip-path-on-split-inline-expected.html: Added.
  • css3/masking/clip-path-on-split-inline.html: Added.

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

2:44 PM Changeset in webkit [284498] by Jonathan Bedard
  • 6 edits in trunk/Tools

[webkitscmpy] Override http url with ssh url
https://bugs.webkit.org/show_bug.cgi?id=231965
<rdar://problem/84422393>

Reviewed by Ryan Haddad.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git): Exclude / from hostname.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:

(Setup.git): Prompt user to switch to ssh checkout.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:

Canonical link: https://commits.webkit.org/243250@main

2:41 PM Changeset in webkit [284497] by Alan Coon
  • 2 edits
    1 delete in branches/safari-613.1.6-branch/Source/WebKit

Cherry-pick r284495. rdar://problem/84433820

Unreviewed, reverting r284099.
https://bugs.webkit.org/show_bug.cgi?id=231984

Introduced build failure

Reverted changeset:

"[iOS] Stop including 'util.sb' in the WebContent process'
sandbox"
https://bugs.webkit.org/show_bug.cgi?id=231570
https://commits.webkit.org/r284099

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

2:40 PM Changeset in webkit [284496] by Russell Epstein
  • 8 edits in branches/safari-613.1.5-branch/Source

Versioning.

WebKit-7613.1.5.2

2:37 PM Changeset in webkit [284495] by commit-queue@webkit.org
  • 2 edits
    1 delete in trunk/Source/WebKit

Unreviewed, reverting r284099.
https://bugs.webkit.org/show_bug.cgi?id=231984

Introduced build failure

Reverted changeset:

"[iOS] Stop including 'util.sb' in the WebContent process'
sandbox"
https://bugs.webkit.org/show_bug.cgi?id=231570
https://commits.webkit.org/r284099

2:10 PM Changeset in webkit [284494] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

REGRESSION (r284220): [PAL] TCCSPI.h should be a project header, not a private header
<https://webkit.org/b/231977>
<rdar://problem/84425384>

Reviewed by Wenson Hsieh.

  • PAL.xcodeproj/project.pbxproj:
  • Change TCCSPI.h from a private header to a project header. PAL uses a build phase script to install its headers.
1:58 PM Changeset in webkit [284493] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

Regression(r283935 - r283938): [ macOS wk1 ] imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-multiple-times.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231918

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
1:46 PM Changeset in webkit [284492] by Ryan Haddad
  • 3 edits in trunk/Tools

[EWS] Move EWS bots to iOS 15 / watchOS 8 / tvOS 15
https://bugs.webkit.org/show_bug.cgi?id=231925

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/config.json:
  • CISupport/ews-build/factories_unittest.py:

(TestExpectedBuildSteps):

1:36 PM Changeset in webkit [284491] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitscmpy] Generate commit message template (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=231023
<rdar://problem/83722871>

Unreviewed follow-up fix.

  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: MarkupSafe is imported as markupsafe.
1:34 PM Changeset in webkit [284490] by Simon Fraser
  • 5 edits
    4 adds in trunk

Regression(r284336): [ iOS 15 ] system-preview/badge.html is image failing
https://bugs.webkit.org/show_bug.cgi?id=231916

Reviewed by Antti Koivisto.
Source/WebCore:

In r284336 I made clip-path not apply to non-RenderBoxes, which disabled it on inlines,
breaking the system-preview/badge.html test.

The spec says it applies to all elements, so this behavior change was incorrect.

Revert back to using calculateLayerBounds() as the fallback rect to use for inlines, and add
tests for this. This rectangle is obviously incorrect (for example, it's affected by text
shadow), but leave it for now until https://github.com/w3c/csswg-drafts/issues/6383 is
resolved.

I also failed to see that computeClipPath() was already computing the reference box
internally, so clean up the code with some comments to make it more clear that the result of
calculateLayerBounds() is used only as the fallback for inlines, as well as for the buffer
bounds for the applyClippingToContext() code path.

Tests: css3/masking/clip-path-on-inline.html

css3/masking/clip-path-on-split-inline.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::computeClipPath const):
(WebCore::RenderLayer::setupClipPath):

  • rendering/RenderLayer.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateMaskingLayerGeometry):

LayoutTests:

Tests for clip-path on a single-box inline, and a split inline.

  • css3/masking/clip-path-on-inline-expected.html: Added.
  • css3/masking/clip-path-on-inline.html: Added.
  • css3/masking/clip-path-on-split-inline-expected.html: Added.
  • css3/masking/clip-path-on-split-inline.html: Added.
1:32 PM Changeset in webkit [284489] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

WebAuthn Platform UI callbacks are not guaranteed to happen on the main thread
https://bugs.webkit.org/show_bug.cgi?id=231963
<rdar://84420452>

Patch by Garrett Davidson <garrett_davidson@apple.com> on 2021-10-19
Reviewed by Brent Fulgham.

  • The clearanceHandler is not guaranteed to happen on the main thread, but

weakThis.get() needs to happen there.

  • proxy needs to stay alive for the whole transaction, otherwise it will tear

down the connection and cancel the request, so explicitly capture it everywhere.

  • Start logging if we get an error from clearanceHandler.

Covered by existing tests.

  • UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:

(WebKit::WebAuthenticatorCoordinatorProxy::performRequest):

1:15 PM Changeset in webkit [284488] by Alan Coon
  • 1 copy in tags/Safari-612.2.9.1.22

Tag Safari-612.2.9.1.22.

1:11 PM Changeset in webkit [284487] by Alan Coon
  • 2 edits in branches/safari-612.2.9.1-branch/Source/WebKit

Cherry-pick r283430. rdar://problem/84428809

Use DYLD_FRAMEWORK_PATH instead of DYLD_VERSIONED_FRAMEWORK_PATH on Safari Big Sur
https://bugs.webkit.org/show_bug.cgi?id=231058

Patch by Remy Demarest <rdemarest@apple.com> on 2021-10-01
Reviewed by David Kilzer.

Modify the DYLD environment variable that is used when compiling with staged frameworks.
We want to use DYLD_VERSIONED_FRAMEWORK_PATH to define the search path of the frameworks
for DYLD because this makes launching Safari and its child processes faster. However,
on Apple Silicon Big Sur using that environment variable does not work and results in Safari
loading frameworks from the System folder rather than from the StagedFrameworks/Safari
folder, this is because dyld on M1 does not look up that variable properly. To make sure
we actually load the frameworks from the desired location, we need to use DYLD_FRAMEWORK_PATH
instead, this makes dyld perform more stat() calls than usual to link the frameworks hence
why we prefer the other variable, but this is the only way to workaround the issue in
Big Sur on M1. In Monterey and above, this bug will be fixed in dyld so we only need this
variable before macOS 11.

Override OTHER_LDFLAGS_VERSIONED_FRAMEWORK_PATH_YES based on SDK and architecture to use
DYLD_FRAMEWORK_PATH instead of DYLD_VERSIONED_FRAMEWORK_PATH when building for macOS 11 and arm64.

  • Configurations/BaseTarget.xcconfig:

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

1:08 PM Changeset in webkit [284486] by Alan Coon
  • 8 edits in branches/safari-612.2.9.1-branch/Source

Versioning.

WebKit-7612.2.9.1.22

1:07 PM Changeset in webkit [284485] by Jonathan Bedard
  • 8 edits
    4 adds in trunk/Tools

[webkitscmpy] Generate commit message template
https://bugs.webkit.org/show_bug.cgi?id=231023
<rdar://problem/83722871>

Reviewed by Dewei Zhu.

  • Tools/Scripts/git-webkit: Use prepare-ChangeLog to generate commit messages.
  • Tools/Scripts/hooks/prepare-commit-msg: Added.
  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version, add jinja.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:

(Git.init): Add unbound status mock.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/init.py:

(main): Pass hooks to sub-programs.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:

(Setup.git): iterate through the directory of provided hooks and render with jinja2.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/hooks/prepare-commit-msg: Added.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:

(TestSetup.test_commit_message):
Canonical link: https://commits.webkit.org/243242@main

1:05 PM Changeset in webkit [284484] by Russell Epstein
  • 12 edits
    2 copies
    2 moves
    1 delete in branches/safari-613.1.6-branch

Cherry-pick r284483. rdar://problem/84428759

LayoutTests/imported/w3c:
Origin of opaque blob: URLs ends up as empty string
https://bugs.webkit.org/show_bug.cgi?id=231942

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

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-origin-expected.txt:
  • web-platform-tests/url/a-element-origin-xhtml-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/resources/urltestdata.json:
  • web-platform-tests/url/url-constructor.any-expected.txt:
  • web-platform-tests/url/url-constructor.any.worker-expected.txt:
  • web-platform-tests/url/url-origin.any-expected.txt:
  • web-platform-tests/url/url-origin.any.worker-expected.txt:

Source/WebCore:
Fix leak of CGColorSpaceRef in FilterEffectRendererCoreImage::sharedCIContext()
<https://webkit.org/b/231902>
<rdar://problem/84375203>

Patch by David Kilzer <ddkilzer@apple.com> on 2021-10-19
Reviewed by Wenson Hsieh.

  • platform/graphics/coreimage/FilterEffectRendererCoreImage.mm: (WebCore::FilterEffectRendererCoreImage::sharedCIContext):
  • Use adoptCF() to fix the leak.

Source/WebKit:
REGRESSION (r284079): fast/canvas/gradient-with-clip.html and fast/canvas/gradient-text-with-shadow.html are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=231681
rdar://84202478

Patch by Wenson Hsieh <Wenson Hsieh> on 2021-10-19
Reviewed by Kimmo Kinnunen.

These tests occasionally fail when we time out while waiting for the pixel buffer to be populated underneath
RemoteImageBufferProxy::getPixelBuffer; this happens because the GPU process sometimes halts (and never
resumes) while processing stream messages, and consequently never ends up processing the GetPixelBuffer IPC
stream message that's necessary to populate the shared memory buffer for GetPixelBuffer.

This, in turn, happens when the IPC stream buffer is about to exhaust all available capacity (i.e. the write
cursor is nearing the end of the 2MB buffer), and as a result, we send messages that would normally be encoded
in the IPC stream as out-of-line IPC messages instead, which are received in the GPU process on the IPC thread
and appended to the receive queue corresponding to the destination ID in Connection::processIncomingMessage().

If we happen to have sent RemoteRenderingBackend::CreateImageBuffer(a) right before exhausting capacity and
sending out-of-line messages targeting the RemoteDisplayListRecorder corresponding to the newly created image
buffer a, we'll end up with a race condition where the IPC thread may receive the out-of-line messages meant
for the new remote display list destination *before* the new remote display list has added itself as an IPC
receive queue by calling into StreamServerConnection::startReceivingMessages().

In this particular scenario (where we "lose" the race), Connection::processIncomingMessage will skip past the
early return where it would normally find its corresponding receive queue via m_receiveQueues.get(*message),
and instead falls through to Connection::SyncMessageState::processIncomingMessage(), which will attempt to
dispatch the incoming message to the Connection's client (GPUConnectionToWebProcess). Of course, the
GPUConnectionToWebProcess isn't aware of how to process this incoming message, so it simply gets dropped. By the
time the receive queue is added for the new RemoteDisplayListRecorder, we'll observe a ProcessOutOfStreamMessage
and end up waiting forever for this out-of-line message to be added to the receive queue, but this never ends up
happening because it has already been received and dropped by GPUConnectionToWebProcess.

To address the flaky tests in the short term, we work around this issue by making CreateImageBuffer a sync
message, so we guarantee that any subsequent messages sent to the image buffer's RemoteDisplayListRecorder will
not be dropped. In the (slightly) longer term, we should turn this back into an async stream message, and add a
mechanism to redirect all receiver-less RemoteDisplayListRecorder messages to a separate queue.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::createImageBuffer):
  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteRenderingBackend.messages.in:

Make CreateImageBuffer a synchronous stream message for now.

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: (WebKit::RemoteRenderingBackendProxy::createRemoteImageBuffer):

LayoutTests:
Resync web-platform-tests/reporting from upstream
https://bugs.webkit.org/show_bug.cgi?id=231957

Reviewed by Alex Christensen.

Resync web-platform-tests/reporting from upstream 207e223d74fdc1f1.

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

1:00 PM Changeset in webkit [284483] by Chris Dumez
  • 12 edits
    2 copies
    2 moves
    1 delete in trunk

LayoutTests/imported/w3c:
Origin of opaque blob: URLs ends up as empty string
https://bugs.webkit.org/show_bug.cgi?id=231942

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

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-origin-expected.txt:
  • web-platform-tests/url/a-element-origin-xhtml-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/resources/urltestdata.json:
  • web-platform-tests/url/url-constructor.any-expected.txt:
  • web-platform-tests/url/url-constructor.any.worker-expected.txt:
  • web-platform-tests/url/url-origin.any-expected.txt:
  • web-platform-tests/url/url-origin.any.worker-expected.txt:

Source/WebCore:
Fix leak of CGColorSpaceRef in FilterEffectRendererCoreImage::sharedCIContext()
<https://webkit.org/b/231902>
<rdar://problem/84375203>

Patch by David Kilzer <ddkilzer@apple.com> on 2021-10-19
Reviewed by Wenson Hsieh.

  • platform/graphics/coreimage/FilterEffectRendererCoreImage.mm:

(WebCore::FilterEffectRendererCoreImage::sharedCIContext):

  • Use adoptCF() to fix the leak.

Source/WebKit:
REGRESSION (r284079): fast/canvas/gradient-with-clip.html and fast/canvas/gradient-text-with-shadow.html are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=231681
rdar://84202478

Patch by Wenson Hsieh <Wenson Hsieh> on 2021-10-19
Reviewed by Kimmo Kinnunen.

These tests occasionally fail when we time out while waiting for the pixel buffer to be populated underneath
RemoteImageBufferProxy::getPixelBuffer; this happens because the GPU process sometimes halts (and never
resumes) while processing stream messages, and consequently never ends up processing the GetPixelBuffer IPC
stream message that's necessary to populate the shared memory buffer for GetPixelBuffer.

This, in turn, happens when the IPC stream buffer is about to exhaust all available capacity (i.e. the write
cursor is nearing the end of the 2MB buffer), and as a result, we send messages that would normally be encoded
in the IPC stream as out-of-line IPC messages instead, which are received in the GPU process on the IPC thread
and appended to the receive queue corresponding to the destination ID in Connection::processIncomingMessage().

If we happen to have sent RemoteRenderingBackend::CreateImageBuffer(a) right before exhausting capacity and
sending out-of-line messages targeting the RemoteDisplayListRecorder corresponding to the newly created image
buffer a, we'll end up with a race condition where the IPC thread may receive the out-of-line messages meant
for the new remote display list destination *before* the new remote display list has added itself as an IPC
receive queue by calling into StreamServerConnection::startReceivingMessages().

In this particular scenario (where we "lose" the race), Connection::processIncomingMessage will skip past the
early return where it would normally find its corresponding receive queue via m_receiveQueues.get(*message),
and instead falls through to Connection::SyncMessageState::processIncomingMessage(), which will attempt to
dispatch the incoming message to the Connection's client (GPUConnectionToWebProcess). Of course, the
GPUConnectionToWebProcess isn't aware of how to process this incoming message, so it simply gets dropped. By the
time the receive queue is added for the new RemoteDisplayListRecorder, we'll observe a ProcessOutOfStreamMessage
and end up waiting forever for this out-of-line message to be added to the receive queue, but this never ends up
happening because it has already been received and dropped by GPUConnectionToWebProcess.

To address the flaky tests in the short term, we work around this issue by making CreateImageBuffer a sync
message, so we guarantee that any subsequent messages sent to the image buffer's RemoteDisplayListRecorder will
not be dropped. In the (slightly) longer term, we should turn this back into an async stream message, and add a
mechanism to redirect all receiver-less RemoteDisplayListRecorder messages to a separate queue.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::createImageBuffer):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteRenderingBackend.messages.in:

Make CreateImageBuffer a synchronous stream message for now.

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::createRemoteImageBuffer):

LayoutTests:
Resync web-platform-tests/reporting from upstream
https://bugs.webkit.org/show_bug.cgi?id=231957

Reviewed by Alex Christensen.

Resync web-platform-tests/reporting from upstream 207e223d74fdc1f1.

12:59 PM Changeset in webkit [284482] by Russell Epstein
  • 12 edits
    2 copies
    2 moves
    1 delete in branches/safari-612-branch

Revert r283931. rdar://problem/83953710

12:56 PM Changeset in webkit [284481] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Fix leak of CGColorSpaceRef in FilterEffectRendererCoreImage::sharedCIContext()
<https://webkit.org/b/231902>
<rdar://problem/84375203>

Reviewed by Wenson Hsieh.

  • platform/graphics/coreimage/FilterEffectRendererCoreImage.mm:

(WebCore::FilterEffectRendererCoreImage::sharedCIContext):

  • Use adoptCF() to fix the leak.
12:49 PM Changeset in webkit [284480] by Chris Dumez
  • 2 edits in trunk/Source/JavaScriptCore

[clang 13] Suppress sign comparison warnings
https://bugs.webkit.org/show_bug.cgi?id=231188
<rdar://problem/84110570>

Reviewed by Alex Christensen.

  • inspector/remote/socket/RemoteInspectorSocket.cpp:

(Inspector::RemoteInspector::backendCommands const):

12:39 PM Changeset in webkit [284479] by Jonathan Bedard
  • 7 edits in trunk/Tools

[webkitscmpy] Filter approvers by status
https://bugs.webkit.org/show_bug.cgi?id=231843
<rdar://problem/84320934>

Reviewed by Dewei Zhu.

If a project defines statuses for it's contributors, we only want
to allow reviewers to approve changes.

  • Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:

(Contributor): Add reviewer status.
(Contributor.Mapping.load): Keep track of possible statuses.
(Contributor.Mapping.init): Ditto.
(Contributor.Mapping.add): Ditto.

  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:

(BitBucket.PRGenerator.PullRequest): If a project defines a reviewer status, enforce it.

  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:

(GitHub.PRGenerator._contributor): Handle case where no name is defined.
(GitHub.PRGenerator.reviewers): If a project defines a reviewer status, enforce it.

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
12:28 PM Changeset in webkit [284478] by commit-queue@webkit.org
  • 12 edits in trunk

Origin of opaque blob: URLs ends up as empty string
https://bugs.webkit.org/show_bug.cgi?id=231942

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

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-origin-expected.txt:
  • web-platform-tests/url/a-element-origin-xhtml-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/resources/urltestdata.json:
  • web-platform-tests/url/url-constructor.any-expected.txt:
  • web-platform-tests/url/url-constructor.any.worker-expected.txt:
  • web-platform-tests/url/url-origin.any-expected.txt:
  • web-platform-tests/url/url-origin.any.worker-expected.txt:

Source/WebCore:

It should be "null" instead of "".
This matches Chrome and Firefox.
Covered by a PR to WPT included in this patch.

  • page/SecurityOrigin.cpp:

(WebCore::shouldTreatAsUniqueOrigin):

12:16 PM Changeset in webkit [284477] by Chris Dumez
  • 12 edits
    49 adds in trunk/LayoutTests

Resync web-platform-tests/reporting from upstream
https://bugs.webkit.org/show_bug.cgi?id=231957

Reviewed by Alex Christensen.

Resync web-platform-tests/reporting from upstream 207e223d74fdc1f1.

LayoutTests/imported/w3c:

  • web-platform-tests/reporting/*: Updated.

LayoutTests:

12:09 PM Changeset in webkit [284476] by Wenson Hsieh
  • 8 edits in trunk

REGRESSION (r284079): fast/canvas/gradient-with-clip.html and fast/canvas/gradient-text-with-shadow.html are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=231681
rdar://84202478

Reviewed by Kimmo Kinnunen.

Source/WebKit:

These tests occasionally fail when we time out while waiting for the pixel buffer to be populated underneath
RemoteImageBufferProxy::getPixelBuffer; this happens because the GPU process sometimes halts (and never
resumes) while processing stream messages, and consequently never ends up processing the GetPixelBuffer IPC
stream message that's necessary to populate the shared memory buffer for GetPixelBuffer.

This, in turn, happens when the IPC stream buffer is about to exhaust all available capacity (i.e. the write
cursor is nearing the end of the 2MB buffer), and as a result, we send messages that would normally be encoded
in the IPC stream as out-of-line IPC messages instead, which are received in the GPU process on the IPC thread
and appended to the receive queue corresponding to the destination ID in Connection::processIncomingMessage().

If we happen to have sent RemoteRenderingBackend::CreateImageBuffer(a) right before exhausting capacity and
sending out-of-line messages targeting the RemoteDisplayListRecorder corresponding to the newly created image
buffer a, we'll end up with a race condition where the IPC thread may receive the out-of-line messages meant
for the new remote display list destination *before* the new remote display list has added itself as an IPC
receive queue by calling into StreamServerConnection::startReceivingMessages().

In this particular scenario (where we "lose" the race), Connection::processIncomingMessage will skip past the
early return where it would normally find its corresponding receive queue via m_receiveQueues.get(*message),
and instead falls through to Connection::SyncMessageState::processIncomingMessage(), which will attempt to
dispatch the incoming message to the Connection's client (GPUConnectionToWebProcess). Of course, the
GPUConnectionToWebProcess isn't aware of how to process this incoming message, so it simply gets dropped. By the
time the receive queue is added for the new RemoteDisplayListRecorder, we'll observe a ProcessOutOfStreamMessage
and end up waiting forever for this out-of-line message to be added to the receive queue, but this never ends up
happening because it has already been received and dropped by GPUConnectionToWebProcess.

To address the flaky tests in the short term, we work around this issue by making CreateImageBuffer a sync
message, so we guarantee that any subsequent messages sent to the image buffer's RemoteDisplayListRecorder will
not be dropped. In the (slightly) longer term, we should turn this back into an async stream message, and add a
mechanism to redirect all receiver-less RemoteDisplayListRecorder messages to a separate queue.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::createImageBuffer):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteRenderingBackend.messages.in:

Make CreateImageBuffer a synchronous stream message for now.

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::createRemoteImageBuffer):

LayoutTests:

Remove the flaky failure entries in test expectations. See WebKit2 ChangeLog for more details.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
11:56 AM Changeset in webkit [284475] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Update test expectations for still-failing CSS web platform tests
https://bugs.webkit.org/show_bug.cgi?id=231964

Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-10-19

  • platform/gtk/TestExpectations:
11:54 AM Changeset in webkit [284474] by achristensen@apple.com
  • 3 edits in trunk/Tools

Fix iOS API tests after r284304
https://bugs.webkit.org/show_bug.cgi?id=231829

Part of the original commit that told the tests to continue doing what they were doing before was omitted.
This commits that.

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:

(webViewWithResourceLoadStatisticsEnabledInNetworkProcess):

11:43 AM Changeset in webkit [284473] by wilander@apple.com
  • 3 edits in trunk/LayoutTests

http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=231379
<rdar://problem/83991245>

Reviewed by Chris Dumez.

  • http/tests/resourceLoadStatistics/resources/redirect.py:

Added the response header 'Cache-Control: no-cache, no-store'.
Historically, we've had problems with redirects getting cached
so that they don't hit the network. In this particular case,
the same redirect is being done in different orders and might
fall into the cache trap.

  • platform/mac-wk2/TestExpectations:

Removed [Pass Failure] expectation for sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html.

11:41 AM Changeset in webkit [284472] by youenn@apple.com
  • 13 edits in trunk

Guarantee order of WebSocket events in case of being resumed
https://bugs.webkit.org/show_bug.cgi?id=231664

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/websockets/interfaces/WebSocket/close/close-nested-expected.txt:
  • web-platform-tests/websockets/interfaces/WebSocket/readyState/003-expected.txt:

Source/WebCore:

Introduce a WebSocket task source as per spec.
This aligns with https://html.spec.whatwg.org/multipage/web-sockets.html where the user agent is expected to a queue task
when closing handshake is started and so on.

By queuing an event loop task to fire WebSocket events, we ensure ordering of events even in case of resuming, while simplifying the implementation.
This makes it use the event loop which is extra nice if we resolve promises in event listeners.

A follow-up patch should refactor code so that WebSocket::didReceiveMessageError can directly fire the close event without having to wait for a didClose call.

Covered by existing tests.

  • Modules/websockets/WebSocket.cpp:

(WebCore::WebSocket::WebSocket):
(WebCore::WebSocket::suspend):
(WebCore::WebSocket::resume):
(WebCore::WebSocket::stop):
(WebCore::WebSocket::dispatchOrQueueEvent):
(WebCore::WebSocket::resumeTimerFired): Deleted.

  • Modules/websockets/WebSocket.h:
  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::send):

  • dom/TaskSource.h:

Source/WebKit:

We no longer need to handle resume/suspend in WebSocketChannel layer since WebSocket will deal with itself by enqueuing a task in the event loop.

  • WebProcess/Network/WebSocketChannel.cpp:

(WebKit::WebSocketChannel::disconnect):
(WebKit::WebSocketChannel::didConnect):
(WebKit::WebSocketChannel::didReceiveText):
(WebKit::WebSocketChannel::didReceiveBinaryData):
(WebKit::WebSocketChannel::didClose):
(WebKit::WebSocketChannel::didReceiveMessageError):
(WebKit::WebSocketChannel::suspend):
(WebKit::WebSocketChannel::resume):
(WebKit::WebSocketChannel::didSendHandshakeRequest):
(WebKit::WebSocketChannel::didReceiveHandshakeResponse):
(WebKit::WebSocketChannel::enqueueTask): Deleted.

  • WebProcess/Network/WebSocketChannel.h:

LayoutTests:

  • http/tests/websocket/tests/hybi/inspector/send-and-receive.html:

The WebSocket server was racing to close the connection with the User Agent.
The patch queueing a task to fire events is further amplifying this race.
To make the test non flaky, we use an echo server that waits for User Agent to close the connection.

11:40 AM Changeset in webkit [284471] by commit-queue@webkit.org
  • 2 edits in trunk

Add AX team GitHub usernames to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=231966

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-19
Reviewed by Chris Fleizach.

  • metadata/contributors.json:

Add Chris Fleizach's and Andres Gonzalez's GitHub usernames. Add Tyler
Wilcock as a contributor. Run validate-committer-lists --canonicalize
to fix some style issues.

11:37 AM Changeset in webkit [284470] by Alan Coon
  • 15 edits
    4 adds in branches/safari-613.1.6-branch

Cherry-pick r284466. rdar://problem/84424869

REGRESSION(r284313): ::marker accelerated animations are broken
https://bugs.webkit.org/show_bug.cgi?id=231906
<rdar://problem/84383279>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

WPT now reflect that we correctly do not animate the opacity property and correctly account for
other ineffective properties on ::marker, such as line-height.

  • web-platform-tests/css/css-pseudo/marker-animate-expected.txt:
  • web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt:

Source/WebCore:

Test: webanimations/marker-opacity-animation-no-effect.html

We incorrectly supported animations for all known CSS properties on a ::marker since we added
support for animation of ::marker, and with r284313 we started returning the correct renderer
for ::marker pseudo-elements which meant that accelerated opacity animations started running
for the first time.

We now correctly ignore disallowed properties for ::marker when animating with those changes.

First, in Style::Resolver::styleForKeyframe(), we pass the relevant allowlist to the MatchResult's
authorDeclarations when adding the keyframe properties.

Then, in KeyframeEffect::isCurrentlyAffectingProperty() we call isValidMarkerStyleProperty() in
case we're being called for a ::marker pseudo-element.

To be able to obtain the allowlist and call isValidMarkerStyleProperty() in those two questions,
we had to refactor the related code into a dedicated PropertyAllowlist file and enum.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/KeyframeEffect.cpp: (WebCore::KeyframeEffect::isCurrentlyAffectingProperty const):
  • style/ElementRuleCollector.cpp: (WebCore::Style::ElementRuleCollector::transferMatchedRules):
  • style/ElementRuleCollector.h:
  • style/PropertyAllowlist.cpp: Added. (WebCore::Style::propertyAllowlistForPseudoId): (WebCore::Style::isValidMarkerStyleProperty): (WebCore::Style::isValidCueStyleProperty):
  • style/PropertyAllowlist.h: Added.
  • style/PropertyCascade.cpp: (WebCore::Style::PropertyCascade::addMatch): (WebCore::Style::isValidMarkerStyleProperty): Deleted. (WebCore::Style::isValidCueStyleProperty): Deleted.
  • style/RuleData.cpp: (WebCore::Style::determinePropertyAllowlist): (WebCore::Style::RuleData::RuleData): (WebCore::Style::determinePropertyAllowlistType): Deleted.
  • style/RuleData.h: (WebCore::Style::RuleData::propertyAllowlist const): (): Deleted. (WebCore::Style::RuleData::propertyAllowlistType const): Deleted.
  • style/StyleResolver.cpp: (WebCore::Style::Resolver::styleForKeyframe):

LayoutTests:

Add a new test that checks we do not visually account for an opacity animation on a ::marker
pseudo-element.

  • webanimations/marker-opacity-animation-no-effect-expected.html: Added.
  • webanimations/marker-opacity-animation-no-effect.html: Added.

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

11:15 AM WebKitGTK/Debugging edited by Michael Catanzaro
WebKitGTK+ -> WebKitGTK (diff)
11:14 AM WebKitGTK/Releasing edited by Michael Catanzaro
WebKitGTK+ -> WebKitGTK (diff)
11:14 AM EnvironmentVariables edited by Michael Catanzaro
WebKitGTK+ -> WebKitGTK (diff)
11:13 AM WebKitGtkLayoutTests edited by Michael Catanzaro
WebKitGTK+ -> WebKitGTK (diff)
11:04 AM Changeset in webkit [284469] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] http/tests/cache/disk-cache/redirect-chain-limits.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=231630

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:00 AM Changeset in webkit [284468] by Ayumi Kojima
  • 3 edits in trunk/LayoutTests

[ iOS ] imported/w3c/web-platform-tests/html/canvas/element/manual tests, fast/canvas/canvas-createPattern-video-modify.html and media/video-canvas-createPattern.html are failing.
https://bugs.webkit.org/show_bug.cgi?id=231959

Unreviewed test gardening.

  • platform/ipad/TestExpectations:
  • platform/mac/TestExpectations:
10:36 AM Changeset in webkit [284467] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Wasm Table can take arbitrary default value
https://bugs.webkit.org/show_bug.cgi?id=231933
rdar://84327812

Reviewed by Robin Morisset.

  • wasm/WasmTable.cpp:

(JSC::Wasm::Table::grow):

10:18 AM Changeset in webkit [284466] by graouts@webkit.org
  • 15 edits
    4 adds in trunk

REGRESSION(r284313): ::marker accelerated animations are broken
https://bugs.webkit.org/show_bug.cgi?id=231906
<rdar://problem/84383279>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

WPT now reflect that we correctly do not animate the opacity property and correctly account for
other ineffective properties on ::marker, such as line-height.

  • web-platform-tests/css/css-pseudo/marker-animate-expected.txt:
  • web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt:

Source/WebCore:

Test: webanimations/marker-opacity-animation-no-effect.html

We incorrectly supported animations for all known CSS properties on a ::marker since we added
support for animation of ::marker, and with r284313 we started returning the correct renderer
for ::marker pseudo-elements which meant that accelerated opacity animations started running
for the first time.

We now correctly ignore disallowed properties for ::marker when animating with those changes.

First, in Style::Resolver::styleForKeyframe(), we pass the relevant allowlist to the MatchResult's
authorDeclarations when adding the keyframe properties.

Then, in KeyframeEffect::isCurrentlyAffectingProperty() we call isValidMarkerStyleProperty() in
case we're being called for a ::marker pseudo-element.

To be able to obtain the allowlist and call isValidMarkerStyleProperty() in those two questions,
we had to refactor the related code into a dedicated PropertyAllowlist file and enum.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::isCurrentlyAffectingProperty const):

  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::transferMatchedRules):

  • style/ElementRuleCollector.h:
  • style/PropertyAllowlist.cpp: Added.

(WebCore::Style::propertyAllowlistForPseudoId):
(WebCore::Style::isValidMarkerStyleProperty):
(WebCore::Style::isValidCueStyleProperty):

  • style/PropertyAllowlist.h: Added.
  • style/PropertyCascade.cpp:

(WebCore::Style::PropertyCascade::addMatch):
(WebCore::Style::isValidMarkerStyleProperty): Deleted.
(WebCore::Style::isValidCueStyleProperty): Deleted.

  • style/RuleData.cpp:

(WebCore::Style::determinePropertyAllowlist):
(WebCore::Style::RuleData::RuleData):
(WebCore::Style::determinePropertyAllowlistType): Deleted.

  • style/RuleData.h:

(WebCore::Style::RuleData::propertyAllowlist const):
(): Deleted.
(WebCore::Style::RuleData::propertyAllowlistType const): Deleted.

  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::styleForKeyframe):

LayoutTests:

Add a new test that checks we do not visually account for an opacity animation on a ::marker
pseudo-element.

  • webanimations/marker-opacity-animation-no-effect-expected.html: Added.
  • webanimations/marker-opacity-animation-no-effect.html: Added.
10:01 AM Changeset in webkit [284465] by commit-queue@webkit.org
  • 6 edits in trunk

Use JSONValues instead of a JSC::VM to parse WKContentRuleLists
https://bugs.webkit.org/show_bug.cgi?id=231704

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-19
Reviewed by Brady Eidson.

Source/WebCore:

This makes the parser much simpler and easier to see what is going on.
It probably also saves some memory because we don't need to make a VM just to parse JSON.
Covered by existing tests. There are extensive tests for invalid input, and there is only
one change in the error reported: we used to say the top level has to be an object, then
we would say that it has to be an array. JavaScript arrays are objects, but JSON arrays aren't.
Valid input continues to parse the same, and invalid input continues to fail to parse, but the
error is more accurate now.

  • contentextensions/ContentExtensionError.cpp:

(WebCore::ContentExtensions::contentExtensionErrorCategory):

  • contentextensions/ContentExtensionError.h:
  • contentextensions/ContentExtensionParser.cpp:

(WebCore::ContentExtensions::getStringList):
(WebCore::ContentExtensions::getDomainList):
(WebCore::ContentExtensions::getTypeFlags):
(WebCore::ContentExtensions::loadTrigger):
(WebCore::ContentExtensions::loadAction):
(WebCore::ContentExtensions::loadRule):
(WebCore::ContentExtensions::loadEncodedRules):
(WebCore::ContentExtensions::parseRuleList):

Tools:

  • TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:

(TestWebKitAPI::TEST_F):

9:54 AM Changeset in webkit [284464] by Ayumi Kojima
  • 3 edits in trunk/LayoutTests

[ iOS Win ] editing/selection/modal-dialog-select-paragraph.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=231962

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/win/TestExpectations:
9:44 AM Changeset in webkit [284463] by achristensen@apple.com
  • 2 edits in trunk/Tools

Re-disable WebKit.HTTPSProxy API test on iOS
https://bugs.webkit.org/show_bug.cgi?id=231396

Yesterday's attempt at making it not time out does not appear to have worked.

  • TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
9:41 AM Changeset in webkit [284462] by ysuzuki@apple.com
  • 2 edits in trunk/Tools

DumpRenderTree should not use WK methods
https://bugs.webkit.org/show_bug.cgi?id=231910

Reviewed by Alex Christensen.

DumpRenderTree functions can be called on WebThread if ios simulator is used.
If we first use WK functions on that, it causes WebKit initialization on non
main thread. We should not mix WK functions with DumpRenderTree.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(dumpFramesAsText):

9:39 AM Changeset in webkit [284461] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] fast/inline/inline-background-clip-text-multiline.html is image failing.
https://bugs.webkit.org/show_bug.cgi?id=231961

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
9:37 AM Changeset in webkit [284460] by Chris Dumez
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed build fix.

  • DerivedSources-input.xcfilelist:
9:30 AM Changeset in webkit [284459] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Drop assertion in RegistrationDatabase::importRecords()
https://bugs.webkit.org/show_bug.cgi?id=231960

Reviewed by Alex Christensen.

Drop assertion in RegistrationDatabase::importRecords(). This can happen when deleting service
worker scripts on disk but not clearing the service worker database.
The code properly deal with this so there is no need to crash in debug builds.

  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::RegistrationDatabase::importRecords):

9:24 AM Changeset in webkit [284458] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

Follow-up #2: WebKit::LocalConnection::createCredentialPrivateKey leaks an NSMutableDictionary
<https://webkit.org/b/231814>
<rdar://problem/84307054>

Unreviewed follow-up to address Darin's comment.

  • UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:

(WebKit::LocalConnection::createCredentialPrivateKey const):

  • Use WTFMove() to avoid ref count churn.
9:23 AM Changeset in webkit [284457] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage- tests are failing.
https://bugs.webkit.org/show_bug.cgi?id=231959

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
9:00 AM Changeset in webkit [284456] by fpizlo@apple.com
  • 2 edits in trunk/Source/WTF

StringBuffer should really know that strings might be 8-bit
https://bugs.webkit.org/show_bug.cgi?id=231937

Reviewed by Yusuke Suzuki.

We somehow forgot to change this to use CharType instead of UChar.

  • wtf/text/StringBuffer.h:

(WTF::StringBuffer::resize):

8:38 AM Changeset in webkit [284455] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

AX: Fix broken spec links in AccessibilityObject.cpp and AccessibilityTree.cpp
https://bugs.webkit.org/show_bug.cgi?id=231932

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-19
Reviewed by Chris Fleizach.

Fix broken spec links.

  • accessibility/AccessibilityObject.cpp:

(WebCore::initializeRoleMap):
(WebCore::AccessibilityObject::buttonRoleType const):

  • accessibility/AccessibilityTree.cpp:

(WebCore::AccessibilityTree::isTreeValid const):

8:17 AM Changeset in webkit [284454] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WebCore

Fix leak of object returned from MTLCreateSystemDefaultDevice()
<https://webkit.org/b/231899>
<rdar://problem/84373621>

Reviewed by Anders Carlsson.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::platformSupportsMetal):

  • testing/Internals.mm:

(WebCore::Internals::platformSupportsMetal):

  • Use adoptNS() to fix the leak.
8:05 AM WebKitGTK/2.34.x edited by Michael Catanzaro
(diff)
8:05 AM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
7:51 AM Changeset in webkit [284453] by Chris Dumez
  • 62 edits in trunk/Source

cachedCGColor() and nsColor() should return smart pointers
https://bugs.webkit.org/show_bug.cgi?id=231909

Reviewed by Tim Horton.

r276283 attempted to make cachedCGColor() and nsColor() thread-safe but the fix was incomplete
since those functions return unretained objects that can be released from the cache on any
other thread. This patch updates cachedCGColor() and nsColor() to return a RetainPtr to address
the issue.

Source/WebCore:

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(AXAttributeStringSetStyle):

  • editing/cocoa/FontAttributesCocoa.mm:

(WebCore::FontAttributes::createDictionary const):

  • editing/cocoa/FontShadowCocoa.mm:

(WebCore::FontShadow::createShadow const):

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::convert):
(HTMLConverter::_colorForElement):
(HTMLConverter::computedAttributesForElement):
(HTMLConverter::_fillInBlock):
(HTMLConverter::_processElement):
(WebCore::editingAttributedString):

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

(WebCore::LocalSampleBufferDisplayLayer::initialize):

  • platform/graphics/ca/PlatformCALayer.cpp:

(WebCore::PlatformCALayer::drawTextAtPoint const):

  • platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:

(WebCore::PlatformCAFilters::setFiltersOnLayer):

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::PlatformCALayerCocoa::setBackgroundColor):
(WebCore::PlatformCALayerCocoa::setBorderColor):

  • platform/graphics/cg/ColorCG.cpp:

(WebCore::cachedCGColor):

  • platform/graphics/cg/GradientCG.cpp:

(WebCore::Gradient::createCGGradient):

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::setCGFillColor):
(WebCore::setCGShadow):
(WebCore::GraphicsContextCG::didUpdateState):

  • platform/graphics/cocoa/ColorCocoa.h:
  • platform/graphics/cocoa/ColorCocoa.mm:

(WebCore::platformColor):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::addAttributesForCustomFontPalettes):

  • platform/graphics/cocoa/GraphicsContextCocoa.mm:

(WebCore::drawFocusRingAtTime):
(WebCore::colorForMarkerLineStyle):
(WebCore::GraphicsContextCG::drawDotsForDocumentMarker):

  • platform/graphics/mac/ColorMac.h:
  • platform/graphics/mac/ColorMac.mm:

(WTF::RetainPtr<NSColor>>::createValueForKey):
(WebCore::nsColor):

  • platform/mac/LocalDefaultSystemAppearance.mm:

(WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance):

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::setColor):

  • platform/mac/ScrollbarThemeMac.mm:

(WebCore::ScrollbarThemeMac::setUpOverhangAreaBackground):

  • platform/mac/ThemeMac.mm:

(WebCore::drawCellFocusRingWithFrameAtTime):

  • rendering/RenderThemeMac.mm:

(WebCore::AttachmentLayout::layOutTitle):
(WebCore::AttachmentLayout::layOutSubtitle):

  • testing/cocoa/WebViewVisualIdentificationOverlay.mm:

(-[WebViewVisualIdentificationOverlay initWithWebView:kind:deprecated:]):
(drawPattern):

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:

(WebKit::cgColorFromColor):
(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView themeColor]):
(-[WKWebView underPageBackgroundColor]):
(-[WKWebView _pageExtendedBackgroundColor]):
(-[WKWebView _sampledPageTopColor]):

  • UIProcess/API/Cocoa/_WKApplicationManifest.mm:

(-[_WKApplicationManifest themeColor]):

  • UIProcess/API/mac/WKView.mm:

(-[WKView underlayColor]):
(-[WKView _pageExtendedBackgroundColor]):

  • UIProcess/API/mac/WKWebViewMac.mm:

(-[WKWebView _underlayColor]):

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

(WebKit::WebViewImpl::updateTextTouchBar):
(WebKit::WebViewImpl::underlayColor const):
(WebKit::WebViewImpl::pageExtendedBackgroundColor const):

  • UIProcess/PDF/WKPDFHUDView.mm:

(-[WKPDFHUDView _setupLayer:]):

  • UIProcess/mac/WebColorPickerMac.mm:

(WebKit::WebColorPickerMac::setSelectedColor):
(WebKit::WebColorPickerMac::showColorPicker):
(-[WKColorPopoverMac setAndShowPicker:withColor:suggestions:]):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::setAccentColor):

  • WebProcess/cocoa/VideoFullscreenManager.mm:

(WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):

Source/WebKitLegacy/mac:

  • DOM/DOMRGBColor.mm:

(-[DOMRGBColor color]):

  • WebView/WebFrame.mm:

(-[WebFrame _bodyBackgroundColor]):

  • WebView/WebView.mm:

(-[WebView updateTextTouchBar]):

7:45 AM Changeset in webkit [284452] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Rename Line::removeCollapsibleContent to removeTrimmableContent
https://bugs.webkit.org/show_bug.cgi?id=231930

Reviewed by Antti Koivisto.

"Trimming" is closer to spec language.

  • layout/formattingContexts/inline/InlineLine.cpp:

(WebCore::Layout::Line::removeTrimmableContent):
(WebCore::Layout::Line::removeCollapsibleContent): Deleted.

  • layout/formattingContexts/inline/InlineLine.h:
  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::close):

7:27 AM Changeset in webkit [284451] by commit-queue@webkit.org
  • 2 edits
    1 add in trunk/Source/WebKit

Update seccomp filters with latest changes from flatpak
https://bugs.webkit.org/show_bug.cgi?id=231479

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-10-19
Reviewed by Adrian Perez de Castro.

Additionally, let's fix a minor inconsistency in our error-handling code: all but one of
our codepaths carefully free and close resources, but the process is about to crash so
there's not really any reason to do so. The code is slightly simpler if we don't bother.

The seemingly-extraneous include order changes are required to placate the style checker.

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::seccompStrerror):
(WebKit::setupSeccomp):

  • UIProcess/Launcher/glib/Syscalls.h: Added.
7:25 AM Changeset in webkit [284450] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Unskip passing flex-basis: content + aspect ratio WPT tests
https://bugs.webkit.org/show_bug.cgi?id=231947

Patch by Rob Buis <rbuis@igalia.com> on 2021-10-19
Reviewed by Sergio Villar Senin.

Unskip passing flex-basis: content + aspect ratio WPT tests. These test cases did not work
before because there was no support for flex-basis: content, but since r284440 they pass.

7:17 AM Changeset in webkit [284449] by youenn@apple.com
  • 7 edits in trunk

[ wk2 ] 2 page-cache layout-tests are flakey crashing
https://bugs.webkit.org/show_bug.cgi?id=224558
<rdar://problem/76652825>

Reviewed by Eric Carlson.

Source/WebCore:

Covered by updated test.

  • Modules/mediastream/PeerConnectionBackend.cpp:

srflx candidates can be exposed even in case of filtering enabled.

  • testing/MockLibWebRTCPeerConnection.cpp:

Backend should now handle the mDNS filtering itself.

LayoutTests:

  • fast/mediastream/RTCPeerConnection-icecandidate-event-expected.txt: Rebasing after mock changes.
  • platform/mac-wk2/TestExpectations:
  • webrtc/peerconnection-new-candidate-page-cache.html:
6:46 AM Changeset in webkit [284448] by commit-queue@webkit.org
  • 5 edits
    4 adds in trunk

[css-scroll-snap] Triggering a layout during scroll causes jittery scrolling on iOS
https://bugs.webkit.org/show_bug.cgi?id=173887
<rdar://problem/67153673>

Patch by Martin Robinson <mrobinson@igalia.com> on 2021-10-19
Reviewed by Simon Fraser.

Source/WebKit:

Tests: fast/scrolling/ios/scroll-snap-with-relayouts-horizontal.html

fast/scrolling/ios/scroll-snap-with-relayouts-vertical.html

Ensure that when the root node is scrolling, it is added to the list of nodes
with an active user scroll. This prevents the web process from resnapping during
layout when the user is actively scrolling.

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView scrollViewWillBeginDragging:]): Call RemoteScrollingCoordinatorProxy::setRootNodeIsInUserScroll
when a scdroll starts and ends.

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h: Added method declaration.
  • UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:

(WebKit::RemoteScrollingCoordinatorProxy::setRootNodeIsInUserScroll): Added setRootNodeIsInUserScroll method.

LayoutTests:

  • fast/scrolling/ios/scroll-snap-with-relayouts-horizontal-expected.txt: Added.
  • fast/scrolling/ios/scroll-snap-with-relayouts-horizontal.html: Added.
  • fast/scrolling/ios/scroll-snap-with-relayouts-vertical-expected.txt: Added.
  • fast/scrolling/ios/scroll-snap-with-relayouts-vertical.html: Added.
6:40 AM Changeset in webkit [284447] by commit-queue@webkit.org
  • 32 edits in trunk

Remove support for some SVG properties
https://bugs.webkit.org/show_bug.cgi?id=227897

Patch by Rob Buis <rbuis@igalia.com> on 2021-10-19
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Adjust test expectations to removed properties.

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:

Source/WebCore:

Remove support for the SVG properties color-profile, color-rendering
and enable-background. We never had support for these apart from parsing
them and they are removed from the SVG2 specification.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json:
  • css/SVGCSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::svgPropertyValue):

  • css/SVGCSSValueKeywords.in:
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

  • rendering/style/SVGRenderStyle.cpp:

(WebCore::SVGRenderStyle::diff const):

  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::setColorInterpolationFilters):
(WebCore::SVGRenderStyle::colorInterpolationFilters const):
(WebCore::SVGRenderStyle::setBitDefaults):
(WebCore::SVGRenderStyle::InheritedFlags::operator== const):
(WebCore::SVGRenderStyle::setColorRendering): Deleted.
(WebCore::SVGRenderStyle::colorRendering const): Deleted.

  • svg/SVGElement.cpp:

(WebCore::createAttributeNameToCSSPropertyIDMap):

  • svg/properties/SVGPropertyAnimatorFactory.h:

(WebCore::SVGPropertyAnimatorFactory::attributeAnimatorCreator):

  • svg/svgattrs.in:

LayoutTests:

Adjust test expectations to removed properties.

  • fast/css/getComputedStyle/computed-style-expected.txt:
  • fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/glib/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/glib/svg/css/getComputedStyle-basic-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/ios/svg/css/getComputedStyle-basic-expected.txt:
  • platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/mac/svg/css/getComputedStyle-basic-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • svg/css/getComputedStyle-basic-expected.txt:
6:20 AM Changeset in webkit [284446] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.34.0

WPE WebKit 2.34.0

6:19 AM Changeset in webkit [284445] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.34

Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.34.0 release

.:

  • Source/cmake/OptionsWPE.cmake: Bump version numbers.

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.34.0.
4:52 AM Changeset in webkit [284444] by youenn@apple.com
  • 12 edits
    2 copies
    2 adds in trunk

getDisplayMedia MediaStreamTrack.applyConstraints behavior regressed in Safari 15
https://bugs.webkit.org/show_bug.cgi?id=231286
<rdar://problem/83930865>

Reviewed by Eric Carlson.

Source/WebKit:

Display tracks are different in that they do not have presets.
Revert back to directly linking the WebProcess track with the remote display source without going through RealtimeVideoSource.
This restores past behavior.
Refactoring of UserMediaCaptureManager to use a single map.
We do not yet support cloning tracks to get different sizes, this should be done as a follow-up.

Covered by fast/mediastream/getDisplayMedia-size.html.

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:
  • WebProcess/cocoa/RemoteCaptureSampleManager.h:
  • WebProcess/cocoa/RemoteRealtimeAudioSource.cpp:
  • WebProcess/cocoa/RemoteRealtimeAudioSource.h:
  • WebProcess/cocoa/RemoteRealtimeDisplaySource.cpp: Added.
  • WebProcess/cocoa/RemoteRealtimeDisplaySource.h: Added.
  • WebProcess/cocoa/RemoteRealtimeVideoSource.cpp:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:
  • WebProcess/cocoa/UserMediaCaptureManager.h:

LayoutTests:

  • fast/mediastream/getDisplayMedia-size-expected.txt: Added.
  • fast/mediastream/getDisplayMedia-size.html: Added.
  • platform/ios/TestExpectations: Added.
4:05 AM Changeset in webkit [284443] by youenn@apple.com
  • 25 edits
    3 copies
    3 moves
    2 adds in trunk

Expose MediaCapabilities to Workers
https://bugs.webkit.org/show_bug.cgi?id=231574

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Allow running encoding tests in workers as well as in window.

  • web-platform-tests/media-capabilities/decodingInfo.any.worker-expected.txt:
  • web-platform-tests/media-capabilities/encodingInfo.any-expected.txt: Added.
  • web-platform-tests/media-capabilities/encodingInfo.any.html: Added.
  • web-platform-tests/media-capabilities/encodingInfo.any.js: Added.
  • web-platform-tests/media-capabilities/encodingInfo.any.worker-expected.txt: Added.
  • web-platform-tests/media-capabilities/encodingInfo.any.worker.html: Added.
  • web-platform-tests/media-capabilities/encodingInfo-expected: Removed.
  • web-platform-tests/media-capabilities/encodingInfo.html: Removed.
  • web-platform-tests/media-capabilities/idlharness.any.worker-expected.txt:

Source/WebCore:

Expose Media Capabilities to workers by hopping to main thread and using worker responsible document for gathering Media Capabilities, then hopping back to worker.
MediaCapabilities will store the promises when waiting for media capabilities gathering by document.

We remove CustomEnabled since it is not supported in Workers and we are now exposing encoding info for WebRTC anyway.

Tests: imported/w3c/web-platform-tests/media-capabilities/encodingInfo.any.html

imported/w3c/web-platform-tests/media-capabilities/encodingInfo.any.worker.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/mediacapabilities/MediaCapabilities.cpp:
  • Modules/mediacapabilities/MediaCapabilities.h:
  • Modules/mediacapabilities/MediaCapabilities.idl:
  • Modules/mediacapabilities/NavigatorMediaCapabilities.cpp:
  • Modules/mediacapabilities/NavigatorMediaCapabilities.h:
  • Modules/mediacapabilities/WorkerNavigator+MediaCapabilities.idl: Added.
  • Modules/mediacapabilities/WorkerNavigatorMediaCapabilities.cpp: Added.
  • Modules/mediacapabilities/WorkerNavigatorMediaCapabilities.h: Added.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/ScriptExecutionContext.cpp:
  • dom/ScriptExecutionContext.h:
  • platform/MediaCapabilitiesDecodingInfo.h:
  • platform/MediaCapabilitiesEncodingInfo.h:
  • platform/MediaCapabilitiesInfo.h:
  • platform/mediacapabilities/AudioConfiguration.h:
  • platform/mediacapabilities/MediaConfiguration.h:
  • platform/mediacapabilities/MediaDecodingConfiguration.h:
  • platform/mediacapabilities/MediaEncodingConfiguration.h:
  • platform/mediacapabilities/VideoConfiguration.h:
4:03 AM Changeset in webkit [284442] by youenn@apple.com
  • 6 edits in trunk

Close peer connection sockets when entering page cache
https://bugs.webkit.org/show_bug.cgi?id=231890

Reviewed by Eric Carlson.

Source/WebKit:

We proactively close all peer connection sockets when entering page cache.
This makes peer connection go to disconnected and then failed state.
Covered by updated tests.

  • WebProcess/Network/webrtc/LibWebRTCSocket.cpp:

LayoutTests:

  • webrtc/peerconnection-page-cache-long.html:
  • webrtc/peerconnection-page-cache.html:
3:21 AM Changeset in webkit [284441] by svillar@igalia.com
  • 2 edits in trunk

Add my github username to contributors.json

Unreviewed.

  • metadata/contributors.json:
3:14 AM Changeset in webkit [284440] by svillar@igalia.com
  • 20 edits in trunk

[css-flexbox] Add flex-basis: content support
https://bugs.webkit.org/show_bug.cgi?id=221479
LayoutTests/imported/w3c:

Reviewed by Javier Fernandez.

Fixed 6 subtest expectations. All of them working fine now.

  • web-platform-tests/css/css-flexbox/parsing/flex-basis-computed-expected.txt:
  • web-platform-tests/css/css-flexbox/parsing/flex-basis-valid-expected.txt:
  • web-platform-tests/css/css-flexbox/parsing/flex-shorthand-expected.txt:

Source/WebCore:

Reviewed by Javier Fernandez.

Add support for the content keyword as a valid value for the flex-basis property.
It indicates an automated size based on the contents of the flex item. It's typically
equivalent to the max-content size but it has some adjustments for aspect ratios,
orthogonal flows and intrinsic sizing constraints.

Apart from adding the parsing support, it required very little adjustments in the
flexbox code after the refactoring in r284359.

This makes WebKit pass all of the flex-basis:content tests in WPT. We're talking
about 6 tests testing the feature and 6 subtests related to parsing.

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Handle Content in switch.
(WebCore::CSSPrimitiveValue::init): Initialization for content CSS value.

  • css/CSSProperties.json:
  • css/LengthFunctions.cpp: Replaced LengthOrAuto by LengthSizing.

(WebCore::valueForLength): Handle Content in switch.
(WebCore::floatValueForLength): Ditto.

  • css/LengthFunctions.h:

(WebCore::minimumValueForLength): Ditto.

  • css/calc/CSSCalcValue.cpp:

(WebCore::createCSS): Ditto.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFlexBasis): Consume CSSValueContent.
(WebCore::CSSPropertyParser::consumeFlex): Ditto.

  • platform/Length.cpp:

(WebCore::operator<<): Added printing support for content.

  • platform/Length.h:

(WebCore::Length::initialize): Added enum for content.
(WebCore::Length::isContent const): New method.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeReplacedLogicalWidthUsing const): Handle content in switch.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::childMainSizeIsDefinite): Treat content as indefinite lenght.
(WebCore::RenderFlexibleBox::childHasComputableAspectRatioAndCrossSizeIsConsideredDefinite):
Flex basis must be either auto or content.
(WebCore::RenderFlexibleBox::computeFlexBaseSizeForChild): Compute flex-basis using max-content
if flex-basis:content is specified.

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertLengthSizing): Handle content in switch.

Source/WebKit:

<rdar://problem/74279369>

Reviewed by Javier Fernandez.

Handle LengthType::Content in encode/decode functions.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<Length>::encode):
(IPC::ArgumentCoder<Length>::decode):

LayoutTests:

Reviewed by Javier Fernandez.

1:35 AM Changeset in webkit [284439] by Cameron McCormack
  • 66 edits
    22 adds
    2 deletes in trunk

Ensure CanvasRenderingContext2D.drawImage(video) uses the right color space
https://bugs.webkit.org/show_bug.cgi?id=229025
<rdar://problem/81828490>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Add some new WPTs for drawImage(video).

  • web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-drawImage.html:
  • web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html:

Updated tests to check that video color space conversion is done
correctly.

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js:

(pixelsApproximatelyEqual): Tweaked threshold to pass video tests on iOS.

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.mp4: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.webm: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.mp4: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.webm: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.mp4: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.webm: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.mp4: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.webm: Added.

Source/WebCore:

When GPU process media handling is disabled (and in the GPU process
when it is handling a NativeImageForCurrentTime message),
MediaPlayer::nativeImageForCurrentTime is used to get the video frame
image. We make this return an image with the right color space on
Apple platforms in PixelBufferConformerCV::createImageFromPixelBuffer.

For now, we avoid using the correct color space when passing
HTMLVideoElements to WebGLRenderingContext.texImage2D. The
specification is unclear about what color space the texture data
should be in, and implementations are currently interoperable in not
converting the RGB color space of the video (such as Rec.601, Rec.709,
etc.) into sRGB. To avoid the conversion, and effectively reinterpret
the video RGB colors as sRGB, we make the ImageBuffer the video is
drawn into have a matching color space, as it's the raw RGB values
from the ImageBuffer that are uploade as the texture.

(An alternative to this could be passing an argument through
nativeImageForCurrentTime and paintCurrentFrameInContext, which says
to avoid doing the conversion from video RGB to sRGB, but that needs a
fair amount of plumbing.)

If https://github.com/KhronosGroup/WebGL/issues/2165 is resolved, the
changes to LRUImageBufferCache in this commit can be reverted, so that
video frames are drawn into sRGB ImageBuffers again. (We'd also need
something to make the copyToPlatformTexture() call in
texImageSourceHelper do the correct color conversion somehow.)

The now differing behavior between CanvasRenderingContext2D.drawImage
and WebGLRenderingContext.texImage2D means that the WebGL conformance
suite textures/misc/texture-corner-case-videos.html test fails, since
it checks for incorrect 2D canvas video frame color conversion.

Tests: imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html

imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html

  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::colorSpace const): New function that
exposes the color space of the current frame of the video.

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

(WebCore::ImageBitmap::createPromise): Create the ImageBuffer in a
color space that matches the video, not always sRGB.

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::drawImageIntoBuffer):
(WebCore::WebGLRenderingContextBase::videoFrameToImage): Use an
ImageBuffer whose color space matches the video frame's color space.
(WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer):
Add a DestinationColorSpace argument, so that the LRU cache is keyed
off both size and color space.

  • html/canvas/WebGLRenderingContextBase.h:
  • platform/cocoa/CoreVideoSoftLink.cpp:
  • platform/cocoa/CoreVideoSoftLink.h: Add SPIs that let us get or

compute a CGColorSpace from a CVPixelBuffer. Remove
CVImageBufferGetColorSpace, which is unsused.

  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::colorSpace):

  • platform/graphics/MediaPlayer.h:
  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::colorSpace):

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
  • platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:

(WebCore::MediaPlayerPrivateAVFoundationCF::colorSpace):

  • platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::colorSpace): Expose the
color space of the current image. While we strictly only need the pixel
buffer to be up to date, we call updateLastImage() since it has the
UpdateSynchronously behavior, and the caller to colorSpace() will use
the image soon anyway.

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::colorSpace):

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

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::colorSpace):

  • platform/graphics/cg/ColorSpaceCG.h:
  • platform/graphics/cv/CVUtilities.h:
  • platform/graphics/cv/CVUtilities.mm:

(WebCore::createCGColorSpaceForCVPixelBuffer): New function to produce
a CGColorSpace for a CVPixelBuffer. On macOS, this is stored as an
attachment on the CVPixelBuffer. On iOS, we must call SPI to create a
CGColorSpace based on the other color space information in the
attachments. (It's possible we should cache the results of this
function for a given set of color space attachments, since
CVImageBufferCreateColorSpaceFromAttachments can end up creating a new
CGColorSpace object every time it's called.)

  • platform/graphics/cv/PixelBufferConformerCV.cpp:

(WebCore::PixelBufferConformerCV::createImageFromPixelBuffer): Create
the CGImage in a color space matching the CVPixelBuffer.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::colorSpace):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
  • platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h:
  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::colorSpace):

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
  • platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:

(WebCore::MockMediaPlayerMediaSource::colorSpace):

  • platform/mock/mediasource/MockMediaPlayerMediaSource.h:
  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::drawInternal):

Source/WebKit:

When GPU process media handling is enabled, ctx.drawImage(video)
calls work by sending a NativeImageForCurrentTime message to the GPU
process, which returns an IOSurface around which a CGImage is created.
There's no good way to get the color space off the IOSurface, so we
add a second return argument to NativeImageForCurrentTime to indicate
the color space used.

ImageBitmap creates an ImageBuffer for that image to be painted into,
and for that we also need to know the color space of the video. The
code that sends NativeImageForCurrentTime and then paints the
resulting image into the GraphicsContext is further down. So we add
a separate IPC message that gets the color space of the video's
current frame. (It would be better if we could avoid a second
synchronous IPC message call, but either ImageBitmap's scaling and
cropping code, or the ImageBuffer creation call, would need to be moved
down into MediaPlayerPrivateRemote::paintCurrentFrameInContext, which
doesn't seem like the right place for it.)

  • GPUProcess/media/RemoteImageDecoderAVFProxy.cpp:

(WebKit::RemoteImageDecoderAVFProxy::createFrameImageAtIndex):

  • GPUProcess/media/RemoteImageDecoderAVFProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
  • GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm:

(WebKit::RemoteMediaPlayerProxy::nativeImageForCurrentTime):
(WebKit::RemoteMediaPlayerProxy::colorSpace):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::colorSpace):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:

(WebKit::MediaPlayerPrivateRemote::nativeImageForCurrentTime): Add a
second return argument to NativeImageForCurrentTime to indicate the
color space of the returned IOSurface.
(WebKit::MediaPlayerPrivateRemote::colorSpace): Add a new IPC message to
get the color space of a video's current frame.

Source/WTF:

  • wtf/PlatformHave.h: Add HAVE_CVBUFFERCOPYATTACHMENTS.

LayoutTests:

texture-corner-case-videos.html relies on incorrect color space handling
with drawImage() on a 2D canvas and so now fails.

  • platform/glib/TestExpectations:
  • platform/ios-14/TestExpectations:
  • platform/ios-device/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:

New tests pass only on macOS Monterey+ and iOS 15+.

  • fast/canvas/canvas-createPattern-video-loading-expected.txt:
  • fast/canvas/canvas-createPattern-video-loading.html:
  • fast/canvas/canvas-createPattern-video-modify-expected.txt:
  • fast/canvas/canvas-createPattern-video-modify.html:
  • media/video-canvas-createPattern-expected.txt:
  • media/video-canvas-createPattern.html:
  • media/video-canvas-drawing-output-expected.txt:
  • media/video-canvas-drawing-output.html:
  • media/video-orientation-canvas-expected.txt:
  • media/video-orientation-canvas.html:

Update some tests to check for correctly converted color values.

  • platform/mac/media/video-canvas-createPattern-expected.png: Removed.
  • platform/wpe/media/video-canvas-createPattern-expected.png: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY-expected.txt:

An existing failure that changed a bit. This is
https://bugs.webkit.org/show_bug.cgi?id=231001.

1:06 AM Changeset in webkit [284438] by Kyle Piddington
  • 5 edits in trunk/Source/WebCore

Query EGL_BIND_TO_TEXTURE_TARGET_ANGLE to determine 2D/rectangular texture usage
https://bugs.webkit.org/show_bug.cgi?id=231468

Refactor GraphicsContextGLCocoa to hold a reference to
BIND_TO_TEXTURE_TARGET. This refactor is neccesary to support dropping
TEXTURE_RECT support from the Metal backend, as support is incomplete, and unnecessary

Reviewed by Kenneth Russell.

  • Modules/webxr/WebXROpaqueFramebuffer.cpp:

(WebCore::WebXROpaqueFramebuffer::startFrame):

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):
(WebCore::GraphicsContextGLOpenGL::drawingBufferTextureTarget):
(WebCore::GraphicsContextGLOpenGL::drawingBufferTextureTargetQueryForDrawingTarget):
(WebCore::GraphicsContextGLOpenGL::EGLDrawingBufferTextureTargetForDrawingTarget):
(WebCore::GraphicsContextGLOpenGL::allocateAndBindDisplayBufferBacking):
(WebCore::GraphicsContextGLOpenGL::bindDisplayBufferBacking):
(WebCore::GraphicsContextGLOpenGL::readCompositedResults):
(WebCore::GraphicsContextGLOpenGL::drawingBufferTextureTargetQuery): Deleted.
(WebCore::GraphicsContextGLOpenGL::EGLDrawingBufferTextureTarget): Deleted.

  • platform/graphics/cv/GraphicsContextGLCVANGLE.cpp:

(WebCore::GraphicsContextGLCVANGLE::GraphicsContextGLCVANGLE):
(WebCore::GraphicsContextGLCVANGLE::copyPixelBufferToTexture):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
Note: See TracTimeline for information about the timeline view.