Timeline



Jul 8, 2021:

10:55 PM Changeset in webkit [279773] by Yijia Huang
  • 9 edits in trunk/Source/JavaScriptCore

Add Air opcode add/sub-and-shift for ARM64 and select this instruction in Air
https://bugs.webkit.org/show_bug.cgi?id=227509

Reviewed by Saam Barati.

This patch includes two modifications:

  1. Add add/sub-with-shift to Air opcode and the corresponding pattern match for instruction selection.
  2. Minor fix in disassembler.

Given the operation:

add/sub Rd, Rn, Rm, ShiftType, amount

ADD/SUB (shifted register), adds/subs a register value Rn and an optionally-shifted register
value Rm, and writes the result to the destination register Rd. The instruction selector
can utilize this to lowering certain patterns in B3 IR before further Air optimization.

The equivalent pattern would be:

d = n +/- (m ShiftType amount)

Given B3 IR:
Int @0 = ArgumentReg(%x0)
Int @1 = ArgumentReg(%x1)
Int @2 = amount
Int @3 = ZShr(@1, @2)
Int @4 = Add/Sub(@0, @3)
Void@5 = Return(@4, Terminal)

Old optimized AIR
Shift %x1, amount, %x1, @3
Add/Sub %x0, %x1, %x0, @4
Ret %x0, @5

New optimized AIR
Add(Sub)Shift %x0, %x1, amount, %x0, @4
Ret %x0, @5

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::addLeftShift32):
(JSC::MacroAssemblerARM64::addRightShift32):
(JSC::MacroAssemblerARM64::addUnsignedRightShift32):
(JSC::MacroAssemblerARM64::addLeftShift64):
(JSC::MacroAssemblerARM64::addRightShift64):
(JSC::MacroAssemblerARM64::addUnsignedRightShift64):
(JSC::MacroAssemblerARM64::subLeftShift32):
(JSC::MacroAssemblerARM64::subRightShift32):
(JSC::MacroAssemblerARM64::subUnsignedRightShift32):
(JSC::MacroAssemblerARM64::subLeftShift64):
(JSC::MacroAssemblerARM64::subRightShift64):
(JSC::MacroAssemblerARM64::subUnsignedRightShift64):

  • assembler/testmasm.cpp:

(JSC::testAddWithLeftShift32):
(JSC::testAddWithRightShift32):
(JSC::testAddWithUnsignedRightShift32):
(JSC::testAddWithLeftShift64):
(JSC::testAddWithRightShift64):
(JSC::testAddWithUnsignedRightShift64):
(JSC::testSubWithLeftShift32):
(JSC::testSubWithRightShift32):
(JSC::testSubWithUnsignedRightShift32):
(JSC::testSubWithLeftShift64):
(JSC::testSubWithRightShift64):
(JSC::testSubWithUnsignedRightShift64):

  • b3/B3LowerToAir.cpp:
  • b3/air/AirOpcode.opcodes:
  • b3/testb3.h:

(checkUsesInstruction):

  • b3/testb3_2.cpp:

(testAddWithLeftShift32):
(testAddWithRightShift32):
(testAddWithUnsignedRightShift32):
(testAddWithLeftShift64):
(testAddWithRightShift64):
(testAddWithUnsignedRightShift64):
(testSubWithLeftShift32):
(testSubWithRightShift32):
(testSubWithUnsignedRightShift32):
(testSubWithLeftShift64):
(testSubWithRightShift64):
(testSubWithUnsignedRightShift64):
(addBitTests):

  • disassembler/ARM64/A64DOpcode.cpp:
  • disassembler/ARM64/A64DOpcode.h:

(JSC::ARM64Disassembler::A64DOpcodeAddSubtractShiftedRegister::immediate6):
(JSC::ARM64Disassembler::A64DOpcodeLogicalShiftedRegister::immediate6):

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

WebContent: Silence report of AppSupport denial
https://bugs.webkit.org/show_bug.cgi?id=227375

Patch by Adam Mazander <mazander@apple.com> on 2021-07-08
Reviewed by Brent Fulgham.

Manual testing confirms AppSupport does not need access to WebContent. Simplified.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
6:08 PM Changeset in webkit [279771] by Russell Epstein
  • 8 edits in branches/safari-612.1.22.1-branch/Source

Versioning.

WebKit-7612.1.22.1.4

5:51 PM Changeset in webkit [279770] by Kate Cheney
  • 2 edits in trunk/Source/WebCore

Unreviewed iOS build fix after
https://trac.webkit.org/changeset/279749/webkit.

  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):

5:38 PM Changeset in webkit [279769] by ysuzuki@apple.com
  • 18 edits in trunk

Fix StructuredClone for streams to handle BigInt64Array / BigUint64Array
https://bugs.webkit.org/show_bug.cgi?id=227571

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • resources/import-expectations.json:
  • web-platform-tests/FileAPI/blob/Blob-constructor.any-expected.txt:
  • web-platform-tests/FileAPI/blob/Blob-constructor.any.js:

(test_blob):

  • web-platform-tests/FileAPI/blob/Blob-constructor.any.worker-expected.txt:
  • web-platform-tests/encoding/encodeInto.any-expected.txt:
  • web-platform-tests/encoding/encodeInto.any.js:

(string_appeared_here.forEach.type.string_appeared_here.forEach):
(Float64Array.forEach.view.string_appeared_here.forEach): Deleted.

  • web-platform-tests/encoding/encodeInto.any.worker-expected.txt:
  • web-platform-tests/encoding/w3c-import.log:
  • web-platform-tests/fetch/api/response/response-clone.any-expected.txt:
  • web-platform-tests/fetch/api/response/response-clone.any.js:
  • web-platform-tests/fetch/api/response/response-clone.any.worker-expected.txt:

Source/WebCore:

While we already support BigInt64Array / BigUint64Array handling even in DOM code,
we lack support of them only in fetch's structuredClone code (which is specialized one
to make it fast by bypassing serialization / deserialization).

This patch fixes the issue to complete BigInt64Array / BigUint64Array in all DOM code.

  • Modules/streams/ReadableStreamInternals.js:

(readableStreamTeePullFunction):
(doStructuredClone): Deleted.

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSDOMGlobalObject::addBuiltinGlobals):

  • bindings/js/StructuredClone.cpp:

(WebCore::JSC_DEFINE_HOST_FUNCTION):

  • bindings/js/StructuredClone.h:
  • bindings/js/WebCoreBuiltinNames.h:
5:12 PM Changeset in webkit [279768] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

Make sure SVG SMIL animations do not run in processes without any pages
https://bugs.webkit.org/show_bug.cgi?id=227720
<rdar://79625708>

Reviewed by Simon Fraser.

Make sure SVG SMIL animations do not run in processes without any pages.

We have seen traces / logging indicating that SVG SMIL animations may run in cached WebProcesses, thus
using CPU unnecessarily. Cached WebProcesses have no WebPage so this patch adds assertions to catch cases
where those animations run when there is no Page (and early returns in release to avoid doing unnecessary
work).

  • page/Page.cpp:

(WebCore::Page::nonUtilityPageCount):
(WebCore::m_httpsUpgradeEnabled):
(WebCore::Page::~Page):
(WebCore::Page::isOnlyNonUtilityPage const):

  • page/Page.h:
  • svg/animation/SMILTimeContainer.cpp:

(WebCore::SMILTimeContainer::begin):
(WebCore::SMILTimeContainer::resume):
(WebCore::SMILTimeContainer::setElapsed):
(WebCore::SMILTimeContainer::startTimer):
(WebCore::SMILTimeContainer::updateAnimations):

5:11 PM Changeset in webkit [279767] by Chris Dumez
  • 8 edits in trunk

[IndexedDB] KeyPath validity checks should happen on the cloned value, not the original one
https://bugs.webkit.org/show_bug.cgi?id=227813

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

  • web-platform-tests/IndexedDB/clone-before-keypath-eval-expected.txt:

Source/WebCore:

KeyPath validity checks should happen on the cloned value, not the original one:

This was causing the following WPT test to fail in WebKit:
https://wpt.live/IndexedDB/clone-before-keypath-eval.html

This test is passing in Chrome and Gecko.

No new tests, rebaselined existing test.

  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::update):

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::putForCursorUpdate):
(WebCore::IDBObjectStore::putOrAdd):

  • Modules/indexeddb/IDBObjectStore.h:

LayoutTests:

Unskip test as it should no longer be flaky.

5:09 PM Changeset in webkit [279766] by clopez@igalia.com
  • 2 edits
    18 adds in trunk/LayoutTests

[GTK][WPE] Gardening of tests after r279585 and 279705

Re-baseline the tests that have consistent text output, mark the
ones that are flaky as failing and report a crash.

Unreviewed gardening.

  • platform/glib/TestExpectations:
  • platform/glib/http/tests/websocket/tests/hybi/multiple-set-cookies-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/cookies/attributes/invalid-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/cookies/attributes/max-age-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/cookies/attributes/path-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/cookies/attributes/secure-non-secure-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/cookies/encoding/charset-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/cookies/name/name-ctl-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/cookies/ordering/ordering.sub-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/cookies/path/match-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/cookies/value/value-ctl-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/cookies/value/value-expected.txt: Added.
5:06 PM Changeset in webkit [279765] by Truitt Savell
  • 3 edits in trunk/LayoutTests

[Mac] media/modern-media-controls/media-controller/media-controller-click-on-video-background-should-pause-fullscreen.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=221017

Unreviewed test gardening.

Patch by Ayumi Kojima <Ayumi Kojima> on 2021-07-08

  • platform/mac/TestExpectations:
  • platform/wk2/TestExpectations:
5:04 PM Changeset in webkit [279764] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

[watchOS] Tapping "Done" in Scribble when focusing an editable element should dismiss Quickboard
https://bugs.webkit.org/show_bug.cgi?id=227817
rdar://79931134

Reviewed by Tim Horton and Devin Rousso.

After using PUICQuickboardMessageViewController's PUICTextInput-based mode for presenting Scribble UI, we fail
to dismiss PUICQuickboardMessageViewController underneath -dismissAllInputViewControllers:, since Quickboard
is not the top-most view controller (instead, it ends up being PUICQuickboardRemoteViewController). As a result,
the call to -dismissViewControllerAnimated:completion: on the fullscreen input view controller ends up being
dropped on the floor.

Prior to adopting PUICQuickboardMessageViewController and remote text input on watchOS, this worked because the
delegate method -quickboard:textEntered: would only be invoked after the front-most view controller was done
dismissing, such that calling -dismissViewControllerAnimated:completion: on the fullscreen input view
controller would (correctly) dismiss it.

We can address this by checking whether the fullscreen input view controller itself has a presented view
controller in -dismissAllInputViewControllers:, and dismissing that first if necessary.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dismissAllInputViewControllers:]):

4:46 PM Changeset in webkit [279763] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Make backingProviderLayerCanIncludeLayer() a member function of BackingSharingState
https://bugs.webkit.org/show_bug.cgi?id=227818

Reviewed by Alan Bujtas.

Minor code refactor, no behavior change.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::BackingSharingState::canIncludeLayer const):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
(WebCore::backingProviderLayerCanIncludeLayer): Deleted.

4:25 PM Changeset in webkit [279762] by Russell Epstein
  • 8 edits in branches/safari-612.1.22.0-branch/Source

Versioning.

WebKit-7612.1.22.0.4

4:08 PM Changeset in webkit [279761] by rniwa@webkit.org
  • 16 edits
    7 deletes in trunk/Source/WebCore

Remove more custom binding code with GenerateAddOpaqueRoot
https://bugs.webkit.org/show_bug.cgi?id=227789

Reviewed by Chris Dumez.

Use GenerateAddOpaqueRoot extended IDL option to remove more custom bindings code.

Also made GenerateAddOpaqueRoot default to use wrapped object's opaqueRoot function.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSAbortControllerCustom.cpp: Removed.
  • bindings/js/JSAudioTrackCustom.cpp: Removed.
  • bindings/js/JSAudioTrackListCustom.cpp: Removed.
  • bindings/js/JSTextTrackCustom.cpp: Removed.
  • bindings/js/JSTextTrackListCustom.cpp: Removed.
  • bindings/js/JSVideoTrackCustom.cpp: Removed.
  • bindings/js/JSVideoTrackListCustom.cpp: Removed.
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • dom/AbortController.h:
  • dom/AbortController.idl:
  • html/track/AudioTrack.idl:
  • html/track/AudioTrackList.idl:
  • html/track/TextTrack.idl:
  • html/track/TextTrackList.idl:
  • html/track/TrackBase.cpp:

(WebCore::TrackBase::opaqueRoot): Added.

  • html/track/TrackBase.h:
  • html/track/TrackListBase.cpp:

(WebCore::TrackListBase::opaqueRoot const): Added.

  • html/track/TrackListBase.h:
  • html/track/VideoTrack.idl:
  • html/track/VideoTrackList.idl:
3:59 PM Changeset in webkit [279760] by commit-queue@webkit.org
  • 18 edits in trunk

Fix some whitespace handling issues in URL setters
https://bugs.webkit.org/show_bug.cgi?id=227806

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

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/url-setters-stripping.any-expected.txt:
  • web-platform-tests/url/url-setters-stripping.any.worker-expected.txt:

Source/WebCore:

Covered by newly passing wpt tests.

  • dom/Element.cpp:

(WebCore::Element::getURLAttribute const):

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::href const):
Don't remove whitespace before giving to completeURL, which will do that for us if it's a valid URL.
If it's not a valid URL, we want the original string, not the trimmed string.

  • html/URLDecomposition.cpp:

(WebCore::parsePort):
Parse ports more like the URLParser, which ignores tabs and newlines.

Source/WTF:

Setters should ignore tabs and newlines like the main parser does.
The protocol setter is problematic, which I reported in https://github.com/whatwg/url/issues/620

  • wtf/URL.cpp:

(WTF::URL::setFragmentIdentifier):

  • wtf/URLParser.cpp:

(WTF::URLParser::isSpecialScheme):
(WTF::URLParser::parse):

  • wtf/URLParser.h:

The URL.hash setter should allow trailing C0 and control characters, which we would otherwise trim.
Rather than introduce a new parameter, use a sentinel value for when we need to do this.

LayoutTests:

Update some old tests that failed in Chrome and Firefox to pass in all browsers after this change.

  • fast/dom/DOMURL/set-href-attribute-port-expected.txt:
  • fast/dom/DOMURL/set-href-attribute-port.html:
  • fast/dom/HTMLAnchorElement/set-href-attribute-port-expected.txt:
  • fast/dom/HTMLAnchorElement/set-href-attribute-port.html:
3:50 PM Changeset in webkit [279759] by Ruben Turcios
  • 1 copy in tags/Safari-612.1.22.0.3

Tag Safari-612.1.22.0.3.

3:36 PM Changeset in webkit [279758] by Russell Epstein
  • 1 copy in tags/Safari-612.1.22.1.3

Tag Safari-612.1.22.1.3.

3:23 PM Changeset in webkit [279757] by Yijia Huang
  • 2 edits in trunk/Tools

Add Yijia Huang as a committer
https://bugs.webkit.org/show_bug.cgi?id=227814

Unreviewed.

  • Scripts/webkitpy/common/config/contributors.json:
3:17 PM Changeset in webkit [279756] by Cameron McCormack
  • 3 edits
    2 adds in trunk

Stop GraphicsLayerCA::recursiveCommitChanges recursion once cMaxLayerTreeDepth is reached
https://bugs.webkit.org/show_bug.cgi?id=227738
<rdar://42584284>

Reviewed by Simon Fraser.

Source/WebCore:

To avoid stack overflow in some configurations, stop
recursiveCommitChange recursion when we reach the same level that we
stop hooking up PlatformCALayers. This will leave GraphicsLayerCAs in
the tree with m_uncommittedChanges, but if we ever do another call to
recursiveCommitChange where the GraphicsLayerCA is now at an
appropriate depth (because some ancestors lost their structural
layers, for example), then we'll process the uncommitted changes at
that point.

Pull up the increment of commitState.treeDepth from
commitLayerChangesBeforeSublayers to recursiveCommitChanges so that
the commitLayerChangesBeforeSublayers call for a mask layer doesn't
contribute to the depth count.

Use structuralLayerPurpose() rather than null-checking
m_structuralLayer to determine whether we count an additional depth
level, since m_structuralLayer reflects whether we already have a
structural layer (which may or may not go away), and
structuralLayerPurpose() can tell us whether we will have a structural
layer.

Test: fast/layers/deep-layer-update.html

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):

LayoutTests:

Add a test that changes made to GraphicsLayerCAs that are too deep
in the tree will be committed if they later become not too deep.

  • fast/layers/deep-layer-update-expected.html: Added.
  • fast/layers/deep-layer-update.html: Added.
3:13 PM Changeset in webkit [279755] by Brent Fulgham
  • 11 edits in trunk

[Cocoa] Expose SPI to opt out of Extensible SSO authentication
https://bugs.webkit.org/show_bug.cgi?id=227729
<rdar://problem/75647892>

Reviewed by Tim Horton.

Source/WebKit:

WKWebView clients should be able to disable Extensible SSO authentication flows, so exposing the internal
mechanism as SPI. This is especially important for use cases where a WKWebView will be used to load content
without being attached to a Window, since a Window is required to present the Extensible SSO authentication
UI. Without a Window, WebKit will wait for a Window to be attached causing loads to timeout. By adopting this
API, developers can opt out of Extensible SSO, allowing loads to fail quickly rather than waiting for a timeout.

Tested by a new TestWebKitAPI test case: SOAuthorizationRedirect.DisableSSO

  • UIProcess/API/Cocoa/WKPreferences.h:
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _extensibleSSOEnabled]): Add getter for new preference.
(-[WKPreferences _setExtensibleSSOEnabled:]): Add setter.

  • UIProcess/Cocoa/SOAuthorization/NavigationSOAuthorizationSession.mm:

(WebKit::NavigationSOAuthorizationSession::shouldStartInternal): Add new logging so developers can see when a WKWebView
without a Window is attempting to participate in Extensible SSO flows.

  • UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.mm:

(WebKit::PopUpSOAuthorizationSession::initSecretWebView): Switch from SPI to API.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction): Ditto.

  • UIProcess/WebPageProxy.h:

Source/WTF:

Create new WKPreference to allow WebKit clients to opt out of Extensible SSO authentication.

  • Scripts/Preferences/WebPreferences.yaml:

Tools:

Add a new test to confirm that Extenstible SSO authentication flows are bypassed when the new WKPreference
is used. Updated other tests to confirm that the SSO delegate is called when expected.

  • TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:

(-[TestSOAuthorizationDelegate _webView:decidePolicyForSOAuthorizationLoadWithCurrentPolicy:forExtension:completionHandler:]):
(resetState):
(TestWebKitAPI::TEST):

2:15 PM Changeset in webkit [279754] by Ruben Turcios
  • 1 copy in tags/Safari-612.1.18.11.4

Tag Safari-612.1.18.11.4.

2:08 PM Changeset in webkit [279753] by Russell Epstein
  • 1 copy in tags/Safari-612.1.22.11.1

Tag Safari-612.1.22.11.1.

2:07 PM Changeset in webkit [279752] by Russell Epstein
  • 1 delete in tags/Safari-612.1.22.11.1

Delete tag.

1:59 PM Changeset in webkit [279751] by Wenson Hsieh
  • 10 edits
    2 adds in trunk

[Live Text] Selection is misaligned on some images on twitter.com
https://bugs.webkit.org/show_bug.cgi?id=227775
rdar://77142364

Reviewed by Tim Horton.

Source/WebCore:

On Twitter, image thumbnails consist of fully transparent image elements (opacity: 0;) that are overlaid over
div elements with a background image. The images for some of these transparent image elements sometimes don't
match the background image behind it (namely, the image is stretched to exactly fit the bounds of the
transparent image element in a way that does not preserve aspect ratio, whereas the background image is cropped
to cover the div). As such, Live Text in these image elements ends up misaligned against the background image
(which is actually visible to the user).

To address this, special case fully transparent images such that we take a snapshot of the page using the
absolute bounds of the transparent image and run OCR over this snapshot, instead of using the image data as-is.

Test: fast/images/text-recognition/image-overlay-in-transparent-image.html

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::containerRectForTextRecognition):
(WebCore::HTMLElement::updateWithTextRecognitionResult):

  • html/HTMLElement.h:
  • page/Page.cpp:

(WebCore::Page::updateElementsWithTextRecognitionResults):

Source/WebKit:

See WebCore ChangeLog for more details.

  • WebProcess/WebCoreSupport/ShareableBitmapUtilities.cpp:

(WebKit::createShareableBitmap):

  • WebProcess/WebCoreSupport/ShareableBitmapUtilities.h:

(WebKit::createShareableBitmap):

Add an option to handle the scenario where the image renderer is fully transparent by falling back to a frame-
level snapshot, using the bounds of the image renderer.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::requestTextRecognition):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::imagePositionInformation):
(WebKit::elementPositionInformation):

LayoutTests:

  • fast/images/text-recognition/image-overlay-in-transparent-image-expected.txt: Added.
  • fast/images/text-recognition/image-overlay-in-transparent-image.html: Added.
1:54 PM Changeset in webkit [279750] by Kate Cheney
  • 79 edits
    2 copies
    14 moves
    7 adds
    9 deletes in trunk

Clean up App Privacy Report code
https://bugs.webkit.org/show_bug.cgi?id=227326
<rdar://problem/79696849>

Reviewed by Brent Fulgham.

Source/WebCore:

Tests: http/tests/app-privacy-report/attribution-load-url.html

http/tests/app-privacy-report/attribution-ping-load.html
http/tests/app-privacy-report/attribution-post-request.html
http/tests/app-privacy-report/attribution-preflight-async.html
http/tests/app-privacy-report/attribution-preflight-sync.html
http/tests/app-privacy-report/attribution-speculative-revalidation.html

Rename App Privacy Report code to better align with the code's purpose
of attributing loads to the app or not. The default value should
be app initiated based on the documentation, so this patch also adjusts
the default value as needed.

  • loader/CrossOriginAccessControl.cpp:

(WebCore::createAccessControlPreflightRequest):

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::lastNavigationWasAppInitiated const):
(WebCore::DocumentLoader::setLastNavigationWasAppInitiated):
(WebCore::DocumentLoader::lastNavigationWasAppBound const): Deleted.
(WebCore::DocumentLoader::setLastNavigationWasAppBound): Deleted.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::load):
(WebCore::FrameLoader::updateRequestAndAddExtraFields):

  • loader/FrameLoader.h:
  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::setAsIsolatedCopy):

  • platform/network/ResourceRequestBase.h:

(WebCore::ResourceRequestBase::isAppInitiated const):
(WebCore::ResourceRequestBase::setIsAppInitiated):
(WebCore::ResourceRequestBase::ResourceRequestBase):
(WebCore::ResourceRequestBase::encodeBase const):
(WebCore::ResourceRequestBase::decodeBase):
(WebCore::ResourceRequestBase::isAppBound const): Deleted.
(WebCore::ResourceRequestBase::setIsAppBound): Deleted.

  • testing/ServiceWorkerInternals.cpp:

(WebCore::ServiceWorkerInternals::lastNavigationWasAppInitiated):
(WebCore::ServiceWorkerInternals::lastNavigationWasAppBound): Deleted.

  • testing/ServiceWorkerInternals.h:
  • testing/ServiceWorkerInternals.idl:
  • workers/service/ServiceWorkerClientData.cpp:

(WebCore::ServiceWorkerClientData::isolatedCopy const):
(WebCore::ServiceWorkerClientData::from):

  • workers/service/ServiceWorkerClientData.h:

(WebCore::ServiceWorkerClientData::encode const):
(WebCore::ServiceWorkerClientData::decode):

  • workers/service/ServiceWorkerContextData.cpp:

(WebCore::ServiceWorkerContextData::isolatedCopy const):

  • workers/service/ServiceWorkerContextData.h:

(WebCore::ServiceWorkerContextData::encode const):
(WebCore::ServiceWorkerContextData::decode):

  • workers/service/context/ServiceWorkerThreadProxy.cpp:

(WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
(WebCore::ServiceWorkerThreadProxy::setLastNavigationWasAppInitiated):
(WebCore::ServiceWorkerThreadProxy::lastNavigationWasAppInitiated):
(WebCore::ServiceWorkerThreadProxy::setLastNavigationWasAppBound): Deleted.
(WebCore::ServiceWorkerThreadProxy::lastNavigationWasAppBound): Deleted.

  • workers/service/context/ServiceWorkerThreadProxy.h:
  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::RegistrationDatabase::importRecords):

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::startScriptFetch):
(WebCore::SWServer::updateWorker):
(WebCore::SWServer::clientIsAppInitiatedForRegistrableDomain):
(WebCore::SWServer::updateAppInitiatedValueForWorkers):
(WebCore::SWServer::registerServiceWorkerClient):
(WebCore::SWServer::unregisterServiceWorkerClient):
(WebCore::SWServer::clientIsAppBoundForRegistrableDomain): Deleted.
(WebCore::SWServer::updateAppBoundValueForWorkers): Deleted.

  • workers/service/server/SWServer.h:
  • workers/service/server/SWServerRegistration.cpp:

(WebCore::SWServerRegistration::scheduleSoftUpdate):

  • workers/service/server/SWServerRegistration.h:

(WebCore::SWServerRegistration::isAppInitiated):
(WebCore::SWServerRegistration::isAppBound): Deleted.

  • workers/service/server/SWServerToContextConnection.h:
  • workers/service/server/SWServerWorker.cpp:

(WebCore::m_lastNavigationWasAppInitiated):
(WebCore::SWServerWorker::contextData const):
(WebCore::SWServerWorker::updateAppInitiatedValue):
(WebCore::m_lastNavigationWasAppBound): Deleted.
(WebCore::SWServerWorker::updateAppBoundValue): Deleted.

  • workers/service/server/SWServerWorker.h:

Source/WebKit:

Rename App Privacy Report code to better align with the code's purpose
of attributing loads to the app or not. The default value should
be app initiated based on the documentation, so this patch also adjusts
the default value as needed.

This also adopts the new NSURLRequest attribution API and removes
the deprecated _isNonAppInitiated SPI.

Covered by existing layout and API tests.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::preconnectTo):
(WebKit::NetworkProcess::appPrivacyReportTestingData):
(WebKit::NetworkProcess::clearAppPrivacyReportTestingData):
(WebKit::NetworkProcess::appBoundNavigationData): Deleted.
(WebKit::NetworkProcess::clearAppBoundNavigationData): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::continueWillSendRedirectedRequest):
(WebKit::NetworkResourceLoader::isAppBound):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::appPrivacyReportTestingData):
(WebKit::NetworkSession::appBoundNavigationTestingData): Deleted.

  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:

(WebKit::ServiceWorkerFetchTask::softUpdateIfNeeded):

  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:

(WebKit::ServiceWorkerSoftUpdateLoader::loadFromNetwork):

  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::controlClient):
(WebKit::WebSWServerConnection::createFetchTask):

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:

(WebKit::WebSWServerToContextConnection::updateAppInitiatedValue):
(WebKit::WebSWServerToContextConnection::updateAppBoundValue): Deleted.

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::constructRevalidationRequest):
(WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
(WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):

  • NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:

(WebKit::NetworkCache::SubresourceInfo::isAppInitiated const):
(WebKit::NetworkCache::SubresourceInfo::setIsAppInitiated):
(WebKit::NetworkCache::SubresourceInfo::isAppBound const): Deleted.
(WebKit::NetworkCache::SubresourceInfo::setIsAppBound): Deleted.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

  • Scripts/webkit/messages.py:

(headers_for_type):

  • Shared/AppPrivacyReport.h:

(WebKit::AppPrivacyReportTestingData::setDidPerformSoftUpdate):
(WebKit::AppPrivacyReportTestingData::clearAppPrivacyReportTestingData):
(WebKit::AppPrivacyReportTestingData::didLoadAppInitiatedRequest):
(WebKit::AppPrivacyReportTestingData::encode const):
(WebKit::AppPrivacyReportTestingData::decode):

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<WebCore::ResourceRequest>::decodePlatformData):

  • Shared/NavigatingToAppBoundDomain.h:

(WebKit::AppBoundNavigationTestingData::setDidPerformSoftUpdate): Deleted.
(WebKit::AppBoundNavigationTestingData::clearAppBoundNavigationDataTesting): Deleted.
(WebKit::AppBoundNavigationTestingData::updateAppBoundNavigationTestingData): Deleted.
(WebKit::AppBoundNavigationTestingData::encode const): Deleted.
(WebKit::AppBoundNavigationTestingData::decode): Deleted.
(): Deleted.

  • Shared/WebPageCreationParameters.cpp:

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

  • Shared/WebPageCreationParameters.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _didLoadAppInitiatedRequest:]):
(-[WKWebView _didLoadNonAppInitiatedRequest:]):
(-[WKWebView _appBoundNavigationDataForDomain:completionHandler:]): Deleted.
Removed now that we no longer need to test attribution context, that
is all it was used for.

(-[WKWebView _didLoadAppBoundRequest:]): Deleted.
(-[WKWebView _didLoadNonAppBoundRequest:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm:

(-[WKWebView _lastNavigationWasAppInitiated:]):
(-[WKWebView _appPrivacyReportTestingData:]):
(-[WKWebView _clearAppPrivacyReportTestingData:]):
(-[WKWebView _lastNavigationWasAppBound:]): Deleted.
(-[WKWebView _appBoundNavigationData:]): Deleted.
(-[WKWebView _clearAppBoundNavigationData:]): Deleted.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::setLastNavigationWasAppInitiated):
(WebKit::WebPageProxy::lastNavigationWasAppInitiated):
(WebKit::WebPageProxy::setLastNavigationWasAppBound): Deleted.
(WebKit::WebPageProxy::lastNavigationWasAppBound): Deleted.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::preconnectTo):

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

(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::preconnectTo):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::appPrivacyReportTestingData):
(WebKit::WebPageProxy::clearAppPrivacyReportTestingData):
(WebKit::WebPageProxy::appBoundNavigationData): Deleted.
(WebKit::WebPageProxy::clearAppBoundNavigationData): Deleted.

  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::loadResource):
(WebKit::WebLoaderStrategy::preconnectTo):

  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::updateAppInitiatedValue):
(WebKit::WebSWContextManagerConnection::startFetch):
(WebKit::WebSWContextManagerConnection::updateAppBoundValue): Deleted.

  • WebProcess/Storage/WebSWContextManagerConnection.h:
  • WebProcess/Storage/WebSWContextManagerConnection.messages.in:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchWillSendRequest):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadRequest):
(WebKit::WebPage::createDocumentLoader):
(WebKit::WebPage::lastNavigationWasAppInitiated):
(WebKit::WebPage::lastNavigationWasAppBound): Deleted.

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::setLastNavigationWasAppInitiated):
(WebKit::WebPage::setLastNavigationWasAppBound): Deleted.

  • WebProcess/WebPage/WebPage.messages.in:

Tools:

Delete testing functions related to attribution context. Move App
Privacy Report tests into their own file.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: Added.

(TEST):
(catch):
(function):
(-[SWAppInitiatedRequestMessageHandler userContentController:didReceiveScriptMessage:]):

  • TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReportPlugIn.mm: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacyPlugIn.mm.

(-[AppPrivacyReportPlugIn webProcessPlugInBrowserContextController:frame:willSendRequestForResource:request:redirectResponse:]):

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(-[SWAppBoundRequestMessageHandler userContentController:didReceiveScriptMessage:]): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/app-privacy-report-iframe.html: Added.
  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::didLoadAppInitiatedRequest):
(WTR::TestRunner::didLoadNonAppInitiatedRequest):
(WTR::TestRunner::appBoundRequestContextDataForDomain): Deleted.
(WTR::TestRunner::callDidReceiveAppBoundRequestContextDataForDomainCallback): Deleted.
(WTR::TestRunner::didLoadAppBoundRequest): Deleted.
(WTR::TestRunner::didLoadNonAppBoundRequest): Deleted.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::didLoadAppInitiatedRequest):
(WTR::TestController::didLoadNonAppInitiatedRequest):
(WTR::TestController::clearAppPrivacyReportTestingData):
(WTR::TestController::appBoundRequestContextDataForDomain): Deleted.
(WTR::TestController::didLoadAppBoundRequest): Deleted.
(WTR::TestController::didLoadNonAppBoundRequest): Deleted.
(WTR::TestController::clearAppBoundNavigationData): Deleted.

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveAppBoundRequestContextDataForDomain): Deleted.

  • WebKitTestRunner/TestInvocation.h:
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::didLoadAppInitiatedRequest):
(WTR::TestController::didLoadNonAppInitiatedRequest):
(WTR::TestController::clearAppPrivacyReportTestingData):
(WTR::TestController::appBoundRequestContextDataForDomain): Deleted.
(WTR::TestController::didLoadAppBoundRequest): Deleted.
(WTR::TestController::didLoadNonAppBoundRequest): Deleted.
(WTR::TestController::clearAppBoundNavigationData): Deleted.

  • WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView _didLoadAppInitiatedRequest:]):
(-[TestRunnerWKWebView _didLoadNonAppInitiatedRequest:]):
(-[TestRunnerWKWebView _appBoundNavigationDataForDomain:completionHandler:]): Deleted.
(-[TestRunnerWKWebView _didLoadAppBoundRequest:]): Deleted.
(-[TestRunnerWKWebView _didLoadNonAppBoundRequest:]): Deleted.

LayoutTests:

Move App Privacy Report tests into their own directory.

  • TestExpectations:
  • http/tests/app-privacy-report/attribution-load-url-expected.txt: Added.
  • http/tests/app-privacy-report/attribution-load-url.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-load-url.html.
  • http/tests/app-privacy-report/attribution-ping-load-expected.txt: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-ping-load-expected.txt.
  • http/tests/app-privacy-report/attribution-ping-load.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-ping-load.html.
  • http/tests/app-privacy-report/attribution-post-request-expected.txt: Added.
  • http/tests/app-privacy-report/attribution-post-request.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-post-request.html.
  • http/tests/app-privacy-report/attribution-preflight-async-expected.txt: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async-expected.txt.
  • http/tests/app-privacy-report/attribution-preflight-async.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async.html.
  • http/tests/app-privacy-report/attribution-preflight-sync-expected.txt: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync-expected.txt.
  • http/tests/app-privacy-report/attribution-preflight-sync.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync.html.
  • http/tests/app-privacy-report/attribution-speculative-revalidation-expected.txt: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation-expected.txt.
  • http/tests/app-privacy-report/attribution-speculative-revalidation.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation.html.
  • http/tests/app-privacy-report/resources/frame-with-authenticated-resource.py: Renamed from LayoutTests/http/tests/in-app-browser-privacy/resources/frame-with-authenticated-resource.py.
  • http/tests/app-privacy-report/resources/post.py: Added.
  • http/tests/app-privacy-report/resources/resource-with-auth.py: Renamed from LayoutTests/http/tests/in-app-browser-privacy/resources/resource-with-auth.py.
  • http/tests/in-app-browser-privacy/app-bound-attribution-load-url-expected.txt: Removed.
  • http/tests/in-app-browser-privacy/app-bound-attribution-post-request-expected.txt: Removed.
  • http/tests/in-app-browser-privacy/context-string-for-subframe-expected.txt: Removed.
  • http/tests/in-app-browser-privacy/context-string-for-subframe.html: Removed.
  • http/tests/in-app-browser-privacy/context-string-preconnect-expected.txt: Removed.
  • http/tests/in-app-browser-privacy/context-string-preconnect.html: Removed.
  • http/tests/in-app-browser-privacy/context-string-preflight-expected.txt: Removed.
  • http/tests/in-app-browser-privacy/context-string-preflight.html: Removed.
  • http/tests/in-app-browser-privacy/resources/post.py: Removed.
  • http/tests/navigation/resources/check-ping-app-initiated-data.py: Renamed from LayoutTests/http/tests/navigation/resources/check-ping-app-bound-data.py.
  • platform/ios-wk2/TestExpectations:
1:45 PM Changeset in webkit [279749] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebCore

Deploy smart pointers in PointerCaptureController
https://bugs.webkit.org/show_bug.cgi?id=227352

Reviewed by Wenson Hsieh.

Deployed Ref/RefPtr in more places in PointerCaptureController.
Also made PointerCaptureController::CapturingData ref counted.

  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::pointerCaptureElement const):
(WebCore::PointerCaptureController::setPointerCapture):
(WebCore::PointerCaptureController::releasePointerCapture):
(WebCore::PointerCaptureController::hasPointerCapture):
(WebCore::PointerCaptureController::pointerLockWasApplied):
(WebCore::PointerCaptureController::elementWasRemoved):
(WebCore::PointerCaptureController::reset):
(WebCore::PointerCaptureController::updateHaveAnyCapturingElement):
(WebCore::PointerCaptureController::hasCancelledPointerEventForIdentifier const):
(WebCore::PointerCaptureController::preventsCompatibilityMouseEventsForIdentifier const):
(WebCore::hierarchyHasCapturingEventListeners):
(WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
(WebCore::PointerCaptureController::pointerEventForMouseEvent):
(WebCore::PointerCaptureController::pointerEventWillBeDispatched):
(WebCore::PointerCaptureController::ensureCapturingDataForPointerEvent):
(WebCore::PointerCaptureController::pointerEventWasDispatched):
(WebCore::PointerCaptureController::cancelPointer):
(WebCore::PointerCaptureController::processPendingPointerCapture):

  • page/PointerCaptureController.h:

(WebCore::PointerCaptureController::CapturingData::create):
(WebCore::PointerCaptureController::CapturingData::CapturingData):

1:29 PM Changeset in webkit [279748] by Simon Fraser
  • 4 edits
    2 adds in trunk

Scrollbar hidden when scroller has a negative z-index child
https://bugs.webkit.org/show_bug.cgi?id=227545

Reviewed by Alan Bujtas.
Source/WebCore:

The code to ensure that overflow:scroll scrollbars appeared on top of composited descendant
layers had incorrect behavior if the only descendant had negative z-index; it would move the
overflow controls container layer to be after that descendant, and thus behind foreground
content.

Fix by inserting the overflow controls container layer in front of the frontmost of the
descendant and the scroller itself.

Test: compositing/scrolling/async-overflow-scrolling/negative-z-in-scroller-hidden-scrollbar.html

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::adjustOverflowScrollbarContainerLayers):

LayoutTests:

  • compositing/scrolling/async-overflow-scrolling/layer-for-negative-z-in-scroller-expected.txt: Rebaseline
  • compositing/scrolling/async-overflow-scrolling/negative-z-in-scroller-hidden-scrollbar-expected.html: Added.
  • compositing/scrolling/async-overflow-scrolling/negative-z-in-scroller-hidden-scrollbar.html: Added.
1:27 PM Changeset in webkit [279747] by Russell Epstein
  • 10 edits
    1 add in branches/safari-612.1.23-branch

Cherry-pick r279690. rdar://problem/80339399

[JSC] Fix Object.assign fast path to accept undefined/null
https://bugs.webkit.org/show_bug.cgi?id=227769
rdar://80264271

Reviewed by Saam Barati.

JSTests:

  • stress/object-assign-undefined.js: Added. (test):

Source/JavaScriptCore:

Object.assign can accept undefined or null as a second (or latter) parameters.
If it is passed, the parameter is just ignored. Previous DFG / FTL optimization patch
does not handle this case.

  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::handleIntrinsicCall):
  • 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::compileObjectAssign):
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileObjectAssign):
  • runtime/ObjectConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION):
  • runtime/ObjectConstructorInlines.h: (JSC::objectAssignFast):

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

1:27 PM Changeset in webkit [279746] by Russell Epstein
  • 35 edits
    3 adds in branches/safari-612.1.23-branch

Cherry-pick r279604. rdar://problem/80340434

[JSC] Optimize Object.assign and putDirectInternal
https://bugs.webkit.org/show_bug.cgi?id=227677

Reviewed by Filip Pizlo.

JSTests:

  • microbenchmarks/object-assign-replace.js: Added. (test):
  • microbenchmarks/object-assign-transition.js: Added. (test):

Source/JavaScriptCore:

This patch improves Object.assign performance (and this requires putDirectInternal improvement).

  1. Object.assign is handled by DFG / FTL as ObjectAssign node
  2. We found that putDirectInternal is suboptimal. This patch removes several bottlenecks. They are super critical from the measurement of microbenchmarks.

2.1. Creating and destroying DeferredStructureTransitionWatchpointFire is not free. We should do that only when we need it.
2.2. Before r277620, we are checking m_replacementWatchpointSets's nullptr and that was fast. But after that, we are always

calling HashMap::get, and it is not inlined. This means that if we have StructureRareData, we are always calling HashMap::get
even though there is no m_replacementWatchpointSets set. This patch adds HashMap::isNullStorage to avoid this call by inlinely
check this via LIKELY(m_replacementWatchpointSets.isNullStorage()).

2.3. Structure::addPropertyTransitionToExistingStructure has very cheap fast path and we must inline them to get performance benefit

for major single-transition case.

Added microbenchmarks show significant performance improvements. And Speedometer2 shows 0.6 - 1.0% improvement.

ToT Patched

object-assign-transition 105.2539+-0.2970 88.8046+-0.2029 definitely 1.1852x faster
object-assign-replace 116.1568+-0.0905 75.0673+-0.0658 definitely 1.5474x faster

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/Watchpoint.cpp: (JSC::DeferredWatchpointFire::fireAllSlow): (JSC::DeferredWatchpointFire::DeferredWatchpointFire): Deleted. (JSC::DeferredWatchpointFire::~DeferredWatchpointFire): Deleted. (JSC::DeferredWatchpointFire::fireAll): Deleted.
  • bytecode/Watchpoint.h: (JSC::DeferredWatchpointFire::DeferredWatchpointFire): (JSC::DeferredWatchpointFire::fireAll): (JSC::FireDetail::FireDetail): Deleted. (JSC::FireDetail::~FireDetail): Deleted.
  • dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::handleIntrinsicCall):
  • dfg/DFGClobberize.h: (JSC::DFG::clobberize):
  • dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC):
  • dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode):
  • dfg/DFGMayExit.cpp:
  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp: (JSC::DFG::JSC_DEFINE_JIT_OPERATION):
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h: (JSC::DFG::safeToExecute):
  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileObjectAssign):
  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile):
  • dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile):
  • ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile):
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileNode): (JSC::FTL::DFG::LowerDFGToB3::compileObjectAssign):
  • runtime/Intrinsic.cpp: (JSC::intrinsicName):
  • runtime/Intrinsic.h:
  • runtime/JSObject.cpp: (JSC::JSObject::deleteProperty):
  • runtime/JSObjectInlines.h: (JSC::JSObject::putDirectInternal):
  • runtime/ObjectConstructor.cpp: (JSC::objectAssignGeneric): (JSC::JSC_DEFINE_HOST_FUNCTION):
  • runtime/ObjectConstructor.h:
  • runtime/ObjectConstructorInlines.h: Added. (JSC::canPerformFastPropertyEnumerationForObjectAssign):
  • runtime/Structure.cpp: (JSC::StructureTransitionTable::singleTransition const): Deleted. (JSC::StructureTransitionTable::get const): Deleted. (JSC::Structure::addPropertyTransitionToExistingStructureImpl): Deleted. (JSC::Structure::addPropertyTransitionToExistingStructure): Deleted. (JSC::Structure::addPropertyTransitionToExistingStructureConcurrently): Deleted.
  • runtime/Structure.h:
  • runtime/StructureInlines.h: (JSC::Structure::didReplaceProperty): (JSC::Structure::propertyReplacementWatchpointSet): (JSC::Structure::addPropertyTransitionToExistingStructureImpl): (JSC::Structure::addPropertyTransitionToExistingStructure): (JSC::Structure::addPropertyTransitionToExistingStructureConcurrently): (JSC::StructureTransitionTable::singleTransition const): (JSC::StructureTransitionTable::get const):

Source/WTF:

  • wtf/HashMap.h:
  • wtf/HashSet.h:
  • wtf/HashTable.h: (WTF::HashTable::isNullStorage const):

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

1:13 PM Changeset in webkit [279745] by Russell Epstein
  • 13 edits in branches/safari-612.1.23-branch/Source/ThirdParty/ANGLE

Cherry-pick r279606. rdar://problem/80339390

REGRESSION (r279466): [Big Sur] webgl/1.0.3/conformance & webgl/2.0.0/conformance are failing
https://bugs.webkit.org/show_bug.cgi?id=227596
Provide Intel workaround for Big Sur systems. Atan and invariant have
issues on older systems, and require us to disable fastmath to produce correct results.

Reviewed by Kenneth Russell.

  • include/platform/FeaturesMtl.h:
  • src/compiler/translator/TranslatorMetalDirect.h: (sh::TranslatorMetalReflection::reset):
  • src/compiler/translator/TranslatorMetalDirect/EmitMetal.cpp: (GenMetalTraverser::emitPostQualifier): (GenMetalTraverser::visitUnary): (GenMetalTraverser::visitAggregate):
  • src/libANGLE/renderer/metal/DisplayMtl.mm: (rx::DisplayMtl::initializeFeatures):
  • src/libANGLE/renderer/metal/ProgramMtl.h: (rx::ProgramMtl::getTranslatedShaderInfo const):
  • src/libANGLE/renderer/metal/ProgramMtl.mm:
  • src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.h:
  • src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm: (rx::mtl::GlslangGetMSL):
  • src/libANGLE/renderer/metal/mtl_render_utils.h:
  • src/libANGLE/renderer/metal/mtl_render_utils.mm: (rx::mtl::TransformFeedbackUtils::createMslXfbLibrary): (rx::mtl::TransformFeedbackUtils::getTransformFeedbackRenderPipeline):
  • src/libANGLE/renderer/metal/mtl_utils.h:
  • src/libANGLE/renderer/metal/mtl_utils.mm: (rx::mtl::CreateShaderLibrary):

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

1:01 PM Changeset in webkit [279744] by Russell Epstein
  • 8 edits in branches/safari-612.1.23-branch/Source

Versioning.

WebKit-7612.1.23

12:56 PM Changeset in webkit [279743] by Russell Epstein
  • 1 copy in branches/safari-612.1.23-branch

New branch.

12:26 PM Changeset in webkit [279742] by yoshiaki.jitsukawa@sony.com
  • 6 edits in trunk

[OpenSSL] Implement HKDF and PBKDF2 support
https://bugs.webkit.org/show_bug.cgi?id=227656

Reviewed by Fujii Hironori.

Source/WebCore:

  • crypto/openssl/CryptoAlgorithmHKDFOpenSSL.cpp:

(WebCore::CryptoAlgorithmHKDF::platformDeriveBits): Implemented with HKDF().

  • crypto/openssl/CryptoAlgorithmPBKDF2OpenSSL.cpp:

(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):

  • crypto/openssl/CryptoAlgorithmRegistryOpenSSL.cpp: Implemented with PKCS5_PBKDF2_HMAC().

(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Register HKDF and PBKDF2.

LayoutTests:

Enable HKDF and PBKDF2 tests.

  • platform/wincairo/TestExpectations:
12:11 PM Changeset in webkit [279741] by mmaxfield@apple.com
  • 4 edits
    2 adds in trunk

Source/WebCore:
[GPU Process] Draw PDFs using an intermediate ImageBuffer when using the GPU process
https://bugs.webkit.org/show_bug.cgi?id=227550

Reviewed by Tim Horton.

When drawing PDFs, we usually already have a cached ImageBuffer of the contents of the PDF.
However, in the situation where we don't have this cached ImageBuffer, we can't just draw
the PDF into the platformContext when we're using the GPU Process. So, instead, we need to
draw the PDF into an intermediate ImageBuffer and then send that to the GPU Process.

When we have a fully functional custom CGContext, we can use that to send all the PDF drawing
commands to the GPU Process, and this patch should then be reverted.

Test: fast/images/pdf-in-canvas.html

  • platform/graphics/cg/PDFDocumentImage.cpp:

(WebCore::PDFDocumentImage::draw):

  • platform/mac/LocalCurrentGraphicsContextMac.mm:

(WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):

LayoutTests:
[GPU Process] Temporarily disable drawing large PDFs in display list drawing
https://bugs.webkit.org/show_bug.cgi?id=227550

Reviewed by Tim Horton.

  • fast/images/pdf-in-canvas-expected.html: Added.
  • fast/images/pdf-in-canvas.html: Added.
11:54 AM Changeset in webkit [279740] by keith_miller@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

display-profiler-output should be able to print disassembly for the FTL
https://bugs.webkit.org/show_bug.cgi?id=227798

Reviewed by Saam Barati.

Right now running JSC with the bytecode profiler will not print
disassembly for FTL code. This patch adds this support. In order to get
execution counts there is a callback at the transition between each
DFG node in the Air disassembler. Since B3 code move parts of
DFG nodes to different basic blocks we don't include execution
counts in the dump. However, the DFG-only graph printed before
the disassembly will still have the counts.

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • ftl/FTLState.cpp:

(JSC::FTL::State::dumpDisassembly):

  • ftl/FTLState.h:

(JSC::FTL::State::dumpDisassembly):

11:48 AM Changeset in webkit [279739] by Russell Epstein
  • 1 copy in tags/Safari-612.1.22.11.1

Tag Safari-612.1.22.11.1.

11:38 AM Changeset in webkit [279738] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[Mac wk2 Debug] fast/canvas/canvas-composite-image.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=227805

Unreviewed test gardening.

Patch by Ayumi Kojima <Ayumi Kojima> on 2021-07-08

  • platform/mac-wk2/TestExpectations:
11:24 AM Changeset in webkit [279737] by achristensen@apple.com
  • 1 edit
    2 deletes in trunk/LayoutTests/imported/w3c

Remove unused URL test expectation files.

  • web-platform-tests/url/historical-expected.txt: Removed.
  • web-platform-tests/url/url-setters-expected.txt: Removed.
11:14 AM Changeset in webkit [279736] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit

[GTK] Too easy to trigger navigation swipe on touchscreen
https://bugs.webkit.org/show_bug.cgi?id=226745

Patch by Alexander Mikhaylenko <Alexander Mikhaylenko> on 2021-07-08
Reviewed by Michael Catanzaro.

ViewGestureController uses both x and y deltas to figure out whether to proceed
with a swipe, in the cross-platform part of the code. However, that was optimized
out during the touch handling rewrite, bring it back.

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseHandleWheelEvent):
(webkitWebViewBaseScroll):
(webkitWebViewBaseTouchDragUpdate):
(webkitWebViewBaseTouchDragEnd):

  • UIProcess/ViewGestureController.h:
  • UIProcess/gtk/ViewGestureControllerGtk.cpp:

(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventGetScrollingDeltas):
(WebKit::ViewGestureController::SwipeProgressTracker::handleEvent):
(WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting):
(WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting):

11:07 AM Changeset in webkit [279735] by Russell Epstein
  • 9 edits in branches/safari-612.1.22.11-branch/Source/WebKit

Cherry-pick r279591. rdar://problem/80282927

Collect Accessibility preferences on a background queue
https://bugs.webkit.org/show_bug.cgi?id=227617
<rdar://80055168>

Reviewed by Brent Fulgham.

To avoid blocking the main thread of the UI process, collect Media Accessibility preferences on a background thread,
and send them to the WebContent process(es).

  • Shared/AccessibilityPreferences.cpp: (IPC::ArgumentCoder<WebKit::AccessibilityPreferences>::encode): (IPC::ArgumentCoder<WebKit::AccessibilityPreferences>::decode):
  • Shared/AccessibilityPreferences.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::accessibilityPreferences): (WebKit::WebProcessPool::setMediaAccessibilityPreferences): (WebKit::WebProcessPool::mediaAccessibilityPreferencesChangedCallback): (WebKit::WebProcessPool::registerNotificationObservers):
  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::initializeNewWebProcess):
  • UIProcess/WebProcessPool.h:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::accessibilityPreferencesDidChange): (WebKit::WebProcess::setMediaAccessibilityPreferences):

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

11:07 AM Changeset in webkit [279734] by Russell Epstein
  • 4 edits in branches/safari-612.1.22.11-branch/Source/WebKit

Cherry-pick r279342. rdar://problem/80282927

Pass correct value of AX per app settings to the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=227441
<rdar://problem/79857797>

Reviewed by Brent Fulgham.

Pass value of type AXValueState instead of a boolean value for per app AX settings.

  • Shared/AccessibilityPreferences.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::accessibilityPreferences):
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::accessibilityPreferencesDidChange):

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

11:07 AM Changeset in webkit [279733] by Russell Epstein
  • 8 edits in branches/safari-612.1.22.11-branch

Cherry-pick r279449. rdar://problem/80212104

Turn off data ICs by default
https://bugs.webkit.org/show_bug.cgi?id=227334
<rdar://problem/79802812>

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/deltablue-varargs.js:
  • microbenchmarks/richards-try-catch.js:

Source/JavaScriptCore:

There are GC crashes that are caused by access data IC sharing. This
patch is both turning off data IC sharing by default, and turning off data
ICs by default.

We should re-enable this once we figure out the issue:
https://bugs.webkit.org/show_bug.cgi?id=227551

Some of our testing modes are still running with data ICs on, so the code doesn't
bit rot. And a select few tests are running with data IC sharing on, for
similar reasons, even though we know it has issues. If those tests start
crashing, we'll just disable sharing completely until the issue is resolved.

  • bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::regenerate):
  • runtime/OptionsList.h:

Tools:

  • Scripts/run-jsc-stress-tests:

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

11:07 AM Changeset in webkit [279732] by Russell Epstein
  • 8 edits in branches/safari-612.1.22.11-branch/Source/JavaScriptCore

Cherry-pick r279560. rdar://problem/80212179

ActiveScratchBufferScope should take the buffer as argument
https://bugs.webkit.org/show_bug.cgi?id=227670
rdar://80011612

Reviewed by Mark Lam.

https://bugs.webkit.org/show_bug.cgi?id=227013 created ActiveScratchBufferScope.
It is used by operations that can cause the GC to run, to mark as roots the contents of the scratch buffer that is live during that time (if any).
The bug is that it simply asks the VM for a scratch buffer of the right size, but this will always return the last scratch buffer, and not necessarily the one that the operation is actually using.

A fairly simple fix is to pass it directly the scratch buffer, since the operation normally can get it easily enough.
In most cases the operation has access to the m_buffer field of the ScratchBuffer, but getting a pointer to the entire structure from that is fairly simple (I added ScratchBuffer::fromData() to do so).

  • dfg/DFGOSRExit.cpp: (JSC::DFG::JSC_DEFINE_JIT_OPERATION):
  • dfg/DFGOSRExit.h:
  • dfg/DFGOperations.cpp: (JSC::DFG::JSC_DEFINE_JIT_OPERATION):
  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileNewArray):
  • dfg/DFGThunks.cpp: (JSC::DFG::osrExitGenerationThunkGenerator):
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::haveABadTime):
  • runtime/VM.h: (JSC::ScratchBuffer::fromData):
  • runtime/VMInlines.h: (JSC::ActiveScratchBufferScope::ActiveScratchBufferScope): (JSC::ActiveScratchBufferScope::~ActiveScratchBufferScope):

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

10:50 AM Changeset in webkit [279731] by Ruben Turcios
  • 8 edits in branches/safari-612.1.18.11-branch/Source

Versioning.

WebKit-7612.1.18.11.4

10:36 AM Changeset in webkit [279730] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ Mac Debug ] inspector/canvas/shaderProgram-add-remove-webgl2.html is a flaky text failure.
https://bugs.webkit.org/show_bug.cgi?id=227781

Unreviewed test gardening.

Patch by Ayumi Kojima <Ayumi Kojima> on 2021-07-08

  • platform/mac/TestExpectations:
10:27 AM Changeset in webkit [279729] by ysuzuki@apple.com
  • 4 edits in trunk/Source

Use JSC::Yarr::flagsString to get string representation of RegExp flags
https://bugs.webkit.org/show_bug.cgi?id=227790

Reviewed by Keith Miller.

Source/JavaScriptCore:

  • yarr/YarrFlags.h:

Source/WebCore:

This patch uses JSC::Yarr::flagsString function to retrieve string representation of
RegExp flags. This allows JSC to add flags without changing WebCore code.
Covered by existing tests.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::dumpIfTerminal):

10:17 AM Changeset in webkit [279728] by Megan Gardner
  • 3 edits in trunk/Source/WebCore

Add logging for legacy AppHighlight decoding to aid in future debugging.
https://bugs.webkit.org/show_bug.cgi?id=227591

Reviewed by Tim Horton.

  • Modules/highlight/AppHighlightRangeData.cpp:

(WebCore::AppHighlightRangeData::decode):

  • platform/Logging.h:
10:13 AM Changeset in webkit [279727] by commit-queue@webkit.org
  • 4 edits in trunk

Source/WebKit:
_WKWebAuthenticationPanel is returning the wrong operation type in clientDataJSON
https://bugs.webkit.org/show_bug.cgi?id=227726
rdar://80073404

Patch by Garrett Davidson <garrett_davidson@apple.com> on 2021-07-08
Reviewed by Kate Cheney.

The -getAssertion:... method was passing the wrong _WKWebAuthenticationType to produceClientDataJSON().

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(-[_WKWebAuthenticationPanel getAssertionWithChallenge:origin:options:completionHandler:]):

Tools:
Update the WebAuthenticationPanel.GetAssertionLA test to expect the right value
https://bugs.webkit.org/show_bug.cgi?id=227726
rdar://80073404

Patch by Garrett Davidson <garrett_davidson@apple.com> on 2021-07-08
Reviewed by Kate Cheney.

This test covers the changed code, but expects the wrong value. The existing
expectation was the base64 encoded string:

{"challenge":"AQIDBAECAwQBAgMEAQIDBAECAwQBAgMEAQIDBAECAwQ","origin":"","type":"webauthn.create"}

The "type" field is clearly incorrect here. Update the test to expect the right
value, and change the expectation to a plaintext string instead of base64 encoded,
to make issues like this easier to spot in the future.

While here, also remove an outdated comment.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

10:05 AM Changeset in webkit [279726] by ysuzuki@apple.com
  • 2 edits in trunk/JSTests

[JSC] Update Intl.Locale test after AppleICU update
https://bugs.webkit.org/show_bug.cgi?id=227788

Reviewed by Keith Miller.

This patch fixes Intl.Locale test since AppleICU fixes the ICU bug and starts producing the right results.

  • stress/intl-long-locale-id-maximize-minimize.js:

(shouldBe):

9:52 AM Changeset in webkit [279725] by Truitt Savell
  • 3 edits in trunk/LayoutTests

transitions/start-transform-transition.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207125.

Unreviewed test gardening.

Patch by Eric Hutchison <Eric Hutchison> on 2021-07-08

  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
9:32 AM Changeset in webkit [279724] by Russell Epstein
  • 36 edits
    2 adds in branches/safari-612.1.22.0-branch

Cherry-pick r279562. rdar://problem/80327101

[iOS] Augment -_webView:didNotHandleTapAsMeaningfulClickAtPoint: to include meaningful taps
https://bugs.webkit.org/show_bug.cgi?id=227666
rdar://80094962

Reviewed by Tim Horton.

Source/WebKit:

The private UI delegate method -_webView:didNotHandleTapAsMeaningfulClickAtPoint: is currently only invoked
when a tap was not handled as a "meaningful" synthetic click (where the notion of "meaningful" is heuristically
determined). However, in order to support revised tab pill minimization behaviors, Safari requires knowledge of
taps that were handled as meaningful clicks as well.

To support this, replace what is currently -_webView:didNotHandleTapAsMeaningfulClickAtPoint: with another
delegate method, -_webView:didTapAtPoint:withResult:, that is always invoked when a tap gesture is recognized
in the web view. The result parameter, a new _WKTapHandlingResult enum, then indicates to the client how the
tap was handled; this currently includes 3 values: one to indicate that the tap gesture did not result in a
synthetic click being dispatched, and two more to indicate whether the synthetic click that was dispatched as a
result of the tap was "meaningfully" handled.

To facilitate the transition from -_webView:didNotHandleTapAsMeaningfulClickAtPoint: to the new SPI, we still
call the old SPI as long as the tap handling result type is not equal to TapHandlingResult::MeaningfulClick;
however, mark the old SPI as deprecated with -_webView:didTapAtPoint:withResult: as the replacement.

Tests: fast/events/ios/did-not-handle-meaningful-click.html

fast/events/ios/meaningful-click-when-focusing-body.html
fast/events/ios/meaningful-click-when-playing-media.html
fast/events/ios/non-meaningful-click-when-tapping-document.html

  • Shared/ios/TapHandlingResult.h: Added.

Add a new C++ enum type to represent the tap handling result type (see description above).

  • UIProcess/API/APIUIClient.h: (API::UIClient::didTapAtPoint): (API::UIClient::didNotHandleTapAsMeaningfulClickAtPoint): Deleted.
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/_WKTapHandlingResult.h: Added.
  • UIProcess/API/ios/WKWebViewIOS.h:
  • UIProcess/API/ios/WKWebViewIOS.mm: (wkTapHandlingResult):

Add a helper method to convert from the WebKit::TapHandlingResult enum to the SPI-exposed _WKTapHandlingResult.

  • UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
  • UIProcess/API/ios/WKWebViewTestingIOS.mm: (-[WKWebView _didTapAtPoint:withResult:]): (-[WKWebView _didNotHandleTapAsMeaningfulClickAtPoint:]): Deleted.
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::setDelegate): (WebKit::UIDelegate::UIClient::didTapAtPoint):

Note that we still invoke the old UI delegate SPI here to ensure that these changes don't break Safari before
they have a chance to adopt the new SPI.

(WebKit::UIDelegate::UIClient::didNotHandleTapAsMeaningfulClickAtPoint): Deleted.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Replace the DidNotHandleTapAsMeaningfulClickAtPoint message with DidTapAtPoint, which takes both a location
and a flag indicating how the tap was handled by web content.

  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::didTapAtPoint): (WebKit::PageClientImpl::didNotHandleTapAsMeaningfulClickAtPoint): Deleted.
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::didTapAtPoint): (WebKit::WebPageProxy::didNotHandleTapAsMeaningfulClickAtPoint): Deleted.
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::completeSyntheticClick):

The meaningful tap heuristic no longer determines whether we send an IPC message or not, but rather the type of
TapHandlingResult to send (namely, whether to send NonMeaningfulClick or MeaningfulClick).

(WebKit::WebPage::attemptSyntheticClick):
(WebKit::WebPage::handleTwoFingerTapAtPoint):
(WebKit::WebPage::commitPotentialTapFailed):

Tools:

Update the layout test harness to use the replacement SPI instead of the newly deprecated SPI. See
WebKit/ChangeLog for more details.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage):
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::installDidHandleTapCallback): (WTR::TestRunner::callDidHandleTapCallback): (WTR::TestRunner::installDidNotHandleTapAsMeaningfulClickCallback): Deleted. (WTR::TestRunner::callDidNotHandleTapAsMeaningfulClickCallback): Deleted.

Rename this to just DidHandleTapCallback, and make it take a boolean argument indicating whether the tap was
handled as a meaningful click.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp: (WTR::TestController::didHandleTap): (WTR::TestController::didNotHandleTapAsMeaningfulClick): Deleted.
  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didHandleTap): (WTR::TestInvocation::didNotHandleTapAsMeaningfulClick): Deleted.
  • WebKitTestRunner/TestInvocation.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: (-[TestRunnerWKWebView _didTapAtPoint:withResult:]): (-[TestRunnerWKWebView _didNotHandleTapAsMeaningfulClickAtPoint:]): Deleted.

LayoutTests:

Update the existing layout tests. The new UI delegate method should now be invoked in all of the cases; however,
we should only observe meaningful clicks in some of the below scenarios. See WebKit/ChangeLog for more details.

  • fast/events/ios/did-not-handle-meaningful-click-expected.txt:
  • fast/events/ios/did-not-handle-meaningful-click.html:
  • fast/events/ios/meaningful-click-when-focusing-body-expected.txt:
  • fast/events/ios/meaningful-click-when-focusing-body.html:
  • fast/events/ios/meaningful-click-when-playing-media-expected.txt:
  • fast/events/ios/meaningful-click-when-playing-media.html:
  • fast/events/ios/non-meaningful-click-when-tapping-document-expected.txt:
  • fast/events/ios/non-meaningful-click-when-tapping-document.html:

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

9:29 AM Changeset in webkit [279723] by Chris Dumez
  • 8 edits in trunk

[WebCrypto] deriveBits() fails if length is not a multiple of 8 for ECDH algorithm
https://bugs.webkit.org/show_bug.cgi?id=227796

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

  • web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.https.any-expected.txt:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.https.any.worker-expected.txt:

Source/WebCore:

deriveBits() fails if length is not a multiple of 8 for ECDH algorithm. This doesn't match
the specification or the behavior of Chrome.

No new tests, rebaselined existing tests.

  • crypto/algorithms/CryptoAlgorithmECDH.cpp:

(WebCore::CryptoAlgorithmECDH::deriveBits):

LayoutTests:

Update existing layout test due to behavior change.

  • crypto/subtle/ecdh-derive-bits-malformed-parametrs-expected.txt:
  • crypto/subtle/ecdh-derive-bits-malformed-parametrs.html:
8:52 AM Changeset in webkit [279722] by mmaxfield@apple.com
  • 6 edits
    1 copy
    6 adds in trunk

[GPU Process] Canvas image rendering can render arbitrary DOM content in the GPU process, which is against policy (for now)
https://bugs.webkit.org/show_bug.cgi?id=227519
<rdar://problem/76678163>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY-expected.txt:

Source/WebCore:

Rendering arbitrary DOM content in the GPU process isn't supported yet, but canvas rendering is. However,
canvas has a drawImage() function which can accept an HTMLImageElement as its source, and an HTMLImageElement
can have an SVG document as its source, which would end up triggering our DOM codepath in canvas and thus
in the GPU process.

This patch disables this for now, by rendering the SVG into an ImageBuffer and then drawing the ImageBuffer
in the GPU process. When we eventually implement arbitrary DOM rendering in the GPU process, this patch will
need to be reverted.

Test: fast/images/svg-mask-in-canvas.html

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::nativeImage):
(WebCore::SVGImage::draw):
(WebCore::SVGImage::drawAsNativeImage):

  • svg/graphics/SVGImage.h:

LayoutTests:

  • fast/images/resources/mask.svg: Added.
  • fast/images/svg-mask-in-canvas-expected.html: Added.
  • fast/images/svg-mask-in-canvas.html: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY-expected.txt.
7:47 AM Changeset in webkit [279721] by Antti Koivisto
  • 3 edits
    2 adds in trunk

Shadow host stops rendering after removing a slot, updating style, then its assigned node
https://bugs.webkit.org/show_bug.cgi?id=227652

Reviewed by Alan Bujtas.

Source/WebCore:

Test: fast/shadow-dom/remove-slot-and-host-child.html

  • dom/SlotAssignment.cpp:

(WebCore::SlotAssignment::didChangeSlot):

When we tear down the render tree we also need to request its rebuild unconditionally.

LayoutTests:

  • fast/shadow-dom/remove-slot-and-host-child-expected.html: Added.
  • fast/shadow-dom/remove-slot-and-host-child.html: Added.
6:00 AM WebKitGTK/2.32.x edited by Carlos Garcia Campos
(diff)
4:46 AM Changeset in webkit [279720] by pvollan@apple.com
  • 11 edits
    3 adds in trunk/Source

Set Caption preferences in the UI process
https://bugs.webkit.org/show_bug.cgi?id=227742
<rdar://79040526>

Reviewed by Eric Carlson.

Source/WebCore:

Add a Caption user preferences delegate, which can be subclassed to perform the work in the UI process.

No new tests, since this is not trivial to add a test for. This has been manually tested.

  • WebCore.xcodeproj/project.pbxproj:
  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::captionPreferencesDelegate):
(WebCore::CaptionUserPreferencesMediaAF::captionDisplayMode const):
(WebCore::CaptionUserPreferencesMediaAF::platformSetCaptionDisplayMode):
(WebCore::CaptionUserPreferencesMediaAF::setCaptionDisplayMode):
(WebCore::CaptionUserPreferencesMediaAF::setCaptionPreferencesDelegate):
(WebCore::CaptionUserPreferencesMediaAF::platformSetPreferredLanguage):
(WebCore::CaptionUserPreferencesMediaAF::setPreferredLanguage):

  • page/CaptionUserPreferencesMediaAF.h:
  • platform/CaptionPreferencesDelegate.h: Added.

(WebCore::CaptionPreferencesDelegate::~CaptionPreferencesDelegate):
(WebCore::CaptionPreferencesDelegate::setDisplayMode):

Source/WebKit:

Subclass the Caption user preferences delegate, which will send messages to the UI process, requesting to set the preferences.

  • SourcesCocoa.txt:
  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::setCaptionDisplayMode):
(WebKit::WebProcessProxy::setCaptionLanguage):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebProcessProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebCaptionPreferencesDelegate.cpp: Added.

(WebKit::WebCaptionPreferencesDelegate::setDisplayMode):
(WebKit::WebCaptionPreferencesDelegate::setPreferredLanguage):

  • WebProcess/WebCoreSupport/WebCaptionPreferencesDelegate.h: Added.
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

3:20 AM Changeset in webkit [279719] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/JavaScriptCore

Merge r279107 - Properly set numFPRs on ARM with NEON/VFP_V3_D32
https://bugs.webkit.org/show_bug.cgi?id=227212

Reviewed by Filip Pizlo.

Don't hardcode the number of FP regs on ARMv7 to 16; when targetting a
CPU with NEON or VFP_V3_d32, the number of FP regs is 32.

This also reverts the recent change to add an extra word to RegisterSet
which essentially covered up for this mismatch. The reason this bug only
manifested on certain compiler versions was that GCC 8.4/8.5 where built using
our buildroot infrastructure, whereas the other GCC versions we tested with
were debian system toolchains, targetting a lowest common denominator.

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::std::initializer_list<int>):

  • jit/RegisterSet.h:
1:57 AM WebKitGTK/2.32.x edited by Carlos Garcia Campos
(diff)
1:43 AM Changeset in webkit [279718] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.32

Merge r279039 - [MSE][GStreamer] Soundcloud serves MP4 audio with empty tfdt boxes
https://bugs.webkit.org/show_bug.cgi?id=191419

Patch by Philippe Normand <pnormand@igalia.com> on 2021-06-18
Reviewed by Michael Catanzaro.

Source/WebCore:

When MSE is used the player receives broken audio fragments, perhaps because the server
expects the client to repair them. Not much we can do about this on GStreamer side though,
so behave as a Chrome UserAgent and then MSE is not used, the player receives an MP3 stream.

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresChromeBrowser):

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST): Add a test for the soundcloud quirk.

1:20 AM WebKitGTK/2.32.x edited by Carlos Garcia Campos
(diff)
1:18 AM Changeset in webkit [279717] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r277855 - [GTK] REGRESSION: Broken scrolling on element.io with async scrolling
https://bugs.webkit.org/show_bug.cgi?id=222265

Reviewed by Carlos Garcia Campos.

Fix transform order for layer clipping in TextureMapperLayer.

No new tests.

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::paintSelfAndChildren):

1:18 AM Changeset in webkit [279716] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r277539 - [GTK] REGRESSION: Kinetic scrolling on touchpad doesn't work with async scrolling off
https://bugs.webkit.org/show_bug.cgi?id=224182

Patch by Alexander Mikhaylenko <Alexander Mikhaylenko> on 2021-05-15
Reviewed by Michael Catanzaro.

Don't clear the scroll history every time we scroll, that defeats the whole point of having
the scroll history.

  • platform/generic/ScrollAnimatorGeneric.cpp:

(WebCore::ScrollAnimatorGeneric::scrollToPositionWithoutAnimation):

12:41 AM Changeset in webkit [279715] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

[GLIB] Skip WebGL 2.0.y tests explicitly
https://bugs.webkit.org/show_bug.cgi?id=227754

Unreviewed test gardening, some tests from this directory were
explicitly enabled from the top level TestExpectations so we skip them
in our own platform expectations just to be sure.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-07-08

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
12:23 AM Changeset in webkit [279714] by commit-queue@webkit.org
  • 4 edits in trunk

[css-scroll-snap] scroll-snap-align should use the box's writing-mode when the box is larger than the snapport
https://bugs.webkit.org/show_bug.cgi?id=227743

Patch by Martin Robinson <mrobinson@igalia.com> on 2021-07-08
Reviewed by Simon Fraser.

Source/WebCore:

No new tests. This fixes an existing WPT test:

  • imported/w3c/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/scroll-snap-writing-mode-000.html
  • page/scrolling/ScrollSnapOffsetsInfo.cpp:

(WebCore::axesFlippedForWritingModeAndDirection): Added this helper which abstracts the process of
determining if the x-axis and y-axis are flipped given the style's writing mode and text direction.
(WebCore::updateSnapOffsetsForScrollableArea): When the inline axis of the box defining the snap area
is larger than the snapport, we use the box's writing mode and text-direction to determine if the
x-axis and y-axis are flipped.

LayoutTests:

12:23 AM Changeset in webkit [279713] by Fujii Hironori
  • 7 edits in trunk/Source/WebCore

Merge Cairo::save and Cairo::restore into GraphicsContextCairo's methods
https://bugs.webkit.org/show_bug.cgi?id=227784

Reviewed by Žan Doberšek.

Cairo::save and Cairo::restore should be GraphicsContextCairo's
methods.

  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::fillShadowBuffer):
(WebCore::Cairo::save): Deleted.
(WebCore::Cairo::restore): Deleted.

  • platform/graphics/cairo/CairoOperations.h:
  • platform/graphics/cairo/GradientCairo.cpp:

(WebCore::Gradient::fill):

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContextCairo::save):
(WebCore::GraphicsContextCairo::restore):
(WebCore::GraphicsContextCairo::fillRect):
(WebCore::GraphicsContextCairo::saveInternal): Deleted.
(WebCore::GraphicsContextCairo::restoreInternal): Deleted.

  • platform/graphics/cairo/GraphicsContextCairo.h:
  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:

(Nicosia::CairoOperationRecorder::fillRect):
(Nicosia::CairoOperationRecorder::save):
(Nicosia::CairoOperationRecorder::restore):

Jul 7, 2021:

11:53 PM Changeset in webkit [279712] by Cameron McCormack
  • 3 edits in trunk/Source/WebCore

Add logging for GraphicsLayerCA::m_uncommittedChanges
https://bugs.webkit.org/show_bug.cgi?id=227783

Reviewed by Simon Fraser.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::layerChangeAsString):
(WebCore::GraphicsLayerCA::dumpLayerChangeFlags):
(WebCore::GraphicsLayerCA::dumpAdditionalProperties const):

  • platform/graphics/ca/GraphicsLayerCA.h:
11:46 PM Changeset in webkit [279711] by timothy_horton@apple.com
  • 11 edits
    17 adds in trunk

Add WKHoverPlatter and some knobs to tweak its appearance
https://bugs.webkit.org/show_bug.cgi?id=227735
<rdar://problem/79198262>

Reviewed by Sam Weinig.

Source/WebCore/PAL:

  • pal/spi/cocoa/QuartzCoreSPI.h:

Source/WebKit:

  • Configurations/WebKit.xcconfig:
  • Platform/spi/ios/PrototypeToolsSPI.h: Added.
  • SourcesCocoa.txt:
  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView rootContentView]):

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView setUpInteraction]):
(-[WKContentView cleanUpInteraction]):
Install and uninstall the platter alongside the gestures that drive it.

(-[WKContentView mouseGestureRecognizerChanged:]):
(-[WKContentView hoverGestureRecognizerChanged:]):
When the gesture recognizers fire, also update the hover point.

(-[WKContentView positionInformationForHoverPlatter:withRequest:completionHandler:]):

  • UIProcess/ios/WKHoverPlatter.h: Added.
  • UIProcess/ios/WKHoverPlatter.mm: Added.

(createBaseAnimation):
(addAnimation):
(setAdditionalPlatterLayerProperties):
(addAdditionalIncomingAnimations):
(addAdditionalDismissalAnimations):
(-[WKHoverPlatter initWithView:delegate:]):
(-[WKHoverPlatter invalidate]):
(-[WKHoverPlatter hoverPoint]):
(-[WKHoverPlatter setHoverPoint:]):
(-[WKHoverPlatter requestPositionInformationForCurrentHoverPoint]):
(-[WKHoverPlatter didReceivePositionInformation:]):
(-[WKHoverPlatter dismissPlatterWithAnimation:]):
(-[WKHoverPlatter didFinishAnimationForShadow:]):
(-[WKHoverPlatter clearLayers]):
Animate the platter in and out, and optionally between states, as the hover point moves.
Use the TextIndicator's geometry information, but not its snapshot; we use a
CAPortalLayer for the platter instead. A future patch will avoid taking the snapshot
entirely, since we call setHoverPoint (and thus generate a TextIndicator) a *lot*
when moving the mouse around, and all those snapshots add up.

  • UIProcess/ios/WKHoverPlatterParameters.h: Added.
  • UIProcess/ios/WKHoverPlatterParameters.mm: Added.

(-[PTSliderRow integerMinValue:maxValue:]):
(-[WKHoverPlatterParameters setDefaultValues]):
(+[WKHoverPlatterParameters settingsControllerModule]):
(+[WKHoverPlatterDomain rootSettings]):
(+[WKHoverPlatterDomain domainGroupName]):
(+[WKHoverPlatterDomain domainName]):
(+[WKHoverPlatterDomain rootSettingsClass]):
Add some knobs, with reasonable defaults, for experimentation.

  • WebKit.xcodeproj/project.pbxproj:

WebKitLibraries:

  • WebKitPrivateFrameworkStubs/appletvos/14/PrototypeTools.framework/PrototypeTools.tbd: Added.
  • WebKitPrivateFrameworkStubs/appletvos/15/PrototypeTools.framework/PrototypeTools.tbd: Added.
  • WebKitPrivateFrameworkStubs/iOS/14/PrototypeTools.framework/PrototypeTools.tbd: Added.
  • WebKitPrivateFrameworkStubs/iOS/15/PrototypeTools.framework/PrototypeTools.tbd: Added.
  • WebKitPrivateFrameworkStubs/watchos/7/PrototypeTools.framework/PrototypeTools.tbd: Added.
  • WebKitPrivateFrameworkStubs/watchos/8/PrototypeTools.framework/PrototypeTools.tbd: Added.
10:09 PM Changeset in webkit [279710] by wilander@apple.com
  • 8 edits in trunk

PCM: Add error logging for CryptoKit operations
https://bugs.webkit.org/show_bug.cgi?id=227731
<rdar://80221057>

Reviewed by Brent Fulgham.

Resolves three FIXMEs for error logging in PCM's CryptoKit operations.

Source/WebCore:

No new tests. Only added logging.

  • loader/PrivateClickMeasurement.h:
  • loader/cocoa/PrivateClickMeasurementCocoa.mm:

(WebCore::PrivateClickMeasurement::calculateAndUpdateSourceUnlinkableToken):
(WebCore::PrivateClickMeasurement::calculateAndUpdateSourceSecretToken):

Source/WebKit:

  • NetworkProcess/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::storeUnattributed):
(WebKit::PrivateClickMeasurementManager::getSignedUnlinkableToken):

Tools:

  • TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:

(TestWebKitAPI::TEST):

Now expects an optional string instead of a bool from the function
calls which means EXPECT_TRUE has become EXPECT_FALSE. The optional
string is non-nullopt if it carries an error message.

  • TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm:

(TestWebKitAPI::TEST):

Now expects an optional string instead of a bool from the function
calls which means EXPECT_TRUE has become EXPECT_FALSE. The optional
string is non-nullopt if it carries an error message.

9:48 PM Changeset in webkit [279709] by ysuzuki@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

[JSC] Clean up RegExp flag code
https://bugs.webkit.org/show_bug.cgi?id=227786

Reviewed by Filip Pizlo.

I found a bug in regexpToSourceString (used for RegExp's dump code), and it motivates me to clean up
all RegExp flag handling code. We define RegExp flags as a macro and updating that macro updates all
RegExp flag handling code too.

  • runtime/RegExp.cpp:

(JSC::RegExpFunctionalTestCollector::outputOneTest):
(JSC::regexpToSourceString):

  • runtime/RegExp.h:
  • runtime/RegExpPrototype.cpp:

(JSC::flagsString):

  • yarr/YarrFlags.cpp:

(JSC::Yarr::parseFlags):
(JSC::Yarr::flagsString):

  • yarr/YarrFlags.h:
8:53 PM Changeset in webkit [279708] by Devin Rousso
  • 3 edits in trunk/Source/WebKit

Extremely jumpy window resizing in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=167529
<rdar://problem/77568931>

Reviewed by Tim Horton.

Instead of computing the m_pendingTopContentInset inside updateContentInsetsIfAutomatic,
wait to do it until we're actually dispatching the value to the WebProcess, as it's possible
for the former to happen while still inside a layout, which could result in the wrong value.

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

(WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
(WebKit::WebViewImpl::topContentInset const):
(WebKit::WebViewImpl::setTopContentInset):
(WebKit::WebViewImpl::scheduleSetTopContentInsetDispatch): Added.
(WebKit::WebViewImpl::dispatchSetTopContentInset):
Still keep m_pendingTopContentInset so that manual calls to setTopContentInset can also
be batched with updateContentInsetsIfAutomatic, each taking precedence over the other if
called later.

7:20 PM Changeset in webkit [279707] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

JSArrayBufferView::byteOffsetConcurrently has a race when using PAC
https://bugs.webkit.org/show_bug.cgi?id=227765

Reviewed by Mark Lam.

We were calling JSArrayBufferView::vector(), which does PAC validation
using the length() of the array. However, this can race with JSArrayBufferView::detach,
which sets the length to zero, leading to sadness on the compiler thread.

  • runtime/JSArrayBufferView.h:

(JSC::JSArrayBufferView::vectorWithoutPACValidation const):

  • runtime/JSArrayBufferViewInlines.h:

(JSC::JSArrayBufferView::byteOffsetImpl):

7:19 PM Changeset in webkit [279706] by Chris Dumez
  • 9 edits
    2 adds in trunk

Our structured cloning implementation does not encode all of RegExp's flags
https://bugs.webkit.org/show_bug.cgi?id=227779

Reviewed by Yusuke Suzuki.

LayoutTests/imported/w3c:

Rebaseline WPT test.

  • web-platform-tests/IndexedDB/structured-clone.any-expected.txt:

Source/WebCore:

Our structured cloning implementation does not encode all of RegExp's flags.
In particular, we are failing to encode the 'y', 'u', 's' and 'd' flags.

This is causing one of the checks to fail in WebKit on:

That subtest is passing in Firefox and Chrome.

Test: fast/dom/Window/post-message-regexp.html

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::dumpIfTerminal):

LayoutTests:

Add layout test coverage.

  • fast/dom/Window/post-message-regexp-expected.txt: Added.
  • fast/dom/Window/post-message-regexp.html: Added.
6:46 PM Changeset in webkit [279705] by commit-queue@webkit.org
  • 1 edit
    3 adds in trunk/LayoutTests

Only first set-cookie HTTP header in websocket http response is accepted
https://bugs.webkit.org/show_bug.cgi?id=227739

Patch by Alex Christensen <achristensen@webkit.org> on 2021-07-07
Reviewed by Geoffrey Garen.

Add a test to verify that this has been fixed.

  • http/tests/websocket/tests/hybi/multiple-set-cookies-expected.txt: Added.
  • http/tests/websocket/tests/hybi/multiple-set-cookies.html: Added.
  • http/tests/websocket/tests/hybi/multiple_set_cookie_wsh.py: Added.

(web_socket_do_extra_handshake):
(web_socket_transfer_data):

6:45 PM Changeset in webkit [279704] by Kocsen Chung
  • 8 edits in branches/safari-612.1.22.0-branch/Source

Versioning.

WebKit-7612.1.22.0.3

6:42 PM Changeset in webkit [279703] by Kocsen Chung
  • 8 edits in branches/safari-612.1.22.2-branch/Source

Versioning.

WebKit-7612.1.22.2.3

6:41 PM Changeset in webkit [279702] by Kocsen Chung
  • 8 edits in branches/safari-612.1.22.1-branch/Source

Versioning.

WebKit-7612.1.22.1.3

6:39 PM Changeset in webkit [279701] by Kocsen Chung
  • 8 edits in branches/safari-612.1.22.3-branch/Source

Versioning.

WebKit-7612.1.22.3.3

6:39 PM Changeset in webkit [279700] by Kocsen Chung
  • 1 copy in tags/Safari-612.1.22.3.2

Tag Safari-612.1.22.3.2.

6:38 PM Changeset in webkit [279699] by Kocsen Chung
  • 8 edits in branches/safari-612.1.22.3-branch/Source

Versioning.

WebKit-7612.1.22.3.2

6:35 PM Changeset in webkit [279698] by Alan Bujtas
  • 6 edits in trunk

[LFC][IFC] Add support for partially trimmed trailing whitespace
https://bugs.webkit.org/show_bug.cgi?id=227688

Reviewed by Antti Koivisto.

Source/WebCore:

This patch fixes the case when as a result of the partially trimmed overflow content,
we don't need to conditionally hang the trailing end anymore.

https://drafts.csswg.org/css-text-3/#valdef-white-space-pre
"If white-space is set to pre-wrap, the UA must (unconditionally)
...
It may also visually collapse the character advance widths of any that would otherwise overflow."

  • layout/formattingContexts/inline/InlineLine.cpp:

(WebCore::Layout::Line::visuallyCollapsePreWrapOverflowContent):
(WebCore::Layout::Line::Run::removeTrailingWhitespace):
(WebCore::Layout::Line::Run::visuallyCollapseTrailingWhitespace):

  • layout/formattingContexts/inline/InlineLine.h:

LayoutTests:

6:35 PM Changeset in webkit [279697] by Kocsen Chung
  • 1 copy in tags/Safari-612.1.22.1.2

Tag Safari-612.1.22.1.2.

6:34 PM Changeset in webkit [279696] by Kocsen Chung
  • 8 edits in branches/safari-612.1.22.1-branch/Source

Versioning.

WebKit-7612.1.22.1.2

6:31 PM Changeset in webkit [279695] by Kocsen Chung
  • 1 copy in tags/Safari-612.1.22.2.2

Tag Safari-612.1.22.2.2.

6:30 PM Changeset in webkit [279694] by Kocsen Chung
  • 1 delete in tags/Safari-612.1.22.2.2

Delete tag.

6:29 PM Changeset in webkit [279693] by Kocsen Chung
  • 8 edits in branches/safari-612.1.22.2-branch/Source

Versioning.

WebKit-7612.1.22.2.2

6:25 PM Changeset in webkit [279692] by Kocsen Chung
  • 1 copy in tags/Safari-612.1.22.2.2

Tag Safari-612.1.22.2.2.

6:15 PM Changeset in webkit [279691] by Kocsen Chung
  • 1 copy in tags/Safari-612.1.22.0.2

Tag Safari-612.1.22.0.2.

5:55 PM Changeset in webkit [279690] by ysuzuki@apple.com
  • 10 edits
    1 add in trunk

[JSC] Fix Object.assign fast path to accept undefined/null
https://bugs.webkit.org/show_bug.cgi?id=227769
rdar://80264271

Reviewed by Saam Barati.

JSTests:

  • stress/object-assign-undefined.js: Added.

(test):

Source/JavaScriptCore:

Object.assign can accept undefined or null as a second (or latter) parameters.
If it is passed, the parameter is just ignored. Previous DFG / FTL optimization patch
does not handle this case.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • 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::compileObjectAssign):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileObjectAssign):

  • runtime/ObjectConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/ObjectConstructorInlines.h:

(JSC::objectAssignFast):

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

Heap::waitForCollector() needs to set m_mutatorDidRun.
https://bugs.webkit.org/show_bug.cgi?id=227782
rdar://78326474

Reviewed by Saam Barati.

Heap::waitForCollector() is one of 2 clients of Heap::stopIfNecessarySlow(unsigned oldState).
The other client, Heap::stopIfNecessarySlow() sets m_mutatorDidRun to true after
calling Heap::stopIfNecessarySlow(unsigned oldState). Heap::waitForCollector()
needs to do the same. Constraint solvers rely on this.

Without this, one fall out we've seen is that DOMGCOutputConstraint fails to
visitOutputConstraints, and as a result, opaqueRoots may not get updated. This
issue was caught by the GC verifier.

  • heap/Heap.cpp:

(JSC::Heap::waitForCollector):

5:25 PM Changeset in webkit [279688] by Chris Dumez
  • 26 edits in trunk

[WebCrypto] Support Elliptic Curve P-521 on Mac
https://bugs.webkit.org/show_bug.cgi?id=216755
<rdar://problem/69667220>

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline WPT test now that a lot more checks are passing.

  • web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.https.any-expected.txt:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.https.any.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.https.any-expected.txt:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.https.any.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.https.any-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.https.any.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.https.any-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.https.any.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.https.any-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.https.any.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.https.any-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.https.any.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/import_export/ec_importKey.https.any-expected.txt:
  • web-platform-tests/WebCryptoAPI/import_export/ec_importKey.https.any.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.https.any-expected.txt:
  • web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.https.any.worker-expected.txt:

Source/WebCore:

Add support for Elliptic Curve P-521 in WebCrypto for ECDSA and ECDH, on macOS.
Both Gecko and Blink already support this.

No new tests, rebaselined existing tests.

  • crypto/mac/CryptoAlgorithmECDHMac.cpp:

(WebCore::CryptoAlgorithmECDH::platformDeriveBits):

  • crypto/mac/CryptoAlgorithmECDSAMac.cpp:

Use std::ceil() when converting bits to bytes since 521 is not a multiple of 8.
This is as per Section 2.3.4 of http://www.secg.org/sec1-v2.pdf, which indicates
we should use ceil().

(WebCore::signECDSA):
Stop assuming the length can be encoded in a single byte as this is not true with
P-521 (values >= 128 require 2 bytes).

(WebCore::verifyECDSA):
Do not reject the promise when CCECCryptorVerifyHash() fails and instead return
false to indicate that the signature fails. This was needed to pass a few more
WPT checks. We do not do much validation on r and s before passing them to
CommonCrypto and CCECCryptorVerifyHash() may return a kCCNotVerified error when
the input signature is invalid (invalid signatures are tested by WPT tests).

(WebCore::CryptoAlgorithmECDSA::platformSign):
(WebCore::CryptoAlgorithmECDSA::platformVerify):

  • crypto/mac/CryptoKeyECMac.cpp:

(WebCore::doesUncompressedPointMatchNamedCurve):
(WebCore::doesFieldElementMatchNamedCurve):
(WebCore::getKeySizeFromNamedCurve):
(WebCore::CryptoKeyEC::platformSupportedCurve):
(WebCore::CryptoKeyEC::platformExportRaw const):
(WebCore::CryptoKeyEC::platformAddFieldElements const):
(WebCore::getOID):
(WebCore::CryptoKeyEC::platformExportSpki const):
(WebCore::CryptoKeyEC::platformImportPkcs8):
(WebCore::CryptoKeyEC::platformExportPkcs8 const):
Add support for P-521 and use std::ceil() when converting bits to bytes since
521 is not a multiple of 8.

LayoutTests:

Update / rebaseline a few tests now that we support P-521.

  • crypto/subtle/ec-generate-key-malformed-parameters-expected.txt:
  • crypto/subtle/ec-generate-key-malformed-parameters.html:
  • crypto/subtle/ecdh-derive-bits-length-limits-expected.txt:
5:09 PM Changeset in webkit [279687] by wilander@apple.com
  • 2 edits in trunk/Tools

PCM: API test PrivateClickMeasurement.ValidBlindedSecret is failing on platforms with RSABSSA
https://bugs.webkit.org/show_bug.cgi?id=227777
<rdar://80291822>

Reviewed by Kate Cheney.

  • TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm:

(TestWebKitAPI::TEST):

The test was looking for the value of JSON key "source_secret_token"
which should be "source_unlinkable_token". This patch fixes that and
renames the local variable accordingly.

4:57 PM Changeset in webkit [279686] by Chris Dumez
  • 5 edits in trunk

[IndexedDB] Transaction should be inactive during structured clone
https://bugs.webkit.org/show_bug.cgi?id=227773

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

  • web-platform-tests/IndexedDB/structured-clone-transaction-state.any-expected.txt:
  • web-platform-tests/IndexedDB/structured-clone-transaction-state.any.worker-expected.txt:

Source/WebCore:

Transaction should be inactive during structured clone, as per:

Gecko and Blink match the specification.

No new tests, rebaselined existing tests.

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::putOrAdd):

4:45 PM Changeset in webkit [279685] by Cameron McCormack
  • 2 edits in trunk/Source/WebCore

Remove unused LayerChange::TilesAdded enum value
https://bugs.webkit.org/show_bug.cgi?id=227736

Reviewed by Simon Fraser.

  • platform/graphics/ca/GraphicsLayerCA.h:
4:11 PM Changeset in webkit [279684] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[BigSur Release wk2 arm64 ] scrollbars/corner-resizer-window-inactive.html is a flaky image-only failure.
https://bugs.webkit.org/show_bug.cgi?id=227776

Unreviewed test gardening.

Patch by Eric Hutchison <Eric Hutchison> on 2021-07-07

  • platform/mac-wk2/TestExpectations:
4:00 PM Changeset in webkit [279683] by Chris Dumez
  • 5 edits in trunk

IDBObjectStore.keyPath should keep returning the same object
https://bugs.webkit.org/show_bug.cgi?id=227770

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are now passing.

  • web-platform-tests/IndexedDB/idbobjectstore_keyPath.any-expected.txt:
  • web-platform-tests/IndexedDB/idbobjectstore_keyPath.any.worker-expected.txt:

Source/WebCore:

IDBObjectStore.keyPath should keep returning the same object to match other
browser engines (Gecko and Blink).

No new tests, rebaselined existing tests.

  • Modules/indexeddb/IDBObjectStore.idl:
3:52 PM Changeset in webkit [279682] by yoshiaki.jitsukawa@sony.com
  • 14 edits
    3 adds in trunk

[OpenSSL] Implement CryptoAlgorithmEC*
https://bugs.webkit.org/show_bug.cgi?id=227655

Reviewed by Don Olmstead.

Source/WebCore:

Implement elliptic curve support in WebCrypto. This patch enables ECDH
and ECDSA algorithms as well as EC key import, export, and generation.

Note that low level ASN1 API is used in CryptoKeyEC.cpp to import
public EC keys in the SPKI format because currently OpenSSL doesn't
have the Object ID of the ecDH algorithm and it fails to load ecDH
keys with d2iPUBKEY().

  • crypto/keys/CryptoKeyEC.h:
  • crypto/openssl/CryptoAlgorithmECDHOpenSSL.cpp:

(WebCore::CryptoAlgorithmECDH::platformDeriveBits):

  • crypto/openssl/CryptoAlgorithmECDSAOpenSSL.cpp:

(WebCore::CryptoAlgorithmECDSA::platformSign):
(WebCore::CryptoAlgorithmECDSA::platformVerify):

  • crypto/openssl/CryptoAlgorithmRegistryOpenSSL.cpp:

(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):

  • crypto/openssl/CryptoKeyECOpenSSL.cpp:

(WebCore::curveIdentifier):
(WebCore::curveSize):
(WebCore::createECKey):
(WebCore::verifyCurve):
(WebCore::CryptoKeyEC::keySizeInBits const):
(WebCore::CryptoKeyEC::platformSupportedCurve):
(WebCore::CryptoKeyEC::platformGeneratePair):
(WebCore::CryptoKeyEC::platformImportRaw):
(WebCore::CryptoKeyEC::platformImportJWKPublic):
(WebCore::CryptoKeyEC::platformImportJWKPrivate):
(WebCore::ecPublicKeyIdentifier):
(WebCore::ecDHIdentifier):
(WebCore::supportedAlgorithmIdentifier):
(WebCore::CryptoKeyEC::platformImportSpki):
(WebCore::CryptoKeyEC::platformImportPkcs8):
(WebCore::CryptoKeyEC::platformExportRaw const):
(WebCore::CryptoKeyEC::platformAddFieldElements const):
(WebCore::CryptoKeyEC::platformExportSpki const):
(WebCore::CryptoKeyEC::platformExportPkcs8 const):

  • crypto/openssl/CryptoKeyRSAOpenSSL.cpp:

(WebCore::CryptoKeyRSA::importSpki):
(WebCore::CryptoKeyRSA::importPkcs8):
(WebCore::CryptoKeyRSA::exportSpki const):
(WebCore::CryptoKeyRSA::exportPkcs8 const):
(WebCore::CryptoKeyRSA::algorithm const):
(WebCore::CryptoKeyRSA::exportData const):

  • crypto/openssl/OpenSSLCryptoUniquePtr.h:

(WebCore::OpenSSLCryptoPtrDeleter<EC_KEY>::operator() const):
(WebCore::OpenSSLCryptoPtrDeleter<EC_POINT>::operator() const):
(WebCore::OpenSSLCryptoPtrDeleter<ECDSA_SIG>::operator() const):
(WebCore::OpenSSLCryptoPtrDeleter<ASN1_SEQUENCE_ANY>::operator() const):

  • crypto/openssl/OpenSSLUtilities.cpp:

(WebCore::convertToBytes):
(WebCore::convertToBytesExpand):
(WebCore::convertToBigNumber):

  • crypto/openssl/OpenSSLUtilities.h:

LayoutTests:

Update test expectations of wincairo to enable ec* tests.

  • platform/wincairo/TestExpectations:

Add expected results thats support the P-521 elliptic curve. Generic test
results expect that P-521 is unsupported.

  • platform/wincairo/crypto/subtle/ec-generate-key-malformed-parameters-expected.txt: Added.
  • platform/wincairo/crypto/subtle/ecdh-derive-bits-length-limits-expected.txt: Added.
  • platform/wincairo/crypto/subtle/ecdh-import-spki-key-ecdh-identifier-expected.txt: Added.

Use shouldRejectWithErrorName after r260579.

  • crypto/subtle/ecdh-import-pkcs8-key-p521-validate-ecprivatekey-parameters-publickey.html:
  • crypto/subtle/ecdsa-import-pkcs8-key-p521-validate-ecprivatekey-parameters-publickey.html:
3:47 PM Changeset in webkit [279681] by achristensen@apple.com
  • 5 edits in trunk

DOMURL's href setter should use empty URL as base URL
https://bugs.webkit.org/show_bug.cgi?id=227772

Reviewed by Yusuke Suzuki.

LayoutTests/imported/w3c:

  • web-platform-tests/url/historical.any-expected.txt:
  • web-platform-tests/url/historical.any.worker-expected.txt:

Source/WebCore:

This matches Chrome and Firefox.

  • html/DOMURL.cpp:

(WebCore::DOMURL::setHref):

3:45 PM Changeset in webkit [279680] by achristensen@apple.com
  • 6 edits in trunk

URL host setter should pass host to URLParser instead of trying to encode it itself
https://bugs.webkit.org/show_bug.cgi?id=227749

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/url/url-setters-a-area.window-expected.txt:
  • web-platform-tests/url/url-setters.any-expected.txt:
  • web-platform-tests/url/url-setters.any.worker-expected.txt:

Source/WTF:

For non-special schemes, the host is percent-encoded instead of punycode-encoded.
Allowing the URL parser to handle all input directly does the right thing for non-special schemes.

  • wtf/URL.cpp:

(WTF::URL::setHost):
(WTF::URL::setHostAndPort):

3:21 PM Changeset in webkit [279679] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed follow-up to r279601 to address some assertions on the bots.

Because we call makeWeakPtr() on a ProcessAssertion from a background queue, we have to
make sure the ProcessAssertion's WeakPtrFactory gets initialized eagerly on the main
thread, to avoid races and assertions in debug.

  • UIProcess/ProcessAssertion.h:
3:07 PM Changeset in webkit [279678] by Alan Bujtas
  • 10 edits
    2 adds in trunk

Source/WebCore:
[LFC][IFC] Unexpected content wrap when the containing block width is fixed
https://bugs.webkit.org/show_bug.cgi?id=227746

Reviewed by Antti Koivisto.

Test: fast/inline/inline-content-should-fit-the-line.html

While we resolved the relative Length value, the float -> LayoutUnit conversion implicitly floors the return value.
This flooring causes unexpected content wrap when the type we use for the measured width does not match the precision of the LayoutUnit.

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processInlineContent):

LayoutTests:
[LFC][IFC] Unexpected content wrap when the containing block width is relative
https://bugs.webkit.org/show_bug.cgi?id=227746

Reviewed by Antti Koivisto.

  • fast/inline/inline-content-should-fit-the-line-expected.html: Added.
  • fast/inline/inline-content-should-fit-the-line.html: Added.
2:55 PM Changeset in webkit [279677] by msaboff@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

fitcored crashes at JavaScriptCore: JSC::Heap::releaseAccessSlow
https://bugs.webkit.org/show_bug.cgi?id=227767

Reviewed by Geoffrey Garen.

Speculative fix for this crash. We are crashing while destroying the VM as we are about to
release the JSLock. In JSLock::willReleaseLock(), we release heap access. Therefore we don't
need to release it again when undertaking the various shutdown steps in the VM destructor.

Added a new scope class that will only release and then acquire heap access if the caller
currently has heap access.

  • heap/ReleaseHeapAccessScope.h:

(JSC::ReleaseHeapAccessIfNeededScope::ReleaseHeapAccessIfNeededScope):
(JSC::ReleaseHeapAccessIfNeededScope::~ReleaseHeapAccessIfNeededScope):

  • jit/JITWorklist.cpp:

(JSC::JITWorklist::waitUntilAllPlansForVMAreReady):

2:42 PM Changeset in webkit [279676] by lingho@apple.com
  • 2 edits in trunk/Tools

Remove proxy server setting from Buildbot configuration
https://bugs.webkit.org/show_bug.cgi?id=227768

Reviewed by Aakash Jain.

  • CISupport/build-webkit-org/steps.py:

(DownloadBuiltProduct.start):

2:42 PM Changeset in webkit [279675] by Ruben Turcios
  • 9 edits in branches/safari-612.1.22.3-branch/Source/WebKit

Cherry-pick r279591. rdar://problem/80282911

Collect Accessibility preferences on a background queue
https://bugs.webkit.org/show_bug.cgi?id=227617
<rdar://80055168>

Reviewed by Brent Fulgham.

To avoid blocking the main thread of the UI process, collect Media Accessibility preferences on a background thread,
and send them to the WebContent process(es).

  • Shared/AccessibilityPreferences.cpp: (IPC::ArgumentCoder<WebKit::AccessibilityPreferences>::encode): (IPC::ArgumentCoder<WebKit::AccessibilityPreferences>::decode):
  • Shared/AccessibilityPreferences.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::accessibilityPreferences): (WebKit::WebProcessPool::setMediaAccessibilityPreferences): (WebKit::WebProcessPool::mediaAccessibilityPreferencesChangedCallback): (WebKit::WebProcessPool::registerNotificationObservers):
  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::initializeNewWebProcess):
  • UIProcess/WebProcessPool.h:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::accessibilityPreferencesDidChange): (WebKit::WebProcess::setMediaAccessibilityPreferences):

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

2:42 PM Changeset in webkit [279674] by Ruben Turcios
  • 4 edits in branches/safari-612.1.22.3-branch/Source/WebKit

Cherry-pick r279342. rdar://problem/80282911

Pass correct value of AX per app settings to the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=227441
<rdar://problem/79857797>

Reviewed by Brent Fulgham.

Pass value of type AXValueState instead of a boolean value for per app AX settings.

  • Shared/AccessibilityPreferences.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::accessibilityPreferences):
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::accessibilityPreferencesDidChange):

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

2:35 PM Changeset in webkit [279673] by Alan Bujtas
  • 11 edits
    2 adds in trunk

[Legacy line layout] Inline content on subpixel position makes the table cell scroll
https://bugs.webkit.org/show_bug.cgi?id=227594
<rdar://74884402>

Reviewed by Simon Fraser.

Source/WebCore:

The root inlinebox is supposed to fit the [top, top + maxHeight] space as it is computed based
on the inline level boxes. However due to the integral rounding on the root inlinebox's logical top,
it may accidentally leak out of the containing block and trigger unintended layout overflow.
This patch ensures that we don't stretch the line (top/bottom) with the integral positioned root inlinebox.

Test: fast/inline/hidpi-root-inlinebox-integral-rounding-table-simple.html

  • rendering/LegacyInlineFlowBox.cpp:

(WebCore::LegacyInlineFlowBox::placeBoxesInBlockDirection):

LayoutTests:

  • fast/inline/hidpi-root-inlinebox-integral-rounding-table-simple-expected.html: Added.
  • fast/inline/hidpi-root-inlinebox-integral-rounding-table-simple.html: Added.
2:35 PM Changeset in webkit [279672] by Ruben Turcios
  • 9 edits in branches/safari-612.1.22.2-branch/Source/WebKit

Cherry-pick r279591. rdar://problem/80282781

Collect Accessibility preferences on a background queue
https://bugs.webkit.org/show_bug.cgi?id=227617
<rdar://80055168>

Reviewed by Brent Fulgham.

To avoid blocking the main thread of the UI process, collect Media Accessibility preferences on a background thread,
and send them to the WebContent process(es).

  • Shared/AccessibilityPreferences.cpp: (IPC::ArgumentCoder<WebKit::AccessibilityPreferences>::encode): (IPC::ArgumentCoder<WebKit::AccessibilityPreferences>::decode):
  • Shared/AccessibilityPreferences.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::accessibilityPreferences): (WebKit::WebProcessPool::setMediaAccessibilityPreferences): (WebKit::WebProcessPool::mediaAccessibilityPreferencesChangedCallback): (WebKit::WebProcessPool::registerNotificationObservers):
  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::initializeNewWebProcess):
  • UIProcess/WebProcessPool.h:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::accessibilityPreferencesDidChange): (WebKit::WebProcess::setMediaAccessibilityPreferences):

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

2:35 PM Changeset in webkit [279671] by Ruben Turcios
  • 4 edits in branches/safari-612.1.22.2-branch/Source/WebKit

Cherry-pick r279342. rdar://problem/80282781

Pass correct value of AX per app settings to the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=227441
<rdar://problem/79857797>

Reviewed by Brent Fulgham.

Pass value of type AXValueState instead of a boolean value for per app AX settings.

  • Shared/AccessibilityPreferences.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::accessibilityPreferences):
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::accessibilityPreferencesDidChange):

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

2:15 PM Changeset in webkit [279670] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

[ITP] Potential assertion hit in ResourceLoadStatisticsDatabaseStore::clearUserInteraction()
https://bugs.webkit.org/show_bug.cgi?id=227763
<rdar://80231894>

Reviewed by Darin Adler.

ResourceLoadStatisticsDatabaseStore::clearUserInteraction() was starting a SQLite transaction
but one of its callers already starts one, causing us to hit this assertion (recursive
transactions are not supported).

To address the issue, add an overload that takes in an SQLiteTransaction, when the call
site already started a transaction.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal):
(WebKit::ResourceLoadStatisticsDatabaseStore::logUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::hasHadUserInteraction):

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
2:12 PM Changeset in webkit [279669] by Chris Dumez
  • 5 edits in trunk

IDBIndex.keyPath should keep returning the same object
https://bugs.webkit.org/show_bug.cgi?id=227758

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are now passing.

  • web-platform-tests/IndexedDB/idbindex_keyPath.any-expected.txt:
  • web-platform-tests/IndexedDB/idbindex_keyPath.any.worker-expected.txt:

Source/WebCore:

IDBIndex.keyPath should keep returning the same object to match other browser
engines (Gecko and Blink).

No new tests, rebaselined existing tests.

  • Modules/indexeddb/IDBIndex.idl:
2:00 PM Changeset in webkit [279668] by Ruben Turcios
  • 9 edits in branches/safari-612.1.22.1-branch/Source/WebKit

Cherry-pick r279591. rdar://problem/80282927

Collect Accessibility preferences on a background queue
https://bugs.webkit.org/show_bug.cgi?id=227617
<rdar://80055168>

Reviewed by Brent Fulgham.

To avoid blocking the main thread of the UI process, collect Media Accessibility preferences on a background thread,
and send them to the WebContent process(es).

  • Shared/AccessibilityPreferences.cpp: (IPC::ArgumentCoder<WebKit::AccessibilityPreferences>::encode): (IPC::ArgumentCoder<WebKit::AccessibilityPreferences>::decode):
  • Shared/AccessibilityPreferences.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::accessibilityPreferences): (WebKit::WebProcessPool::setMediaAccessibilityPreferences): (WebKit::WebProcessPool::mediaAccessibilityPreferencesChangedCallback): (WebKit::WebProcessPool::registerNotificationObservers):
  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::initializeNewWebProcess):
  • UIProcess/WebProcessPool.h:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::accessibilityPreferencesDidChange): (WebKit::WebProcess::setMediaAccessibilityPreferences):

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

2:00 PM Changeset in webkit [279667] by Ruben Turcios
  • 4 edits in branches/safari-612.1.22.1-branch/Source/WebKit

Cherry-pick r279342. rdar://problem/80282927

Pass correct value of AX per app settings to the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=227441
<rdar://problem/79857797>

Reviewed by Brent Fulgham.

Pass value of type AXValueState instead of a boolean value for per app AX settings.

  • Shared/AccessibilityPreferences.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::accessibilityPreferences):
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::accessibilityPreferencesDidChange):

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

1:59 PM Changeset in webkit [279666] by achristensen@apple.com
  • 6 edits in trunk

Allow setting empty hosts of URLs with non-special schemes
https://bugs.webkit.org/show_bug.cgi?id=227752

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/url/url-setters-a-area.window-expected.txt:
  • web-platform-tests/url/url-setters.any-expected.txt:
  • web-platform-tests/url/url-setters.any.worker-expected.txt:

Source/WebCore:

asdf:/// is fine.
http:/// is not fine.

  • html/URLDecomposition.cpp:

(WebCore::URLDecomposition::setHost):
(WebCore::URLDecomposition::setHostname):
(WebCore::URLDecomposition::hash const):

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

[build.webkit.org] Add unit-tests for RunWebKit1Tests
https://bugs.webkit.org/show_bug.cgi?id=227658

Reviewed by Alexey Proskuryakov.

  • CISupport/build-webkit-org/steps_unittest.py:
1:39 PM Changeset in webkit [279664] by Ruben Turcios
  • 9 edits in branches/safari-612.1.22.0-branch/Source/WebKit

Cherry-pick r279591. rdar://problem/80282918

Collect Accessibility preferences on a background queue
https://bugs.webkit.org/show_bug.cgi?id=227617
<rdar://80055168>

Reviewed by Brent Fulgham.

To avoid blocking the main thread of the UI process, collect Media Accessibility preferences on a background thread,
and send them to the WebContent process(es).

  • Shared/AccessibilityPreferences.cpp: (IPC::ArgumentCoder<WebKit::AccessibilityPreferences>::encode): (IPC::ArgumentCoder<WebKit::AccessibilityPreferences>::decode):
  • Shared/AccessibilityPreferences.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::accessibilityPreferences): (WebKit::WebProcessPool::setMediaAccessibilityPreferences): (WebKit::WebProcessPool::mediaAccessibilityPreferencesChangedCallback): (WebKit::WebProcessPool::registerNotificationObservers):
  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::initializeNewWebProcess):
  • UIProcess/WebProcessPool.h:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::accessibilityPreferencesDidChange): (WebKit::WebProcess::setMediaAccessibilityPreferences):

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

1:39 PM Changeset in webkit [279663] by Ruben Turcios
  • 4 edits in branches/safari-612.1.22.0-branch/Source/WebKit

Cherry-pick r279342. rdar://problem/80282918

Pass correct value of AX per app settings to the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=227441
<rdar://problem/79857797>

Reviewed by Brent Fulgham.

Pass value of type AXValueState instead of a boolean value for per app AX settings.

  • Shared/AccessibilityPreferences.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::accessibilityPreferences):
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::accessibilityPreferencesDidChange):

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

1:20 PM Changeset in webkit [279662] by achristensen@apple.com
  • 6 edits in trunk

URL path setter should add "./" before non-empty path and after empty host for URLs with non-special schemes
https://bugs.webkit.org/show_bug.cgi?id=227750

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/url/url-setters-a-area.window-expected.txt:
  • web-platform-tests/url/url-setters.any-expected.txt:
  • web-platform-tests/url/url-setters.any.worker-expected.txt:

Source/WTF:

This is related to r267837 but in the path setter, too.
This helps preserve idempotence in parsed URLs.
This is an edge case that will rarely be hit in practice, but now the path setter matches the parser.

  • wtf/URL.cpp:

(WTF::URL::setPath):

12:57 PM Changeset in webkit [279661] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Deploy smart pointers in DOMWindow
https://bugs.webkit.org/show_bug.cgi?id=227584

Reviewed by David Kilzer.

Deployed Ref/RefPtr in more places in DOMWindow.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::performance const):
(WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
(WebCore::DOMWindow::postMessage):
(WebCore::DOMWindow::frameElement const):
(WebCore::DOMWindow::focus):
(WebCore::DOMWindow::blur):
(WebCore::DOMWindow::close):
(WebCore::DOMWindow::print):
(WebCore::DOMWindow::stop):
(WebCore::DOMWindow::alert):
(WebCore::DOMWindow::confirmForBindings):
(WebCore::DOMWindow::prompt):
(WebCore::DOMWindow::outerHeight const):
(WebCore::DOMWindow::outerWidth const):
(WebCore::DOMWindow::innerHeight const):
(WebCore::DOMWindow::innerWidth const):
(WebCore::DOMWindow::screenX const):
(WebCore::DOMWindow::screenY const):
(WebCore::DOMWindow::scrollX const):
(WebCore::DOMWindow::scrollY const):
(WebCore::DOMWindow::closed const):
(WebCore::DOMWindow::name const):
(WebCore::DOMWindow::setName):
(WebCore::DOMWindow::setStatus):
(WebCore::DOMWindow::setDefaultStatus):
(WebCore::DOMWindow::opener const):
(WebCore::DOMWindow::disownOpener):
(WebCore::DOMWindow::parent const):
(WebCore::DOMWindow::top const):
(WebCore::DOMWindow::consumeTransientActivation):
(WebCore::DOMWindow::notifyActivated):
(WebCore::DOMWindow::getMatchedCSSRules const):
(WebCore::DOMWindow::scrollBy const):
(WebCore::DOMWindow::allowedToChangeWindowGeometry const):
(WebCore::DOMWindow::setTimeout):
(WebCore::DOMWindow::clearTimeout):
(WebCore::DOMWindow::setInterval):
(WebCore::DOMWindow::requestAnimationFrame):
(WebCore::DOMWindow::cancelAnimationFrame):
(WebCore::DOMWindow::createImageBitmap):
(WebCore::DOMWindow::isSecureContext const):
(WebCore::DOMWindow::addEventListener):
(WebCore::DOMWindow::startListeningForDeviceOrientationIfNecessary):
(WebCore::DOMWindow::startListeningForDeviceMotionIfNecessary):
(WebCore::DOMWindow::incrementScrollEventListenersCount):
(WebCore::DOMWindow::removeEventListener):
(WebCore::DOMWindow::dispatchLoadEvent):
(WebCore::DOMWindow::removeAllEventListeners):
(WebCore::DOMWindow::setLocation):
(WebCore::DOMWindow::createWindow):
(WebCore::DOMWindow::open):
(WebCore::DOMWindow::showModalDialog):

12:54 PM Changeset in webkit [279660] by chris.reid@sony.com
  • 8 edits in trunk/Source

[PlayStation] Don't assume 4KB block size when estimating Network Cache disk usage
https://bugs.webkit.org/show_bug.cgi?id=227502

Reviewed by Chris Dumez.

Source/WebKit:

Network Cache disk usage can underestimate the real disk usage on platforms
with file blocks larger than 4 KB.
Adding call to FileSystem::getVolumeFileBlockSize to use the FileSystem's
block size in the estimation.

  • NetworkProcess/cache/NetworkCacheStorage.cpp:
  • NetworkProcess/cache/NetworkCacheStorage.h:

Source/WTF:

Add getVolumeFileBlockSize to fetch the block size from the filesystem.
Currently only implemented for Windows and POSIX filesystems.

  • wtf/FileSystem.cpp:
  • wtf/FileSystem.h:
  • wtf/playstation/FileSystemPlayStation.cpp:
12:46 PM Changeset in webkit [279659] by Aditya Keerthi
  • 3 edits
    3 adds in trunk

[iOS] Inconsistent styling for input[type="submit"] and button[type="submit"]
https://bugs.webkit.org/show_bug.cgi?id=227043
<rdar://problem/79629354>

Reviewed by Wenson Hsieh.

Source/WebCore:

In iOS 15, submit buttons have a different appearance from standard
buttons, matching UIKit's "preferred" button style.

Previously, all buttons had the same styling, which meant that
input[type="submit"] and button[type="submit"] had the same
appearance by default. The changes made for iOS 15 were applied to
input[type="submit"], but not button[type="submit"], leading to
inconsistent styling.

Test: fast/forms/ios/form-control-refresh/button/button-type-submit.html

  • css/html.css:

Ensure the different style applied to input[type="submit"] also applies
to button[type="submit"].

Additionally, apply the new style to button[type="menu"]. This type is
unsupported, but should have the same appearance as a submit button,
according to the button-type-menu-historical.html web platform test.

LayoutTests:

Added a reference test to verify that input[type="submit"] and
button[type="submit"] have the same appearance.

  • fast/forms/ios/form-control-refresh/button/button-type-submit-expected.html: Added.
  • fast/forms/ios/form-control-refresh/button/button-type-submit.html: Added.
12:43 PM Changeset in webkit [279658] by Fujii Hironori
  • 29 edits
    2 deletes in trunk/Source

[Cairo] Merge PlatformContextCairo into GraphicsContextCairo
https://bugs.webkit.org/show_bug.cgi?id=227721

Reviewed by Don Olmstead.

Source/WebCore:

PlatformContextCairo was introduced to separate Cairo specific
code from the platform-independent GraphicsContext class. However,
GraphicsContext is a abstract class since r278062. And,
GraphicsContextCairo is a Cairo specific concrete class.

Some modifications are needed to merge PlatformContextCairo into
GraphicsContextCairo. Renamed m_state to m_cairoState. Renamed
save() and restore() to saveInternal() and restoreInternal().

  • platform/Cairo.cmake:
  • platform/SourcesCairo.txt:
  • platform/graphics/GraphicsContext.h:
  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::drawShadowLayerBuffer):
(WebCore::Cairo::drawShadowImage):
(WebCore::Cairo::fillShadowBuffer):
(WebCore::Cairo::drawPathShadow):
(WebCore::Cairo::fillCurrentCairoPath):
(WebCore::Cairo::drawGlyphsShadow):
(WebCore::Cairo::computeLineBoundsAndAntialiasingModeForText):
(WebCore::Cairo::State::setStrokeThickness):
(WebCore::Cairo::State::setStrokeStyle):
(WebCore::Cairo::State::setCompositeOperation):
(WebCore::Cairo::State::setShouldAntialias):
(WebCore::Cairo::State::setCTM):
(WebCore::Cairo::State::getCTM):
(WebCore::Cairo::State::getClipBounds):
(WebCore::Cairo::State::roundToDevicePixels):
(WebCore::Cairo::State::isAcceleratedContext):
(WebCore::Cairo::ShadowState::isRequired const):
(WebCore::Cairo::setLineCap):
(WebCore::Cairo::setLineDash):
(WebCore::Cairo::setLineJoin):
(WebCore::Cairo::setMiterLimit):
(WebCore::Cairo::fillRect):
(WebCore::Cairo::fillRoundedRect):
(WebCore::Cairo::fillRectWithRoundedHole):
(WebCore::Cairo::fillPath):
(WebCore::Cairo::strokeRect):
(WebCore::Cairo::strokePath):
(WebCore::Cairo::clearRect):
(WebCore::Cairo::drawGlyphs):
(WebCore::Cairo::drawPlatformImage):
(WebCore::Cairo::drawPattern):
(WebCore::Cairo::drawSurface):
(WebCore::Cairo::drawRect):
(WebCore::Cairo::drawLine):
(WebCore::Cairo::drawLinesForText):
(WebCore::Cairo::drawDotsForDocumentMarker):
(WebCore::Cairo::drawEllipse):
(WebCore::Cairo::drawFocusRing):
(WebCore::Cairo::save):
(WebCore::Cairo::restore):
(WebCore::Cairo::translate):
(WebCore::Cairo::rotate):
(WebCore::Cairo::scale):
(WebCore::Cairo::concatCTM):
(WebCore::Cairo::beginTransparencyLayer):
(WebCore::Cairo::endTransparencyLayer):
(WebCore::Cairo::clip):
(WebCore::Cairo::clipOut):
(WebCore::Cairo::clipPath):
(WebCore::Cairo::clipToImageBuffer):

  • platform/graphics/cairo/CairoOperations.h:
  • platform/graphics/cairo/FontCairo.cpp:
  • platform/graphics/cairo/GradientCairo.cpp:
  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContextCairo::GraphicsContextCairo):
(WebCore::GraphicsContextCairo::platformContext const):
(WebCore::GraphicsContextCairo::save):
(WebCore::GraphicsContextCairo::restore):
(WebCore::GraphicsContextCairo::drawRect):
(WebCore::GraphicsContextCairo::drawNativeImage):
(WebCore::GraphicsContextCairo::drawLine):
(WebCore::GraphicsContextCairo::drawEllipse):
(WebCore::GraphicsContextCairo::fillPath):
(WebCore::GraphicsContextCairo::strokePath):
(WebCore::GraphicsContextCairo::fillRect):
(WebCore::GraphicsContextCairo::clip):
(WebCore::GraphicsContextCairo::clipPath):
(WebCore::GraphicsContextCairo::clipToImageBuffer):
(WebCore::GraphicsContextCairo::drawFocusRing):
(WebCore::GraphicsContextCairo::drawLinesForText):
(WebCore::GraphicsContextCairo::drawDotsForDocumentMarker):
(WebCore::GraphicsContextCairo::roundToDevicePixels):
(WebCore::GraphicsContextCairo::translate):
(WebCore::GraphicsContextCairo::updateState):
(WebCore::GraphicsContextCairo::concatCTM):
(WebCore::GraphicsContextCairo::setCTM):
(WebCore::GraphicsContextCairo::beginTransparencyLayer):
(WebCore::GraphicsContextCairo::endTransparencyLayer):
(WebCore::GraphicsContextCairo::clearRect):
(WebCore::GraphicsContextCairo::strokeRect):
(WebCore::GraphicsContextCairo::setLineCap):
(WebCore::GraphicsContextCairo::setLineDash):
(WebCore::GraphicsContextCairo::setLineJoin):
(WebCore::GraphicsContextCairo::setMiterLimit):
(WebCore::GraphicsContextCairo::clipOut):
(WebCore::GraphicsContextCairo::rotate):
(WebCore::GraphicsContextCairo::scale):
(WebCore::GraphicsContextCairo::fillRoundedRectImpl):
(WebCore::GraphicsContextCairo::fillRectWithRoundedHole):
(WebCore::GraphicsContextCairo::drawPattern):
(WebCore::GraphicsContextCairo::drawGlyphs):
(WebCore::GraphicsContextCairo::cr const):
(WebCore::GraphicsContextCairo::layers):
(WebCore::GraphicsContextCairo::saveInternal):
(WebCore::GraphicsContextCairo::restoreInternal):
(WebCore::GraphicsContextCairo::pushImageMask):
(WebCore::GraphicsContextCairo::graphicsContextPrivate):
(WebCore::GraphicsContextCairo::~GraphicsContextCairo): Deleted.

  • platform/graphics/cairo/GraphicsContextCairo.h:
  • platform/graphics/cairo/GraphicsContextGLCairo.cpp:
  • platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
  • platform/graphics/cairo/ImageBufferCairoBackend.cpp:
  • platform/graphics/cairo/PlatformContextCairo.cpp: Removed.
  • platform/graphics/cairo/PlatformContextCairo.h: Removed.
  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:

(Nicosia::contextForReplay):

  • platform/graphics/nicosia/cairo/NicosiaPaintingContextCairo.cpp:
  • platform/graphics/nicosia/cairo/NicosiaPaintingOperationReplayCairo.h:

(Nicosia::PaintingOperationReplayCairo::PaintingOperationReplayCairo):

  • platform/graphics/win/Direct2DOperations.h:
  • platform/graphics/win/GraphicsContextCairoWin.cpp:

(WebCore::GraphicsContextCairo::GraphicsContextCairo):
(WebCore::drawBitmapToContext):

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
  • platform/gtk/ScrollbarThemeGtk.cpp:
  • platform/win/DragImageCairoWin.cpp:

(WebCore::deallocContext):
(WebCore::allocImage):
(WebCore::scaleDragImage):
(WebCore::createDragImageFromImage):

Source/WebKit:

  • Shared/API/c/cairo/WKImageCairo.cpp:
  • Shared/cairo/ShareableBitmapCairo.cpp:
  • WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
  • WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:

Source/WebKitLegacy/win:

  • WebFrame.cpp:

(WebFrame::spoolPages):

  • WebFrame.h:
12:37 PM Changeset in webkit [279657] by commit-queue@webkit.org
  • 4 edits in trunk

Unreviewed, reverting r279271.
https://bugs.webkit.org/show_bug.cgi?id=227764

Gmail labels (folders) aren't visible on left side anymore

Reverted changeset:

"[css-flexbox] Do not clamp flex base size with
{min|max}-{height|width}"
https://bugs.webkit.org/show_bug.cgi?id=225590
https://commits.webkit.org/r279271

12:35 PM Changeset in webkit [279656] by Kyle Piddington
  • 3 edits
    2 adds in trunk

WebGL shader link error in iOS 15 beta: "Internal error compiling shader with Metal backend"
https://bugs.webkit.org/show_bug.cgi?id=227723

The sequence operator can be used to combine statements. Our initial
logic did not account for this.
Source/ThirdParty/ANGLE:

Reviewed by Dean Jackson.

  • src/compiler/translator/TranslatorMetalDirect/SeparateCompoundExpressions.cpp:

(sh::Separator::isStandaloneExpr):

LayoutTests:

Reviewed by Dean Jackson.

  • fast/canvas/webgl/shader-with-comma-op-expected.txt: Added.
  • fast/canvas/webgl/shader-with-comma-op.html: Added.
12:32 PM Changeset in webkit [279655] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

[GLIB] Update test expectations after r279561
https://bugs.webkit.org/show_bug.cgi?id=227759

The tests updated in the general expectations in that change still

fail on GTK. Also, some specific WPE pass expectations can be removed.
Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-07-07

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
12:08 PM Changeset in webkit [279654] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Do not allocate JITWorklist if JIT is disabled
https://bugs.webkit.org/show_bug.cgi?id=227734

Reviewed by Mark Lam.

Previously, this code was doing,

if (Options::useJIT())

DFG::iterateCodeBlocksForGC(visitor, m_vm, func);

But r278082 changed it to

JITWorklist::ensureGlobalWorklist().iterateCodeBlocksForGC(visitor, m_vm, func);

As a result, we are always allocating JITWorklist even JIT is not enabled.
This patch fixes the behavior not to allocate JITWorklist.

  • heap/Heap.cpp:

(JSC::Heap::iterateExecutingAndCompilingCodeBlocks):

11:44 AM Changeset in webkit [279653] by ysuzuki@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

r270214 broke testb3 on arm64e
https://bugs.webkit.org/show_bug.cgi?id=227713

Reviewed by Saam Barati.

ARM64E CAS lacks isBranch case. This patch adds isBranch implementation.
We also adjust disasm scanning test to support CAS in ARM64E.

  • assembler/testmasm.cpp:

(JSC::testAtomicStrongCASFill8):
(JSC::testAtomicStrongCASFill16):

  • b3/B3LowerToAir.cpp:
  • b3/testb3_8.cpp:

(testAtomicWeakCAS):
(testAtomicStrongCAS):
(testAtomicXchg):

11:34 AM Changeset in webkit [279652] by achristensen@apple.com
  • 1 edit
    2 adds in trunk/LayoutTests

Add WK1 URL expectations after r279646

navigator.sendBeacon isn't implemented for WK1. It needs its own expectations.

  • platform/mac-wk1/imported/w3c/web-platform-tests/url: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/url/failure-expected.txt: Added.
11:31 AM Changeset in webkit [279651] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ iOS Debug ] fast/dom/Window/post-message-large-array-buffer-should-not-crash.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=227755

Unreviewed test gardening.

Patch by Ayumi Kojima <Ayumi Kojima> on 2021-07-07

  • platform/ios-simulator-wk2/TestExpectations:
11:04 AM Changeset in webkit [279650] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ Mac Debug ] fast/dom/Window/post-message-large-array-buffer-should-not-crash.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=227753

Unreviewed test gardening.

Patch by Ayumi Kojima <Ayumi Kojima> on 2021-07-07

  • platform/mac/TestExpectations:
10:52 AM Changeset in webkit [279649] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

REGRESSION (r274460?): Infinite recursion on fullscreen/full-screen-remove-ancestor.html in WTR::InjectedBundlePage::closeFullScreen
https://bugs.webkit.org/show_bug.cgi?id=224085

Unreviewed test gardening.

Patch by Eric Hutchison <Eric Hutchison> on 2021-07-07

  • platform/mac-wk2/TestExpectations:
10:34 AM Changeset in webkit [279648] by Chris Dumez
  • 4 edits in trunk/LayoutTests

REGRESSION (r279427): [ Mac wk2 ] imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/import-css-module-basic.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=227730
<rdar://problem/80240658>

Unreviewed, address flakiness of test by silencing console logging.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/import-css-module-basic-expected.txt:

LayoutTests:

10:32 AM Changeset in webkit [279647] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

XPC services should release their os transaction when given a SIGTERM signal
https://bugs.webkit.org/show_bug.cgi?id=227747
<rdar://72430454>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-07-07
Reviewed by Geoff Garen.

Apparently when you shut down your computer, processes are given a SIGTERM signal and expected to release their os_transaction_t
to indicate that they can now be terminated "cleanly".

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:

(WebKit::XPCServiceInitializer):

10:15 AM Changeset in webkit [279646] by achristensen@apple.com
  • 4 edits in trunk/LayoutTests

Update URL test expectations
https://bugs.webkit.org/show_bug.cgi?id=172337

LayoutTests/imported/w3c:

  • web-platform-tests/url/failure-expected.txt:

LayoutTests:

Before r225186 this test asserted, so it was marked as pass/fail for some reason instead of being skipped.
Now it's fine, though, so mark it as passing and update the expectations.

10:07 AM Changeset in webkit [279645] by achristensen@apple.com
  • 31 edits in trunk/Source

Use more Span
https://bugs.webkit.org/show_bug.cgi?id=227606

Reviewed by Darin Adler.

Source/WebCore:

  • inspector/InspectorFrontendHost.cpp:

(WebCore::InspectorFrontendHost::showCertificate):

  • platform/SharedBuffer.cpp:

(WebCore::SharedBuffer::decoder const):

  • platform/network/cf/CertificateInfoCFNet.cpp:

(WTF::Persistence::encodeCFData):

  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::RegistrationDatabase::importRecords):

  • workers/service/server/SWScriptStorage.cpp:

(WebCore::SWScriptStorage::store):

Source/WebKit:

  • NetworkProcess/cache/CacheStorageEngineCache.cpp:

(WebKit::CacheStorage::Cache::decodeRecordHeader):

  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::Caches::readOrigin):
(WebKit::CacheStorage::decodeCachesNames):

  • NetworkProcess/cache/NetworkCacheData.cpp:

(WebKit::NetworkCache::Data::mapToFile const):
(WebKit::NetworkCache::computeSHA1):

  • NetworkProcess/cache/NetworkCacheData.h:

(WebKit::NetworkCache::Data::span const):

  • NetworkProcess/cache/NetworkCacheDataCocoa.mm:

(WebKit::NetworkCache::Data::apply const):

  • NetworkProcess/cache/NetworkCacheDataCurl.cpp:

(WebKit::NetworkCache::Data::apply const):

  • NetworkProcess/cache/NetworkCacheDataGLib.cpp:

(WebKit::NetworkCache::Data::apply const):

  • NetworkProcess/cache/NetworkCacheEntry.cpp:

(WebKit::NetworkCache::Entry::decodeStorageRecord):

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::decodeRecordMetaData):

  • NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:

(WebKit::NetworkCache::SubresourcesEntry::decodeStorageRecord):

  • UIProcess/API/APIContentRuleListStore.cpp:

(API::getData):
(API::decodeContentRuleListMetaData):
(API::writeDataToFile):

Source/WTF:

New is always better, right?

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::mapToFile):

  • wtf/FileSystem.h:
  • wtf/persistence/PersistentCoders.cpp:

(WTF::Persistence::Coder<CString>::encode):
(WTF::Persistence::Coder<CString>::decode):
(WTF::Persistence::Coder<String>::encode):
(WTF::Persistence::decodeStringText):
(WTF::Persistence::Coder<SHA1::Digest>::encode):
(WTF::Persistence::Coder<SHA1::Digest>::decode):

  • wtf/persistence/PersistentCoders.h:
  • wtf/persistence/PersistentDecoder.cpp:

(WTF::Persistence::Decoder::Decoder):
(WTF::Persistence::Decoder::bufferIsLargeEnoughToContain const):
(WTF::Persistence::Decoder::bufferPointerForDirectRead):
(WTF::Persistence::Decoder::decodeFixedLengthData):
(WTF::Persistence::Decoder::decodeNumber):
(WTF::Persistence::Decoder::verifyChecksum):

  • wtf/persistence/PersistentDecoder.h:

(WTF::Persistence::Decoder::length const):
(WTF::Persistence::Decoder::currentOffset const):

  • wtf/persistence/PersistentEncoder.cpp:

(WTF::Persistence::Encoder::updateChecksumForData):
(WTF::Persistence::Encoder::encodeFixedLengthData):
(WTF::Persistence::Encoder::encodeChecksum):

  • wtf/persistence/PersistentEncoder.h:
9:44 AM Changeset in webkit [279644] by Chris Dumez
  • 5 edits in trunk/Source/WebKit

[macOS] Suspend WebProcesses that are in the process cache
https://bugs.webkit.org/show_bug.cgi?id=227269
<rdar://problem/79639863>

Reviewed by Geoffrey Garen.

Suspend WebProcesses that are in the process cache on macOS to make sure they use no CPU.
The suspension happens 30 seconds after the process enters the cache, giving the WebProcess
time to finish whatever clean up it needs to do before suspending.

  • UIProcess/WebProcessCache.cpp:

(WebKit::WebProcessCache::CachedProcess::CachedProcess):
(WebKit::WebProcessCache::CachedProcess::~CachedProcess):
(WebKit::WebProcessCache::CachedProcess::takeProcess):
(WebKit::WebProcessCache::suspensionTimerFired):

  • UIProcess/WebProcessCache.h:

(WebKit::WebProcessCache::CachedProcess::isSuspended const):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/mac/WebProcessProxyMac.mm:

(WebKit::WebProcessProxy::platformSuspendProcess):
(WebKit::WebProcessProxy::platformResumeProcess):

9:14 AM Changeset in webkit [279643] by ntim@apple.com
  • 4 edits in trunk/Source/WebCore

Use setBooleanAttribute instead of setAttributeWithoutSynchronization(X, Y ? emptyAtom() : nullAtom());
https://bugs.webkit.org/show_bug.cgi?id=227745

Reviewed by Antti Koivisto.

It's easier to read and attribute sync doesn't make a difference here (it only does for style & SVG attributes).
Also clean up HTMLDialogElement to remove intermediary setOpen method.

  • html/HTMLDialogElement.cpp:

(WebCore::HTMLDialogElement::show):
(WebCore::HTMLDialogElement::showModal):
(WebCore::HTMLDialogElement::close):
(WebCore::HTMLDialogElement::parseAttribute):
(WebCore::HTMLDialogElement::setOpen): Deleted.

  • html/HTMLDialogElement.h:
  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::setMultiple):

8:37 AM Changeset in webkit [279642] by Chris Dumez
  • 5 edits
    2 adds in trunk

SubtleCrypto should only be exposed to secure contexts
https://bugs.webkit.org/show_bug.cgi?id=227725

Reviewed by Darin Adler.

Source/WebCore:

SubtleCrypto should only be exposed to secure contexts:

Gecko and Blink match the specification.

This was causing WebKit to fail the WebCryptoAPI/historical.any.html WPT test.

Test: http/wpt/crypto/historical.html

  • crypto/CryptoKey.idl:
  • crypto/SubtleCrypto.idl:
  • page/Crypto.idl:

LayoutTests:

Add layout test coverage.

  • http/wpt/crypto/historical-expected.txt: Added.
  • http/wpt/crypto/historical.html: Added.
6:15 AM Changeset in webkit [279641] by Adrian Perez de Castro
  • 5 edits
    2 moves in releases/WebKitGTK/webkit-2.32/Source/WebKit

Merge r279037 - [WPE] Rework touch-based gesture controller
https://bugs.webkit.org/show_bug.cgi?id=226456

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-06-18
Reviewed by Alejandro G. Castro.

Rename WPE's ScrollGestureController to TouchGestureController since now
it also handles production of touch-based click events.

TouchGestureController now internally manages all the related state,
tracking the touch interaction and determining whether it progresses
into a scrolling gesture or whether, upon finishing, it should be
translated into a simple click event.

In PageClientImpl, any unhandled event is pushed into
TouchGestureController and a variant of different outcomes is returned.
No-event result is ignored, and click or axis events are dispatched as
appropriate.

In WPEView, where the touch events arrive into the engine, we keep the
shortcut where touch events are piped directly into the controller if
said controller is already gesturing scrolling behavior. In that case
the touch events are not dispatched into the engine, with the exception
of touch-up events which are, to provide matching closure for the
touch-down events.

  • SourcesWPE.txt:
  • UIProcess/API/wpe/PageClientImpl.cpp:

(WebKit::PageClientImpl::doneWithTouchEvent):

  • UIProcess/API/wpe/TouchGestureController.cpp: Renamed from Source/WebKit/UIProcess/API/wpe/ScrollGestureController.cpp.

(WebKit::TouchGestureController::handleEvent):

  • UIProcess/API/wpe/TouchGestureController.h: Renamed from Source/WebKit/UIProcess/API/wpe/ScrollGestureController.h.

(WebKit::TouchGestureController::gesturedEvent const):

  • UIProcess/API/wpe/WPEView.cpp:

(WKWPE::View::View):
(WKWPE::m_backend):

  • UIProcess/API/wpe/WPEView.h:

(WKWPE::View::touchGestureController const):
(WKWPE::View::scrollGestureController const): Deleted.

1:12 AM Changeset in webkit [279640] by Chris Lord
  • 4 edits in trunk

[WPE] Fieldset elements can incorrectly get treated as opaque with async scrolling overflow areas enabled
https://bugs.webkit.org/show_bug.cgi?id=227679

Reviewed by Simon Fraser.

Source/WebCore:

Don't treat fieldset elements as opaque as their background shape is
determined by its children and can be non-rectangular.

No new tests, covered by existing tests.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect const):

LayoutTests:

WPT fieldset-overflow test now passes with async overflow scrolling
enabled.

  • platform/wpe/TestExpectations:

Jul 6, 2021:

11:05 PM Changeset in webkit [279639] by commit-queue@webkit.org
  • 5 edits
    2 deletes in trunk

Unreviewed, reverting r279628.
https://bugs.webkit.org/show_bug.cgi?id=227737

Test does not work since it relies on r279546, which is
reverted due to Speedometer regression

Reverted changeset:

"SubtleCrypto should only be exposed to secure contexts"
https://bugs.webkit.org/show_bug.cgi?id=227725
https://commits.webkit.org/r279628

8:49 PM Changeset in webkit [279638] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix after r279630
https://bugs.webkit.org/show_bug.cgi?id=223166

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
8:44 PM Changeset in webkit [279637] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, need CryptoKey and SubtleCrypto names

  • bindings/js/WebCoreBuiltinNames.h:
8:36 PM Changeset in webkit [279636] by Simon Fraser
  • 3 edits
    2 adds in trunk

REGRESSION (r262237) Safari 14.x shows graphics artifacts when scrolling, using drop-down menus or just moving the mouse
https://bugs.webkit.org/show_bug.cgi?id=220892
<rdar://73538454>

Reviewed by Alan Bujtas.

Source/WebCore:

Fix an issue with backing sharing where a composited layer needs to interrupted a backing
sharing sequence. In some cases, a layer that became composited via an indirect reason
(like overflow positioning) would not interrupt a backing sharing sequence, leaving a dangling
layer that ended up painting into the wrong ancestor.

The fix is to ensure that BackingSharingState::updateBeforeDescendantTraversal() and
BackingSharingState::updateAfterDescendantTraversal() have the same behavior when a layer
becomes composited (thus interrupting the sequence). However, we also have ensure that
updateAfterDescendantTraversal() doesn't erroeously interrupt the sequence when the sequence
was initiated by some descendant, hence the check against the preDescendantProviderCandidate.

Test: compositing/shared-backing/backing-sharing-compositing-change.html

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::BackingSharingState::endBackingSharingSequence):
(WebCore::RenderLayerCompositor::BackingSharingState::updateBeforeDescendantTraversal):
(WebCore::RenderLayerCompositor::BackingSharingState::updateAfterDescendantTraversal):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::traverseUnchangedSubtree):

LayoutTests:

  • compositing/shared-backing/backing-sharing-compositing-change-expected.html: Added.
  • compositing/shared-backing/backing-sharing-compositing-change.html: Added.
8:12 PM Changeset in webkit [279635] by commit-queue@webkit.org
  • 122 edits
    5 deletes in trunk

Unreviewed, reverting r279546, r279554, r279558 and r279567.
https://bugs.webkit.org/show_bug.cgi?id=227732

Speedometer/jQuery-TodoMVC 2-3% regression

Reverted changesets:

"[WebIDL] Rework runtime enabled properties leveraging
PropertyCallback"
https://bugs.webkit.org/show_bug.cgi?id=227275
https://commits.webkit.org/r279546

"[WebIDL] Generate constructor's hash table in
GenerateConstructorHelperMethods"
https://bugs.webkit.org/show_bug.cgi?id=227668
https://commits.webkit.org/r279554

"[WebIDL] Simplify generation of runtime conditionally read-
write attributes"
https://bugs.webkit.org/show_bug.cgi?id=227672
https://commits.webkit.org/r279558

"Use AbortSignal's [PrivateIdentifier] whenSignalAborted()
static method"
https://bugs.webkit.org/show_bug.cgi?id=227673
https://commits.webkit.org/r279567

6:09 PM Changeset in webkit [279634] by Alan Coon
  • 1 copy in tags/Safari-612.1.22.3.1

Tag Safari-612.1.22.3.1.

6:06 PM Changeset in webkit [279633] by Alan Coon
  • 1 copy in tags/Safari-612.1.22.1.1

Tag Safari-612.1.22.1.1.

6:04 PM Changeset in webkit [279632] by Alan Coon
  • 1 copy in tags/Safari-612.1.22.2.1

Tag Safari-612.1.22.2.1.

6:01 PM Changeset in webkit [279631] by Alan Coon
  • 1 copy in tags/Safari-612.1.22.0.1

Tag Safari-612.1.22.0.1.

5:48 PM Changeset in webkit [279630] by commit-queue@webkit.org
  • 8 edits
    4 adds in trunk/Source/JavaScriptCore

[JSC] Implement Temporal
https://bugs.webkit.org/show_bug.cgi?id=223166

Patch by Philip Chimento <pchimento@igalia.com> on 2021-07-06
Reviewed by Yusuke Suzuki.

Intended to be the first patch in a stack. Adds boilerplate for
Temporal in order to unblock further parallelizable work on this bug.

This patch adds a feature flag for Temporal, and a toplevel Temporal
global containing only Temporal.now, which is itself an empty object.
These objects will be further populated in later patches.

  • CMakeLists.txt: Add TemporalObject and TemporalNow. Property lookup table in TemporalObject.
  • DerivedSources.make: Add TemporalObject property lookup table header.
  • JavaScriptCore.xcodeproj/project.pbxproj: Add new files.
  • Sources.txt: Add TemporalObject and TemporalNow.
  • runtime/CommonIdentifiers.h: Add 'Temporal' property key.
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init): Create the Temporal global if the feature

flag is enabled.

  • runtime/OptionsList.h: Add useTemporal feature flag.
  • runtime/TemporalNow.cpp: Added.

(JSC::TemporalNow::TemporalNow):
(JSC::TemporalNow::create):
(JSC::TemporalNow::createStructure):
(JSC::TemporalNow::finishCreation):

  • runtime/TemporalNow.h: Added.
  • runtime/TemporalObject.cpp: Added.

(JSC::createNowObject):
(JSC::TemporalObject::TemporalObject):
(JSC::TemporalObject::create):
(JSC::TemporalObject::createStructure):
(JSC::TemporalObject::finishCreation):

  • runtime/TemporalObject.h: Added.
5:27 PM Changeset in webkit [279629] by commit-queue@webkit.org
  • 4 edits in trunk

imported/w3c/web-platform-tests/fetch/api/credentials/authentication-basic.any*.html are crashing in debug
https://bugs.webkit.org/show_bug.cgi?id=227310

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

Source/WebCore:

In r228486 we blocked cross-origin requests from asking for credentials, and we wanted to add a console log for web developers
to see why they could no longer ask for credentials. r228703 loosened that to allow main resources to request credentials,
and it added an incorrect assertion before logging. ResourceLoader::isAllowedToAskUserForCredentials has two other reasons
why credentials could be blocked, and there is no reason to log in those cases because that is standard web behavior, as seen by
running the tests in Chrome and Firefox and seeing no console log. This removes the logs in cases where other browsers also
have the same behavior and do not log, and removes the incorrect assertion.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::didBlockAuthenticationChallenge):

LayoutTests:

4:54 PM Changeset in webkit [279628] by Chris Dumez
  • 5 edits
    2 adds in trunk

SubtleCrypto should only be exposed to secure contexts
https://bugs.webkit.org/show_bug.cgi?id=227725

Reviewed by Darin Adler.

Source/WebCore:

SubtleCrypto should only be exposed to secure contexts:

Gecko and Blink match the specification.

This was causing WebKit to fail the WebCryptoAPI/historical.any.html WPT test.

Test: http/wpt/crypto/historical.html

  • crypto/CryptoKey.idl:
  • crypto/SubtleCrypto.idl:
  • page/Crypto.idl:

LayoutTests:

Add layout test coverage.

  • http/wpt/crypto/historical-expected.txt: Added.
  • http/wpt/crypto/historical.html: Added.
3:49 PM Changeset in webkit [279627] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Fix type error in testb3
https://bugs.webkit.org/show_bug.cgi?id=227722

Patch by Yijia Huang <Yijia Huang> on 2021-07-06
Reviewed by Mark Lam.

Fix type error in testb3. Shift amount should be 32-bit constant.

  • b3/testb3_3.cpp:

(testInsertSignedBitfieldInZero64):
(testExtractSignedBitfield64):

3:37 PM Changeset in webkit [279626] by rniwa@webkit.org
  • 5 edits in trunk/Source

Deploy smart pointers in EventHandler and UserInputBridge
https://bugs.webkit.org/show_bug.cgi?id=227481
<rdar://problem/79906757>

Reviewed by Wenson Hsieh and Chris Dumez.

Source/WebCore:

Deployed Ref/RefPtr in various places in EventHandler and UserInputBridge.

  • page/EventHandler.cpp:

(WebCore::EventHandler::selectClosestWordFromHitTestResult):
(WebCore::EventHandler::selectClosestContextualWordFromMouseEvent):
(WebCore::EventHandler::selectClosestContextualWordOrLinkFromMouseEvent):
(WebCore::EventHandler::handleMousePressEventTripleClick):
(WebCore::EventHandler::handleMousePressEventSingleClick):
(WebCore::EventHandler::selectionExtentRespectingEditingBoundary):
(WebCore::EventHandler::handleMouseDraggedEvent):
(WebCore::EventHandler::eventMayStartDrag const):
(WebCore::EventHandler::updateSelectionForMouseDrag):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::hitTestResultAtPoint const):
(WebCore::EventHandler::scrollOverflow):
(WebCore::EventHandler::logicalScrollOverflow):
(WebCore::EventHandler::scrollRecursively):
(WebCore::EventHandler::logicalScrollRecursively):
(WebCore::EventHandler::updateCursor):
(WebCore::EventHandler::selectCursor):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::contentFrameForNode): Renamed from targetIsFrame and made it return the node.
(WebCore::EventHandler::updateDragAndDrop):
(WebCore::EventHandler::cancelDragAndDrop):
(WebCore::EventHandler::performDragAndDrop):
(WebCore::hierarchyHasCapturingEventListeners):
(WebCore::EventHandler::updateMouseEventTargetNode):
(WebCore::EventHandler::notifyScrollableAreasOfMouseEvents):
(WebCore::EventHandler::dispatchMouseEvent):
(WebCore::EventHandler::isInsideScrollbar const):
(WebCore::EventHandler::handleWheelEvent):
(WebCore::EventHandler::handleWheelEventInternal):
(WebCore::EventHandler::sendContextMenuEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::fakeMouseMoveEventTimerFired):
(WebCore::EventHandler::hoverTimerFired):
(WebCore::EventHandler::handleAccessKey):
(WebCore::EventHandler::isKeyEventAllowedInFullScreen const):
(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::internalKeyEvent):
(WebCore::setInitialKeyboardSelection):
(WebCore::removeDraggedContentDocumentMarkersFromAllFramesInPage):
(WebCore::EventHandler::handleKeyboardScrolling):
(WebCore::EventHandler::handleTouchEvent):
(WebCore::EventHandler::passWheelEventToWidget):

  • replay/UserInputBridge.cpp:

(WebCore::UserInputBridge::handleMousePressEvent):
(WebCore::UserInputBridge::handleMouseReleaseEvent):
(WebCore::UserInputBridge::handleMouseMoveEvent):
(WebCore::UserInputBridge::handleMouseMoveOnScrollbarEvent):
(WebCore::UserInputBridge::handleMouseForceEvent):
(WebCore::UserInputBridge::handleKeyEvent):
(WebCore::UserInputBridge::handleAccessKeyEvent):
(WebCore::UserInputBridge::handleWheelEvent):
(WebCore::UserInputBridge::scrollRecursively):
(WebCore::UserInputBridge::logicalScrollRecursively):
(WebCore::UserInputBridge::loadRequest):
(WebCore::UserInputBridge::tryClosePage):

Source/WebKit:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::contextMenuAtPointInWindow):
(WebKit::handleContextMenuEvent):

3:34 PM Changeset in webkit [279625] by Devin Rousso
  • 3 edits in trunk/Source/WebKit

Provide SPI for clients to override just the contextmenu preview instead of the entire UIContextMenuConfiguration
https://bugs.webkit.org/show_bug.cgi?id=227603
<rdar://problem/78832586>

Reviewed by Wenson Hsieh.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView continueContextMenuInteraction:]):
This allows Safari to remove some custom contextmenu code and use WebKit's default actions.

3:33 PM Changeset in webkit [279624] by dino@apple.com
  • 5 edits in trunk/Source/WebCore

WebGL video to texture upload spends time clearing the uploaded-to texture
https://bugs.webkit.org/show_bug.cgi?id=227582
<rdar://problem/80020335>

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

Disable robust resource initiaization for the shared ANGLE context that is used
to copy video frames to WebGL textures. Otherwise ANGLE would spend time
initializing the texture in gl::DrawArrays.

No new tests, we currently do not have WebGL perf tests.

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::texImage2DDirect):
Add the direct texImage2D call so that the texture seed can be
somehow updated. This will be removed once the texture image version
management is fixed to be a bit more robust.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

  • platform/graphics/cv/GraphicsContextGLCVANGLE.cpp:

(WebCore::GraphicsContextGLCVANGLE::copyPixelBufferToTexture):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
3:27 PM Changeset in webkit [279623] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

RenderLayer does not need a virtual destructor
https://bugs.webkit.org/show_bug.cgi?id=227706

Reviewed by Tim Horton.

The virtual destructor was a holdover from when RenderLayer inherited from
ScrollableArea.

  • rendering/RenderLayer.h:
2:35 PM Changeset in webkit [279622] by Truitt Savell
  • 16 edits
    6 deletes in trunk

Unreviewed, reverting r279542.

Casued 4 test crashes

Reverted changeset:

"SourceBuffer.abort() doesn't go back to state
WAITING_FOR_SEGMENT properly"
https://bugs.webkit.org/show_bug.cgi?id=227559
https://commits.webkit.org/r279542

2:20 PM Changeset in webkit [279621] by msaboff@apple.com
  • 14 edits in trunk/Source/bmalloc

[bmalloc] Make adaptive scavenging more precise
https://bugs.webkit.org/show_bug.cgi?id=226237

Reviewed by Geoffrey Garen.

Reland the adaptive scavenger change for macOS with fix.

The bug happens when decommitting large ranges that don't have physical pages.
We'd call Heap::decommitLargeRange(), but would only add the range to the
decommitter list if there were physical pages associated with the range.
We would still perform all the other processing of a decommitted range,
including setting the range as not elgible for allocation or merging.
Had the range been added to the decommitter list, we would have set the
range as elgible after the physical pages were released to the OS.
The result is that the range could never be allocated, either by itself or as a
larger range merged with adjacent ranges.

The fix is to only perform decommit processing of large ranges if they have
physical pages. We now check for physical pages before calling Heap::decommitLargeRange().
For ranges that don't have physical pages, they can stay on the free list as
elgible without having to round trip through decommit processing.

Made a minor change to the calculation of the physical end of the LargeRange created
and added to the free list in Heap::deallocateSmallChunk. If the last page in the chunk
has a physical page, we set the physical end of the range to the end of the chunk.
This is for the case where there is an unusable partial small page at the end of the chunk.

  • bmalloc/BPlatform.h:
  • bmalloc/Heap.cpp:

(bmalloc::Heap::decommitLargeRange):
(bmalloc::Heap::scavenge):
(bmalloc::Heap::allocateSmallChunk):
(bmalloc::Heap::deallocateSmallChunk):
(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::splitAndAllocate):
(bmalloc::Heap::allocateLarge):
(bmalloc::Heap::tryAllocateLargeChunk):
(bmalloc::Heap::shrinkLarge):
(bmalloc::Heap::deallocateLarge):
(bmalloc::Heap::scavengeToHighWatermark): Deleted.

  • bmalloc/Heap.h:
  • bmalloc/IsoDirectory.h:
  • bmalloc/IsoDirectoryInlines.h:

(bmalloc::passedNumPages>::takeFirstEligible):
(bmalloc::passedNumPages>::scavenge):
(bmalloc::passedNumPages>::scavengeToHighWatermark): Deleted.

  • bmalloc/IsoHeapImpl.h:
  • bmalloc/IsoHeapImplInlines.h:

(bmalloc::IsoHeapImpl<Config>::scavengeToHighWatermark): Deleted.

  • bmalloc/IsoSharedHeapInlines.h:

(bmalloc::IsoSharedHeap::allocateSlow):

  • bmalloc/LargeMap.cpp:

(bmalloc::LargeMap::add):

  • bmalloc/LargeRange.h:

(bmalloc::LargeRange::LargeRange):
(bmalloc::LargeRange::physicalEnd const):
(bmalloc::LargeRange::setPhysicalEnd):
(bmalloc::LargeRange::clearPhysicalEnd):
(bmalloc::LargeRange::setUsedSinceLastScavenge):
(bmalloc::merge):
(bmalloc::LargeRange::split const):
(): Deleted.

  • bmalloc/Scavenger.cpp:

(bmalloc::Scavenger::Scavenger):
(bmalloc::Scavenger::scheduleIfUnderMemoryPressure):
(bmalloc::Scavenger::schedule):
(bmalloc::Scavenger::scavenge):
(bmalloc::Scavenger::threadRunLoop):
(bmalloc::Scavenger::didStartGrowing): Deleted.
(bmalloc::Scavenger::timeSinceLastPartialScavenge): Deleted.
(bmalloc::Scavenger::partialScavenge): Deleted.

  • bmalloc/Scavenger.h:
  • bmalloc/SmallPage.h:

(bmalloc::SmallPage::setUsedSinceLastScavenge):

2:12 PM Changeset in webkit [279620] by sbarati@apple.com
  • 2 edits in trunk/JSTests

Run microbenchmarks/memcpy-typed-loop-small.js for fewer iterations to avoid timeouts
https://bugs.webkit.org/show_bug.cgi?id=227717

Reviewed by Robin Morisset.

  • microbenchmarks/memcpy-typed-loop-small.js:
2:05 PM Changeset in webkit [279619] by sihui_liu@apple.com
  • 7 edits in trunk/Source/WebKit

WebIDBServer created after NetworkProcess::prepareToSuspend is not suspended correctly
https://bugs.webkit.org/show_bug.cgi?id=227650

Reviewed by Chris Dumez.

We created WebIDBServer on receiving AddIDBConnection message from web process, to make sure WebIDBServer's
thread is launched only when it is needed. Now WebIDBServer uses WorkQueue, which uses thread from thread pool,
we can go back to ensure WebIDBServer at when connection to web process is needed. By doing this, it's less
likely WebIDBServer is created after NetworkProcess::prepareToSuspend. To make it more safe, this patch also
sets m_shouldSuspendIDBServer on NetworkProcess::prepareToSuspend. If the value is true, WebIDBServer is
suspended after creation.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::addIDBConnection): Deleted.

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
(WebKit::NetworkProcess::prepareToSuspend):
(WebKit::NetworkProcess::resume):
(WebKit::NetworkProcess::createWebIDBServer):

  • NetworkProcess/NetworkProcess.h:
  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:

(WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):

1:54 PM Changeset in webkit [279618] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r278892 - [GStreamer] Another crash under gst_element_add_pad
https://bugs.webkit.org/show_bug.cgi?id=225765

Patch by Philippe Normand <pnormand@igalia.com> on 2021-06-15
Reviewed by Adrian Perez de Castro.

Decodebin3 in GStreamer <= 1.16 does not respect user-supplied select-stream events. So we
need to relax the release assert for these versions. This bug was fixed in:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/b41b87522f59355bb21c001e9e2df96dc6956928

  • platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:

(WebCore::ImageDecoderGStreamer::InnerDecoder::connectDecoderPad):

1:54 PM Changeset in webkit [279617] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebKit

Merge r278761 - [GTK] Crash when dragging an account node above WebView
https://bugs.webkit.org/show_bug.cgi?id=226811

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-06-11
Reviewed by Adrian Perez de Castro.

When we receive empty drag data, this is indicated by length -1, not by 0.

  • UIProcess/API/gtk/DropTargetGtk3.cpp:

(WebKit::DropTarget::dataReceived):

1:53 PM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
1:51 PM Changeset in webkit [279616] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.32/Source

Merge r278302 - [WPE][GTK] Support building against uClibc
https://bugs.webkit.org/show_bug.cgi?id=226244

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

  • assembler/MacroAssemblerARM64.cpp:

(getauxval): Provide a fallback implementation of getauxval() for
systems which do not provide <sys/auxv.h>, like those using uClibc
as their C library.

Source/WTF:

  • wtf/PlatformRegisters.h: Use the <sys/ucontext.h> header instead of

<ucontext.h>, which is enough to gain access to the type definitions
for CPU registers and is available on every libc. On the other hand,
uClibc does not have <ucontext.h>, so this fixes the build in that
case.

1:46 PM Changeset in webkit [279615] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Make sure PlatformCALayer gets destroyed on the main thread
https://bugs.webkit.org/show_bug.cgi?id=227714

Reviewed by Geoffrey Garen.

Make sure PlatformCALayer gets destroyed on the main thread as we have evidence this is
not always the case and its destructor is definitely not safe to call on a non-main
thread.

  • platform/graphics/ca/PlatformCALayer.h:
1:31 PM Changeset in webkit [279614] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

MediaPlayer may be left in a non-visible state
https://bugs.webkit.org/show_bug.cgi?id=227711

Reviewed by Eric Carlson.

Prospective fix for possible edge-case behavior. MediaPlayer defaults to non-visible state
at creation time, but that visibility state is set to true in two places:

  • When the Page's visibility state changes
  • During layout

If the MediaPlayer is created (or re-created) after the Page's visibility state, or (somehow)
layout does not occur, the MediaPlayer can be left thinking it is not visible, which could
cause downstream effects like a failure to render video content.

Rather than wait for layout to occur, or for the Page's visibility state to change, always
set the visibility state immediately after creating the MediaPlayer object.

No test, as it's unclear what edge case may cause this problem to occur; could be a result of
re-creating the remote MediaPlayer after a GPU process crash; could be a specific page behavior
when switching media sources; could only occur in fullscreen mode.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::createMediaPlayer:

1:25 PM Changeset in webkit [279613] by Patrick Angle
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Elements Tab Details Sidebar navigation items sometime wrap to a second line
https://bugs.webkit.org/show_bug.cgi?id=227707

Reviewed by Devin Rousso.

When resizing a sidebar, it was possible that the cumulative widths of each navigation item could add up to just
less than the actual amount of space necessary to lay out each item in a single row, leading to wrapping items
to the next line. This resolves that issue by taking the ceiling of each item's width when calculating the
total amount of space needed to display all the items. Additionally, every time a panel is added or removed from
the sidebar, we need to recalculate the width of the sidebar to make sure the new navigation item, or the
removal thereof, is accommodated.

  • UserInterface/Views/NavigationBar.js:

(WI.NavigationBar.prototype.layout.calculateVisibleItemWidth):
(WI.NavigationBar.prototype._calculateMinimumWidth):

  • UserInterface/Views/SingleSidebar.js:

(WI.SingleSidebar.prototype.didInsertSidebarPanel):
(WI.SingleSidebar.prototype.didRemoveSidebarPanel):

1:19 PM Changeset in webkit [279612] by Ruben Turcios
  • 8 edits in trunk/Source

Versioning.

WebKit-7612.1.24

1:01 PM Changeset in webkit [279611] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, address flakiness of imported/w3c/web-platform-tests/html/webappapis/timers/negative-settimeout.any.worker.html

This test has been flaky since its import. Silence its console logging to address the flakiness.

12:43 PM Changeset in webkit [279610] by Ruben Turcios
  • 8 edits in branches/safari-612.1.22.3-branch

Cherry-pick r279449. rdar://problem/80212082

Turn off data ICs by default
https://bugs.webkit.org/show_bug.cgi?id=227334
<rdar://problem/79802812>

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/deltablue-varargs.js:
  • microbenchmarks/richards-try-catch.js:

Source/JavaScriptCore:

There are GC crashes that are caused by access data IC sharing. This
patch is both turning off data IC sharing by default, and turning off data
ICs by default.

We should re-enable this once we figure out the issue:
https://bugs.webkit.org/show_bug.cgi?id=227551

Some of our testing modes are still running with data ICs on, so the code doesn't
bit rot. And a select few tests are running with data IC sharing on, for
similar reasons, even though we know it has issues. If those tests start
crashing, we'll just disable sharing completely until the issue is resolved.

  • bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::regenerate):
  • runtime/OptionsList.h:

Tools:

  • Scripts/run-jsc-stress-tests:

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

12:37 PM Changeset in webkit [279609] by Wenson Hsieh
  • 9 edits
    2 adds in trunk

[Live Text] Extraneous spaces when copying or translating Chinese and Japanese text in WebKit
https://bugs.webkit.org/show_bug.cgi?id=227674
rdar://79669807

Reviewed by Tim Horton.

Source/WebCore:

See WebKit/ChangeLog for more details.

Test: fast/images/text-recognition/image-overlay-text-without-leading-whitespace.html

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::updateWithTextRecognitionResult):

For each recognized word in text, only append a trailing newline in the text content of the text container
element if hasLeadingWhitespace is set. Drive-by fix: additionally remove logic to append a line break when
computing and applying CSS transforms to text container elements.

  • platform/TextRecognitionResult.h:

(WebCore::TextRecognitionWordData::TextRecognitionWordData):
(WebCore::TextRecognitionWordData::encode const):
(WebCore::TextRecognitionWordData::decode):

Add a per-word hasLeadingWhitespace flag.

  • testing/Internals.cpp:

(WebCore::makeDataForLine):

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

Source/WebKit:

When injecting Live Text into images, we currently assume that all pieces of recognized text from VisionKit are
separated by spaces. Upon selecting Japanese or Chinese text, this causes text selections to include extraneous
spaces between words.

To fix this, we add a bit for each TextRecognitionWordData, to indicate whether that word should be followed by
whitespace in the image overlay. When converting VKWKTextInfo into TextRecognitionWordData, we then set this bit
to true only if the word is the first on a line of text that is preceded by another line, or there exists
whitespace between the word and the previous word on the same line.

  • Platform/cocoa/TextRecognitionUtilities.mm:

(WebKit::makeTextRecognitionResult):

LayoutTests:

Add a layout test to verify that no extraneous spaces are inserted when injecting recognized text into images
without leading whitespace.

  • fast/images/text-recognition/image-overlay-text-without-leading-whitespace-expected.txt: Added.
  • fast/images/text-recognition/image-overlay-text-without-leading-whitespace.html: Added.
12:34 PM Changeset in webkit [279608] by Ruben Turcios
  • 8 edits in branches/safari-612.1.22.1-branch

Cherry-pick r279449. rdar://problem/80212104

Turn off data ICs by default
https://bugs.webkit.org/show_bug.cgi?id=227334
<rdar://problem/79802812>

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/deltablue-varargs.js:
  • microbenchmarks/richards-try-catch.js:

Source/JavaScriptCore:

There are GC crashes that are caused by access data IC sharing. This
patch is both turning off data IC sharing by default, and turning off data
ICs by default.

We should re-enable this once we figure out the issue:
https://bugs.webkit.org/show_bug.cgi?id=227551

Some of our testing modes are still running with data ICs on, so the code doesn't
bit rot. And a select few tests are running with data IC sharing on, for
similar reasons, even though we know it has issues. If those tests start
crashing, we'll just disable sharing completely until the issue is resolved.

  • bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::regenerate):
  • runtime/OptionsList.h:

Tools:

  • Scripts/run-jsc-stress-tests:

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

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

Make Caches::writeRecord and Caches::readRecord more robust
https://bugs.webkit.org/show_bug.cgi?id=221620

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

I saw null dereferenced in EWS, and everywhere else we check m_storage for null.
Some events happen during teardown. No reason to crash.

  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::Caches::writeRecord):
(WebKit::CacheStorage::Caches::readRecord):

12:33 PM Changeset in webkit [279606] by Kyle Piddington
  • 13 edits in trunk/Source/ThirdParty/ANGLE

REGRESSION (r279466): [Big Sur] webgl/1.0.3/conformance & webgl/2.0.0/conformance are failing
https://bugs.webkit.org/show_bug.cgi?id=227596
Provide Intel workaround for Big Sur systems. Atan and invariant have
issues on older systems, and require us to disable fastmath to produce correct results.

Reviewed by Kenneth Russell.

  • include/platform/FeaturesMtl.h:
  • src/compiler/translator/TranslatorMetalDirect.h:

(sh::TranslatorMetalReflection::reset):

  • src/compiler/translator/TranslatorMetalDirect/EmitMetal.cpp:

(GenMetalTraverser::emitPostQualifier):
(GenMetalTraverser::visitUnary):
(GenMetalTraverser::visitAggregate):

  • src/libANGLE/renderer/metal/DisplayMtl.mm:

(rx::DisplayMtl::initializeFeatures):

  • src/libANGLE/renderer/metal/ProgramMtl.h:

(rx::ProgramMtl::getTranslatedShaderInfo const):

  • src/libANGLE/renderer/metal/ProgramMtl.mm:
  • src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.h:
  • src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm:

(rx::mtl::GlslangGetMSL):

  • src/libANGLE/renderer/metal/mtl_render_utils.h:
  • src/libANGLE/renderer/metal/mtl_render_utils.mm:

(rx::mtl::TransformFeedbackUtils::createMslXfbLibrary):
(rx::mtl::TransformFeedbackUtils::getTransformFeedbackRenderPipeline):

  • src/libANGLE/renderer/metal/mtl_utils.h:
  • src/libANGLE/renderer/metal/mtl_utils.mm:

(rx::mtl::CreateShaderLibrary):

12:30 PM Changeset in webkit [279605] by Ruben Turcios
  • 8 edits in branches/safari-612.1.22.0-branch

Cherry-pick r279449. rdar://problem/80212096

Turn off data ICs by default
https://bugs.webkit.org/show_bug.cgi?id=227334
<rdar://problem/79802812>

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/deltablue-varargs.js:
  • microbenchmarks/richards-try-catch.js:

Source/JavaScriptCore:

There are GC crashes that are caused by access data IC sharing. This
patch is both turning off data IC sharing by default, and turning off data
ICs by default.

We should re-enable this once we figure out the issue:
https://bugs.webkit.org/show_bug.cgi?id=227551

Some of our testing modes are still running with data ICs on, so the code doesn't
bit rot. And a select few tests are running with data IC sharing on, for
similar reasons, even though we know it has issues. If those tests start
crashing, we'll just disable sharing completely until the issue is resolved.

  • bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::regenerate):
  • runtime/OptionsList.h:

Tools:

  • Scripts/run-jsc-stress-tests:

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

12:25 PM Changeset in webkit [279604] by ysuzuki@apple.com
  • 35 edits
    3 adds in trunk

[JSC] Optimize Object.assign and putDirectInternal
https://bugs.webkit.org/show_bug.cgi?id=227677

Reviewed by Filip Pizlo.

JSTests:

  • microbenchmarks/object-assign-replace.js: Added.

(test):

  • microbenchmarks/object-assign-transition.js: Added.

(test):

Source/JavaScriptCore:

This patch improves Object.assign performance (and this requires putDirectInternal improvement).

  1. Object.assign is handled by DFG / FTL as ObjectAssign node
  2. We found that putDirectInternal is suboptimal. This patch removes several bottlenecks. They are super critical from the measurement of microbenchmarks.

2.1. Creating and destroying DeferredStructureTransitionWatchpointFire is not free. We should do that only when we need it.
2.2. Before r277620, we are checking m_replacementWatchpointSets's nullptr and that was fast. But after that, we are always

calling HashMap::get, and it is not inlined. This means that if we have StructureRareData, we are always calling HashMap::get
even though there is no m_replacementWatchpointSets set. This patch adds HashMap::isNullStorage to avoid this call by inlinely
check this via LIKELY(m_replacementWatchpointSets.isNullStorage()).

2.3. Structure::addPropertyTransitionToExistingStructure has very cheap fast path and we must inline them to get performance benefit

for major single-transition case.

Added microbenchmarks show significant performance improvements. And Speedometer2 shows 0.6 - 1.0% improvement.

ToT Patched

object-assign-transition 105.2539+-0.2970 88.8046+-0.2029 definitely 1.1852x faster
object-assign-replace 116.1568+-0.0905 75.0673+-0.0658 definitely 1.5474x faster

(JSC::DeferredWatchpointFire::fireAllSlow):
(JSC::DeferredWatchpointFire::DeferredWatchpointFire): Deleted.
(JSC::DeferredWatchpointFire::~DeferredWatchpointFire): Deleted.
(JSC::DeferredWatchpointFire::fireAll): Deleted.

  • bytecode/Watchpoint.h:

(JSC::DeferredWatchpointFire::DeferredWatchpointFire):
(JSC::DeferredWatchpointFire::fireAll):
(JSC::FireDetail::FireDetail): Deleted.
(JSC::FireDetail::~FireDetail): Deleted.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGMayExit.cpp:
  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileObjectAssign):

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

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileObjectAssign):

  • runtime/Intrinsic.cpp:

(JSC::intrinsicName):

  • runtime/Intrinsic.h:
  • runtime/JSObject.cpp:

(JSC::JSObject::deleteProperty):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::putDirectInternal):

  • runtime/ObjectConstructor.cpp:

(JSC::objectAssignGeneric):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/ObjectConstructor.h:
  • runtime/ObjectConstructorInlines.h: Added.

(JSC::canPerformFastPropertyEnumerationForObjectAssign):

  • runtime/Structure.cpp:

(JSC::StructureTransitionTable::singleTransition const): Deleted.
(JSC::StructureTransitionTable::get const): Deleted.
(JSC::Structure::addPropertyTransitionToExistingStructureImpl): Deleted.
(JSC::Structure::addPropertyTransitionToExistingStructure): Deleted.
(JSC::Structure::addPropertyTransitionToExistingStructureConcurrently): Deleted.

  • runtime/Structure.h:
  • runtime/StructureInlines.h:

(JSC::Structure::didReplaceProperty):
(JSC::Structure::propertyReplacementWatchpointSet):
(JSC::Structure::addPropertyTransitionToExistingStructureImpl):
(JSC::Structure::addPropertyTransitionToExistingStructure):
(JSC::Structure::addPropertyTransitionToExistingStructureConcurrently):
(JSC::StructureTransitionTable::singleTransition const):
(JSC::StructureTransitionTable::get const):

Source/WTF:

  • wtf/HashMap.h:
  • wtf/HashSet.h:
  • wtf/HashTable.h:

(WTF::HashTable::isNullStorage const):

12:10 PM Changeset in webkit [279603] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Add myself (Harshil Ratnu) to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=227653

Patch by Harshil Ratnu <hratnu@apple.com> on 2021-07-06
Reviewed by Devin Rousso.

  • Scripts/webkitpy/common/config/contributors.json: Added myself.
12:02 PM Changeset in webkit [279602] by youenn@apple.com
  • 16 edits in trunk

Unable to use 'data:application/javascript' url for Worker
https://bugs.webkit.org/show_bug.cgi?id=225716
<rdar://problem/78222538>

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/cors/data-url-worker-expected.txt:
  • web-platform-tests/html/cross-origin-embedder-policy/cross-origin-isolated-permission.https-expected.txt:
  • web-platform-tests/html/webappapis/the-windoworworkerglobalscope-mixin/Worker_Self_Origin-expected.txt:
  • web-platform-tests/service-workers/service-worker/local-url-inherit-controller.https-expected.txt:
  • web-platform-tests/workers/Worker_script_mimetype-expected.txt:
  • web-platform-tests/workers/constructors/Worker/same-origin-expected.txt:
  • web-platform-tests/workers/data-url-expected.txt:
  • web-platform-tests/workers/dedicated-worker-in-data-url-context.window-expected.txt:
  • web-platform-tests/workers/modules/dedicated-worker-import-data-url-cross-origin-expected.txt:
  • web-platform-tests/workers/modules/dedicated-worker-import-data-url.any-expected.txt:

Source/WebCore:

As per https://fetch.spec.whatwg.org/#main-fetch step 11, same origin fetch for data URL should succeed.
Update AbstractWorker to let such URLs trigger loads and update WorkerScriptLoader to enable those loads.

Covered by rebased tests.

  • workers/AbstractWorker.cpp:

(WebCore::AbstractWorker::resolveURL):

  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::loadAsynchronously):

LayoutTests:

Some tests are showing progress but are timing out. Skipping them for now.

12:01 PM Changeset in webkit [279601] by Chris Dumez
  • 20 edits in trunk/Source/WebKit

[iOS] Have ProcessAssertion take the RunningBoard assertion asynchronously by default
https://bugs.webkit.org/show_bug.cgi?id=225324
<rdar://76972252>

Reviewed by Geoffrey Garen.

Have ProcessAssertion take the RunningBoard assertion asynchronously (on a background thread) by
default as we have evidence that doing so on the main thread is bad for performance and may
negatively impact launch time.

When constructing a ProcessAssertion, the caller can now indicate if it wants the assertion to be
taken asynchronously (default) or not. Bug 227552 is an example of a case where we still want to
take the assertion synchronously (because we're not on the main thread and we need to make sure
we have the assertion before proceeding).

The caller can also provide a completion handler that will get called once the RunningBoard is
taken. Note that the RunningBoard async API ([RBSAssertion acquireWithInvalidationHandler]) does
not provide a way for us to know when the assertion is taken. For this reason, ProcessAssertion
keeps using the RunningBoard sync API ([RBSAssertion acquireWithError:]) but calls in on a
background queue.

For the UIProcess's background task though, we don't need to know when the assertion is taken
so we can use the RunningBoard async API.

Note that the previous iteration of this patch had a bug where the ProcessThrottler would release
its previous assertion before the new one is taken (asynchronously) when changing the assertion
type (e.g. foreground to background). This is addressed in this patch. ProcessThrottler now passes
an acquisition handler when constructing the ProcessAssertion and only releases its previous
assertion once the acquisition handler for the new one is taken.

  • NetworkProcess/Downloads/DownloadMap.cpp:

(WebKit::DownloadMap::add):

  • NetworkProcess/Downloads/DownloadMap.h:
  • Platform/IPC/cocoa/ConnectionCocoa.mm:

(IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):

  • UIProcess/Downloads/DownloadProxyMap.cpp:

(WebKit::DownloadProxyMap::createDownloadProxy):

  • UIProcess/Downloads/DownloadProxyMap.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::setWebProcessHasUploads):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/ProcessAssertion.cpp:

(WebKit::ProcessAssertion::ProcessAssertion):

  • UIProcess/ProcessAssertion.h:

(WebKit::ProcessAssertion::create):

  • UIProcess/ProcessThrottler.cpp:

(WebKit::ProcessThrottler::setAssertionType):

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

(WebKit::WebProcessPool::updateAudibleMediaAssertions):

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

(WebKit::WebProcessProxy::updateAudibleMediaAssertions):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/ios/ProcessAssertionIOS.mm:

(assertionsWorkQueue):
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
(-[WKProcessAssertionBackgroundTaskManager assertion:didInvalidateWithError:]):
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::acquireAsync):
(WebKit::ProcessAssertion::acquireSync):
(WebKit::ProcessAssertion::~ProcessAssertion):
(WebKit::ProcessAssertion::processAssertionWasInvalidated):
(WebKit::ProcessAssertion::isValid const):

12:00 PM Changeset in webkit [279600] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebKit

Don't interrupt database for WebResourceLoadStatisticsStore if it will not be suspended
https://bugs.webkit.org/show_bug.cgi?id=227708

Reviewed by Geoffrey Garen.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::suspend):

11:29 AM Changeset in webkit [279599] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r279597.

Broke build

Reverted changeset:

"Make Caches::writeRecord and Caches::readRecord more robust"
https://bugs.webkit.org/show_bug.cgi?id=221620
https://commits.webkit.org/r279597

10:59 AM Changeset in webkit [279598] by Ruben Turcios
  • 8 edits in branches/safari-612.1.22.3-branch/Source/JavaScriptCore

Cherry-pick r279560. rdar://problem/80212160

ActiveScratchBufferScope should take the buffer as argument
https://bugs.webkit.org/show_bug.cgi?id=227670
rdar://80011612

Reviewed by Mark Lam.

https://bugs.webkit.org/show_bug.cgi?id=227013 created ActiveScratchBufferScope.
It is used by operations that can cause the GC to run, to mark as roots the contents of the scratch buffer that is live during that time (if any).
The bug is that it simply asks the VM for a scratch buffer of the right size, but this will always return the last scratch buffer, and not necessarily the one that the operation is actually using.

A fairly simple fix is to pass it directly the scratch buffer, since the operation normally can get it easily enough.
In most cases the operation has access to the m_buffer field of the ScratchBuffer, but getting a pointer to the entire structure from that is fairly simple (I added ScratchBuffer::fromData() to do so).

  • dfg/DFGOSRExit.cpp: (JSC::DFG::JSC_DEFINE_JIT_OPERATION):
  • dfg/DFGOSRExit.h:
  • dfg/DFGOperations.cpp: (JSC::DFG::JSC_DEFINE_JIT_OPERATION):
  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileNewArray):
  • dfg/DFGThunks.cpp: (JSC::DFG::osrExitGenerationThunkGenerator):
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::haveABadTime):
  • runtime/VM.h: (JSC::ScratchBuffer::fromData):
  • runtime/VMInlines.h: (JSC::ActiveScratchBufferScope::ActiveScratchBufferScope): (JSC::ActiveScratchBufferScope::~ActiveScratchBufferScope):

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

10:40 AM Changeset in webkit [279597] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Make Caches::writeRecord and Caches::readRecord more robust
https://bugs.webkit.org/show_bug.cgi?id=221620

Reviewed by Youenn Fablet.

I saw null dereferenced in EWS, and everywhere else we check m_storage for null.
Some events happen during teardown. No reason to crash.

  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::Caches::writeRecord):
(WebKit::CacheStorage::Caches::readRecord):

10:38 AM Changeset in webkit [279596] by Ruben Turcios
  • 8 edits in branches/safari-612.1.22.1-branch/Source/JavaScriptCore

Cherry-pick r279560. rdar://problem/80212179

ActiveScratchBufferScope should take the buffer as argument
https://bugs.webkit.org/show_bug.cgi?id=227670
rdar://80011612

Reviewed by Mark Lam.

https://bugs.webkit.org/show_bug.cgi?id=227013 created ActiveScratchBufferScope.
It is used by operations that can cause the GC to run, to mark as roots the contents of the scratch buffer that is live during that time (if any).
The bug is that it simply asks the VM for a scratch buffer of the right size, but this will always return the last scratch buffer, and not necessarily the one that the operation is actually using.

A fairly simple fix is to pass it directly the scratch buffer, since the operation normally can get it easily enough.
In most cases the operation has access to the m_buffer field of the ScratchBuffer, but getting a pointer to the entire structure from that is fairly simple (I added ScratchBuffer::fromData() to do so).

  • dfg/DFGOSRExit.cpp: (JSC::DFG::JSC_DEFINE_JIT_OPERATION):
  • dfg/DFGOSRExit.h:
  • dfg/DFGOperations.cpp: (JSC::DFG::JSC_DEFINE_JIT_OPERATION):
  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileNewArray):
  • dfg/DFGThunks.cpp: (JSC::DFG::osrExitGenerationThunkGenerator):
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::haveABadTime):
  • runtime/VM.h: (JSC::ScratchBuffer::fromData):
  • runtime/VMInlines.h: (JSC::ActiveScratchBufferScope::ActiveScratchBufferScope): (JSC::ActiveScratchBufferScope::~ActiveScratchBufferScope):

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

10:34 AM Changeset in webkit [279595] by achristensen@apple.com
  • 15 edits in trunk

loadSimulatedRequest: should do same delegate callbacks as loadHTMLString and loadData
https://bugs.webkit.org/show_bug.cgi?id=227599

Reviewed by Chris Dumez.

Source/WebCore:

  • loader/SubstituteData.h:

Source/WebKit:

Share more code with loadData and loadHTMLString to prevent such errors.

Before this change we set SubstituteData.failingURL, which in FrameLoader::PolicyChecker::checkNavigationPolicy
makes it behave more like _loadAlternateHTMLString which doesn't call decidePolicyForNavigationAction and does
add a back/forward entry. We want it to behave more like loadHTMLString, which does call decidePolicyForNavigationAction
and doesn't add a back/forward entry. Except we do want it to add a back/forward entry. This patch is to accomplish that.

In order to continue making a back/forward list item with loadSimulatedRequest, we need to use
WebCore::SubstituteData::SessionHistoryVisibility::Visible for its calls and also API::SubstituteData
needs to remember that we initially used that for when we go back to a back/forward list item from
that data. In order to keep binary compatibility with existing apps, loadData and loadHTMLString
need to continue using WebCore::SubstituteData::SessionHistoryVisibility::Hidden.

Covered by existing and new API tests.

  • Shared/LoadParameters.cpp:

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

  • Shared/LoadParameters.h:
  • UIProcess/API/APINavigation.cpp:

(API::SubstituteData::SubstituteData):

  • UIProcess/API/APINavigation.h:

(API::SubstituteData::SubstituteData):

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::loadData):

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

(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadDataWithNavigationShared):
(WebKit::WebPageProxy::loadSimulatedRequest):
(WebKit::WebPageProxy::continueNavigationInNewProcess):

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

(WebKit::WebPage::loadDataImpl):
(WebKit::WebPage::loadData):
(WebKit::WebPage::loadAlternateHTML):
(WebKit::WebPage::loadSimulatedRequestAndResponse):

  • WebProcess/WebPage/WebPage.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewLoadAPIs.mm:

(TEST):

10:32 AM Changeset in webkit [279594] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Add assertions in LayerPool to help debug <rdar://80184576>
https://bugs.webkit.org/show_bug.cgi?id=227710

Reviewed by Simon Fraser.

  • platform/graphics/ca/LayerPool.cpp:

(WebCore::LayerPool::LayerPool):
(WebCore::LayerPool::~LayerPool):
(WebCore::LayerPool::addLayer):
(WebCore::LayerPool::takeLayerWithSize):
(WebCore::LayerPool::pruneTimerFired):
(WebCore::LayerPool::drain):

  • platform/graphics/ca/LayerPool.h:
10:29 AM Changeset in webkit [279593] by commit-queue@webkit.org
  • 5 edits in trunk/Source/JavaScriptCore

Fix instruction check failure of UBFX and SBFIZ in testb3 due to the speculative fix in bug 227554
https://bugs.webkit.org/show_bug.cgi?id=227563

Patch by Yijia Huang <Yijia Huang> on 2021-07-06
Reviewed by Filip Pizlo.

This patch includes two modifications to resolve rdar://79978150:

  1. Fix the bug caused by the patch introducing BFI.
  2. Discard the corresponding speculative fix in https://bugs.webkit.org/show_bug.cgi?id=227554.

The previous patch, added bit field insert (BFI) to AIR opcode, causes the Gmail page
hanging issue on Safari. The root cause is the incorrect definition of register role in
BFI's AIR opcode. Since BFI inserts a bit field at the low end of the destination register
while keeping the high bit unchanged, the destination register should have both roles of
use and define simultaneously, which is not (missing use) in the previous patch.

This will result in the loss of preserving the value of the destination register,
which does happen when browsing the Gmail page on Safari.

B3 IR snippets from Gmail
Int32 b@23 = Add(b@104, b@111, D@100)
...
Int32 b@55 = Const32(65535, D@50)
Int32 b@137 = BitAnd(b@118, $65535(b@55), D@160)
Int32 b@168 = Const32(16, D@40)
Int32 b@141 = Shl(b@137, $16(b@168), D@163)
Int32 b@143 = BitAnd(b@23, $65535(b@55), D@166)
Int32 b@144 = BitOr(b@141, b@143, D@169)

The pattern of BFI is d = ((n & mask1) << lsb) | (d & mask2). So, it is obvious that
BFI can be utilized in b@144 where the d is b@23.

Incorrect AIR opcode of BFI
arm64: InsertBitField32 U:G:32, U:G:32, U:G:32, ZD:G:32

Tmp, Imm, Imm, Tmp

Air w/o use role
Add32 %x3, %x7, %x7, b@23
...
InsertBitField32 %x3, $16, $16, %x4, b@144

Generated code w/o use role
add w7, w3, w7
...
bfi w4, w3, #16, #16

In Air, the added value is stored in the w7. But the value is not preserved after
lowering with BFI. To fix this, the use role should be enabled for the destination
register.

Correnct AIR opcode of BFI
arm64: InsertBitField32 U:G:32, U:G:32, U:G:32, UZD:G:32

Tmp, Imm, Imm, Tmp

Air w/ use role
Add32 %x3, %x7, %x7, b@23
...
Move32 %x7, %x4, b@144
InsertBitField32 %x3, $16, $16, %x4, b@144

Generated code w/ use role
add w7, w3, w7
...
ubfx x4, x7, #0, #32
bfi w4, w3, #16, #16

In addition, BFXIL, which has pattern d = ((n >> lsb) & mask1) | (d & mask2), also needs
the similar update.

  • b3/B3LowerToAir.cpp:
  • b3/air/AirOpcode.opcodes:
  • b3/testb3_2.cpp:

(testInsertBitField32):
(testInsertBitField64):
(testExtractInsertBitfieldAtLowEnd32):
(testExtractInsertBitfieldAtLowEnd64):

  • runtime/OptionsList.h:
10:26 AM Changeset in webkit [279592] by Russell Epstein
  • 1 copy in tags/Safari-611.3.10.1.4

Tag Safari-611.3.10.1.4.

10:25 AM Changeset in webkit [279591] by pvollan@apple.com
  • 9 edits in trunk/Source/WebKit

Collect Accessibility preferences on a background queue
https://bugs.webkit.org/show_bug.cgi?id=227617
<rdar://80055168>

Reviewed by Brent Fulgham.

To avoid blocking the main thread of the UI process, collect Media Accessibility preferences on a background thread,
and send them to the WebContent process(es).

  • Shared/AccessibilityPreferences.cpp:

(IPC::ArgumentCoder<WebKit::AccessibilityPreferences>::encode):
(IPC::ArgumentCoder<WebKit::AccessibilityPreferences>::decode):

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

(WebKit::accessibilityPreferences):
(WebKit::WebProcessPool::setMediaAccessibilityPreferences):
(WebKit::WebProcessPool::mediaAccessibilityPreferencesChangedCallback):
(WebKit::WebProcessPool::registerNotificationObservers):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::initializeNewWebProcess):

  • UIProcess/WebProcessPool.h:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::accessibilityPreferencesDidChange):
(WebKit::WebProcess::setMediaAccessibilityPreferences):

10:24 AM Changeset in webkit [279590] by Russell Epstein
  • 8 edits in branches/safari-611.3.10.1-branch/Source

Versioning.

WebKit-7611.3.10.1.4

10:20 AM Changeset in webkit [279589] by Russell Epstein
  • 8 edits in branches/safari-611.3.10.0-branch/Source

Revert "Versioning."

This reverts commit r279588.

10:15 AM Changeset in webkit [279588] by Russell Epstein
  • 8 edits in branches/safari-611.3.10.0-branch/Source

Versioning.

WebKit-7611.3.10.1.4

10:05 AM Changeset in webkit [279587] by Ruben Turcios
  • 8 edits in branches/safari-612.1.22.0-branch/Source/JavaScriptCore

Cherry-pick r279560. rdar://problem/80212171

ActiveScratchBufferScope should take the buffer as argument
https://bugs.webkit.org/show_bug.cgi?id=227670
rdar://80011612

Reviewed by Mark Lam.

https://bugs.webkit.org/show_bug.cgi?id=227013 created ActiveScratchBufferScope.
It is used by operations that can cause the GC to run, to mark as roots the contents of the scratch buffer that is live during that time (if any).
The bug is that it simply asks the VM for a scratch buffer of the right size, but this will always return the last scratch buffer, and not necessarily the one that the operation is actually using.

A fairly simple fix is to pass it directly the scratch buffer, since the operation normally can get it easily enough.
In most cases the operation has access to the m_buffer field of the ScratchBuffer, but getting a pointer to the entire structure from that is fairly simple (I added ScratchBuffer::fromData() to do so).

  • dfg/DFGOSRExit.cpp: (JSC::DFG::JSC_DEFINE_JIT_OPERATION):
  • dfg/DFGOSRExit.h:
  • dfg/DFGOperations.cpp: (JSC::DFG::JSC_DEFINE_JIT_OPERATION):
  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileNewArray):
  • dfg/DFGThunks.cpp: (JSC::DFG::osrExitGenerationThunkGenerator):
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::haveABadTime):
  • runtime/VM.h: (JSC::ScratchBuffer::fromData):
  • runtime/VMInlines.h: (JSC::ActiveScratchBufferScope::ActiveScratchBufferScope): (JSC::ActiveScratchBufferScope::~ActiveScratchBufferScope):

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

10:04 AM Changeset in webkit [279586] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[BigSur E Wk2 Release] imported/w3c/web-platform-tests/webrtc/RTCRtpSender-encode-same-track-twice.https.html in flaky failure
https://bugs.webkit.org/show_bug.cgi?id=226054

Unreviewed test gardening.

Patch by Eric Hutchison <Eric Hutchison> on 2021-07-06

  • platform/mac-wk2/TestExpectations:
9:27 AM Changeset in webkit [279585] by Chris Dumez
  • 18 edits
    181 adds in trunk/LayoutTests

Resync cookies web-platform-tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=227641

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Resync cookies web-platform-tests from upstream 2c19d6ee62676ac90146.

  • resources/import-expectations.json:
  • web-platform-tests/cookies/*: Updated.

LayoutTests:

9:02 AM Changeset in webkit [279584] by youenn@apple.com
  • 6 edits in trunk/Source/WebKit

REGRESSION: [iOS] ASSERTION FAILED: !m_messageReceiverMapCount under WebKit::RemoteRemoteCommandListener::~RemoteRemoteCommandListener()
https://bugs.webkit.org/show_bug.cgi?id=226248
<rdar://problem/78481758>

Reviewed by Eric Carlson.

Make sure to remove message receiver on the same gpu process connection it was added.
Also make sure to recreate remote command listener every time we use a new connection.
Do the same thing for RemoteAudioHardwareListener.
Also make sure to remove message receiver in RemoteRenderingBackendProxy::gpuProcessConnectionDidClose

Covered by existing tests.

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::gpuProcessConnectionDidClose):

  • WebProcess/GPU/media/RemoteAudioHardwareListener.cpp:

(WebKit::RemoteAudioHardwareListener::RemoteAudioHardwareListener):
(WebKit::RemoteAudioHardwareListener::~RemoteAudioHardwareListener):

  • WebProcess/GPU/media/RemoteAudioHardwareListener.h:
  • WebProcess/GPU/media/RemoteRemoteCommandListener.cpp:

(WebKit::RemoteRemoteCommandListener::RemoteRemoteCommandListener):
(WebKit::RemoteRemoteCommandListener::~RemoteRemoteCommandListener):
(WebKit::RemoteRemoteCommandListener::ensureGPUProcessConnection):
(WebKit::RemoteRemoteCommandListener::gpuProcessConnectionDidClose):
(WebKit::RemoteRemoteCommandListener::updateSupportedCommands):

  • WebProcess/GPU/media/RemoteRemoteCommandListener.h:
9:00 AM Changeset in webkit [279583] by Chris Dumez
  • 10 edits in trunk/Source

Unreviewed, reverting r279495.

Seems to have caused a ~2% PLT5 regression

Reverted changeset:

"[macOS] Suspend WebProcesses that are in the process cache"
https://bugs.webkit.org/show_bug.cgi?id=227269
https://commits.webkit.org/r279495

8:17 AM Changeset in webkit [279582] by youenn@apple.com
  • 7 edits in trunk

Remove MediaStreamTrack.onconstrainederror
https://bugs.webkit.org/show_bug.cgi?id=227696

Reviewed by Eric Carlson.

Source/WebCore:

Covered by updated tests.

  • Modules/mediastream/MediaStreamTrack.idl:
  • dom/EventNames.h:

Remove never used/deprecated event handler.

LayoutTests:

  • fast/mediastream/MediaStreamTrack-clone-expected.txt:
  • fast/mediastream/MediaStreamTrack-clone.html:
  • fast/mediastream/MediaStreamTrack.html:
7:54 AM Changeset in webkit [279581] by Antti Koivisto
  • 7 edits
    10 adds in trunk/LayoutTests

Import basic :has() tests
https://bugs.webkit.org/show_bug.cgi?id=227703

Reviewed by Alan Bujtas.

Along with some other updates to css/selectors.

  • web-platform-tests/css/selectors/focus-visible-022.tentative-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-022.tentative.html: Added.
  • web-platform-tests/css/selectors/has-basic-expected.txt: Added.
  • web-platform-tests/css/selectors/has-basic.html: Added.
  • web-platform-tests/css/selectors/has-relative-argument-expected.txt: Added.
  • web-platform-tests/css/selectors/has-relative-argument.html: Added.
  • web-platform-tests/css/selectors/is-where-parsing-expected.txt:
  • web-platform-tests/css/selectors/is-where-parsing.html:
  • web-platform-tests/css/selectors/parsing/parse-has-expected.txt: Added.
  • web-platform-tests/css/selectors/parsing/parse-has.html: Added.
  • web-platform-tests/css/selectors/parsing/w3c-import.log:
  • web-platform-tests/css/selectors/user-invalid.html:
  • web-platform-tests/css/selectors/user-valid-expected.txt: Added.
  • web-platform-tests/css/selectors/user-valid.html: Added.
  • web-platform-tests/css/selectors/w3c-import.log:
4:10 AM Changeset in webkit [279580] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[GTK4] Navigation swipe doesn't work when the page scrolls horizontally
https://bugs.webkit.org/show_bug.cgi?id=226173

Patch by Alexander Mikhaylenko <Alexander Mikhaylenko> on 2021-07-06
Reviewed by Michael Catanzaro.

There was a chunk of code that was never ported to GTK4. Port it.

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):

1:02 AM Changeset in webkit [279579] by youenn@apple.com
  • 5 edits in trunk/Source/WebCore

Set kVTCompressionPropertyKey_MaxKeyFrameInterval in VideoSampleBufferCompressor
https://bugs.webkit.org/show_bug.cgi?id=227680
<rdar://78027782>

Reviewed by Eric Carlson.

Source/WebCore:

Set kVTCompressionPropertyKey_MaxKeyFrameInterval in addition to kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration.
Manually tested.

  • platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm:

(WebCore::VideoSampleBufferCompressor::initCompressionSession):

Source/WebCore/PAL:

  • pal/cf/VideoToolboxSoftLink.cpp:
  • pal/cf/VideoToolboxSoftLink.h:
12:55 AM Changeset in webkit [279578] by youenn@apple.com
  • 5 edits in trunk/Source/WebKit

NetworkRTCUDPSocketCocoa should update the port of its m_address field
https://bugs.webkit.org/show_bug.cgi?id=227622

Reviewed by Eric Carlson.

Make sure we set the port to m_address field as this is used for setting up nw_connections.
Then notify WebProcess to proceed. This will ensure that we create a nw_connection with the right listening port.
Also fix the value given to nw_parameters_set_is_third_party_web_content.

Set local address reuse to true with nw_parameters_set_reuse_local_address so that listeners and connections can share the same address and port.
This does not always work so, we temporarily resort to use a 0 port instead of m_address.port() when setting up nw_connections.

Manually tested.

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::doSocketTaskOnRTCNetworkThread):

  • NetworkProcess/webrtc/NetworkRTCProvider.h:
  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.h:
  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm:

(WebKit::NetworkRTCUDPSocketCocoa::setListeningPort):
(WebKit::NetworkRTCUDPSocketCocoaConnections::NetworkRTCUDPSocketCocoaConnections):
(WebKit::NetworkRTCUDPSocketCocoaConnections::setListeningPort):

12:54 AM Changeset in webkit [279577] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

UserMediaCaptureManagerProxy::SourceProxy destructor should remove itself as observer before invalidating its ring buffer storage
https://bugs.webkit.org/show_bug.cgi?id=227683

Reviewed by Eric Carlson.

Covered by existing tests.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::SourceProxy::~SourceProxy):
Previously, we were invalidating the ring buffer storage before removing the source proxy as audio observer.
This created the risk for the ring buffer to be recreated before the end of SourceProxy destructor.
To fix this, we invalidate the storage just after stopping observing.

12:48 AM Changeset in webkit [279576] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[curl][Win] very high CPU load on page with WebSocket
https://bugs.webkit.org/show_bug.cgi?id=227428
<rdar://problem/80150503>

Reviewed by Don Olmstead.

curl_socket_t is UINT_PTR on Windows while it is int on other
platforms. CurlStream::appendMonitoringFd was failing to update
maxfd because the following condition can't be true on Windows.

if (maxfd < *socket)

maxfd = *socket;

As the result, ::select was not called, and CurlStreamScheduler's
thread ran busy.

  • platform/network/curl/CurlStream.cpp:

(WebCore::CurlStream::appendMonitoringFd): Added static_cast.

12:44 AM Changeset in webkit [279575] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[curl][Win] wss: WebSocket doesn't work since r271170
https://bugs.webkit.org/show_bug.cgi?id=227694

Reviewed by Don Olmstead.

r271170 started to use CURLSSLOPT_NATIVE_CA for https for Windows.
However, I forgot to set the flag to WebSocket curl handles.

  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::enableSSLForHost):
(WebCore::CurlHandle::enableHttp):

Jul 5, 2021:

10:45 PM Changeset in webkit [279574] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit

[GTK] Navigation swipe gesture can be triggered with mouse
https://bugs.webkit.org/show_bug.cgi?id=227678

Patch by Alexander Mikhaylenko <Alexander Mikhaylenko> on 2021-07-05
Reviewed by Carlos Garcia Campos.

Originally, the navigation swipe gesture had a few checks to only make it possible to
trigger it with a touchpad or touchscreen, with an exception for simulated swipes
where we couldn't set the source easily.

During the rewrite in https://bugs.webkit.org/show_bug.cgi?id=212324, the check got
dropped, but it has a good reason to be there: not all devices are capable of
performing a gesture. Touchpads and touchscreens should be fine, trackpoints are
finicky, though can still technically work, but mouse are a no-go. While they can
start a swipe, they will never end it and the gesture will get stuck.

So, add the check back. Don't bother with the scroll direction this time though, while
that check made sense when it got added, at some point since then all scroll events
had GDK_SCROLL_SMOOTH direction and just set their deltas to (1, 0), (-1, 0), (0, 1)
or (0, -1), so that check stopped working, and the source type check should filter
mouse events anyway.

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseHandleWheelEvent):
(webkitWebViewBaseScroll):
(webkitWebViewBaseTouchDragUpdate):
(webkitWebViewBaseTouchDragEnd):

  • UIProcess/ViewGestureController.h:
  • UIProcess/gtk/ViewGestureControllerGtk.cpp:

(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanInfluenceSwipe):
(WebKit::isTouchEvent):
(WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting):
(WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting):

5:56 PM Changeset in webkit [279573] by Wenson Hsieh
  • 3 edits
    2 adds in trunk

Live Text should not be visible in video thumbnail images behind "Skip Ad" button on YouTube
https://bugs.webkit.org/show_bug.cgi?id=227692

Reviewed by Darin Adler.

Source/WebCore:

Force text-shadow: none; for image overlay text, such that Live Text injected into image elements isn't
visible to the user when the containing image element has a text shadow.

Test: fast/images/text-recognition/image-overlay-with-text-shadow.html

  • html/shadow/imageOverlay.css:

(div#image-overlay):

LayoutTests:

Add a new layout test to verify that specifying text-shadow on image elements does not cause Live Text to
become visible.

  • fast/images/text-recognition/image-overlay-with-text-shadow-expected.html: Added.
  • fast/images/text-recognition/image-overlay-with-text-shadow.html: Added.
3:54 PM Changeset in webkit [279572] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[LFC][IFC] Test garderning for overflow-wrap:anywhere
https://bugs.webkit.org/show_bug.cgi?id=227689

Unreviewed.

with IFC. Also use ImageOnlyFailure instead so that we can see progressions.

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

[GTK] Kinetic scrolling interferes with gestures
https://bugs.webkit.org/show_bug.cgi?id=226680

Patch by Alexander Mikhaylenko <Alexander Mikhaylenko> on 2021-07-05
Reviewed by Michael Catanzaro.

Simulate scroll events that would stop scrolling when we're starting any touch
gesture. Since we don't have a way to do that on touchpad yet, just stop it when
starting a zoom or a navigation swipe gesture instead.

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::navigationGestureDidBegin):

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseZoomBegin):
(webkitWebViewBaseTouchDragBegin):
(webkitWebViewBaseConstructed):

1:59 PM Changeset in webkit [279570] by Cameron McCormack
  • 7 edits
    21 deletes in trunk/LayoutTests

Move some Mac MathML test expectation files around
https://bugs.webkit.org/show_bug.cgi?id=227520
<rdar://79749198>

Reviewed by Frédéric Wang.

LayoutTests/imported/w3c:

  • web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-combining-expected.txt:
  • web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002-expected.txt:

Make the macOS expectation file the default for these tests.

LayoutTests:

This should make it so that the same test expectation files are used
for Monterey as for Big Sur, without needing to add Monterey-specific
files.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-wk2/TestExpectations:

Re-enable border-002.html.

  • platform/mac-wk1/TestExpectations:

Re-enable displaystyle-013.html and displaystyle-014.html.

  • platform/ios-wk2/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-combining-expected.txt: Removed.
  • platform/ios-wk2/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002-expected.txt: Removed.
  • platform/ios/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002-expected.txt: Removed.
  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-minsize-maxsize-001-expected.txt: Removed.
  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-combining-expected.txt: Removed.
  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-001-expected.txt: Removed.
  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-002-expected.txt: Removed.
  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-001-expected.txt: Removed.
  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-005-expected.txt: Removed.
  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-006-expected.txt: Removed.
  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-minsize-maxsize-001-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-001-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-002-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-001-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-005-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-006-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002-expected.txt: Removed.
  • platform/mac-wk2/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-combining-expected.txt: Removed.
  • platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002-expected.txt: Removed.
  • platform/mac/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002-expected.txt: Removed.
11:04 AM Changeset in webkit [279569] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

[GTK] Installs in wrong directory on the bots
https://bugs.webkit.org/show_bug.cgi?id=227684

Patch by Philippe Normand <pnormand@igalia.com> on 2021-07-05
Reviewed by Aakash Jain.

The patch landed in r279563 induced a typo in the installation prefix path option passed to
build-webkit. Then the built-product-archive was failing to find the header andn pkgconfig
files to pack. This patch fixes the issue.

  • CISupport/build-webkit-org/steps.py:

(CompileWebKit.start):

  • CISupport/build-webkit-org/steps_unittest.py:

(TestCompileWebKit.test_success_gtk):

7:52 AM Changeset in webkit [279568] by Alan Bujtas
  • 4 edits in trunk

[LFC][IFC] Add support for conditionally hanging glyph
https://bugs.webkit.org/show_bug.cgi?id=227676

Reviewed by Antti Koivisto.

Source/WebCore:

When a glyph at the end edge of a line hangs, it is not considered when measuring the line’s contents alignment.
If white-space is set to pre-wrap, the UA must (unconditionally) hang the trailing sequence,
unless the sequence is followed by a forced line break, in which case it must conditionally hang the sequence instead
(hang only if it does not otherwise fit in the line prior to justification).
e.g.
<div style="white-space: pre-wrap; width: 5ch; text-align: center"> 0 </p>
We center the _0_ content as the trailing whitespace does not hang here.

  • layout/formattingContexts/inline/InlineFormattingGeometry.cpp:

(WebCore::Layout::hangingGlyphWidth): No need for the struct. We can handle it by returning the hanging content width.
(WebCore::Layout::horizontalAlignmentOffset):
(WebCore::Layout::HangingTrailingWhitespaceContent::width const): Deleted.
(WebCore::Layout::HangingTrailingWhitespaceContent::isConditional const): Deleted.
(WebCore::Layout::HangingTrailingWhitespaceContent::setIsConditional): Deleted.
(WebCore::Layout::HangingTrailingWhitespaceContent::expand): Deleted.
(WebCore::Layout::HangingTrailingWhitespaceContent::reset): Deleted.
(WebCore::Layout::collectHangingTrailingWhitespaceContent): Deleted.

LayoutTests:

7:34 AM Changeset in webkit [279567] by Alexey Shvayka
  • 8 edits in trunk

Use AbortSignal's [PrivateIdentifier] whenSignalAborted() static method
https://bugs.webkit.org/show_bug.cgi?id=227673

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/streams/piping/abort.any-expected.txt:
  • web-platform-tests/streams/piping/abort.any.worker-expected.txt:
  • web-platform-tests/streams/piping/pipe-through.any-expected.txt:
  • web-platform-tests/streams/piping/pipe-through.any.worker-expected.txt:

Source/WebCore:

Enabled by refactoring in r279546, this change removes handcrafted @whenSignalAborted()
global function in favor of using equivalent generated [PrivateIdentifier] static method.

The generated method checks its arguments more strictly (as per WebIDL spec):
a TypeError is thrown for invalid AbortSignal argument, which progresses the WPT.

Test: imported/w3c/web-platform-tests/streams/piping/pipe-through.any.js

  • Modules/streams/ReadableStreamInternals.js:

(readableStreamPipeToWritableStream):

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSDOMGlobalObject::addBuiltinGlobals):

4:48 AM Changeset in webkit [279566] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[Media] test-webvtt.m3u8 is invalid
https://bugs.webkit.org/show_bug.cgi?id=227681

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

This issue was detected by the GStreamer m3u8 parser.

  • http/tests/media/resources/hls/test-webvtt.m3u8:
2:58 AM Changeset in webkit [279565] by Philippe Normand
  • 2 edits in trunk/LayoutTests

Unreviewed, GLIB gardening triaging.

  • platform/glib/TestExpectations:
2:21 AM Changeset in webkit [279564] by Martin Robinson
  • 7 edits
    2 adds in trunk

[css-scroll-snap] Triggering a layout during scroll causes jittery scrolling on Mac when dragging the scrollbar
https://bugs.webkit.org/show_bug.cgi?id=227478

Reviewed by Simon Fraser.

Source/WebCore:

When dragging the scrollbar thumb, wait to resnap after layout for a
given axis until the mouse button is up on the scrollbar. This prevents
the layout and the scrollbar from fighting to set the scroll position
which causes some pretty terrible jitter in this case.

Test: css3/scroll-snap/scroll-snap-drag-scrollbar-thumb-with-relayouts.html

  • platform/ScrollAnimationSmooth.cpp:

(WebCore::ScrollAnimationSmooth::updatePerAxisData): Fix an issue where the new position
was calculated incorrectly. This did not cause the animation to land on the wrong place,
but did cause a very janky animation progression when retriggering animations to the
same location.

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::retargetRunningAnimation): Added this helper, which retargets a
a running animation to allow for a smooth transition during relayouts.

  • platform/ScrollAnimator.h: Added new method definition.
  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::resnapAfterLayout): Only snap after layout when the user is not
currently interacting with the scrollbar. Once the scrollbar isn't being interacted with,
snapping will occur already. When there is already some sort of animation in progress,
smoothly transition that animation to land on the new position instead of snapping there
immediately.

LayoutTests:

  • css3/scroll-snap/scroll-snap-drag-scrollbar-thumb-with-relayouts-expected.txt: Added.
  • css3/scroll-snap/scroll-snap-drag-scrollbar-thumb-with-relayouts.html: Added.
  • platform/ios/TestExpectations: Skip this test on iOS since it uses a scrollbar thumb drag.
1:25 AM Changeset in webkit [279563] by commit-queue@webkit.org
  • 9 edits
    1 add in trunk/Tools

[GTK] Pack header and .pc files in the built-product archive
https://bugs.webkit.org/show_bug.cgi?id=227526

Patch by Philippe Normand <pnormand@igalia.com> on 2021-07-05
Reviewed by Michael Catanzaro.

The header files and pkg-config files needed to build WebKitGTK apps are now included in the
built product zip file. As they're text files the impact on the zip size should not be
significant. In order to support this, two changes are introduced for the GTK build bot:

  • build-webkit is now called with a --prefix option
  • a new build step has been added, which installs the built files in the given prefix directory

Then built-product-archive can simply pack files from the install prefix directory.

Additionally the .a (potentially big) files are now excluded from the zip archive.

  • CISupport/build-webkit-org/factories.py:

(BuildFactory.init):

  • CISupport/build-webkit-org/steps.py:

(CompileWebKit.start):
(InstallBuiltProduct):

  • CISupport/built-product-archive:
  • Scripts/install-built-product: Added.

Jul 4, 2021:

10:54 PM Changeset in webkit [279562] by Wenson Hsieh
  • 36 edits
    2 adds in trunk

[iOS] Augment -_webView:didNotHandleTapAsMeaningfulClickAtPoint: to include meaningful taps
https://bugs.webkit.org/show_bug.cgi?id=227666
rdar://80094962

Reviewed by Tim Horton.

Source/WebKit:

The private UI delegate method -_webView:didNotHandleTapAsMeaningfulClickAtPoint: is currently only invoked
when a tap was not handled as a "meaningful" synthetic click (where the notion of "meaningful" is heuristically
determined). However, in order to support revised tab pill minimization behaviors, Safari requires knowledge of
taps that were handled as meaningful clicks as well.

To support this, replace what is currently -_webView:didNotHandleTapAsMeaningfulClickAtPoint: with another
delegate method, -_webView:didTapAtPoint:withResult:, that is always invoked when a tap gesture is recognized
in the web view. The result parameter, a new _WKTapHandlingResult enum, then indicates to the client how the
tap was handled; this currently includes 3 values: one to indicate that the tap gesture did not result in a
synthetic click being dispatched, and two more to indicate whether the synthetic click that was dispatched as a
result of the tap was "meaningfully" handled.

To facilitate the transition from -_webView:didNotHandleTapAsMeaningfulClickAtPoint: to the new SPI, we still
call the old SPI as long as the tap handling result type is not equal to TapHandlingResult::MeaningfulClick;
however, mark the old SPI as deprecated with -_webView:didTapAtPoint:withResult: as the replacement.

Tests: fast/events/ios/did-not-handle-meaningful-click.html

fast/events/ios/meaningful-click-when-focusing-body.html
fast/events/ios/meaningful-click-when-playing-media.html
fast/events/ios/non-meaningful-click-when-tapping-document.html

  • Shared/ios/TapHandlingResult.h: Added.

Add a new C++ enum type to represent the tap handling result type (see description above).

  • UIProcess/API/APIUIClient.h:

(API::UIClient::didTapAtPoint):
(API::UIClient::didNotHandleTapAsMeaningfulClickAtPoint): Deleted.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/_WKTapHandlingResult.h: Added.
  • UIProcess/API/ios/WKWebViewIOS.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:

(wkTapHandlingResult):

Add a helper method to convert from the WebKit::TapHandlingResult enum to the SPI-exposed _WKTapHandlingResult.

  • UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
  • UIProcess/API/ios/WKWebViewTestingIOS.mm:

(-[WKWebView _didTapAtPoint:withResult:]):
(-[WKWebView _didNotHandleTapAsMeaningfulClickAtPoint:]): Deleted.

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

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::didTapAtPoint):

Note that we still invoke the old UI delegate SPI here to ensure that these changes don't break Safari before
they have a chance to adopt the new SPI.

(WebKit::UIDelegate::UIClient::didNotHandleTapAsMeaningfulClickAtPoint): Deleted.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Replace the DidNotHandleTapAsMeaningfulClickAtPoint message with DidTapAtPoint, which takes both a location
and a flag indicating how the tap was handled by web content.

  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::didTapAtPoint):
(WebKit::PageClientImpl::didNotHandleTapAsMeaningfulClickAtPoint): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::didTapAtPoint):
(WebKit::WebPageProxy::didNotHandleTapAsMeaningfulClickAtPoint): Deleted.

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::completeSyntheticClick):

The meaningful tap heuristic no longer determines whether we send an IPC message or not, but rather the type of
TapHandlingResult to send (namely, whether to send NonMeaningfulClick or MeaningfulClick).

(WebKit::WebPage::attemptSyntheticClick):
(WebKit::WebPage::handleTwoFingerTapAtPoint):
(WebKit::WebPage::commitPotentialTapFailed):

Tools:

Update the layout test harness to use the replacement SPI instead of the newly deprecated SPI. See
WebKit/ChangeLog for more details.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::installDidHandleTapCallback):
(WTR::TestRunner::callDidHandleTapCallback):
(WTR::TestRunner::installDidNotHandleTapAsMeaningfulClickCallback): Deleted.
(WTR::TestRunner::callDidNotHandleTapAsMeaningfulClickCallback): Deleted.

Rename this to just DidHandleTapCallback, and make it take a boolean argument indicating whether the tap was
handled as a meaningful click.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::didHandleTap):
(WTR::TestController::didNotHandleTapAsMeaningfulClick): Deleted.

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didHandleTap):
(WTR::TestInvocation::didNotHandleTapAsMeaningfulClick): Deleted.

  • WebKitTestRunner/TestInvocation.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView _didTapAtPoint:withResult:]):
(-[TestRunnerWKWebView _didNotHandleTapAsMeaningfulClickAtPoint:]): Deleted.

LayoutTests:

Update the existing layout tests. The new UI delegate method should now be invoked in all of the cases; however,
we should only observe meaningful clicks in some of the below scenarios. See WebKit/ChangeLog for more details.

  • fast/events/ios/did-not-handle-meaningful-click-expected.txt:
  • fast/events/ios/did-not-handle-meaningful-click.html:
  • fast/events/ios/meaningful-click-when-focusing-body-expected.txt:
  • fast/events/ios/meaningful-click-when-focusing-body.html:
  • fast/events/ios/meaningful-click-when-playing-media-expected.txt:
  • fast/events/ios/meaningful-click-when-playing-media.html:
  • fast/events/ios/non-meaningful-click-when-tapping-document-expected.txt:
  • fast/events/ios/non-meaningful-click-when-tapping-document.html:
8:18 PM Changeset in webkit [279561] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[LFC][IFC] WPT progressions
https://bugs.webkit.org/show_bug.cgi?id=227675

Unreviewed.

4:55 PM Changeset in webkit [279560] by rmorisset@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

ActiveScratchBufferScope should take the buffer as argument
https://bugs.webkit.org/show_bug.cgi?id=227670
rdar://80011612

Reviewed by Mark Lam.

https://bugs.webkit.org/show_bug.cgi?id=227013 created ActiveScratchBufferScope.
It is used by operations that can cause the GC to run, to mark as roots the contents of the scratch buffer that is live during that time (if any).
The bug is that it simply asks the VM for a scratch buffer of the right size, but this will always return the last scratch buffer, and not necessarily the one that the operation is actually using.

A fairly simple fix is to pass it directly the scratch buffer, since the operation normally can get it easily enough.
In most cases the operation has access to the m_buffer field of the ScratchBuffer, but getting a pointer to the entire structure from that is fairly simple (I added ScratchBuffer::fromData() to do so).

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

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

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewArray):

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrExitGenerationThunkGenerator):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::haveABadTime):

  • runtime/VM.h:

(JSC::ScratchBuffer::fromData):

  • runtime/VMInlines.h:

(JSC::ActiveScratchBufferScope::ActiveScratchBufferScope):
(JSC::ActiveScratchBufferScope::~ActiveScratchBufferScope):

2:06 PM Changeset in webkit [279559] by Ben Nham
  • 2 edits in trunk/Tools

Add support for parsing Competitive PLT results to compare-results
https://bugs.webkit.org/show_bug.cgi?id=227470

Reviewed by Per Arne Vollan.

Modify the script to understand the competitive PLT JSON results produced by the perf bots.

  • Scripts/compare-results:

(plt5Breakdown):
(competitivePLTBreakdown):
(PLT5Results):
(detectCompetitivePLT):
(CompetitivePLTResults):
(CompetitivePLTResults.calculate_time_for_run):
(detectBenchmark):
(biggerIsBetter):
(main):

12:18 PM Changeset in webkit [279558] by Alexey Shvayka
  • 14 edits in trunk/Source

[WebIDL] Simplify generation of runtime conditionally read-write attributes
https://bugs.webkit.org/show_bug.cgi?id=227672

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • runtime/Lookup.h:

(JSC::HashTableValue::makeReadOnlyCopy const):

Source/WebCore:

This patch introduces HashTableValue::makeReadOnlyCopy() to avoid manually
generating & putting a JSValue for an attribute, which is non-trivial to
do right while supporting all kinds of accelerated / built-in attributes.

Also, removes incorrect classForThis argument from entries reification.

No new tests, no behavior change.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • bindings/scripts/test/JS/*: Updated.
11:47 AM Changeset in webkit [279557] by Kocsen Chung
  • 1 copy in tags/Safari-611.3.10.0.1

Tag Safari-611.3.10.0.1.

11:40 AM Changeset in webkit [279556] by Kocsen Chung
  • 1 delete in tags/Safari-611.3.10.0.1

Delete Tag

11:37 AM Changeset in webkit [279555] by Kocsen Chung
  • 1 copy in tags/Safari-611.3.10.0.1

Tag Safari-611.3.10.0.1.

11:37 AM Changeset in webkit [279554] by Alexey Shvayka
  • 6 edits in trunk/Source/WebCore

[WebIDL] Generate constructor's hash table in GenerateConstructorHelperMethods
https://bugs.webkit.org/show_bug.cgi?id=227668

Reviewed by Sam Weinig.

This change moves generation of constructor's hash table to GenerateConstructorHelperMethods,
right before it is used to define the constructor's s_info, which is nicer than inferring
table's name and more precise than using ConstructorHasProperties.

Also, makes $generatingLegacyFactoryFunction bool-ish and removes unused $protoClassName parameter.

No new tests, no behavior change.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):
(GenerateCallbackImplementationContent):
(GenerateConstructorDefinitions):
(GenerateConstructorDefinition):
(GenerateConstructorHelperMethods):
(ConstructorHasProperties): Deleted.

  • bindings/scripts/test/JS/*: Updated.
11:34 AM Changeset in webkit [279553] by Kocsen Chung
  • 1 copy in tags/Safari-611.3.10.1.3

Tag Safari-611.3.10.1.3.

11:33 AM Changeset in webkit [279552] by Kocsen Chung
  • 1 copy in tags/Safari-611.3.10.1.1/safari-611.3.10.1-branch

Tag Safari-611.3.10.1.1.

10:51 AM Changeset in webkit [279551] by commit-queue@webkit.org
  • 8 edits
    24 adds in trunk/LayoutTests

Resync web-platform-tests/css/css-sizing/aspect-ratio from upstream
https://bugs.webkit.org/show_bug.cgi?id=227657

Patch by Rob Buis <rbuis@igalia.com> on 2021-07-04
Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Resync web-platform-tests/css/css-sizing/aspect-ratio from upstream c21b0b8ca7.

  • web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-025.html:
  • web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-026.html:
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-020.html:
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-021.html:
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-028-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-028.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-029-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-029.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-030-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-030.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-031-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-031.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-032-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-032.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-033-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-033.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-034-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-034.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-035-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-035.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-036-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-036.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-037-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-037.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-038-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-038.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/select-element-001-expected.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/select-element-001.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/w3c-import.log:

LayoutTests:

9:53 AM Changeset in webkit [279550] by eric.carlson@apple.com
  • 7 edits
    4 adds in trunk

WebAudio auto-play policy should come from top document
https://bugs.webkit.org/show_bug.cgi?id=227593
rdar://76920375

Reviewed by Chris Dumez.

Source/WebCore:

Tests: media/auto-play-video-in-about-blank-iframe.html

media/auto-play-web-audio-in-about-blank-iframe.html

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::constructCommon): Get auto-play policy from document()->topDocument().

  • testing/Internals.cpp:

(WebCore::Internals::setDocumentAutoplayPolicy): New method to test auto-play policy.

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

LayoutTests:

  • media/auto-play-video-in-about-blank-iframe-expected.txt: Added.
  • media/auto-play-video-in-about-blank-iframe.html: Added.
  • media/auto-play-web-audio-in-about-blank-iframe-expected.txt: Added.
  • media/auto-play-web-audio-in-about-blank-iframe.html: Added.
  • media/video-test.js:

(waitForEventWithTimeout): Return event.

8:47 AM Changeset in webkit [279549] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][TFC] Cleanup computedPreferredWidthForColumns and distributeAvailableSpace functions
https://bugs.webkit.org/show_bug.cgi?id=227669

Reviewed by Antti Koivisto.

Let's create some sub-scopes within these long functions to make them read better.

  • layout/formattingContexts/table/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns):

  • layout/formattingContexts/table/TableLayout.cpp:

(WebCore::Layout::distributeAvailableSpace):

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

[LFC][TFC] 100% percent width column(s) make the table stretch
https://bugs.webkit.org/show_bug.cgi?id=227667

Reviewed by Antti Koivisto.

Source/WebCore:

This patch addresses the odd transition of going from 99% to 100% in accumulated percent width.

Test: fast/layoutformattingcontext/table-space-width-100-percent-quirk.html

  • layout/formattingContexts/table/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns):

LayoutTests:

  • fast/layoutformattingcontext/table-space-width-100-percent-quirk-expected.html: Added.
  • fast/layoutformattingcontext/table-space-width-100-percent-quirk.html: Added.
Note: See TracTimeline for information about the timeline view.