Timeline



Nov 4, 2021:

11:23 PM Changeset in webkit [285337] by Russell Epstein
  • 1 edit in branches/safari-612-branch/Source/JavaScriptCore/bytecode/GetterSetterAccessCase.cpp

Unreviewed build fix. rdar://problem/85045208

unused variable 'stubInfo' [-Werror,-Wunused-variable]

10:14 PM Changeset in webkit [285336] by Russell Epstein
  • 7 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r285335. rdar://problem/85045948

Have RemoteMediaResource use SharedMemory
https://bugs.webkit.org/show_bug.cgi?id=232744
rdar://85045948

Reviewed by Alex Christensen.

When playing a non-mse media element, the loading gets initiated in the
GPU Process and proxied to the WebContent process via a RemoteMediaResource.
By using a SharedBuffer in the RemoteMediaResource wrapping a SharedMemory
we can allocate the buffer in the content process and pass it to the GPU
process without copy nor new allocations.
Playing a 694MB mp4, the GPU memory usage goes from 868MB to 14MB on an
iPhone running iOS 15.
This is a follow-up on bug 232422, what landed was missing this part.

  • GPUProcess/media/RemoteMediaResource.cpp: (WebKit::RemoteMediaResource::dataReceived):
  • GPUProcess/media/RemoteMediaResource.h:
  • GPUProcess/media/RemoteMediaResourceManager.cpp: (WebKit::RemoteMediaResourceManager::dataReceived): Wrap SharedMemory into a SharedBuffer.
  • GPUProcess/media/RemoteMediaResourceManager.h:
  • GPUProcess/media/RemoteMediaResourceManager.messages.in: Change data type from an IPCDataReference to a ShareMemory's handle.
  • WebProcess/GPU/media/RemoteMediaResourceProxy.cpp: (WebKit::RemoteMediaResourceProxy::dataReceived): Allocate a SharedMemory and copy the download data into it, before sending it to the GPU process.

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

10:06 PM Changeset in webkit [285335] by Jean-Yves Avenard
  • 7 edits in trunk/Source/WebKit

Have RemoteMediaResource use SharedMemory
https://bugs.webkit.org/show_bug.cgi?id=232744
rdar://85045948

Reviewed by Alex Christensen.

When playing a non-mse media element, the loading gets initiated in the
GPU Process and proxied to the WebContent process via a RemoteMediaResource.
By using a SharedBuffer in the RemoteMediaResource wrapping a SharedMemory
we can allocate the buffer in the content process and pass it to the GPU
process without copy nor new allocations.
Playing a 694MB mp4, the GPU memory usage goes from 868MB to 14MB on an
iPhone running iOS 15.
This is a follow-up on bug 232422, what landed was missing this part.

  • GPUProcess/media/RemoteMediaResource.cpp:

(WebKit::RemoteMediaResource::dataReceived):

  • GPUProcess/media/RemoteMediaResource.h:
  • GPUProcess/media/RemoteMediaResourceManager.cpp:

(WebKit::RemoteMediaResourceManager::dataReceived): Wrap SharedMemory into
a SharedBuffer.

  • GPUProcess/media/RemoteMediaResourceManager.h:
  • GPUProcess/media/RemoteMediaResourceManager.messages.in: Change data type

from an IPCDataReference to a ShareMemory's handle.

  • WebProcess/GPU/media/RemoteMediaResourceProxy.cpp:

(WebKit::RemoteMediaResourceProxy::dataReceived): Allocate a SharedMemory
and copy the download data into it, before sending it to the GPU process.

9:52 PM Changeset in webkit [285334] by Cameron McCormack
  • 3 edits in trunk/Source/WebCore

Factor out didDraw / didDrawEntireCanvas calls in canvas drawing functions
https://bugs.webkit.org/show_bug.cgi?id=232527
<rdar://problem/84834950>

Reviewed by Antti Koivisto.

No behavior change except for in drawImage, where the
paintCurrentFrameInContext code path now will check whether to call
didDrawEntireCanvas.

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::fillInternal):
(WebCore::CanvasRenderingContext2DBase::strokeInternal):
(WebCore::CanvasRenderingContext2DBase::fillRect):
(WebCore::CanvasRenderingContext2DBase::strokeRect):
(WebCore::CanvasRenderingContext2DBase::drawImage):
(WebCore::CanvasRenderingContext2DBase::didDraw):
(WebCore::CanvasRenderingContext2DBase::drawTextUnchecked):

  • html/canvas/CanvasRenderingContext2DBase.h:
9:06 PM Changeset in webkit [285333] by Cameron McCormack
  • 2 edits in trunk/Source/WebCore

Avoid sending video data to Web process for canvas.drawImage(video)
https://bugs.webkit.org/show_bug.cgi?id=230766
<rdar://problem/83576009>

Reviewed by Simon Fraser.

Using nativeImageForCurrentTime() to get the image to paint on to the
canvas results in a ShareableBitmap being created to send to the
Web process, the identifier for which we then send back to the GPU
process for the drawImage() call. But if we use
paintCurrentFrameInContext(), this uses the PaintFrameForMedia
message, which just sends the MediaPlayer ID and avoids the bitmap
creation.

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::drawImage):

  • platform/graphics/ImageBuffer.h:

(WebCore::ImageBuffer::isRemote const):

8:40 PM Changeset in webkit [285332] by Russell Epstein
  • 4 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r284036. rdar://problem/85034297

Fix spec-correctness when inlining proto intrinsic using get_by_id_with_this
https://bugs.webkit.org/show_bug.cgi?id=231559

Reviewed by Yusuke Suzuki.

My original fix in r283512 has some theoretical spec correctness issues.
I'm not sure if they can be materialized or not since we only use
get_by_id_with_this in very limited scenarios. However, this patch just
makes it so we call the getter instead of attempting to inline it
when using get_by_id_with_this.

  • jit/AssemblyHelpers.cpp: (JSC::AssemblyHelpers::emitLoadPrototypeWithoutCheck): Deleted.
  • jit/AssemblyHelpers.h:
  • jit/IntrinsicEmitter.cpp: (JSC::IntrinsicGetterAccessCase::canEmitIntrinsicGetter): (JSC::IntrinsicGetterAccessCase::emitIntrinsicGetter):

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

8:40 PM Changeset in webkit [285331] by Russell Epstein
  • 6 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r283954. rdar://problem/85045208

Share more code that uses ScratchRegisterAllocator in the ICs
https://bugs.webkit.org/show_bug.cgi?id=231125
<rdar://problem/84066374>

Reviewed by Sam Weinig.

We had the same code to allocate a scratch register allocator copy pasted
all over the IC code. This patch refactors that to use a shared helper.

Also, Delete was using a ScratchRegisterAllocator for no reason (it never
allocated a scratch register), so I deleted that code.

  • bytecode/AccessCase.cpp: (JSC::AccessCase::generateWithGuard): (JSC::AccessCase::generateImpl):
  • bytecode/GetterSetterAccessCase.cpp: (JSC::GetterSetterAccessCase::emitDOMJITGetter):
  • bytecode/PolymorphicAccess.cpp: (JSC::AccessGenerationState::makeDefaultScratchAllocator): (JSC::PolymorphicAccess::regenerate):
  • bytecode/PolymorphicAccess.h:
  • jit/IntrinsicEmitter.cpp: (JSC::IntrinsicGetterAccessCase::emitIntrinsicGetter):

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

8:27 PM Changeset in webkit [285330] by Cameron McCormack
  • 3 edits in trunk/Source/WebCore

Nested run loops under MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange can cause hang when timeout fires
https://bugs.webkit.org/show_bug.cgi?id=232695
<rdar://problem/85004449>

Reviewed by Jer Noble.

It's possible for MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange
to be called re-entrantly, if the RunLoop::run call ends up processing
an event that also wants to synchronously update the media image. This
can cause a hang:

  1. Enter the outer waitForVideoOutputMediaDataWillChange call.
  2. Set up the outer timeout timer.
  3. Call RunLoop::run.

3.1. Enter the inner waitForVideoOutputMediaDataWillChange call.
3.2. Set up the inner timeout timer.
3.3. Call RunLoop::run.

3.3.1. Wait for new RunLoop events, and none arrive.
3.3.2. The outer timeout timer fires, calling RunLoop::stop.

3.4. Return from waitForVideoOutputMediaDataWillChange, cancelling

the inner timeout timer.

3.5. Wait for more events on the run loop, forever.

To avoid this, we can set up a single timeout timer, and track the
nesting level of our RunLoop::run calls. The innermost RunLoop::run call
will finish either by the timer firing (which calls RunLoop::stop) or by
the video data updating (which also calls RunLoop::stop, under
outputMediaDataWillChange). Either way, once the innermost
RunLoop::run call is finished, we know we can stop processing all of
the ancestor RunLoop:run calls.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):

8:25 PM Changeset in webkit [285329] by Russell Epstein
  • 1 delete in branches/safari-612.3.3.0-branch/Source/WebKit/ChangeLog.orig

Remove bogus file from source.

8:06 PM Changeset in webkit [285328] by Russell Epstein
  • 12 edits
    1 delete in branches/safari-612-branch

Cherry-pick r285239. rdar://problem/80991209

Apply patch. rdar://problem/84982191

git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-612.3.3.0-branch@285239 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7:45 PM Changeset in webkit [285327] by Russell Epstein
  • 4 edits in branches/safari-612-branch/Source

Revert "Apply patch. rdar://problem/80991209"

This reverts commit r285313.

6:56 PM Changeset in webkit [285326] by Russell Epstein
  • 1 edit in branches/safari-612-branch/Source/WebCore/page/cocoa/CaptionUserPreferencesMediaAFCocoa.mm

Unreviewed build fix. rdar://85042122

fatal error: 'wtf/cocoa/TypeCastsCocoa.h' file not found

6:54 PM Changeset in webkit [285325] by Russell Epstein
  • 9 edits
    1 add in branches/safari-612-branch/Source/WebCore

Cherry-pick r284163. rdar://problem/85042122

WebCore::CaptionUserPreferencesMediaAF should use a weak observer with CFNotificationCenter
<https://webkit.org/b/231550>
<rdar://problem/84129338>

Reviewed by Darin Adler.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • Add CaptionUserPreferencesMediaAF.mm.
  • page/CaptionUserPreferences.cpp: (WebCore::CaptionUserPreferences::create): Add.
  • page/CaptionUserPreferences.h: (WebCore::CaptionUserPreferences):
  • Make subclass of RefCounted<> and CanMakeWeakPtr<>. (WebCore::CaptionUserPreferences::create): Add. (WebCore::CaptionUserPreferences::CaptionUserPreferences):
  • Move constructor to protected visiblity with explicit keyword, and add static create() method.
  • page/CaptionUserPreferencesMediaAF.cpp: (WebCore::userCaptionPreferencesChangedNotificationCallback):
  • Update to use extractCaptionUserPreferencesMediaAF() for Cococa platforms. Note that -> is used for two different userPreferences variable types based on the platform. (WebCore::CaptionUserPreferencesMediaAF::create): Add. (WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF):
  • Move initialization of m_listeningForPreferenceChanges to class definition. (WebCore::CaptionUserPreferencesMediaAF::~CaptionUserPreferencesMediaAF):
  • Update to use m_weakObserver as observer for Cocoa platforms. (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):
  • Update to use m_weakObserver as observer and _CFNotificationObserverIsObjC in suspension behavior for Cocoa platforms.
  • page/CaptionUserPreferencesMediaAF.h: (WebCore::CaptionUserPreferencesMediaAF::create): Add. (WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF):
  • Move constructor to private visiblity, and add static create() method. (WebCore::CaptionUserPreferencesMediaAF::extractCaptionUserPreferencesMediaAF): Add. (WebCore::CaptionUserPreferencesMediaAF::createWeakObserver): Add. (WebCore::CaptionUserPreferencesMediaAF::m_weakObserver):
  • Add m_weakObserver instance variable for use with CFNotificationCenter. (WebCore::CaptionUserPreferencesMediaAF::m_listeningForPreferenceChanges):
  • Move initialization of m_listeningForPreferenceChanges here from the constructor.
  • page/cocoa/CaptionUserPreferencesMediaAFCocoa.mm: Add. (-[WebCaptionUserPreferencesMediaAFWeakObserver initWithWeakPtr:]): (-[WebCaptionUserPreferencesMediaAFWeakObserver userPreferences]):
  • Declare and implement WebCaptionUserPreferencesMediaAFWeakObserver class for use as a weak CFNotificationCenter observer. (WebCore::CaptionUserPreferencesMediaAF::createWeakObserver): Add.
  • Helper method to call from C++ that creates weak observer object from Objective-C++. (WebCore::CaptionUserPreferencesMediaAF::extractCaptionUserPreferencesMediaAF): Add.
  • Helper method to extract RefPtr<CaptionUserPreferencesMediaAF> from CFNotification observer parameter.
  • page/PageGroup.cpp: (WebCore::PageGroup::ensureCaptionPreferences):
  • Switch to using new create() methods.
  • page/PageGroup.h: (WebCore::PageGroup::m_captionPreferences):
  • Change from std::unique_ptr<> to RefPtr<>.

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

6:35 PM Changeset in webkit [285324] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Use objectReplacementCharacter to mark atomic inline box position.
https://bugs.webkit.org/show_bug.cgi?id=232718

Reviewed by Antti Koivisto.

objectReplacementCharacter is input to the bidi code as atomic inline level box marker.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::handleInlineLevelBox):
(WebCore::Layout::InlineItemsBuilder::buildPreviousTextContent): Take the atomic inline level boxes into account when building previous content for bidi processing.

6:01 PM Changeset in webkit [285323] by Russell Epstein
  • 9 edits
    1 delete in branches/safari-612-branch/Source/WebCore

Revert "Cherry-pick r284163. rdar://problem/84129338"

This reverts commit r285281.

5:54 PM Changeset in webkit [285322] by Ryan Haddad
  • 2 edits in trunk/Websites/webkit.org

Add Monterey to WebKit Build Archives page
https://bugs.webkit.org/show_bug.cgi?id=232739

Reviewed by Alexey Proskuryakov.

  • wp-content/themes/webkit/build-archives.php:
4:48 PM Changeset in webkit [285321] by Russell Epstein
  • 9 edits
    1 add in branches/safari-612-branch

Cherry-pick r282379. rdar://problem/85039227

Fix computed style for transform-origin on SVG boxes
https://bugs.webkit.org/show_bug.cgi?id=230172

Reviewed by Alan Bujtas.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-transforms/transform-origin-014-expected.txt:

Source/WebCore:

When getting the computed value for transform-origin on SVG boxes, we need to get
the appropriate "reference box" from the renderer. Do minor refactoring to share
code between rendering and computed style for SVG and non-SVG boxes.

Tested by imported/w3c/web-platform-tests/css/css-transforms/transform-origin-014.html

  • css/CSSComputedStyleDeclaration.cpp: (WebCore::transformReferenceBox): (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
  • rendering/RenderLayer.cpp: (WebCore::transformBoxToCSSBoxType): Deleted.
  • rendering/style/RenderStyleConstants.cpp: (WebCore::transformBoxToCSSBoxType):
  • rendering/style/RenderStyleConstants.h:
  • rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::transformReferenceBox):
  • rendering/svg/SVGRenderSupport.h:
  • svg/SVGGraphicsElement.cpp: (WebCore::SVGGraphicsElement::animatedLocalTransform const):

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

4:46 PM Changeset in webkit [285320] by Kate Cheney
  • 8 edits
    2 adds in trunk

Form action with a redirect should report correct blocked URI
https://bugs.webkit.org/show_bug.cgi?id=232660
<rdar://problem/84969024>

Reviewed by Brent Fulgham.

Source/WebCore:

We currently report the blocked URI as the target of a redirect, per
the spec it should actually be the initiating url.

Test: http/tests/security/contentSecurityPolicy/form-action-redirect-with-correct-blocked-uri.html

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::willSendRequest):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::checkIfFormActionAllowedByCSP const):

  • loader/FrameLoader.h:
  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::allowResourceFromSource const):
(WebCore::ContentSecurityPolicy::allowFormAction const):

  • page/csp/ContentSecurityPolicy.h:

LayoutTests:

  • http/tests/security/contentSecurityPolicy/form-action-redirect-with-correct-blocked-uri-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/form-action-redirect-with-correct-blocked-uri.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/form-action-src-redirect-blocked-expected.txt:

Update console logging to report the correct URL.

4:29 PM Changeset in webkit [285319] by dino@apple.com
  • 4 edits in trunk/Source

REGRESSION: AR Quicklook asset is shared instead of page URL
https://bugs.webkit.org/show_bug.cgi?id=232674
rdar://84220997

Reviewed by Antoine Quint.

There was a typo. ENABLE(ARKIT_QUICK_LOOK_PREVIEW_ITEM)
should be HAVE(ARKIT_QUICK_LOOK_PREVIEW_ITEM).

Source/WebCore/PAL:

  • pal/spi/ios/SystemPreviewSPI.h:

Source/WebKit:

  • UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
4:18 PM Changeset in webkit [285318] by mmaxfield@apple.com
  • 11 edits
    1 add in trunk/Source/WebCore

[Cocoa] Migrate from CTFontCopyVariationAxes() to CTFontCopyVariationAxesInternal() if possible
https://bugs.webkit.org/show_bug.cgi?id=232690

Reviewed by Simon Fraser and Cameron McCormack.

Source/WebCore:

CTFontCopyVariationAxesInternal() is faster than CTFontCopyVariationAxes(), but the strings
it provides are not localized. Luckily, we don't actually use the strings in the common case,
so we can migrate to CTFontCopyVariationAxesInternal() safely.

No new tests because there is no behavior change.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::variationAxes):
(WebCore::defaultVariationValues):
(WebCore::preparePlatformFont):

  • platform/graphics/cocoa/FontCacheCoreText.h:
  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:

(WebCore::FontPlatformData::variationAxes const):

Source/WebCore/PAL:

  • pal/spi/cf/CoreTextSPI.h:
3:55 PM Changeset in webkit [285317] by commit-queue@webkit.org
  • 7 edits in trunk

We need to PreferNumber when calling toPrimitive for coercion to BigInt
https://bugs.webkit.org/show_bug.cgi?id=232720

Patch by Alexey Shvayka <ashvayka@apple.com> on 2021-11-04
Reviewed by Saam Barati.

JSTests:

  • stress/big-int-constructor.js:
  • stress/bigint-asintn.js:
  • stress/bigint-asuintn.js:

Source/JavaScriptCore:

The difference between "default" and "number" hints is observable only via
Symbol.toPrimitive method.

This patch aligns hints in ToBigInt [1] and BigInt constructor [2] with the
spec, V8, and SpiderMonkey.

[1]: https://tc39.es/ecma262/#sec-tobigint (step 1)
[2]: https://tc39.es/ecma262/#sec-bigint-constructor-number-value (step 2)

  • runtime/BigIntConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::toBigInt const):

2:58 PM Changeset in webkit [285316] by Nikos Mouchtaris
  • 31 edits in trunk/Source

Make scrollbar orientation an enum class
https://bugs.webkit.org/show_bug.cgi?id=232648

Reviewed by Simon Fraser.

Source/WebCore:

  • accessibility/AccessibilityScrollbar.cpp:

(WebCore::AccessibilityScrollbar::orientation const):

  • css/SelectorChecker.h:
  • css/SelectorCheckerTestFunctions.h:

(WebCore::scrollbarMatchesHorizontalPseudoClass):
(WebCore::scrollbarMatchesVerticalPseudoClass):

  • page/FrameView.cpp:

(WebCore::FrameView::horizontalScrollbarHiddenByStyle const):
(WebCore::FrameView::verticalScrollbarHiddenByStyle const):
(WebCore::FrameView::performSizeToContentAutoSize):
(WebCore::FrameView::adjustScrollStepForFixedContent):

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::scroll):
(WebCore::ScrollAnimator::deltaFromStep):
(WebCore::ScrollAnimator::handleWheelEvent):

  • platform/ScrollTypes.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::setHasHorizontalScrollbar):
(WebCore::ScrollView::setHasVerticalScrollbar):

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::scroll):
(WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
(WebCore::ScrollableArea::didAddScrollbar):
(WebCore::ScrollableArea::willRemoveScrollbar):
(WebCore::ScrollableArea::doPostThumbMoveSnapping):

  • platform/ScrollableArea.h:

(WebCore::offsetForOrientation):

  • platform/Scrollbar.cpp:

(WebCore::Scrollbar::pressedPartScrollDirection):
(WebCore::Scrollbar::moveThumb):
(WebCore::Scrollbar::mouseMoved):
(WebCore::Scrollbar::mouseDown):

  • platform/ScrollbarThemeComposite.cpp:

(WebCore::ScrollbarThemeComposite::splitTrack):
(WebCore::ScrollbarThemeComposite::trackPosition):
(WebCore::ScrollbarThemeComposite::trackLength):

  • platform/mac/ScrollbarThemeMac.mm:

(WebCore::ScrollbarThemeMac::registerScrollbar):
(WebCore::ScrollbarThemeMac::hasButtons):
(WebCore::ScrollbarThemeMac::hasThumb):
(WebCore::buttonRepaintRect):
(WebCore::ScrollbarThemeMac::backButtonRect):
(WebCore::ScrollbarThemeMac::forwardButtonRect):
(WebCore::ScrollbarThemeMac::trackRect):

  • platform/mac/ScrollbarsControllerMac.mm:

(-[WebScrollerImpDelegate layer]):
(-[WebScrollerImpDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::hasAutoScrollbar const):
(WebCore::RenderBox::hasAlwaysPresentScrollbar const):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateOverflowControlsLayers):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::destroyRootLayer):

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::clear):
(WebCore::RenderLayerScrollableArea::destroyScrollbar):
(WebCore::RenderLayerScrollableArea::setHasHorizontalScrollbar):
(WebCore::RenderLayerScrollableArea::setHasVerticalScrollbar):
(WebCore::RenderLayerScrollableArea::updateScrollbarPresenceAndState):
(WebCore::RenderLayerScrollableArea::updateScrollbarsAfterLayout):

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::layout):
(WebCore::RenderListBox::scrollToRevealElementAtListIndex):
(WebCore::RenderListBox::setScrollTop):
(WebCore::RenderListBox::createScrollbar):
(WebCore::RenderListBox::destroyScrollbar):

  • rendering/RenderScrollbar.cpp:

(WebCore::RenderScrollbar::RenderScrollbar):
(WebCore::RenderScrollbar::updateScrollbarParts):
(WebCore::RenderScrollbar::buttonRect const):
(WebCore::RenderScrollbar::trackRect const):
(WebCore::RenderScrollbar::trackPieceRectWithMargins const):
(WebCore::RenderScrollbar::minimumThumbLength const):

  • rendering/RenderScrollbarPart.cpp:

(WebCore::RenderScrollbarPart::layout):

  • rendering/RenderScrollbarTheme.cpp:

(WebCore::RenderScrollbarTheme::buttonSizesAlongTrackAxis):
(WebCore::RenderScrollbarTheme::hasButtons):
(WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):

Source/WebKit:

  • Shared/WebHitTestResultData.cpp:

(WebKit::WebHitTestResultData::WebHitTestResultData):

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::updateScrollbars):
(WebKit::PDFPlugin::createScrollbar):
(WebKit::PDFPlugin::destroyScrollbar):
(WebKit::PDFPlugin::destroy):

2:43 PM Changeset in webkit [285315] by Russell Epstein
  • 7 edits
    1 add in branches/safari-612-branch

Cherry-pick r283512. rdar://problem/85034084

IntrinsicGetterAccessCase implementation of proto needs to handle get_by_id_with_this
https://bugs.webkit.org/show_bug.cgi?id=229951
<rdar://problem/82787527>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/run-proto-intrinsic-getter-with-this-value-in-get-by-id-with-this.js: Added. (assert): (main.v37): (main):

Source/JavaScriptCore:

The whole point of get_by_id_with_this is to have different
slot base values for |this| vs the slot base when invoking
getters. However, our intrinsic getter inlining wasn't respecting
this. This patch makes the proto intrinsic getter do the right
thing. For typed array intrinsic getters, if they have different
|this| value vs slot base, we chose not to inline them, because
the type checks are not on the |this| value, so they're not guaranteed
to be typed arrays. We can improve upon this in the future.

  • bytecode/IntrinsicGetterAccessCase.h:
  • jit/AssemblyHelpers.cpp: (JSC::AssemblyHelpers::emitLoadPrototypeWithoutCheck):
  • jit/AssemblyHelpers.h:
  • jit/IntrinsicEmitter.cpp: (JSC::IntrinsicGetterAccessCase::canEmitIntrinsicGetter): (JSC::IntrinsicGetterAccessCase::emitIntrinsicGetter):
  • jit/Repatch.cpp: (JSC::tryCacheGetBy):

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

2:42 PM Changeset in webkit [285314] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/JavaScriptCore

Revert "Cherry-pick r284036. rdar://problem/84167629"

This reverts commit r285280.

2:39 PM Changeset in webkit [285313] by Russell Epstein
  • 4 edits in branches/safari-612-branch/Source

Apply patch. rdar://problem/80991209

2:37 PM Changeset in webkit [285312] by Russell Epstein
  • 6 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r285177. rdar://problem/85033636

Terminate unresponsive network process by crashing it
https://bugs.webkit.org/show_bug.cgi?id=232603

Reviewed by Chris Dumez.

UI process currently kills network process when it does not respond message in some time (network process being
unresponsive). We've found one common case where network process becomes unresponsive is that it is blocked by
some slow operation on the main thread (like file operation in rdar://84511633). To understand what the
operations are and make a fix, we now ask network process to crash itself on IPC thread. In this way, we can get
crash report that includes the call stack of the main thread. To avoid generating too many crash reports, we
only send the crash message to network process when it becomes unresponsive multiple times in a short time
period.

  • Platform/IPC/Connection.cpp: (IPC::terminateDueToIPCTerminateMessage): (IPC::Connection::processIncomingMessage):
  • Scripts/webkit/model.py:
  • Scripts/webkit/tests/MessageNames.cpp: (IPC::description): (IPC::receiverName): (IPC::isValidMessageName):
  • Scripts/webkit/tests/MessageNames.h:
  • UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::shouldTerminateNetworkProcessBySendingMessage): (WebKit::NetworkProcessProxy::didBecomeUnresponsive):

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

2:37 PM Changeset in webkit [285311] by Russell Epstein
  • 7 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r285115. rdar://problem/85033664

Increase responsiveness timeout for network process
https://bugs.webkit.org/show_bug.cgi?id=232505

Reviewed by Chris Dumez.

  • UIProcess/AuxiliaryProcessProxy.cpp: (WebKit::AuxiliaryProcessProxy::AuxiliaryProcessProxy):
  • UIProcess/AuxiliaryProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::NetworkProcessProxy): (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
  • UIProcess/ResponsivenessTimer.cpp: (WebKit::ResponsivenessTimer::ResponsivenessTimer): (WebKit::ResponsivenessTimer::timerFired): (WebKit::ResponsivenessTimer::start): (): Deleted.
  • UIProcess/ResponsivenessTimer.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::getNetworkProcessConnection):

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

2:37 PM Changeset in webkit [285310] by Russell Epstein
  • 3 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r284651. rdar://problem/85033593

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

Reviewed by Alex Christensen.

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

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
  • UIProcess/Cocoa/WKShareSheet.mm: (+[WKShareSheet createRandomSharingDirectoryForFile:]): (+[WKShareSheet writeFileToShareableURL:data:temporaryDirectory:]):

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

2:23 PM Changeset in webkit [285309] by Lauro Moura
  • 4 edits in trunk/LayoutTests

[GLIB] Gardening some timeouts

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
2:19 PM Changeset in webkit [285308] by Russell Epstein
  • 4 edits in branches/safari-612-branch/Source

Cherry-pick r285241. rdar://problem/84990898

[macOS] MediaSession coordinator enabled in UIProcess, disabled in WebContent
https://bugs.webkit.org/show_bug.cgi?id=232687
<rdar://84990898>

Reviewed by Eric Carlson.

Source/WebKit:

The default value of defaultMediaSessionCoordinatorEnabled() will be true if the UIProcess has
the correct entitlement. However, this value is not passed across the XPC boundary unless it has
been overridden, which means defaultMediaSessionCoordinatorEnabled() will control the setting
in the WebContent process, which is not entitled.

Have the WebContent process check its parent process's entitlement rather than its own when
determining the default value for defaultMediaSessionCoordinatorEnabled().

  • Shared/WebPreferencesDefaultValues.cpp: (WebKit::defaultMediaSessionCoordinatorEnabled):

Source/WTF:

Have the MediaSessionPlaylistEnabled preference use the same defaults as MediaSessionCoordinatorEnabled.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

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

2:07 PM Changeset in webkit [285307] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

Update global test expectations to skip more rvfc tests (and enable them only on Mac/iOS)
https://bugs.webkit.org/show_bug.cgi?id=232719

Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-11-04

  • TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
1:35 PM Changeset in webkit [285306] by Aditya Keerthi
  • 3 edits
    2 adds in trunk

Crash when opening and closing color picker while resetting form
https://bugs.webkit.org/show_bug.cgi?id=232689
rdar://84979791

Reviewed by Simon Fraser.

Source/WebKit:

Resetting a <form> element containing an <input type=color> resets
the value of the color input. If the WebProcess believes that a
color picker is visible in the UIProcess, an IPC message
(WebPageProxy_SetColorPickerColor) is sent to the UIProcess to update
the selected color.

If the color picker is closed by user action (on macOS, clicking
outside the popover), the UIProcess nulls out m_colorPicker, and
notifies the WebProcess that the color picker is no longer visible
by sending the WebPage_DidEndColorPicker message.

Consequently, it is possible for WebPageProxy_SetColorPickerColor to be
dispatched in the UIProcess after m_colorPicker is nulled out, while
the WebProcess is still waiting to process WebPage_DidEndColorPicker.
This sequence of events results in a MESSAGE_CHECK failure in
WebPageProxy::setColorPickerColor, leading to WebProcess termination.

To fix, remove the MESSAGE_CHECK and replace it with a null check, since
a null m_colorPicker is a valid state.

Test: fast/forms/color/color-input-reset-crash.html

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setColorPickerColor):

LayoutTests:

Added a layout test to exercise the crash.

  • fast/forms/color/color-input-reset-crash-expected.txt: Added.
  • fast/forms/color/color-input-reset-crash.html: Added.
1:31 PM Changeset in webkit [285305] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[ iOS ] TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS is crashing
https://bugs.webkit.org/show_bug.cgi?id=232676

Patch by Alex Christensen <achristensen@webkit.org> on 2021-11-04
Reviewed by Eric Carlson.

In WebKitLegacy on iOS, WebCoreAVFPullDelegate.initWithPlayer is being called on the web thread,
but outputMediaDataWillChange is being called on the main run loop then accessing _player in a non-thread-safe manner.
To fix this, I call callOnMainThread to access _player on the web thread. To fix the assertion that happens after this
fix, I made MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange able to be called on the non-main run loop.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
(-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):

1:02 PM Changeset in webkit [285304] by Russell Epstein
  • 1 edit in branches/safari-612-branch/Source/WTF/wtf/WeakPtr.h

Unreviewed build fix. rdar://85029973

Support both makeWeakPtr and WeakPtr.

12:56 PM Changeset in webkit [285303] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r282849. rdar://problem/83067708

Follow-up: WebKit::WebProcessPool should use a weak observer with CFNotificationCenter
<https://webkit.org/b/230227>
<rdar://problem/83067708>

Reviewed by Tim Horton.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::registerNotificationObservers):
  • Set m_weakObserver for all platforms at the beginning of the method. Previously it was only set for macOS.

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

12:56 PM Changeset in webkit [285302] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WTF

Cherry-pick r282704. rdar://problem/83067708

Build fix: WebKit::WebProcessPool should use a weak observer with CFNotificationCenter
<https://webkit.org/b/230227>
<rdar://problem/83067708>

  • wtf/spi/cocoa/NSObjCRuntimeSPI.h:
  • Fix internal Catalina builds by including NSObjCRuntime_Private.h, but falling through to define NS_DIRECT and NS_DIRECT_MEMBERS if they weren't defined in the private header.

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

12:40 PM Changeset in webkit [285301] by Russell Epstein
  • 5 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r285165. rdar://problem/84908023

Revert the wheel event coalescing added in r277587
https://bugs.webkit.org/show_bug.cgi?id=232602
<rdar://84908023>

Reviewed by Wenson Hsieh.

This wheel event coalescing was added to allow the tail end of momentum scrolls on
120Hz devices to fall back to 60fps for power reasons. However, the OS does this for
us, so we don't need to do our own coalescing.

  • Shared/WebWheelEventCoalescer.cpp: (WebKit::WebWheelEventCoalescer::shouldDispatchEvent): (WebKit::WebWheelEventCoalescer::isMomentumPhaseEvent): Deleted.
  • Shared/WebWheelEventCoalescer.h: (WebKit::WebWheelEventCoalescer::shouldCoalesceEventsDuringDeceleration const): Deleted. (WebKit::WebWheelEventCoalescer::setShouldCoalesceEventsDuringDeceleration): Deleted. (): Deleted.
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::wheelEventCoalescer): (WebKit::WebPageProxy::windowScreenDidChange): (WebKit::WebPageProxy::shouldCoalesceWheelEventsDuringDeceleration const): Deleted.
  • UIProcess/WebPageProxy.h:

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

12:40 PM Changeset in webkit [285300] by Russell Epstein
  • 7 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r285149. rdar://problem/81217357

[JSC] LLIntCallee should have two replacements
https://bugs.webkit.org/show_bug.cgi?id=228552
rdar://81217357

Reviewed by Saam Barati.

LLIntCallee can be used for signaling memory and bounds-checking memory.
Thus it should have two replacements for each mode.

  • wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::work):
  • wasm/WasmCallee.h: (JSC::Wasm::Callee::setOSREntryCallee):
  • wasm/WasmOMGForOSREntryPlan.cpp: (JSC::Wasm::OMGForOSREntryPlan::work):
  • wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::work):
  • wasm/WasmPlan.cpp: (JSC::Wasm::Plan::updateCallSitesToCallUs):
  • wasm/WasmSlowPaths.cpp: (JSC::LLInt::jitCompileAndSetHeuristics): (JSC::LLInt::WASM_SLOW_PATH_DECL):

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

12:40 PM Changeset in webkit [285299] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebKitLegacy/mac

Cherry-pick r285148. rdar://problem/81053743

Make WebChromeClient's m_webView pointer weak.
https://bugs.webkit.org/show_bug.cgi?id=232588

Reviewed by David Kilzer.

  • WebCoreSupport/WebChromeClient.h:

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

12:40 PM Changeset in webkit [285298] by Russell Epstein
  • 8 edits
    5 adds in branches/safari-612-branch

Cherry-pick r285117. rdar://problem/84402043

JSGenericTypedArrayView<Adaptor>::set crashes if the length + objectOffset is > UINT32_MAX
https://bugs.webkit.org/show_bug.cgi?id=231975
rdar://84402043

Reviewed by Yusuke Suzuki.

JSTests:

  • regress-84402043 is the testcase that revealed the problem.
  • typed-array-set-large(-offset) test the same function, in the typed-array to typed-array case
  • typed-array-large-slice tests the only caller that passes a non-0 objectOffset, and found other issues with it
  • typed-array-large-oob-eventually-not.js is just another test of the Wasm4GB change that I had forgotten to commit
  • stress/regress-84402043.js: Added.
  • stress/typed-array-large-oob-eventually-not.js: Added. (test):
  • stress/typed-array-large-slice.js: Added. (expect):
  • stress/typed-array-set-large-offset.js: Added.
  • stress/typed-array-set-large.js: Added.

Source/JavaScriptCore:

UINT_MAX (and anything above it) is not a valid array index, so we cannot use JSObject::get(JSGlobalObject*, unsigned) with an index that big.
This was pointed by Yusuke in his review of my recent patch that introduced the problem (https://bugs.webkit.org/show_bug.cgi?id=229353#c21),
but I misunderstood the code and thought we could never get values that big at that point, thus only putting a RELEASE_ASSERT.
In this patch I instead apply his original suggestion to have a first loop using the (fast) JSObject::get(),
and a second loop for any large indices, using a slower but safe code path.

I also fixed an unrelated bug I noticed in Clobberize/AbstractInterpreter while testing the rest of the patch:
they were not aware that NewTypedArray can take a Int52RepUse child.

Finally, while trying to properly test this change, I discovered that genericTypedArrayViewProtoFuncSlice
(which is the only caller of JSGenericTypedArrayView<Adaptor>::set which passes it a non-0 objectOffset)
was still using unsigned everywhere instead of size_t, and that the same was true of all other functions in the same file.
So I fixed it in the same patch.

  • dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
  • dfg/DFGClobberize.h: (JSC::DFG::clobberize):
  • runtime/JSArrayBufferConstructor.cpp: (JSC::JSGenericArrayBufferConstructor<sharingMode>::constructImpl):
  • runtime/JSGenericTypedArrayViewConstructorInlines.h: (JSC::constructGenericTypedArrayViewImpl):
  • runtime/JSGenericTypedArrayViewInlines.h: (JSC::JSGenericTypedArrayView<Adaptor>::set):
  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h: (JSC::argumentClampedIndexFromStartOrEnd): (JSC::genericTypedArrayViewProtoFuncSet): (JSC::genericTypedArrayViewProtoFuncCopyWithin): (JSC::genericTypedArrayViewProtoFuncIncludes): (JSC::genericTypedArrayViewProtoFuncIndexOf): (JSC::genericTypedArrayViewProtoFuncJoin): (JSC::genericTypedArrayViewProtoFuncFill): (JSC::genericTypedArrayViewProtoFuncLastIndexOf): (JSC::genericTypedArrayViewProtoFuncSlice): (JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):

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

12:40 PM Changeset in webkit [285297] by Russell Epstein
  • 13 edits
    2 adds in branches/safari-612-branch

Cherry-pick r285089. rdar://problem/84522357

Layer tree should not be stuck in frozen state after explicitly stopping a page load
https://bugs.webkit.org/show_bug.cgi?id=232532
rdar://84522357

Reviewed by Tim Horton.

Source/WebCore:

Add WEBCORE_EXPORT to a method. See WebKit/ChangeLog for more details.

Test: http/tests/navigation/unfreeze-layer-tree-after-stopping-load.html

  • loader/FrameLoader.h:

Source/WebKit:

From diagnostic logs gathered in rdar://84522357, it's apparently possible for the layer tree to be stuck in a
state where it's indefinitely frozen after the user explicitly stops the page load (e.g. by tapping on the "x"
button in Safari). Specifically, these logs indicate that the PageTransition layer tree freeze reason may
persist even after the user has canceled the load, leading to situations where content may be visible but
unresponsive.

From code inspection, this may happen for multiple reasons, one of which is that a media element has incremented
the load event delay count, which in turn prevents us from transitioning to completed state inside
FrameLoader::checkLoadCompleteForThisFrame(). It's unknown whether this (in particular) is the cause of
unresponsiveness observed by the reporter of rdar://84522357, but we can at least use this in order to come up
with a layout test; to mitigate all instances where the PageTransition reason may persist after the load has
been stopped, we make WebPage::stopLoading() complete the page transition (thereby lifting the freeze reason)
if needed.

  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::stopLoading):

Tools:

Add support for TestRunner.stopLoading(), which immediately stops the page load, emulating what would normally
happen if the user taps or clicks the "x" button to cancel loading in Safari. See the layout test for more
details.

  • DumpRenderTree/TestRunner.cpp: (stopLoadingCallback): (TestRunner::staticFunctions):
  • DumpRenderTree/TestRunner.h:
  • DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::stopLoading):
  • DumpRenderTree/win/TestRunnerWin.cpp: (TestRunner::stopLoading):
  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::stopLoading):
  • WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

Add a test that verifies that a requestAnimationFrame() callback fires even after stopping page load. This
test fails without the fix in this patch, since the layer tree ends up in a permanently frozen state.

  • http/tests/navigation/unfreeze-layer-tree-after-stopping-load-expected.txt: Added.
  • http/tests/navigation/unfreeze-layer-tree-after-stopping-load.html: Added.

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

12:40 PM Changeset in webkit [285296] by Russell Epstein
  • 5 edits in branches/safari-612-branch

Cherry-pick r285080. rdar://problem/84811692

[iOS 15] Loads after WKWebView session restore are marked as app-initiated
https://bugs.webkit.org/show_bug.cgi?id=232486
<rdar://problem/84811692>

Reviewed by Brent Fulgham.

Source/WebKit:

Return app initiated value in the page's SessionState so it can be restored
by third party apps using the [WKWebView setInteractionState] API.

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::sessionState const):
  • UIProcess/mac/LegacySessionStateCoding.cpp: (WebKit::encodeLegacySessionState): (WebKit::decodeLegacySessionState):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:

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

12:40 PM Changeset in webkit [285295] by Russell Epstein
  • 10 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r285069. rdar://problem/84558835

Have PlatformMediaResourceClient use SharedBuffer
https://bugs.webkit.org/show_bug.cgi?id=232422
rdar://84558835

Reviewed by Alex Christensen.

When playing a non-mse media element, the download gets controlled by a
MediaResource into a WebCoreNSURLSession to be used by the media framework.
The data got copied at least three times along the way due to the
multi-threaded nature of the framework and the need for thread
safety.
The situation was made worse when the content server didn't support
range-request: as a RangeResponseGenerator is then used by the
WebCoreNSURLSession which downloads the entire media to be played and
keep it in memory.

By modifying the various actors between a MediaResource and WebCoreNSURLSession
to use SharedBuffers ; we can remove most copies and allocation.
This also completely eliminates the need for new memory buffer allocations and
copies by the RangeResponseGenerator object.

With WK2 and the GPU process, it allows for the memory to be allocated once
and only be assigned to the content process by using SharedMemory wrapped
in a SharedBuffer.

In the future, by refactoring CachedRawResourceClient to use SharedBuffers,
we could remove further allocation/copies. We could likely get the data from the
network process all the way to the final client in the GPU process without
a single copy. This is tracked in bug 232424.

No change in observable behaviour. Covered by all the existing media tests.

  • platform/SharedBuffer.cpp: (WebCore::SharedBufferDataView::size const): (WebCore::SharedBufferDataView::trim): Add ability to trim a SharedBufferDataView. This allows to avoid having to copy into a new buffer. (WebCore::SharedBufferDataView::createSharedBuffer const): Cross declarations makes it difficult to add a new SharedBuffer constructor that would take a SharedBufferDataView.
  • platform/SharedBuffer.h: Add new methods.
  • platform/cocoa/SharedBufferCocoa.mm: Update to allow for end trimming information. (-[WebCoreSharedBufferData initWithDataSegment:position:endTrim:]): (-[WebCoreSharedBufferData length]): (WebCore::SharedBuffer::DataSegment::createNSData const): (WebCore::SharedBufferDataView::createNSData const): (-[WebCoreSharedBufferData initWithDataSegment:position:]): Deleted.
  • platform/graphics/PlatformMediaResourceLoader.h: (WebCore::PlatformMediaResourceClient::dataReceived): Add a new API using a SharedBuffer. We keep the old one taking a pointer/size due to a WebKit implementation details which allows us to save an intermediary allocation/copy when used with SharedMemory.
  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: (WebCore::PlatformResourceMediaLoader::dataReceived):
  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (CachedResourceStreamingClient::dataReceived): Update to use SharedBuffer.
  • platform/network/cocoa/RangeResponseGenerator.mm: (WebCore::RangeResponseGenerator::giveResponseToTaskIfBytesInRangeReceived):
  • platform/network/cocoa/WebCoreNSURLSession.h: Change prototypes. Fly-by fix, property countOfBytesReceived needed to be atomic.
  • platform/network/cocoa/WebCoreNSURLSession.mm: (WebCore::WebCoreNSURLSessionDataTaskClient::dataReceived): (-[WebCoreNSURLSessionDataTask resource:receivedData:]): (-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:completionHandler:]):

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

12:39 PM Changeset in webkit [285294] by Russell Epstein
  • 5 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r285004. rdar://problem/84778008

Don't call type() on Structure, instead call type() on its typeInfo()
https://bugs.webkit.org/show_bug.cgi?id=232414

Reviewed by Yusuke Suzuki.

  • dfg/DFGOperations.cpp: (JSC::DFG::JSC_DEFINE_JIT_OPERATION):
  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::emitAllocateRawObject):
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
  • runtime/Structure.h: (JSC::Structure::type):

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

12:39 PM Changeset in webkit [285293] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r284924. rdar://problem/83455472

REGRESSION (iOS 15): Touch events are not fired during quick successive taps
https://bugs.webkit.org/show_bug.cgi?id=232324
rdar://83455472

Reviewed by Wenson Hsieh.

To support Live Text on iOS 15, two new gesture recognizers were added
to WKContentView. When the gesture recognizers were added,
-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]
was not updated, resulting in a failure dependency between the new gesture
recognizers and the touchstart deferring gesture recognizer for "immediately
resettable" gestures.

The failure dependency causes the entire "immediately resettable" subgraph
(which contains UIWebTouchEventsGestureRecognizer) to have a delayed reset,
as the new gestures recognizers are connected to the "delayed resettable"
subgraph by way of UIKit's exclusion gestures that control context menu
presentation. The delayed reset prevents successive touches from being
recognized, and touch events are only recognized after the delay has
passed. Consequently, quick successive taps result in some touch events
being dropped.

To fix, remove the existing failure dependency and instead add an explicit
failure dependency to the "delayed resettable" subgraph. This ensures the
immediately resettable subgraph can reset as intended.

No new tests, as the issue has been difficult to reproduce in WebKitTestRunner,
even though it reproduces consistently in Safari. Filed webkit.org/b/232326
as a follow-up to investigate a testing strategy.

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

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

12:39 PM Changeset in webkit [285292] by Russell Epstein
  • 3 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r284889. rdar://problem/82671325

REGRESSION (r281054): [iOS] Context menu presents from wrong location when long pressing a link in Mail
https://bugs.webkit.org/show_bug.cgi?id=232287
rdar://82671325

Reviewed by Tim Horton.

In the case where the WebKit client isn't overriding the context menu configuration via WebKit context menu UI
delegate methods, _contextMenuElementInfo on WKContentView will end up being nil while presenting the context
menu via long press.

After the changes in r281054, this means that when the last view is removed from our WKTargetedPreviewContainer,
we'll unparent WKTargetedPreviewContainer too early, since _contextMenuElementInfo won't prevent us from
bailing in -_removeContextMenuHintContainerIfPossible. To fix this, we add a boolean flag to track when the
context menu presentation animation is running, and avoid unparenting the preview container if the flag is set.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setUpInteraction]): (-[WKContentView _removeContextMenuHintContainerIfPossible]): (-[WKContentView _contentsOfUserInterfaceItem:]): (-[WKContentView contextMenuInteraction:willDisplayMenuForConfiguration:animator:]):

To test this change, add an assertion that fires if the context menu preview hint container has already been
unparented by the time we've presented the context menu. This assertion already fires during the extant layout
test fast/events/touch/ios/long-press-on-link.html, which technically exhibits the bug (albeit in a more subtle
way).

(-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]):

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

12:39 PM Changeset in webkit [285291] by Russell Epstein
  • 4 edits in branches/safari-612-branch

Cherry-pick r284875. rdar://problem/84597422

[ App Privacy Report ] Restoring a session after clearing the cache results in app initiated loads in Safari
https://bugs.webkit.org/show_bug.cgi?id=232292
<rdar://problem/84597422>

Reviewed by Brent Fulgham.

Source/WebKit:

Update session restore code to also set the app initiated value on
the current document loader. Previously, this was only set on the new
document loader. This is a problem because the main resource load
uses the old document loader, so if we restore from a previous session
state, the main resource load will have the incorrect attribution
value.

  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::goToBackForwardItem):

Tools:

Update API test in 2 ways. First, close the original WebView to
destroy the page's document loader as if the application was being
quit. Second, clear history to make sure there are no cached loads.

  • TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:

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

12:39 PM Changeset in webkit [285290] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-612-branch

Cherry-pick r284853. rdar://problem/84516016

Fix issue for transform-origin in SVG
https://bugs.webkit.org/show_bug.cgi?id=232189

Patch by Nikolaos Mouchtaris <Nikos Mouchtaris> on 2021-10-25
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/svg/styling/render/transform-origin-not-explicit-style-ref.svg: Added.
  • web-platform-tests/svg/styling/render/transform-origin-not-explicit-style.svg: Added.

Source/WebCore:

Add temp fix to use previously ignored transform-origin in SVGGraphicsElement::animatedLocalTransform
if not explicitly set in style. Proper fix to come: https://bugs.webkit.org/show_bug.cgi?id=232128.

Tests: imported/w3c/web-platform-tests/svg/styling/render/transform-origin-not-explicit-style-ref.svg

imported/w3c/web-platform-tests/svg/styling/render/transform-origin-not-explicit-style.svg

  • svg/SVGGraphicsElement.cpp: (WebCore::SVGGraphicsElement::animatedLocalTransform const):

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

12:39 PM Changeset in webkit [285289] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-612-branch

Cherry-pick r284849. rdar://problem/84066469

REGRESSION (iOS 15), safari604.1: Could not link the shader program
https://bugs.webkit.org/show_bug.cgi?id=231475

Renaming regex incorrectly substituted an attribute.
Update to require exact attribute match

Source/ThirdParty/ANGLE:

Reviewed by Dean Jackson

  • src/libANGLE/renderer/metal/mtl_glslang_mtl_utils.mm: (rx::mtl::updateShaderAttributes):

LayoutTests:

Add test to expose bug, verify test passes

Reviewed by Dean Jackson.

  • fast/canvas/webgl/attrib-name-aliasing-bug-expected.txt: Added.
  • fast/canvas/webgl/attrib-name-aliasing-bug.html: Added.

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

12:39 PM Changeset in webkit [285288] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-612-branch

Cherry-pick r284740. rdar://problem/83628607

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

Reviewed by Simon Fraser.

Source/WebCore:

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

The fix is:

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

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

  • svg/graphics/SVGImage.cpp: (WebCore::SVGImage::drawAsNativeImage):

LayoutTests:

  • fast/canvas/canvas-draw-large-svg-image-expected.html: Added.
  • fast/canvas/canvas-draw-large-svg-image.html: Added.

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

12:39 PM Changeset in webkit [285287] by Russell Epstein
  • 3 edits
    1 add in branches/safari-612-branch

Cherry-pick r284716. rdar://problem/84366658

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

Reviewed by Robin Morisset.

JSTests:

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

Source/JavaScriptCore:

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

  • dfg/DFGSSALoweringPhase.cpp: (JSC::DFG::SSALoweringPhase::handleNode): (JSC::DFG::SSALoweringPhase::lowerBoundsCheck):

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

12:39 PM Changeset in webkit [285286] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r284694. rdar://problem/79244664

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

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

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

  • platform/network/cocoa/RangeResponseGenerator.mm:

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

12:39 PM Changeset in webkit [285285] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r284689. rdar://problem/83692944

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

Reviewed by Eric Carlson.

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

Manually tested.

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:

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

12:39 PM Changeset in webkit [285284] by Russell Epstein
  • 5 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r284646. rdar://problem/84523973

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

Reviewed by Robin Morisset.

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

  • dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode):
  • dfg/DFGNodeType.h:
  • dfg/DFGSSALoweringPhase.cpp: (JSC::DFG::SSALoweringPhase::handleNode): (JSC::DFG::SSALoweringPhase::lowerBoundsCheck):
  • dfg/DFGValidate.cpp:

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

12:39 PM Changeset in webkit [285283] by Russell Epstein
  • 3 edits
    1 add in branches/safari-612-branch

Cherry-pick r284635. rdar://problem/84455814

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

Reviewed by Saam Barati.

JSTests:

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

Source/JavaScriptCore:

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

  • dfg/DFGSSALoweringPhase.cpp: (JSC::DFG::SSALoweringPhase::handleNode):

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

12:39 PM Changeset in webkit [285282] by Russell Epstein
  • 10 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r284513. rdar://problem/84441842

Address post-landing feedback to wasm exceptions
https://bugs.webkit.org/show_bug.cgi?id=231973

Reviewed by Saam Barati.

Address comments left by Saam in https://bugs.webkit.org/show_bug.cgi?id=229681
after the patch landed. This includes deleting some unused code, and renaming a
couple variables and methods, but the biggest change is copying the callee saves
to VMEntry in the llint rethrow.

  • interpreter/Interpreter.cpp: (JSC::CatchInfo::CatchInfo): (JSC::UnwindFunctor::operator() const):
  • interpreter/Interpreter.h: (JSC::CatchInfo::CatchInfo): Deleted.
  • jit/JSInterfaceJIT.h: (JSC::JSInterfaceJIT::convertCalleeToVM): Deleted.
  • llint/WebAssembly.asm:
  • wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::B3IRGenerator::ControlData::ControlData): (JSC::Wasm::B3IRGenerator::ControlData::tryDepth const): (JSC::Wasm::B3IRGenerator::connectControlAtEntrypoint): (JSC::Wasm::B3IRGenerator::addLoop): (JSC::Wasm::B3IRGenerator::addTry): (JSC::Wasm::B3IRGenerator::preparePatchpointForExceptions): (JSC::Wasm::B3IRGenerator::emitCatchImpl): (JSC::Wasm::B3IRGenerator::addDelegateToUnreachable): (JSC::Wasm::B3IRGenerator::addThrow): (JSC::Wasm::B3IRGenerator::addRethrow): (JSC::Wasm::B3IRGenerator::addEndToUnreachable): (JSC::Wasm::B3IRGenerator::connectControlEntry): Deleted.
  • wasm/WasmCallee.h: (JSC::Wasm::Callee::llintFunctionCodeBlock const): (JSC::Wasm::Callee::functionCodeBlock const): Deleted.
  • wasm/WasmLLIntGenerator.cpp: (JSC::Wasm::LLIntGenerator::unifyValuesWithBlock): (JSC::Wasm::LLIntGenerator::addTry): (JSC::Wasm::LLIntGenerator::addThrow): (JSC::Wasm::LLIntGenerator::repatch): Deleted.
  • wasm/WasmOperations.cpp: (JSC::Wasm::JSC_DEFINE_JIT_OPERATION):
  • wasm/WasmOperations.h:

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

12:39 PM Changeset in webkit [285281] by Russell Epstein
  • 9 edits
    1 add in branches/safari-612-branch/Source/WebCore

Cherry-pick r284163. rdar://problem/84129338

WebCore::CaptionUserPreferencesMediaAF should use a weak observer with CFNotificationCenter
<https://webkit.org/b/231550>
<rdar://problem/84129338>

Reviewed by Darin Adler.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • Add CaptionUserPreferencesMediaAF.mm.
  • page/CaptionUserPreferences.cpp: (WebCore::CaptionUserPreferences::create): Add.
  • page/CaptionUserPreferences.h: (WebCore::CaptionUserPreferences):
  • Make subclass of RefCounted<> and CanMakeWeakPtr<>. (WebCore::CaptionUserPreferences::create): Add. (WebCore::CaptionUserPreferences::CaptionUserPreferences):
  • Move constructor to protected visiblity with explicit keyword, and add static create() method.
  • page/CaptionUserPreferencesMediaAF.cpp: (WebCore::userCaptionPreferencesChangedNotificationCallback):
  • Update to use extractCaptionUserPreferencesMediaAF() for Cococa platforms. Note that -> is used for two different userPreferences variable types based on the platform. (WebCore::CaptionUserPreferencesMediaAF::create): Add. (WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF):
  • Move initialization of m_listeningForPreferenceChanges to class definition. (WebCore::CaptionUserPreferencesMediaAF::~CaptionUserPreferencesMediaAF):
  • Update to use m_weakObserver as observer for Cocoa platforms. (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):
  • Update to use m_weakObserver as observer and _CFNotificationObserverIsObjC in suspension behavior for Cocoa platforms.
  • page/CaptionUserPreferencesMediaAF.h: (WebCore::CaptionUserPreferencesMediaAF::create): Add. (WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF):
  • Move constructor to private visiblity, and add static create() method. (WebCore::CaptionUserPreferencesMediaAF::extractCaptionUserPreferencesMediaAF): Add. (WebCore::CaptionUserPreferencesMediaAF::createWeakObserver): Add. (WebCore::CaptionUserPreferencesMediaAF::m_weakObserver):
  • Add m_weakObserver instance variable for use with CFNotificationCenter. (WebCore::CaptionUserPreferencesMediaAF::m_listeningForPreferenceChanges):
  • Move initialization of m_listeningForPreferenceChanges here from the constructor.
  • page/cocoa/CaptionUserPreferencesMediaAFCocoa.mm: Add. (-[WebCaptionUserPreferencesMediaAFWeakObserver initWithWeakPtr:]): (-[WebCaptionUserPreferencesMediaAFWeakObserver userPreferences]):
  • Declare and implement WebCaptionUserPreferencesMediaAFWeakObserver class for use as a weak CFNotificationCenter observer. (WebCore::CaptionUserPreferencesMediaAF::createWeakObserver): Add.
  • Helper method to call from C++ that creates weak observer object from Objective-C++. (WebCore::CaptionUserPreferencesMediaAF::extractCaptionUserPreferencesMediaAF): Add.
  • Helper method to extract RefPtr<CaptionUserPreferencesMediaAF> from CFNotification observer parameter.
  • page/PageGroup.cpp: (WebCore::PageGroup::ensureCaptionPreferences):
  • Switch to using new create() methods.
  • page/PageGroup.h: (WebCore::PageGroup::m_captionPreferences):
  • Change from std::unique_ptr<> to RefPtr<>.

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

12:39 PM Changeset in webkit [285280] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r284036. rdar://problem/84167629

Fix spec-correctness when inlining proto intrinsic using get_by_id_with_this
https://bugs.webkit.org/show_bug.cgi?id=231559

Reviewed by Yusuke Suzuki.

My original fix in r283512 has some theoretical spec correctness issues.
I'm not sure if they can be materialized or not since we only use
get_by_id_with_this in very limited scenarios. However, this patch just
makes it so we call the getter instead of attempting to inline it
when using get_by_id_with_this.

  • jit/AssemblyHelpers.cpp: (JSC::AssemblyHelpers::emitLoadPrototypeWithoutCheck): Deleted.
  • jit/AssemblyHelpers.h:
  • jit/IntrinsicEmitter.cpp: (JSC::IntrinsicGetterAccessCase::canEmitIntrinsicGetter): (JSC::IntrinsicGetterAccessCase::emitIntrinsicGetter):

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

12:39 PM Changeset in webkit [285279] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r283886. rdar://problem/83743661

[iOS] Add message filter in the WebContent process' sandbox
https://bugs.webkit.org/show_bug.cgi?id=231046
<rdar://problem/83743661>

Reviewed by Brent Fulgham.

Add IOKit message filter in the WebContent process' sandbox on iOS.

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

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

12:39 PM Changeset in webkit [285278] by Russell Epstein
  • 7 edits
    5 adds in branches/safari-612-branch

Cherry-pick r283803. rdar://problem/83823282

REGRESSION (r277818): XHR with requestType document broken for larger HTML files
https://bugs.webkit.org/show_bug.cgi?id=231138
<rdar://problem/83823282>

Reviewed by Darin Adler.

Source/WebCore:

The parser may end up yielding during XHR or DOMParser parsing even though those should be
synchronous. This appears to be a long standing bug that was made more visible by r277818
because it makes the parser yield more eagerly. This only affects cases where the document
being parsed contains <script> tags as those are considered potential yield points.

Tests: http/tests/xmlhttprequest/xhr-and-parse-large-document.html

http/tests/xmlhttprequest/xhr-large-document.html

  • dom/Document.cpp: (WebCore::Document::setContent):

Explicitly parse synchronously. The comment was wrong, nothing forces parser flushing on close().

  • dom/DocumentParser.h: (WebCore::DocumentParser::appendSynchronously):
  • html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::append): (WebCore::HTMLDocumentParser::appendSynchronously):
  • html/parser/HTMLDocumentParser.h:
  • html/parser/HTMLParserScheduler.cpp: (WebCore::HTMLParserScheduler::shouldYieldBeforeExecutingScript):

Also avoid script yielding if script execution is not allowed.

LayoutTests:

  • http/tests/xmlhttprequest/resources/large-html-with-script-tags.py: Added.
  • http/tests/xmlhttprequest/xhr-and-parse-large-document-expected.txt: Added.
  • http/tests/xmlhttprequest/xhr-and-parse-large-document.html: Added.
  • http/tests/xmlhttprequest/xhr-large-document-expected.txt: Added.
  • http/tests/xmlhttprequest/xhr-large-document.html: Added.

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

12:38 PM Changeset in webkit [285277] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r283498. rdar://problem/83732537

Unreviewed maccatalyst build fix.

  • platform/audio/ios/AudioSessionIOS.mm: (WebCore::AudioSessionIOS::setHostProcessAttribution):

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

12:38 PM Changeset in webkit [285276] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebCore/PAL

Cherry-pick r283480. rdar://problem/83732537

Build fix: GPU Process microphone attribution SPI adoption
<https://bugs.webkit.org/show_bug.cgi?id=231034>
<rdar://problem/83732537>

  • pal/spi/cocoa/AVFoundationSPI.h: (-[AVAudioSession setHostProcessAttribution:error:]):
  • Add SPI declaration for open source bots.

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

12:38 PM Changeset in webkit [285275] by Russell Epstein
  • 11 edits in branches/safari-612-branch/Source

Cherry-pick r283394. rdar://problem/83732537

GPU Process microphone attribution SPI adoption
https://bugs.webkit.org/show_bug.cgi?id=231034
<rdar://problem/83732537>

Reviewed by Youenn Fablet.

Source/WebCore:

No new tests. Tested manually by inspecting APR JSON files.

  • platform/audio/AudioSession.h:
  • platform/audio/ios/AudioSessionIOS.h:
  • platform/audio/ios/AudioSessionIOS.mm: (WebCore::AudioSessionIOS::setHostProcessAttribution):

Source/WebCore/PAL:

  • pal/spi/cocoa/LaunchServicesSPI.h:

Source/WebKit:

Adopt SPI for App Privacy Report that attributes mic capture to the
host app.

  • GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::audioSessionProxy):
  • GPUProcess/media/RemoteAudioSessionProxyManager.cpp: (WebKit::RemoteAudioSessionProxyManager::addProxy):
  • GPUProcess/media/RemoteAudioSessionProxyManager.h:
  • Scripts/process-entitlements.sh:

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

12:38 PM Changeset in webkit [285274] by Russell Epstein
  • 9 edits
    3 adds in branches/safari-612-branch

Cherry-pick r282632. rdar://problem/83067708

WebKit::WebProcessPool should use a weak observer with CFNotificationCenter
<https://webkit.org/b/230227>
<rdar://problem/83067708>

Reviewed by Darin Adler.

Source/WebKit:

To fix the bug, implement an Objective-C class named
WKProcessPoolWeakObserver which contains an instance variable
holding a WeakPtr<WebProcessPool>, and tell CFNotificationCenter
to hold a weak reference to WKProcessPoolWeakObserver.

Since WKProcessPoolWeakObserver is self-contained within the
source file, it uses the NS_DIRECT_MEMBERS attribute since it
does not require the overhead of dynamic Objective-C method
dispatch.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (-[WKProcessPoolWeakObserver initWithWeakPtr:]): Add. (-[WKProcessPoolWeakObserver pool]): Add.
  • Implement WKProcessPoolWeakObserver class.
  • Note that init methods can never be marked as NS_DIRECT, and @property statements can't use NS_DIRECT in their declaration, so the @property is declared in a category which uses NS_DIRECT_MEMBERS. (WebKit::extractWebProcessPool): Add.
  • Static helper method for extracting RefPtr<WebProcessPool> from type-punned WKProcessPoolWeakObserver. (WebKit::WebProcessPool::backlightLevelDidChangeCallback): (WebKit::WebProcessPool::accessibilityPreferencesChangedCallback): (WebKit::WebProcessPool::mediaAccessibilityPreferencesChangedCallback): (WebKit::WebProcessPool::colorPreferencesDidChangeCallback): (WebKit::WebProcessPool::remoteWebInspectorEnabledCallback):
  • Clean up function parameter list.
  • Use extractWebProcessPool() helper method to get a RefPtr<WebProcessPool> from observer. (WebKit::WebProcessPool::addCFNotificationObserver): Add. (WebKit::WebProcessPool::removeCFNotificationObserver): Add.
  • Private helper methods to reduce duplicate code.
  • Use m_weakObserver for CFNotificationCenter observer and include _CFNotificationObserverIsObjC to fix the bug. (WebKit::WebProcessPool::registerNotificationObservers):
  • Make use of new addCFNotificationObserver() helper method.
  • Fixes use of static_cast<CFStringRef> to make code ready for ARC by using a bridge cast or removing the static_cast when CFSTR() is used. (WebKit::WebProcessPool::unregisterNotificationObservers):
  • Make use of new removeCFNotificationObserver() helper method.
  • UIProcess/WebProcessPool.h:
  • Add m_weakObserver instance variable to hold the WKProcessPoolWeakObserver object. (WebKit::WebProcessPool::addCFNotificationObserver): Add. (WebKit::WebProcessPool::removeCFNotificationObserver): Add.
  • Add declarations for new helper methods. (WebKit::WebProcessPool::backlightLevelDidChangeCallback): (WebKit::WebProcessPool::accessibilityPreferencesChangedCallback): (WebKit::WebProcessPool::mediaAccessibilityPreferencesChangedCallback): (WebKit::WebProcessPool::colorPreferencesDidChangeCallback): (WebKit::WebProcessPool::remoteWebInspectorEnabledCallback):
  • Clean up function parameter list.

Source/WTF:

Tests (API):

TestWTF.TypeCastsNS.checked_ns_cast
TestWTF.TypeCastsNS.dynamic_ns_cast
TestWTF.TypeCastsNS.dynamic_ns_cast_RetainPtr

  • WTF.xcodeproj/project.pbxproj:
  • wtf/PlatformMac.cmake:
  • Add new header files to the project.
  • wtf/cocoa/TypeCastsNS.h: Add. (WTF::checked_ns_cast): (WTF::dynamic_ns_cast):
  • Add casts for NS objects similar to TypeCastsCF.h.
  • wtf/PlatformHave.h: (HAVE_NS_DIRECT_SUPPORT): Add.
  • Note that clang for macOS 11 Big Sur claims to know about the attributes, but will fail to compile if they are actually used.
  • wtf/spi/cocoa/NSObjCRuntimeSPI.h: Add. (NS_DIRECT): (NS_DIRECT_MEMBERS):
  • Define compiler attributes for direct dispatch of Objective-C methods.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • Add TypeCastsNS.mm to the project.
  • TestWebKitAPI/Tests/WTF/cocoa/TypeCastsNS.mm: Add. (TestWebKitAPI::TEST): Add tests for <wtf/TypeCastsNS.h>.

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

12:38 PM Changeset in webkit [285273] by Russell Epstein
  • 6 edits
    1 add in branches/safari-612-branch/Source

Cherry-pick r282313. rdar://problem/82987695

CFNotificationCenterAddObserver() should use weak observers
<https://webkit.org/b/230168>
<rdar://problem/82987695>

Reviewed by Darin Adler.

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • Add CFNotificationCenterSPI.h to the project.
  • pal/spi/cf/CFNotificationCenterSPI.h: Add.

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebView.mm: (hardwareKeyboardAvailabilityChangedCallback):
  • Use RetainPtr to store observer for the duration of the function, and add an early return if it is nil. (-[WKWebView _initializeWithConfiguration:]):
  • Use _CFNotificationObserverIsObjC to fix the bug.
  • Extract local variables and change notificationName cast to be ARC-ready. Remove notificationName from autoreleasePool. (-[WKWebView dealloc]):
  • Extract local variable and change notificationName cast to be ARC-ready. Remove notificationName from autoreleasePool.

Source/WebKitLegacy/mac:

  • WebView/WebHTMLView.mm: (hardwareKeyboardAvailabilityChangedCallback):
  • Modernize syntax for WeakObjCPtr constructor. (-[WebHTMLView initWithFrame:]):
  • Use _CFNotificationObserverIsObjC to fix the bug.
  • Extract local variables and change notificationName cast to be ARC-ready. Remove notificationName from autoreleasePool. (-[WebHTMLView dealloc]):
  • Extract local variable and change notificationName cast to be ARC-ready. Remove notificationName from autoreleasePool.

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

11:44 AM Changeset in webkit [285272] by Jonathan Bedard
  • 9 edits
    2 adds in trunk/Tools

[git-webkit] Add land command
https://bugs.webkit.org/show_bug.cgi?id=231821
<rdar://problem/84309339>

Reviewed by Dewei Zhu.

  • Tools/Scripts/git-webkit: WebKit still uses Svn as it's canonical source of truth.
  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git._to_git_ref): Convert identifiers or revisions to git refs.
(Git.checkout): Use shared _to_git_ref function.
(Git.rebase): Support rebasing identifiers.
(Git.pull): Generalize computation of the gmtoffset.
(Git.diff_lines): Output diff between two refs.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:

(Git.init): Add branch, push and diff commands.
(Git.filter_branch): Support sed.
(Git.pull): Mock git pull
(Git.move_branch): Mock git rebase.
(Git.push): Mock git push.
(Git.reset): Mock git reset HEAD~#.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/init.py:

(main): Add land command.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py: Added.

(Land.parser):
(Land.main): Rebase the current branch against it's root, assign the reviewer, check for 'OOPS' messages,
rebase against target branch, update target branch ref, optionally canonicalize, push (or svn dcommit) and
update and close pull-request with information on the landed commit.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py:

(ScmBase.gmtoffset): Add shared computation of GMT offset.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:

(TestGit.test_commits): git log should exclude base ref.
(TestGit.test_commits_branch): Ditto.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/land_unittest.py: Added.

(repository):
(TestLand):
(TestLandGitHub):
(TestLandBitBucket):

Canonical link: https://commits.webkit.org/243883@main

11:15 AM Changeset in webkit [285271] by Jonathan Bedard
  • 4 edits in trunk/Tools

[generate-webkit-css-docs] Change shebang to Python 3
https://bugs.webkit.org/show_bug.cgi?id=232714
<rdar://problem/85019719>

Reviewed by Ryan Haddad.

  • Tools/Scripts/libraries/resultsdbpy/resultsdbpy/init.py: Bump version.
  • Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/library/css/generate-webkit-css-docs: Use Python 3 shebang.
  • Tools/Scripts/libraries/resultsdbpy/setup.py: Bump version.

Canonical link: https://commits.webkit.org/243882@main

11:10 AM Changeset in webkit [285270] by Jonathan Bedard
  • 2 edits in trunk/Tools

[run-webkit-websocketserver] Replace /usr/bin/python with /usr/bin/env python
https://bugs.webkit.org/show_bug.cgi?id=232713
<rdar://problem/85019074>

Reviewed by Ryan Haddad.

  • Scripts/run-webkit-websocketserver:

(openWebSocketServer):
(closeWebSocketServer):

Canonical link: https://commits.webkit.org/243881@main

11:06 AM Changeset in webkit [285269] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

Remove isMatchingHostPseudoClass state from ElementRuleCollector
https://bugs.webkit.org/show_bug.cgi?id=232715

Reviewed by Simon Fraser.

Style scope ordinal that we already pass to SelectorChecker contains the same information.

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::match const):

Check the ordinal.

(WebCore::SelectorChecker::matchHostPseudoClass const):

Just check for shadow root as it is hard to reason why the assert is correct.

  • css/SelectorChecker.h:
  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::matchHostPseudoClassRules):
(WebCore::Style::ElementRuleCollector::ruleMatches):

  • style/ElementRuleCollector.h:
10:53 AM Changeset in webkit [285268] by rreapor@apple.com
  • 2 edits in trunk

Update rreapor's status in contributors.json.
https://bugs.webkit.org/show_bug.cgi?id=232685

Reviewed by Aakash Jain.

  • metadata/contributors.json:
10:40 AM Changeset in webkit [285267] by commit-queue@webkit.org
  • 8 edits
    8 adds in trunk/Source/WebKit

[WebAuthn] Implement add/remove_virtual_authenticator for transport=internal
https://bugs.webkit.org/show_bug.cgi?id=232635
<rdar://problem/84942173>

Patch by John Pascoe <J Pascoe> on 2021-11-04
Reviewed by Brent Fulgham.

This change implements much of the plumbing needed to call the virtual authenticator
commands from safaridriver. The idea is that virtual authenticators are added via
the add_virtual_authenticator call, which replaces the default AuthenticatorManager
with a VirtualAuthenticatorManager similar to how we do it for mocks. Then the
VirtualService will create the virtual connections for authenticators as nessesary
to make webauthn calls within WebDriver based tests.

Tested manually via safaridriver.

  • UIProcess/Automation/Automation.json:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::toAuthenticatorTransport):
(WebKit::WebAutomationSession::removeVirtualAuthenticator):
(WebKit::WebAutomationSession::addVirtualAuthenticatorCredential):
(WebKit::WebAutomationSession::removeVirtualAuthenticatorCredential):
(WebKit::WebAutomationSession::removeAllVirtualAuthenticatorCredentials):
(WebKit::WebAutomationSession::setVirtualAuthenticatorUserVerified):

  • UIProcess/Automation/WebAutomationSession.h:

Plumbing to call from safaridriver

  • UIProcess/WebAuthentication/AuthenticatorManager.h:

(WebKit::AuthenticatorManager::isVirtual const):

  • UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorConfiguration.h: Added.
  • UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorManager.cpp: Added.

(WebKit::VirtualAuthenticatorManager::VirtualAuthenticatorManager):
(WebKit::VirtualAuthenticatorManager::createAuthenticator):
(WebKit::VirtualAuthenticatorManager::removeAuthenticator):
(WebKit::VirtualAuthenticatorManager::createService const):
Manages virtual authenticators, replaces the default manager when used similar to MockAuthenticatorManager.

  • UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorManager.h: Added.
  • UIProcess/WebAuthentication/Virtual/VirtualLocalConnection.h: Added.
  • UIProcess/WebAuthentication/Virtual/VirtualLocalConnection.mm: Added.

(WebKit::VirtualLocalConnection::VirtualLocalConnection):
(WebKit::VirtualLocalConnection::verifyUser):
(WebKit::VirtualLocalConnection::getAttestation const):
(WebKit::VirtualLocalConnection::filterResponses const):

  • UIProcess/WebAuthentication/Virtual/VirtualService.h: Added.
  • UIProcess/WebAuthentication/Virtual/VirtualService.mm: Added.

(WebKit::VirtualService::VirtualService):
(WebKit::VirtualService::createVirtual):
(WebKit::VirtualService::startDiscoveryInternal):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::virtualAuthenticatorManager):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • WebKit.xcodeproj/project.pbxproj:
9:46 AM Changeset in webkit [285266] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

Update test expectations for http/tests/appcache/fail-on-update-2.html.
https://bugs.webkit.org/show_bug.cgi?id=225665.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
9:38 AM Changeset in webkit [285265] by Lauro Moura
  • 2 edits in trunk/Source/WebKit

REGRESSION(r285077) [GLIB] 'MemoryPressureMonitor' has not been declared
https://bugs.webkit.org/show_bug.cgi?id=232706

Unreviewed non-linux build fix.

MemoryPressureMonitor is only available on Linux, so its usage should
be guarded, like WebProcessPool.cpp does when starting it.

  • UIProcess/glib/WebProcessPoolGLib.cpp:

(WebKit::WebProcessPool::platformInitialize): Add OS(LINUX) guard.
(WebKit::WebProcessPool::platformInitializeWebProcess): Ditto.

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

[iOS] Update IOKit message filters for later iOS releases
https://bugs.webkit.org/show_bug.cgi?id=232681
<rdar://problem/78779102>

Reviewed by Per Arne Vollan.

Now that method ordinals have stabilized, we can re-enable message filtering
in our trunk builds.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
9:28 AM Changeset in webkit [285263] by commit-queue@webkit.org
  • 5 edits in trunk

Unskip tests disabled because of the recent 32 bits issues
https://bugs.webkit.org/show_bug.cgi?id=230490

Unreviewed gardening.

Patch by Mikhail R. Gadelha <Mikhail R. Gadelha> on 2021-11-04

JSTests:

  • ChakraCore.yaml:

LayoutTests:

  • js/script-tests/reserved-words.js:
  • platform/glib/TestExpectations:
9:15 AM Changeset in webkit [285262] by Antti Koivisto
  • 5 edits in trunk

:host::part(foo) selector does not select elements inside shadow roots
https://bugs.webkit.org/show_bug.cgi?id=232261
<rdar://problem/84894922>

Reviewed by Simon Fraser.

We need to also look for ::part rules from the element's own scope.

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::match const):

Rename mayMatchHostPseudoClass -> mustMatchHostPseudoClass for clarity.

(WebCore::localContextForParent):
(WebCore::SelectorChecker::matchRecursively const):

Split ShadowDescendant and ShadowPartDescendant handling as they are sufficiently different.
Set nextContext.mustMatchHostPseudoClass bit for ::part rules coming from the Element's scope as
it is the only way they can match.

(WebCore::SelectorChecker::checkOne const):

No name mapping for rules from the element's own scope.

  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::matchPartPseudoElementRules):
(WebCore::Style::ElementRuleCollector::matchPartPseudoElementRulesForScope):

Also check ::part rules from the element scope.

  • style/ElementRuleCollector.h:
5:51 AM Changeset in webkit [285261] by Andres Gonzalez
  • 3 edits in trunk/Tools

Fix for crashes in layout tests in AX isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=232680
<rdar://problem/84987971>

Reviewed by Chris Fleizach.

Changed the return value of WTR::AccessibilityUIElement::attributeValue
to be a RetainPtr<id> instead of id. This guaranties that the ObjC
object pointed by it is not freed when the value is computed on the AX
thread and utilized on the main thread.

The following tests were crashing before and now pass:
accessibility/mac/internal-link-when-document-has-fragment.html
accessibility/svg-remote-element.html
accessibility/url-test.html
accessibility/video-element-url-attribute.html

The following tests were failing before and now pass:
accessibility/add-children-pseudo-element.html
accessibility/aria-selected.html
accessibility/aria-table-with-presentational-elements.html
accessibility/mac/aria-columnrowheaders.html
accessibility/mac/aria-details.html
accessibility/mac/children-in-navigation-order-returns-children.html
accessibility/mac/descriptionlist-not-ignored.html
accessibility/mac/id-class-attributes.html
accessibility/mac/landmark-not-ignored.html
accessibility/mac/line-index-for-textmarker.html
accessibility/mac/table-visible-rows.html
accessibility/mac/treeitem-row-delegation.html
accessibility/math-has-non-presentational-children.html
accessibility/math-multiscript-attributes.html
accessibility/radio-button-group-members.html
accessibility/table-column-headers-with-captions.html
accessibility/table-header-calculation-for-header-rows.html
accessibility/table-roles-hierarchy.html
accessibility/treeitem-child-exposed.html

The following tests were timing out and now pass:
accessibility/aria-combobox-control-owns-elements.html
accessibility/loading-iframe-sends-notification.html

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::attributeValue):
(WTR::AccessibilityUIElement::descriptionOfValue const):
(WTR::AccessibilityUIElement::attributeValue const):
(WTR::AccessibilityUIElement::domIdentifier const):
(WTR::AccessibilityUIElement::getLinkedUIElements):
(WTR::AccessibilityUIElement::getDocumentLinks):
(WTR::AccessibilityUIElement::getUIElementsWithAttribute const):
(WTR::AccessibilityUIElement::children const):
(WTR::AccessibilityUIElement::getChildren):
(WTR::AccessibilityUIElement::rowHeaders const):
(WTR::AccessibilityUIElement::columnHeaders const):
(WTR::AccessibilityUIElement::elementForAttribute const):
(WTR::AccessibilityUIElement::elementForAttributeAtIndex const):
(WTR::AccessibilityUIElement::detailsElements const):
(WTR::AccessibilityUIElement::errorMessageElements const):
(WTR::AccessibilityUIElement::allAttributes):
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue):
(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::numberAttributeValue):
(WTR::AccessibilityUIElement::uiElementAttributeValue const):
(WTR::AccessibilityUIElement::boolAttributeValue):
(WTR::AccessibilityUIElement::role):
(WTR::AccessibilityUIElement::subrole):
(WTR::AccessibilityUIElement::roleDescription):
(WTR::AccessibilityUIElement::computedRoleString):
(WTR::AccessibilityUIElement::title):
(WTR::AccessibilityUIElement::description):
(WTR::AccessibilityUIElement::orientation const):
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::language):
(WTR::AccessibilityUIElement::helpText const):
(WTR::AccessibilityUIElement::x):
(WTR::AccessibilityUIElement::y):
(WTR::AccessibilityUIElement::width):
(WTR::AccessibilityUIElement::height):
(WTR::AccessibilityUIElement::clickPointX):
(WTR::AccessibilityUIElement::clickPointY):
(WTR::AccessibilityUIElement::lineRectsAndText const):
(WTR::AccessibilityUIElement::intValue const):
(WTR::AccessibilityUIElement::minValue):
(WTR::AccessibilityUIElement::maxValue):
(WTR::AccessibilityUIElement::valueDescription):
(WTR::AccessibilityUIElement::insertionPointLineNumber):
(WTR::AccessibilityUIElement::isEnabled):
(WTR::AccessibilityUIElement::isRequired const):
(WTR::AccessibilityUIElement::isFocused const):
(WTR::AccessibilityUIElement::isSelected const):
(WTR::AccessibilityUIElement::isIndeterminate const):
(WTR::AccessibilityUIElement::isExpanded const):
(WTR::AccessibilityUIElement::currentStateValue const):
(WTR::AccessibilityUIElement::sortDirection const):
(WTR::AccessibilityUIElement::hierarchicalLevel const):
(WTR::AccessibilityUIElement::classList const):
(WTR::AccessibilityUIElement::speakAs):
(WTR::AccessibilityUIElement::ariaIsGrabbed const):
(WTR::AccessibilityUIElement::ariaDropEffects const):
(WTR::AccessibilityUIElement::attributesOfColumnHeaders):
(WTR::AccessibilityUIElement::attributesOfRowHeaders):
(WTR::AccessibilityUIElement::attributesOfColumns):
(WTR::AccessibilityUIElement::attributesOfRows):
(WTR::AccessibilityUIElement::attributesOfVisibleCells):
(WTR::AccessibilityUIElement::attributesOfHeader):
(WTR::AccessibilityUIElement::indexInTable):
(WTR::AccessibilityUIElement::rowIndexRange):
(WTR::AccessibilityUIElement::columnIndexRange):
(WTR::AccessibilityUIElement::horizontalScrollbar const):
(WTR::AccessibilityUIElement::verticalScrollbar const):
(WTR::AccessibilityUIElement::selectedTextRange):
(WTR::AccessibilityUIElement::setSelectedChildAtIndex const):
(WTR::AccessibilityUIElement::removeSelectionAtIndex const):
(WTR::AccessibilityUIElement::documentEncoding):
(WTR::AccessibilityUIElement::documentURI):
(WTR::AccessibilityUIElement::url):
(WTR::AccessibilityUIElement::isMultiSelectable const):
(WTR::AccessibilityUIElement::isOnScreen const):
(WTR::AccessibilityUIElement::embeddedImageDescription const):
(WTR::AccessibilityUIElement::imageOverlayElements const):
(WTR::AccessibilityUIElement::hasPopup const):
(WTR::AccessibilityUIElement::popupValue const):
(WTR::AccessibilityUIElement::selectedTextMarkerRange):
(WTR::AccessibilityUIElement::resetSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::startTextMarker):
(WTR::AccessibilityUIElement::endTextMarker):
(WTR::AccessibilityUIElement::mathPostscriptsDescription const):
(WTR::AccessibilityUIElement::mathPrescriptsDescription const):
(WTR::AccessibilityUIElement::mathRootRadicand const):
(WTR::AccessibilityUIElement::pathDescription const):

5:36 AM Changeset in webkit [285260] by Diego Pino Garcia
  • 5 edits in trunk

.:
Disable MEDIA_SESSION_PLAYLIST in WebKitGTK and WPE
https://bugs.webkit.org/show_bug.cgi?id=232694

Reviewed by Žan Doberšek.

Since the feature depends on MEDIA_SESSION_COORDINATOR, whichs is
disabled, this feature should also be disabled and not experimental.

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

Source/WTF:
Require MediaSession enabled to enable MediaSession PlayList API
https://bugs.webkit.org/show_bug.cgi?id=232694

Reviewed by Žan Doberšek.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
5:25 AM Changeset in webkit [285259] by graouts@webkit.org
  • 3 edits in trunk/Source/WTF

Make PreferPageRenderingUpdatesNear60FPSEnabled experimental rather than internal
https://bugs.webkit.org/show_bug.cgi?id=232702

Reviewed by Tim Horton.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • Scripts/Preferences/WebPreferencesInternal.yaml:
5:17 AM Changeset in webkit [285258] by Andres Gonzalez
  • 2 edits in trunk/Source/WebCore

Fix for AXObjectCache::postPlatformNotification in isolated tree mode, debug builds.
https://bugs.webkit.org/show_bug.cgi?id=232682
<rdar://problem/84991736>

Reviewed by Chris Fleizach.

In debug builds AXObjectCache::postPlatformNotification was calling the
object's wrapper accessibilityIsIgnored, which in turn calls
updateBackingStore. Since postPlatformNotification runs on the main
thread, and calls into the platform's wrapper should happen on the
secondary thread, this is hitting the asserts in
AXIsolatedTree::applyPendingChanges to prevent this situation.
Instead of calling through the wrapper, this patch adds a utility
function to exercise the same core methods invoked by
accessibilityIsIgnored on the AX object directly, and hence avoiding the
problem above.

  • accessibility/mac/AXObjectCacheMac.mm:

(WebCore::AXObjectCache::postPlatformNotification):

2:31 AM Changeset in webkit [285257] by commit-queue@webkit.org
  • 4 edits in trunk/Source

Unreviewed, reverting r285228.
https://bugs.webkit.org/show_bug.cgi?id=232704

Broke iOS builds

Reverted changeset:

"REGRESSION: AR Quicklook asset is shared instead of page URL"
https://bugs.webkit.org/show_bug.cgi?id=232674
https://commits.webkit.org/r285228

1:57 AM Changeset in webkit [285256] by graouts@webkit.org
  • 4 edits
    2 adds in trunk

REGRESSION (r268932): CPU usage higher than expected with sibling elements running WebAnimations
https://bugs.webkit.org/show_bug.cgi?id=228833
<rdar://problem/81573075>

Reviewed by Antti Koivisto.

Source/WebCore:

Test: webanimations/no-style-updates-for-animated-sibling-elements-accelerated.html

Elements that have any type of animations, and not just CSS Transitions and CSS Animations,
should not be eligible for style sharing.

  • style/StyleSharingResolver.cpp:

(WebCore::Style::SharingResolver::canShareStyleWithElement const):

LayoutTests:

Add a new test that checks that accelerated animations on sibling elements do not yield style updates.

  • platform/win/TestExpectations:
  • webanimations/no-style-updates-for-animated-sibling-elements-accelerated-expected.txt: Added.
  • webanimations/no-style-updates-for-animated-sibling-elements-accelerated.html: Added.
1:51 AM Changeset in webkit [285255] by Martin Robinson
  • 10 edits in trunk

implement transform: perspective(none)
https://bugs.webkit.org/show_bug.cgi?id=231361
<rdar://problem/84124161>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-transforms/animation/transform-interpolation-001-expected.txt:
  • web-platform-tests/css/css-transforms/parsing/transform-valid-expected.txt:

Source/WebCore:

Add support for perspective(none) and update test results
to show newly passing tests.

No new tests. This is covered by the existing WPT tests:

  • imported/w3c/web-platform-tests/css/css-transforms/parsing/transform-valid.html
  • imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-001.html
  • css/TransformFunctions.cpp:

(WebCore::transformsForValue): Accept a "none" keyword as an input and be a bit more stringent
about what kind of numbers are accepted. These should be rejected earlier in consumePerspective.
This can now hold an Undefined length which indicates perspective: none.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumePerspective): Accept "none" and clean up the code a little, using ValueRange
instead of a manual check for numerical values. Also make the code structure a little more
consistent.

  • platform/graphics/transforms/PerspectiveTransformOperation.h: Update assertion, because

Undefined means perpsective: none now.

  • platform/graphics/transforms/PerspectiveTransformOperation.cpp:

(WebCore::PerspectiveTransformOperation::blend): Handle the case of perspective: none for
either values.

LayoutTests:

  • platform/glib/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-001-expected.txt:

Nov 3, 2021:

11:28 PM Changeset in webkit [285254] by Megan Gardner
  • 3 edits in trunk/Source/WebCore

TextIndicators are flipped when spanning more than one line.
https://bugs.webkit.org/show_bug.cgi?id=232688

We regressed this in https://bugs.webkit.org/show_bug.cgi?id=225557 when text indicators were factored
out to be used for App Highlights. We need to restore the geomitry flipping behavior to have the text
indicatores show up correctly.

Reviewed by Tim Horton.

  • page/cocoa/WebTextIndicatorLayer.mm:

(-[WebTextIndicatorLayer initWithFrame:textIndicator:margin:offset:]):
(-[WebTextIndicatorLayer isFlipped]): Deleted.

  • page/mac/TextIndicatorWindow.mm:

(-[WebTextIndicatorView isFlipped]):
(WebCore::TextIndicatorWindow::setTextIndicator):

9:49 PM Changeset in webkit [285253] by commit-queue@webkit.org
  • 5 edits in trunk/LayoutTests

[GLIB] Update test expectations and baselines. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=232683

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-11-03

  • platform/glib/TestExpectations:
  • platform/glib/http/tests/contentextensions/block-private-click-measurement-expected.txt:
  • platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/wpe/fast/dom/navigator-detached-no-crash-expected.txt:
6:23 PM Changeset in webkit [285252] by achristensen@apple.com
  • 23 edits
    20 deletes in trunk

Remove QuickTimePluginReplacement and YouTubePluginReplacement
https://bugs.webkit.org/show_bug.cgi?id=232400

Reviewed by Chris Dumez.

Source/WebCore:

They were disabled at runtime in https://trac.webkit.org/changeset/275911/webkit

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/plugins/PluginReplacement.h: Removed.
  • Modules/plugins/QuickTimePluginReplacement.css: Removed.
  • Modules/plugins/QuickTimePluginReplacement.h: Removed.
  • Modules/plugins/QuickTimePluginReplacement.idl: Removed.
  • Modules/plugins/QuickTimePluginReplacement.js: Removed.
  • Modules/plugins/QuickTimePluginReplacement.mm: Removed.
  • Modules/plugins/YouTubePluginReplacement.cpp: Removed.
  • Modules/plugins/YouTubePluginReplacement.h: Removed.
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSPluginElementFunctions.cpp:

(WebCore::pluginScriptObject):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • html/HTMLPlugInElement.cpp:

(WebCore::HTMLPlugInElement::createElementRenderer):
(WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot):
(WebCore::HTMLPlugInElement::requestObject):
(): Deleted.
(WebCore::registrar): Deleted.
(WebCore::pluginReplacementForType): Deleted.
(WebCore::HTMLPlugInElement::scriptObjectForPluginReplacement): Deleted.

  • html/HTMLPlugInElement.h:

(WebCore::HTMLPlugInElement::pluginReplacementScriptObject): Deleted.

  • html/shadow/ShadowPseudoIds.cpp:

(WebCore::ShadowPseudoIds::webkitPluginReplacement): Deleted.

  • html/shadow/ShadowPseudoIds.h:
  • html/shadow/YouTubeEmbedShadowElement.cpp: Removed.
  • html/shadow/YouTubeEmbedShadowElement.h: Removed.
  • page/Settings.yaml:

Source/WebInspectorUI:

  • UserInterface/Models/NativeFunctionParameters.js:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/YouTubePluginReplacement.cpp: Removed.

LayoutTests:

  • security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement-expected.txt: Removed.
  • security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html: Removed.
5:40 PM Changeset in webkit [285251] by Yousuke.Kimoto@sony.com
  • 2 edits in trunk/Tools

Use 0.0.0.0 when "--all-interfaces" is given for websocket_server
https://bugs.webkit.org/show_bug.cgi?id=231798
<rdar://problem/84540538>

Reviewed by Jonathan Bedard.

When run-webkit-tests runs with "--all-interfaces", servers running
on the host PC should use "0.0.0.0". It will help situations where
host and target systems are discrete so that test programs can
connect to test servers on the host PC.

  • Scripts/webkitpy/layout_tests/servers/websocket_server.py:

(PyWebSocket.init): Fixed a style check error.
(PyWebSocket._prepare_config): Added "0.0.0.0" for --all-interfaces.

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

Tag Safari-612.3.3.0.2.

5:14 PM Changeset in webkit [285249] by Russell Epstein
  • 1 copy in tags/Safari-612.3.3.1.2

Tag Safari-612.3.3.1.2.

5:13 PM Changeset in webkit [285248] by Russell Epstein
  • 8 edits in branches/safari-612.3.3.1-branch/Source

Versioning.

WebKit-7612.3.3.1.2

5:12 PM Changeset in webkit [285247] by Russell Epstein
  • 4 edits in branches/safari-612.3.3.1-branch/Source

Revert "Cherry-pick r285241. rdar://problem/84990898"

This reverts commit r285243.

5:05 PM Changeset in webkit [285246] by ysuzuki@apple.com
  • 14 edits in trunk

[JSC] Clean up StructureStubInfo initialization
https://bugs.webkit.org/show_bug.cgi?id=232652

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch enhances FixedVector to initialize it from the other containers.
So we can simplify baseline StructureStubInfo initialization.
Now, StructureStubInfo::initializeFromUnlinkedStructureStubInfo becomes
StructureStubInfo constructor taking const UnlinkedStructureStubInfo&.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::setupWithUnlinkedBaselineCode):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::StructureStubInfo):
(JSC::StructureStubInfo::initializeFromUnlinkedStructureStubInfo): Deleted.

  • bytecode/StructureStubInfo.h:
  • jit/JIT.cpp:

(JSC::JIT::link):

Source/WebCore:

  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::fontForLayoutLabel):

Source/WTF:

  • wtf/FixedVector.h:

(WTF::FixedVector::FixedVector):
(WTF::FixedVector::operator=):

  • wtf/RefCountedArray.h:

(WTF::RefCountedArray::RefCountedArray):
(WTF::RefCountedArray::operator=):

  • wtf/SegmentedVector.h:
  • wtf/Vector.h:

(WTF::VectorTypeOperations::uninitializedCopy):

Tools:

  • TestWebKitAPI/Tests/WTF/FixedVector.cpp:

(TestWebKitAPI::TEST):

4:55 PM Changeset in webkit [285245] by Russell Epstein
  • 1 copy in tags/Safari-612.3.3.1.1

Tag Safari-612.3.3.1.1.

4:55 PM Changeset in webkit [285244] by Russell Epstein
  • 1 delete in tags/Safari-612.3.3.1.1

Delete tag.

4:53 PM Changeset in webkit [285243] by Russell Epstein
  • 4 edits in branches/safari-612.3.3.1-branch/Source

Cherry-pick r285241. rdar://problem/84990898

[macOS] MediaSession coordinator enabled in UIProcess, disabled in WebContent
https://bugs.webkit.org/show_bug.cgi?id=232687
<rdar://84990898>

Reviewed by Eric Carlson.

Source/WebKit:

The default value of defaultMediaSessionCoordinatorEnabled() will be true if the UIProcess has
the correct entitlement. However, this value is not passed across the XPC boundary unless it has
been overridden, which means defaultMediaSessionCoordinatorEnabled() will control the setting
in the WebContent process, which is not entitled.

Have the WebContent process check its parent process's entitlement rather than its own when
determining the default value for defaultMediaSessionCoordinatorEnabled().

  • Shared/WebPreferencesDefaultValues.cpp: (WebKit::defaultMediaSessionCoordinatorEnabled):

Source/WTF:

Have the MediaSessionPlaylistEnabled preference use the same defaults as MediaSessionCoordinatorEnabled.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

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

4:50 PM Changeset in webkit [285242] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

Disable WebXR on tvOS and watchOS
<https://webkit.org/b/232672>
<rdar://problem/84982378>

Reviewed by Brent Fulgham.

  • wtf/PlatformEnableCocoa.h:

(ENABLE_WEBXR):
(ENABLE_WEBXR_HANDS):

  • Disable features on tvOS and watchOS.
4:46 PM Changeset in webkit [285241] by jer.noble@apple.com
  • 4 edits in trunk/Source

[macOS] MediaSession coordinator enabled in UIProcess, disabled in WebContent
https://bugs.webkit.org/show_bug.cgi?id=232687
<rdar://84990898>

Reviewed by Eric Carlson.

Source/WebKit:

The default value of defaultMediaSessionCoordinatorEnabled() will be true if the UIProcess has
the correct entitlement. However, this value is not passed across the XPC boundary unless it has
been overridden, which means defaultMediaSessionCoordinatorEnabled() will control the setting
in the WebContent process, which is not entitled.

Have the WebContent process check its parent process's entitlement rather than its own when
determining the default value for defaultMediaSessionCoordinatorEnabled().

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultMediaSessionCoordinatorEnabled):

Source/WTF:

Have the MediaSessionPlaylistEnabled preference use the same defaults as MediaSessionCoordinatorEnabled.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
4:29 PM Changeset in webkit [285240] by Russell Epstein
  • 5 edits in branches/safari-613.1.7-branch/Source

Cherry-pick r285110. rdar://problem/84994696

Unreviewed, reverting r285055.

Reverting because this commit may have caused
webgl/1.0.x/conformance/textures/misc/texture-corner-case-
videos.html and webgl/2.0.y/conformance/textures/misc/texture-
corner-case-videos.html to time out

Reverted changeset:

"Avoid sending video data to Web process for
canvas.drawImage(video)"
https://bugs.webkit.org/show_bug.cgi?id=230766
https://commits.webkit.org/r285055

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

3:52 PM Changeset in webkit [285239] by Russell Epstein
  • 13 edits in branches/safari-612.3.3.0-branch

Apply patch. rdar://problem/84982191

3:41 PM Changeset in webkit [285238] by Nikos Mouchtaris
  • 1 edit
    3 copies
    4 adds
    2 deletes in trunk/LayoutTests

Add platform test expectations for imported/w3c/web-platform-tests/mathml/relations/html5-tree/dynamic-childlist-001.html
https://bugs.webkit.org/show_bug.cgi?id=232504

Reviewed by Myles Maxfield.

Fix expectations for Big Sur wk1.

  • platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/dynamic-childlist-001-expected.txt: Added.
  • platform/mac-bigsur/imported/w3c/web-platform-tests/mathml/relations/html5-tree/dynamic-childlist-001-expected.txt: Added.
3:40 PM Changeset in webkit [285237] by Russell Epstein
  • 1 edit in branches/safari-612.3.3.1-branch/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp

Unreviewed build fix. rdar://problem/84987165.

error: no viable constructor or deduction guide for deduction of template arguments of 'WeakPtr'

3:36 PM Changeset in webkit [285236] by commit-queue@webkit.org
  • 5 edits in trunk/Source

AX: WKAccessibilityWebPageObjectMac.mm should expose accessibilityChildrenInNavigationOrder and NSAccessibilityChildrenInNavigationOrderAttribute
https://bugs.webkit.org/show_bug.cgi?id=232654

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-11-03
Reviewed by Chris Fleizach.

Some clients expect accessibilityChildrenInNavigationOrder and
NSAccessibilityChildrenInNavigationOrderAttribute to be available,
and WKAccessibilityWebPageObjectMac didn't expose them.

Source/WebCore:

  • accessibility/mac/WebAccessibilityObjectWrapperMac.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

Move #define NSAccessibilityChildrenInNavigationOrderAttribute to
header so it can be used in the WebKit layer.

Source/WebKit:

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:

(-[WKAccessibilityWebPageObject accessibilityChildrenInNavigationOrder]): Added.
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
Handle NSAccessibilityChildrenInNavigationOrderAttribute.
(-[WKAccessibilityWebPageObject accessibilityAttributeNames:]):
Add NSAccessibilityChildrenInNavigationOrderAttribute.

3:18 PM Changeset in webkit [285235] by jh718.park@samsung.com
  • 7 edits in trunk

border-radius inline style should serialize with valid syntax
https://bugs.webkit.org/show_bug.cgi?id=183994

This patch have border-radius property serializes in canonical order
as specified in https://drafts.csswg.org/css-backgrounds/#border-radius.

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-backgrounds/parsing/border-radius-valid-expected.txt: Add more test case results.
  • web-platform-tests/css/css-backgrounds/parsing/border-radius-valid.html: Add more test cases.

Source/WebCore:

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):
(WebCore::StyleProperties::borderRadiusValue const):

  • css/StyleProperties.h:
  • css/parser/CSSPropertyParser.cpp:
3:07 PM Changeset in webkit [285234] by ddkilzer@apple.com
  • 4 edits in trunk/Source/WebCore

Fix consistency issues with localized strings and regenerate localizable.strings
<https://webkit.org/b/232642>

Reviewed by Megan Gardner.

  • en.lproj/Localizable.strings:
  • Regenerate the file using update-webkit-localizable-strings.
  • List of strings realphabetized, except as noted below.

("%@ (%@ Internet plug-in)"): Delete.

  • Removed in r285047 for Bug 232462.
  • platform/LocalizedStrings.cpp:

(WebCore::addTextTrackKindEasyReaderSuffix):

  • Fix unlocalized string that regressed in r278202 for Bug 226361.

(WebCore::useBlockedPlugInContextMenuTitle):

  • Remove unneeded call to WebCore::formatLocalizedString() since there are no placeholders to replace.
  • platform/cocoa/LocalizedStringsCocoa.mm:

(WebCore::contextMenuItemTagSearchWeb):
(WebCore::contextMenuItemTagShowFonts):

  • Switch from calling WebCore::localizedNSString() directly to using WEB_UI_NSSTRING() so these strings will be found by update-webkit-localizable-strings.
3:03 PM Changeset in webkit [285233] by Wenson Hsieh
  • 4 edits in trunk/Source/WebKit

[GPU Process] Rendering backend may stop processing IPC stream messages after a sync message timeout
https://bugs.webkit.org/show_bug.cgi?id=232580

Reviewed by Tim Horton.

Currently, it's possible for sync IPC messages that are sent through IPC streams to time out and subsequently
cause the IPC stream server (e.g. RemoteRenderingBackend) to stop processing IPC stream messages altogether. The
following example illustrates how this might happen:

  1. Web process sends the sync message at offset n (relative to the start of the ring buffer).

Web process then begins to wait for the sync stream response under tryAcquireAll().

  1. GPU process receives the sync message, and takes a while (> 1 sec.) attempting to dispatch it.
  1. Meanwhile in the web process, we hit the IPC timeout and bail from tryAcquireAll(). The client offset

is still at n. Shortly afterwards, the web process tries to send a regular stream message, calling
tryAcquire() and waiting for the client semaphore to be signaled.

  1. The GPU process finally finishes dispatching the sync message from (2), sends a sync reply (unaware that

the web process has already given up waiting), and finally calls releaseAll(), signaling the client
semaphore. The server offset is then reset back to 0.

  1. The web process finishes waiting, returns from tryAcquire(), proceeds to write the new stream

message after offset n, and wakes up the GPU process with the intention of handling this message.

  1. The GPU process wakes up and begins reading from offset 0. The first message it encounters is the

SyncMessageReply it just wrote in step (4), and subsequently bails from the processing loop because it
isn't capable of dispatching this message (which was meant to be consumed in the web process in the
first place).

In summary, the sync IPC timeout causes us to enter a state where the web process continues to encode messages
at the buffer offset prior to timeout (i.e. offset n), while the GPU process is reading from the start of the
buffer (offset 0). To avoid this, simply replace the timeouts when synchronously grabbing image data from the
GPU process. This ensures that we're never in a state where we're continuing to send stream messages to a
rendering backend connection stream after timing out when waiting for a previous sync message to that stream to
finish.

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::sharedMemoryForGetPixelBuffer):
(WebKit::RemoteRenderingBackendProxy::waitForGetPixelBufferToComplete):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
3:01 PM Changeset in webkit [285232] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Return nullopt in aspect-ratio+intrinsic width case
https://bugs.webkit.org/show_bug.cgi?id=230769

Patch by Rob Buis <rbuis@igalia.com> on 2021-11-03
Reviewed by Javier Fernandez.

Source/WebCore:

Return nullopt in aspect-ratio+intrinsic width case, while
calculating preferred widths we do not know the container width yet,
so we can't determine the logical height reliably from it.

Test: fast/css-grid-layout/aspect-ratio-auto-repeat-crash.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const):

LayoutTests:

  • fast/css-grid-layout/aspect-ratio-auto-repeat-crash-expected.txt: Added.
  • fast/css-grid-layout/aspect-ratio-auto-repeat-crash.html: Added.
2:58 PM Changeset in webkit [285231] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[ iOS ] TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS is crashing
https://bugs.webkit.org/show_bug.cgi?id=232676

Patch by Alex Christensen <achristensen@webkit.org> on 2021-11-03
Reviewed by Eric Carlson.

In r284743 we changed types from raw pointers to WeakPtr, but accessing them in layoutSublayers is not thread safe.
Remove some unsafe early returns.

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(-[WebAVPlayerLayer layoutSublayers]):
(-[WebAVPlayerLayer resolveBounds]):

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

[ iOS Debug ] TestWebKitAPI.ResourceLoadStatistics.GrandfatherCallback is failing
https://bugs.webkit.org/show_bug.cgi?id=232675

Patch by Alex Christensen <achristensen@webkit.org> on 2021-11-03
Reviewed by Kate Cheney.

Clearing website data attempts a connection with the daemon.
For now, just tell it not to connect to the daemon.

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:

(TEST):

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

Fix the build.

  • UIProcess/Cocoa/ModelElementControllerCocoa.mm:

(WebKit::ModelElementController::modelElementDidCreatePreview):

2:07 PM Changeset in webkit [285228] by dino@apple.com
  • 4 edits in trunk/Source

REGRESSION: AR Quicklook asset is shared instead of page URL
https://bugs.webkit.org/show_bug.cgi?id=232674
rdar://84220997

Reviewed by Antoine Quint.

There was a typo. ENABLE(ARKIT_QUICK_LOOK_PREVIEW_ITEM)
should be HAVE(ARKIT_QUICK_LOOK_PREVIEW_ITEM).

Source/WebCore/PAL:

  • pal/spi/ios/SystemPreviewSPI.h:

Source/WebKit:

  • UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
1:26 PM Changeset in webkit [285227] by Russell Epstein
  • 6 edits in branches/safari-612.3.3.1-branch/Source/WebKit

Cherry-pick r285177. rdar://problem/84987165

Terminate unresponsive network process by crashing it
https://bugs.webkit.org/show_bug.cgi?id=232603

Reviewed by Chris Dumez.

UI process currently kills network process when it does not respond message in some time (network process being
unresponsive). We've found one common case where network process becomes unresponsive is that it is blocked by
some slow operation on the main thread (like file operation in rdar://84511633). To understand what the
operations are and make a fix, we now ask network process to crash itself on IPC thread. In this way, we can get
crash report that includes the call stack of the main thread. To avoid generating too many crash reports, we
only send the crash message to network process when it becomes unresponsive multiple times in a short time
period.

  • Platform/IPC/Connection.cpp: (IPC::terminateDueToIPCTerminateMessage): (IPC::Connection::processIncomingMessage):
  • Scripts/webkit/model.py:
  • Scripts/webkit/tests/MessageNames.cpp: (IPC::description): (IPC::receiverName): (IPC::isValidMessageName):
  • Scripts/webkit/tests/MessageNames.h:
  • UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::shouldTerminateNetworkProcessBySendingMessage): (WebKit::NetworkProcessProxy::didBecomeUnresponsive):

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

1:26 PM Changeset in webkit [285226] by Russell Epstein
  • 7 edits in branches/safari-612.3.3.1-branch/Source/WebKit

Cherry-pick r285115. rdar://problem/84984094

Increase responsiveness timeout for network process
https://bugs.webkit.org/show_bug.cgi?id=232505

Reviewed by Chris Dumez.

  • UIProcess/AuxiliaryProcessProxy.cpp: (WebKit::AuxiliaryProcessProxy::AuxiliaryProcessProxy):
  • UIProcess/AuxiliaryProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::NetworkProcessProxy): (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
  • UIProcess/ResponsivenessTimer.cpp: (WebKit::ResponsivenessTimer::ResponsivenessTimer): (WebKit::ResponsivenessTimer::timerFired): (WebKit::ResponsivenessTimer::start): (): Deleted.
  • UIProcess/ResponsivenessTimer.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::getNetworkProcessConnection):

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

1:25 PM Changeset in webkit [285225] by Russell Epstein
  • 3 edits in branches/safari-612.3.3.1-branch/Source/WebKit

Cherry-pick r284651. rdar://problem/84984058

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

Reviewed by Alex Christensen.

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

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
  • UIProcess/Cocoa/WKShareSheet.mm: (+[WKShareSheet createRandomSharingDirectoryForFile:]): (+[WKShareSheet writeFileToShareableURL:data:temporaryDirectory:]):

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

1:24 PM Changeset in webkit [285224] by Chris Dumez
  • 10 edits in trunk/Source

Clicking a link should preconnect to destination as first party
https://bugs.webkit.org/show_bug.cgi?id=232668

Reviewed by Alex Christensen.

Clicking a link should preconnect to destination as first party, not third-party. Otherwise, the
preconnect is wasted when session isolation based on registrable domain is enabled. This is a
follow-up to r284730.

Source/WebCore:

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::handleClick):

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::preconnectIfNeeded):

  • loader/LoaderStrategy.h:

Source/WebKit:

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::preconnectTo):

  • WebProcess/Network/WebLoaderStrategy.h:

Source/WebKitLegacy:

  • WebCoreSupport/WebResourceLoadScheduler.cpp:

(WebResourceLoadScheduler::preconnectTo):

  • WebCoreSupport/WebResourceLoadScheduler.h:
1:14 PM Changeset in webkit [285223] by Russell Epstein
  • 8 edits in branches/safari-612.3.3.0-branch/Source

Versioning.

WebKit-7612.3.3.0.2

1:12 PM Changeset in webkit [285222] by Chris Dumez
  • 5 edits in trunk

_pasteboardWithName should be thread-safe
https://bugs.webkit.org/show_bug.cgi?id=232670

Reviewed by Tim Horton.

Source/WTF:

wtf/Atomics.h uses WTF_MAKE_STRUCT_FAST_ALLOCATED which is declared in
wtf/FastMalloc.h but was failing to include it. This was leading to a
build error when I tried including wtf/Lock.h in WKTR.

  • wtf/Atomics.h:

Tools:

_pasteboardWithName should be thread-safe, to match [NSPasteboard _pasteboardWithName].
This was leading to flaky crashes in _pasteboardWithName getting called off the main
thread from ShareKit code.

  • DumpRenderTree/mac/DumpRenderTreePasteboard.mm:

(+[DumpRenderTreePasteboard _pasteboardWithName:]):
(+[DumpRenderTreePasteboard releaseLocalPasteboards]):

  • WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:

(+[WebKitTestRunnerPasteboard _pasteboardWithName:]):
(+[WebKitTestRunnerPasteboard releaseLocalPasteboards]):

1:11 PM Changeset in webkit [285221] by Ryan Haddad
  • 2 edits in trunk/Tools

[EWS] Add more bots to iOS layout and API test queues
https://bugs.webkit.org/show_bug.cgi?id=232678

Reviewed by Aakash Jain.

  • CISupport/ews-build/config.json:
1:10 PM Changeset in webkit [285220] by Kyle Piddington
  • 3 edits in trunk/Source/ThirdParty/ANGLE

REGRESSION (iOS 15): Tab crashes when trying to render Projector stories
https://bugs.webkit.org/show_bug.cgi?id=231607

Rework vertex buffer caching to allow us to reuse parts
of converted buffers. This dramatically drops the memory usage
of this tab from 4.5 gb to roughly 1.3gb

Reviewed by Dean Jackson.

  • src/libANGLE/renderer/metal/BufferMtl.mm:

(rx::BufferMtl::getVertexConversionBuffer):

  • src/libANGLE/renderer/metal/VertexArrayMtl.mm:

(rx::VertexArrayMtl::convertVertexBuffer):
(rx::VertexArrayMtl::convertVertexBufferCPU):
(rx::VertexArrayMtl::convertVertexBufferGPU):

1:09 PM Changeset in webkit [285219] by jer.noble@apple.com
  • 7 edits in trunk/Source/WebKit

[Catalina] HLS streams will not select HDR variants when GPU Process is enabled
https://bugs.webkit.org/show_bug.cgi?id=232671
<rdar://84686676>

Reviewed by Eric Carlson.

Tested manually.

In Catalina, fall back to a MediaToolbox API for setting a global HDR override in the GPU
process which instructs all AVPlayer instances whether HDR playback is supported for the
current set of displays. Pass the required data across from the UIProcess to the GPU process
at process start up and when the displays are reconfigured.

  • GPUProcess/GPUProcess.h:
  • GPUProcess/GPUProcess.messages.in:
  • GPUProcess/mac/GPUProcessMac.mm:

(WebKit::GPUProcess::setScreenProperties):

  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::setScreenProperties):
(WebKit::GPUProcessProxy::updatePreferences):

  • UIProcess/GPU/GPUProcessProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::screenPropertiesStateChanged):
(WebKit::displayReconfigurationCallBack):

11:40 AM Changeset in webkit [285218] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

Rebaseline http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive.html.
https://bugs.webkit.org/show_bug.cgi?id=231928.

Unreviewed test gardening.

  • platform/ios/http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive-expected.txt:
11:26 AM Changeset in webkit [285217] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

Leak of UUID in WebKit::ModelElementController::modelElementDidCreatePreview()
<https://webkit.org/b/232628>
<rdar://problem/84935290>

Reviewed by Brent Fulgham.

  • UIProcess/Cocoa/ModelElementControllerCocoa.mm:

(WebKit::ModelElementController::modelElementDidCreatePreview):

  • Use adoptNS() to fix the leak.
10:59 AM Changeset in webkit [285216] by Devin Rousso
  • 6 edits
    4 adds in trunk

[Modern Media Controls] should show tracks button/menu for <audio>
https://bugs.webkit.org/show_bug.cgi?id=232597

Reviewed by Eric Carlson.

Source/WebCore:

There's nothing preventing <audio> from having multiple <source>. We should have a
language picker for <audio> just like what we have for <video>.

Tests: media/modern-media-controls/tracks-support/audio-multiple-tracks.html

media/modern-media-controls/tracks-support/audio-single-track.html

  • Modules/modern-media-controls/controls/inline-media-controls.js:

(InlineMediaControls.prototype._rightContainerButtons):

LayoutTests:

  • media/modern-media-controls/tracks-support/audio-multiple-tracks.html: Added.
  • media/modern-media-controls/tracks-support/audio-multiple-tracks-expected.txt: Added.
  • media/modern-media-controls/tracks-support/audio-single-track.html: Added.
  • media/modern-media-controls/tracks-support/audio-single-track-expected.txt: Added.
  • media/modern-media-controls/audio/audio-controls-buttons.html:
  • media/modern-media-controls/audio/audio-controls-buttons-expected.txt:
  • platform/ios-wk2/TestExpectations:
10:47 AM Changeset in webkit [285215] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Display swatch popovers below the swatch by default, not on the left side
https://bugs.webkit.org/show_bug.cgi?id=232577

Reviewed by Devin Rousso.

The new defaults are: below, above, left.

Displaying the swatch popover on the left side covers the relevant property name.
Displaying it below or above doesn't have this problem; below is preferred because
it doesn't hide the CSS selector of the relevant rule.

  • UserInterface/Views/InlineSwatch.js:

(WI.InlineSwatch.prototype._presentPopover):
Introduce a method to remove code duplication.

10:28 AM Changeset in webkit [285214] by Chris Dumez
  • 13 edits
    8 adds in trunk

Javascript URLs do not run in the right context when using frame targeting
https://bugs.webkit.org/show_bug.cgi?id=232382

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/010-expected.txt:

The test is no longer timing out now that we run the javascript URL contained in the <form>'s action in the context
of the "test" iframe instead of the top frame. However, the test is still failing, possibly because the JavaScript
URL is run synchronously.

Source/WebCore:

Javascript URLs did not run in the right context when using frame targeting
(e.g. <a target="foo" src="javascript:...">). We would previously run the
JavaScript URL in the context of the anchor instead of the target frame/window.

Also, we would fail to open a new popup when there is no existing frame with
the given target name.

This patch fixes the issue by doing the executeJavaScriptURL() call later,
inside of FrameLoader::loadWithNavigationAction(), once we've already resolved
the target frame and created a new window if necessary.

This aligns our behavior with both Chrome and Firefox.

Tests: fast/frames/javascript-url-anchor-target-new-window.html

fast/frames/javascript-url-anchor-target.html
fast/frames/javascript-url-form-target-new-window.html
fast/frames/javascript-url-form-target.html

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::executeJavaScriptURL):

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::handleClick):

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::submit):

  • loader/FormSubmission.cpp:

(WebCore::FormSubmission::requestURL const):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::changeLocation):
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):

  • loader/NavigationAction.h:

(WebCore::NavigationAction::shouldReplaceDocumentIfJavaScriptURL const):
(WebCore::NavigationAction::setShouldReplaceDocumentIfJavaScriptURL):

  • loader/NavigationScheduler.cpp:

(WebCore::NavigationScheduler::scheduleFormSubmission):

LayoutTests:

Add layout test coverage. I have verified that these tests are passing in both
Chrome 94 and Firefox 94.

  • fast/frames/javascript-url-anchor-target-expected.txt: Added.
  • fast/frames/javascript-url-anchor-target-new-window-expected.txt: Added.
  • fast/frames/javascript-url-anchor-target-new-window.html: Added.
  • fast/frames/javascript-url-anchor-target.html: Added.
  • fast/frames/javascript-url-form-target-expected.txt: Added.
  • fast/frames/javascript-url-form-target-new-window-expected.txt: Added.
  • fast/frames/javascript-url-form-target-new-window.html: Added.
  • fast/frames/javascript-url-form-target.html: Added.
10:05 AM Changeset in webkit [285213] by Simon Fraser
  • 13 edits in trunk

Expose fuzzy match data in layout test results
https://bugs.webkit.org/show_bug.cgi?id=232523

Reviewed by Jonathan Bedard.

Tools:

For a failing ref (or image) test, include the fuzzy matching data in full_results.json
in the form "image_difference": { "max_difference": 13, "total_pixels": 167 }, and
show that in the image comparison page that's written out for each test result.

Fix some tests that relied on JSON property serialization ordering (we don't serialize
with sort_keys=True).

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager._save_json_files):

  • Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:

(TestResultWriter.write_image_diff_files):

  • Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:

(JSONResultsGenerator.generate_times_ms_file):

  • Scripts/webkitpy/layout_tests/models/test_failures.py:

(FailureImageHashMismatch.formatted_diff_percent):
(FailureImageHashMismatch):
(FailureImageHashMismatch.formatted_fuzzy_data):
(FailureImageHashMismatch.write_failure):
(FailureReftestMismatch.message):
(FailureReftestMismatch.formatted_diff_percent):
(FailureReftestMismatch):
(FailureReftestMismatch.formatted_fuzzy_data):
(FailureReftestMismatch.write_failure):

  • Scripts/webkitpy/layout_tests/models/test_run_results.py:

(_interpret_test_failures):

  • Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:

(InterpretTestFailuresTest.test_interpret_test_failures):

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RunTest.test_retrying_force_pixel_tests):

LayoutTests:

Add some "image_difference" values to the test JSON and update the resulting
files.

  • fast/harness/full_results.json:
  • fast/harness/image-diff-template-expected.txt:
  • fast/harness/image-diff-template.html:
  • fast/harness/results.html:
10:05 AM Changeset in webkit [285212] by Russell Epstein
  • 1 copy in tags/Safari-612.3.3.1.1

Tag Safari-612.3.3.1.1.

9:59 AM Changeset in webkit [285211] by Antti Koivisto
  • 5 edits in trunk

::slotted element style not invalidated correctly in nested case
https://bugs.webkit.org/show_bug.cgi?id=232665

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-scoping/slotted-nested-expected.txt:

Source/WebCore:

We fail to invalidate ::slotted style if the assigned node is not from the current host scope.

  • style/StyleInvalidator.cpp:

(WebCore::Style::invalidateAssignedElements):

Invalidate more accurately by following assigned node chain recursively instead of just invalidating all host children.

(WebCore::Style::Invalidator::invalidateIfNeeded):

Remove the unnecessary and incorrect m_didInvalidateHostChildren optimization.

  • style/StyleInvalidator.h:
9:52 AM Changeset in webkit [285210] by jer.noble@apple.com
  • 5 edits
    2 moves
    2 adds in trunk

[iOS] AVAssetResourceLoadingRequest.request does not include a Range: header on iOS 15.
https://bugs.webkit.org/show_bug.cgi?id=232195
<rdar://84574375>

Reviewed by Darin Adler.

Source/WebCore:

Explicitly add a Range: header for Blob requests which do not have one (but otherwise should).

Test: platform/mac/media/video-blob-request-contains-range-header.html

Drive-by fix: to allow this change to be testable, we must revert a change which calls all the
network delegate callbacks with empty data. This was necessary at the time because (at least for
Cocoa ports) media loading happened outside WebCore's loader path. Currently, all http(s), data,
blob, and custom protocol schemes are loaded through WebCore, leaving file:// URLs as the
remaining protocol type that needs custom handling, and only on Cocoa ports.

Further drive-by fix: WebKitLegacy's network delegate client operates synchronously during
requestResource(), so WebCoreNSURLSession must synthesize an error if that method returns a
nil resource.

  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:

(WebCore::WebCoreAVFResourceLoader::startLoading):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::loadResource):

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSessionDataTask _restart]):

LayoutTests:

The existing media-blocked-by-willsendrequest.html test only verified that file:// URLs were blocked,
not http://, so this test is moved to the http/tests/ directory where media will use http:// for loading.

  • http/tests/media/media-blocked-by-willsendrequest-expected.txt: Renamed from LayoutTests/media/media-blocked-by-willsendrequest-expected.txt.
  • http/tests/media/media-blocked-by-willsendrequest.html: Renamed from LayoutTests/media/media-blocked-by-willsendrequest.html.
  • platform/mac/media/video-blob-request-contains-range-header.html:
  • platform/mac/media/video-blob-request-contains-range-header-expected.txt: Added.
  • platform/mac/media/video-blob-request-contains-range-header.html: Added.
9:40 AM Changeset in webkit [285209] by Antti Koivisto
  • 4 edits in trunk

::slotted shouldn't match an active <slot>
https://bugs.webkit.org/show_bug.cgi?id=232664

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-scoping/slotted-slot-expected.txt:

Source/WebCore:

https://drafts.csswg.org/css-scoping/#slotted-pseudo

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::checkOne const):

Avoid matching <slot>.

9:17 AM Changeset in webkit [285208] by Kate Cheney
  • 7 edits
    1 add in trunk

[iOS] Need API for marking file requests as non-app-initiated
https://bugs.webkit.org/show_bug.cgi?id=232506
<rdar://problem/84824703>

Reviewed by Brent Fulgham.

Source/WebKit:

Pass app initiated value through to the WebPage so file loads
can be attributed correctly.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView loadFileRequest:allowingReadAccessToURL:]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::loadFile):

  • UIProcess/WebPageProxy.h:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/file-with-iframe.html: Added.
9:14 AM Changeset in webkit [285207] by beidson@apple.com
  • 2 edits in trunk/Tools

Fix iOS API tests after r285199
https://bugs.webkit.org/show_bug.cgi?id=232649

Unreviewed.

  • TestWebKitAPI/Tests/WebKitCocoa/NotificationAPI.mm: Definitely not ready for these tests to start running.
9:05 AM Changeset in webkit [285206] by Chris Dumez
  • 2 edits in trunk/Source/WebKitLegacy/mac

Unreviewed iOS build fix.

  • WebCoreSupport/WebNotificationClient.mm:

(-[WebNotificationPolicyListener NO_RETURN_DUE_TO_ASSERT]):
(-[WebNotificationPolicyListener denyOnlyThisRequest]): Deleted.
(-[WebNotificationPolicyListener shouldClearCache]): Deleted.

7:37 AM Changeset in webkit [285205] by Chris Lord
  • 12 edits in trunk/Source/WebCore

[GTK][WPE] Use the display refresh to drive scrolling animations (sync scroll)
https://bugs.webkit.org/show_bug.cgi?id=232077

Reviewed by Simon Fraser.

Service sync scroll animations as part of the scroll phase in
Page::updateRendering, which is driven by the display refresh.

No new tests, covered by existing tests.

  • dom/Document.cpp:

(WebCore::serviceScrollAnimationForScrollableArea):
(WebCore::Document::runScrollSteps):

  • page/FrameView.cpp:

(WebCore::FrameView::didStartScrollAnimation):

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

(WebCore::ScrollAnimator::ScrollAnimator):
(WebCore::ScrollAnimator::startAnimationCallback):
(WebCore::ScrollAnimator::stopAnimationCallback):
(WebCore::ScrollAnimator::serviceScrollAnimation):
(WebCore::ScrollAnimator::scrollControllerAnimationTimerFired): Deleted.

  • platform/ScrollAnimator.h:
  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::didStartScrollAnimation):

  • platform/ScrollingEffectsController.cpp:

(WebCore::ScrollingEffectsController::retargetAnimatedScrollBy):

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::didStartScrollAnimation):

  • rendering/RenderLayerScrollableArea.h:
  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::didStartScrollAnimation):

  • rendering/RenderListBox.h:
6:37 AM Changeset in webkit [285204] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Display box builder should take visual order into account when computing horizontal positions
https://bugs.webkit.org/show_bug.cgi?id=232655

Reviewed by Antti Koivisto.

In this patch we turn logical horizontal positions into "physical" positions based on the visual order of the runs.
With this change, now IFC can render simple RTL content.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineContent): Move shared code to displayBoxRect.

5:45 AM Changeset in webkit [285203] by ntim@apple.com
  • 2 edits
    1 add
    1 delete in trunk/LayoutTests

Make render-layer-rebuild-z-order-lists.html use an HTML reference
https://bugs.webkit.org/show_bug.cgi?id=232658

Reviewed by Antti Koivisto.

This not only tests the crash, but also tests that the dialog is rendered (which was not
the case at the first iteration of the patch which introduced this test).

Also done some minor cleanups to the test.

  • fast/layers/render-layer-rebuild-z-order-lists-expected.html: Added.
  • fast/layers/render-layer-rebuild-z-order-lists-expected.txt: Removed.
  • fast/layers/render-layer-rebuild-z-order-lists.html:
3:59 AM Changeset in webkit [285202] by Antti Koivisto
  • 9 edits in trunk/Source/WebCore

Use Style::ScopeOrdinal for finding the right scope for ::part matching
https://bugs.webkit.org/show_bug.cgi?id=232562

Reviewed by Simon Fraser.

We are already passing the scope ordinal to the selector checker so we can use it consistently to find
the right scope.

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::matchRecursively const):

Find the right scope based on the scope ordinal.
Simplify allowMultiplePseudoElements check, invalid cases are not allowed by the parser.

(WebCore::SelectorChecker::checkOne const):

Find the right scope based on the scope ordinal.

  • css/SelectorChecker.h:
  • dom/ShadowRoot.h:
  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::matchPartPseudoElementRulesForScope):

Compute the scope ordinal for nested scopes.
Make iterative instead of recursive.

(WebCore::Style::ElementRuleCollector::ruleMatches):
(WebCore::Style::ElementRuleCollector::matchAllRules):

Flush all remaining rules.

  • style/ElementRuleCollector.h:
  • style/StyleScope.cpp:

(WebCore::Style::Scope::forOrdinal):
(WebCore::Style::assignedSlotForScopeOrdinal):
(WebCore::Style::hostForScopeOrdinal):

Add helpers.

  • style/StyleScope.h:
  • style/StyleScopeOrdinal.h:

(WebCore::Style::operator--):

We now use values less than ContainingHost to present enclosing scopes, similar to slotted matching.

3:36 AM Changeset in webkit [285201] by Pablo Saavedra
  • 2 edits in trunk

[cmake] Check "cortex" string in the CMAKE_SYSTEM_PROCESSOR for defining WTF_CPU_* vars
https://bugs.webkit.org/show_bug.cgi?id=232623

Reviewed by Carlos Alberto Lopez Perez.

  • Source/cmake/WebKitCommon.cmake:
1:23 AM Changeset in webkit [285200] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

REGRESSION(r284603) [GTK][WPE] test fast/frames/flattening/scrolling-in-object.html fails
https://bugs.webkit.org/show_bug.cgi?id=232627

Use UIHelper.waitForTargetScrollAnimationToSettle rather than a timeout to make the test reliable.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-11-03
Reviewed by Martin Robinson.

  • fast/frames/flattening/scrolling-in-object.html:

Nov 2, 2021:

11:53 PM Changeset in webkit [285199] by beidson@apple.com
  • 7 edits in trunk/Source

Notifications on iOS enabled at compile-time, disabled at runtime
https://bugs.webkit.org/show_bug.cgi?id=232649

Reviewed by Tim Horton.

Source/WebCore:

No new tests (Changing compiled behavior but definitely not runtime behavior)

  • Modules/notifications/Notification.idl:
  • Modules/notifications/NotificationPermission.idl:
  • Modules/notifications/NotificationPermissionCallback.idl:
  • bindings/js/WebCoreBuiltinNames.h:

Source/WTF:

  • wtf/PlatformEnableCocoa.h:
8:37 PM Changeset in webkit [285198] by timothy_horton@apple.com
  • 2 edits in trunk/Tools

UnicodeDecodeError in write_reftest copying a non-UTF8 expected result file
https://bugs.webkit.org/show_bug.cgi?id=232643

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:

(TestResultWriter.write_reftest):
If a reftest's -expected.html file is not valid UTF-8, and the test fails,
when we copy the expected file from the layout tests directory to the
test results directory, we attempt to parse it as UTF-8, resulting in
an exception being thrown.

Instead of needlessly reading in the file as a string and immediately
writing it back out, just copy the file...

I'm not sure there are any not-valid-UTF-8 *ref* tests in the tree, but
there is at least one not-valid-UTF-8 *text* test, which can be run
as a ref-test in some scenarios (see r285132), in which case this problem
occurs: fast/css/line-height-determined-by-primary-font.html.

Also, explicitly ensure the output directory exists before copying
to avoid regressing r122505. Previously this was done inside _write_text_file.

8:23 PM Changeset in webkit [285197] by Ross Kirsling
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Add LLInt fast path for OpMod on x86_64
https://bugs.webkit.org/show_bug.cgi?id=232644

Reviewed by Saam Barati and Yusuke Suzuki.

This patch ports the x86_64 fast path for OpMod from baseline JIT to LLInt.

This is quite similar to OpDiv but the implementation avoids using binaryOpCustomStore
because OpMod is not a ProfiledBinaryOp.

Performance results appear negligible with all JIT tiers enabled;
relevant microbenchmarks with JIT off are as follows.

Before After

int-or-other-mod-then-get-by-val 158.0136+-0.9338 39.7698+-0.4394 definitely 3.9732x faster
integer-modulo 15.1972+-0.4197 7.1461+-0.1530 definitely 2.1266x faster
mod-boolean 145.4011+-2.0483 ? 146.1243+-1.6816 ?
mod-boolean-double 145.6148+-1.8530 ? 145.9380+-1.7073 ?
mod-untyped 286.9585+-3.9535 284.0360+-4.1221 might be 1.0103x faster
negative-zero-modulo 1.2951+-0.1275 1.0220+-0.0412 definitely 1.2672x faster

<geometric> 51.5408+-0.8164 34.7341+-0.3365 definitely 1.4839x faster

  • jit/GPRInfo.h: Add assertions.
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
8:08 PM Changeset in webkit [285196] by caitp@igalia.com
  • 15 edits
    3 adds in trunk/Source/WebCore

[WebIDL] Support [Exposed=*] extended attribute
https://bugs.webkit.org/show_bug.cgi?id=231082

Reviewed by Chris Dumez.

Adds a shorthand to expose interfaces/attributes on Window, Workers*,
and the forthcoming ShadowRealm global object.

See https://github.com/heycam/webidl/issues/468 and
https://github.com/heycam/webidl/pull/526 for details.

  • bindings/scripts/CodeGenerator.pm:

(shouldPropertyBeExposed):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateRuntimeEnableConditionalStringForExposed):

  • bindings/scripts/IDLParser.pm:

(parseExtendedAttributeRest2):

  • bindings/scripts/preprocess-idls.pl:
  • bindings/scripts/test/AudioWorkletGlobalScopeConstructors.idl:
  • bindings/scripts/test/DOMWindowConstructors.idl:
  • bindings/scripts/test/DedicatedWorkerGlobalScopeConstructors.idl:
  • bindings/scripts/test/ExposedStar.idl: Added.
  • bindings/scripts/test/JS/JSDOMWindow.cpp:

(WebCore::jsDOMWindow_ExposedStarConstructorGetter):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):

  • bindings/scripts/test/JS/JSDedicatedWorkerGlobalScope.cpp:

(WebCore::jsDedicatedWorkerGlobalScope_ExposedStarConstructorGetter):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):

  • bindings/scripts/test/JS/JSExposedStar.cpp: Added.

(WebCore::JSExposedStarDOMConstructor::prototypeForStructure):
(WebCore::JSExposedStarDOMConstructor::initializeProperties):
(WebCore::JSExposedStarPrototype::finishCreation):
(WebCore::JSExposedStar::JSExposedStar):
(WebCore::JSExposedStar::finishCreation):
(WebCore::JSExposedStar::createPrototype):
(WebCore::JSExposedStar::prototype):
(WebCore::JSExposedStar::getConstructor):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):
(WebCore::jsExposedStarPrototypeFunction_operationForAllContextsBody):
(WebCore::JSC_DEFINE_HOST_FUNCTION):
(WebCore::jsExposedStarPrototypeFunction_operationJustForWindowContextsBody):
(WebCore::jsExposedStarPrototypeFunction_operationJustForWorkerContextsBody):
(WebCore::JSExposedStar::subspaceForImpl):
(WebCore::JSExposedStar::analyzeHeap):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSExposedStar::toWrapped):

  • bindings/scripts/test/JS/JSExposedStar.h: Added.

(WebCore::JSExposedStar::create):
(WebCore::JSExposedStar::createStructure):
(WebCore::JSExposedStar::subspaceFor):
(WebCore::JSExposedStar::wrapped const):
(WebCore::toJS):
(WebCore::toJSNewlyCreated):

  • bindings/scripts/test/JS/JSPaintWorkletGlobalScope.cpp:

(WebCore::jsPaintWorkletGlobalScope_ExposedStarConstructorGetter):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):

  • bindings/scripts/test/JS/JSServiceWorkerGlobalScope.cpp:

(WebCore::jsServiceWorkerGlobalScope_ExposedStarConstructorGetter):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):

  • bindings/scripts/test/PaintWorkletGlobalScopeConstructors.idl:
  • bindings/scripts/test/ServiceWorkerGlobalScopeConstructors.idl:
  • bindings/scripts/test/SupplementalDependencies.dep:
7:26 PM Changeset in webkit [285195] by don.olmstead@sony.com
  • 45 edits in trunk/Source

Non-unified build fixes early November 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=232589

Unreviewed non-unified build fixes.

Source/JavaScriptCore:

  • API/JSAPIGlobalObject.cpp:
  • bytecode/EvalCodeBlock.cpp:
  • bytecode/FunctionCodeBlock.cpp:
  • bytecode/ModuleProgramCodeBlock.cpp:
  • bytecode/ProgramCodeBlock.cpp:
  • jit/JITInlineCacheGenerator.h:
  • runtime/CustomGetterSetter.cpp:
  • runtime/JSScriptFetcher.cpp:
  • runtime/JSSourceCode.cpp:
  • runtime/ShadowRealmObject.cpp:
  • runtime/ShadowRealmPrototype.cpp:
  • runtime/TemporalInstant.cpp:

Source/WebCore:

  • Modules/push-api/PushSubscriptionData.h:
  • animation/CSSPropertyAnimation.cpp:
  • animation/CSSPropertyAnimation.h:
  • animation/CSSTransition.cpp:
  • animation/WebAnimation.cpp:
  • css/SelectorFilter.cpp:
  • dom/Attr.cpp:
  • dom/ComposedTreeIterator.cpp:
  • editing/BreakBlockquoteCommand.cpp:
  • editing/InsertParagraphSeparatorCommand.cpp:
  • editing/SplitElementCommand.cpp:
  • editing/SplitTextNodeContainingElementCommand.cpp:
  • html/HTMLSummaryElement.cpp:
  • html/HTMLTitleElement.cpp:
  • html/track/VTTCue.cpp:
  • inspector/DOMPatchSupport.cpp:
  • inspector/InspectorNodeFinder.cpp:
  • inspector/agents/InspectorPageAgent.cpp:
  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:
  • page/ResizeObservation.cpp:
  • page/scrolling/ScrollingCoordinatorTypes.h:
  • rendering/RenderCounter.cpp:
  • rendering/svg/RenderSVGModelObject.cpp:
  • rendering/svg/SVGResources.cpp:
  • rendering/svg/SVGRootInlineBox.cpp:
  • rendering/svg/SVGTextChunk.cpp:
  • style/ElementRuleCollector.cpp:
  • style/PageRuleCollector.h:

Source/WebKit:

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::createGPUConnectionToWebProcess):
(WebKit::GPUProcess::webProcessConnection const):
(WebKit::GPUProcess::updateCaptureAccess):
(WebKit::GPUProcess::updateCaptureOrigin):
(WebKit::GPUProcess::nowPlayingManager):

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:
7:19 PM Changeset in webkit [285194] by Russell Epstein
  • 1 copy in tags/Safari-613.1.6.7

Tag Safari-613.1.6.7.

7:12 PM Changeset in webkit [285193] by Russell Epstein
  • 8 edits in branches/safari-613.1.6-branch/Source

Versioning.

WebKit-7613.1.6.7

6:47 PM Changeset in webkit [285192] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

Crash in RenderLayer::rebuildZOrderLists
https://bugs.webkit.org/show_bug.cgi?id=230229

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-11-02
Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/layers/render-layer-rebuild-z-order-lists.html

To avoid operating on nullptr, allocate posZOrderList if it is null,
similar to how it is done in RenderLayer::collectLayers.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::rebuildZOrderLists):

LayoutTests:

  • fast/layers/render-layer-rebuild-z-order-lists-expected.txt: Added.
  • fast/layers/render-layer-rebuild-z-order-lists.html: Added.
  • platform/win/TestExpectations: Skip due to diag.showModal undefined in win.
6:27 PM Changeset in webkit [285191] by rmorisset@apple.com
  • 5 edits in trunk

Regression (r284330): [ macOS wk1 Debug ] webaudio/AudioBuffer/huge-buffer.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=232244
<rdar://problem/84616427>

Reviewed by Yusuke Suzuki.

Source/WebCore:

The test is verifying that trying to allocate an AudioBuffer with 4GB channels fails cleanly.
It used to work automatically, as AudioBuffer relies on Float32Array under the hood, which was limited to 2GB.
Since r284330, ArrayBuffers can be up to 4GB, so it now takes very long to OOM, and sometimes timeout.
I use the same solution which I used for PixelBuffers in r284330: just test that the length is reasonable
and if it is not then abort as if the allocation of the Float32Array had failed.

No new tests: covered by LayoutTests/webaudio/AudioBuffer/huge-buffer.html

  • Modules/webaudio/AudioBuffer.cpp:

(WebCore::AudioBuffer::AudioBuffer):

  • Modules/webaudio/AudioBuffer.h:

LayoutTests:

  • platform/mac-wk1/TestExpectations:
6:00 PM Changeset in webkit [285190] by Kocsen Chung
  • 1 copy in tags/Safari-612.3.3.0.1

Tag Safari-612.3.3.0.1.

5:21 PM Changeset in webkit [285189] by Dewei Zhu
  • 40 edits
    1 add in trunk/Websites/perf.webkit.org

Add 'paired-parallel' repetition type for A/B testing.
https://bugs.webkit.org/show_bug.cgi?id=229545

Reviewed by Ryosuke Niwa and Alexey Proskuryakov.

Add 'paired-parallel' repetition type for A/B testing.
Add 'TriggerableConfiguration' model to store repetition type information for each (platform, test) pair.
Add new component 'repetition-type-selection' to unify A/B testing UI for repetition type selection.
Extend A/B testing syncing script to update repetition types for each triggerable configuration and only
schedule A/B testing on a builder which supports a given repetition type.

  • browser-tests/custom-analysis-task-configurator-tests.js: Updated unit tests accordingly.

(async createCustomAnalysisTaskConfiguratorWithContext):

  • browser-tests/customizable-test-group-form-tests.js: Updated unit tests accordingly.

(async createCustomizableTestGroupFormWithContext):

  • browser-tests/test-group-form-tests.js: Updated unit tests accordingly.

(async createTestGroupFormWithContext):

  • init-database.sql: Added 'triggerable_configuration_repetition_types' table to store supported

repetition types for each triggerable configuration.
Added 'paired-parallel' repetition type.

  • migrate-database.sql: Updated migration scripts.
  • public/api/update-triggerable.php: Added logic to update repetition types for each tirggerable configurations.
  • public/include/commit-sets-helpers.php: Added support for 'paired-parallel' repetition type.
  • public/include/json-header.php: Extended 'find_triggerable_for_task' to include supported repetition types in

return value.

  • public/include/manifest-generator.php: Added logic to include supported repetition types in manifest.
  • public/privileged-api/add-build-requests.php: Extended API to support 'paired-parallel' repetition type.
  • public/privileged-api/create-analysis-task.php: Extended API to support 'paired-parallel' repetition type.
  • public/privileged-api/create-test-group.php: Extended API to support 'paired-parallel' repetition type.
  • public/v3/commit-set-range-bisector.js:

(CommitSetRangeBisector._closestCommitSetsToBisectingCommitByTime): Fix a bug that error is raise when there is
no middle commit set in a range.

  • public/v3/components/custom-configuration-test-group-form.js: Added code to update supported repetition types

on test config change.
(CustomConfigurationTestGroupForm.prototype.startTesting):
(CustomConfigurationTestGroupForm.prototype.didConstructShadowTree):

  • public/v3/components/customizable-test-group-form.js:

(CustomizableTestGroupForm.prototype.startTesting):

  • public/v3/components/repetition-type-selection.js: Added a new model that stores repetition types information

for each (platform, test) pair.
(RepetitionTypeSelection):
(RepetitionTypeSelection.prototype.didConstructShadowTree):
(RepetitionTypeSelection.prototype.get selectedRepetitionType):
(RepetitionTypeSelection.prototype.set selectedRepetitionType):
(RepetitionTypeSelection.prototype.set disabled):
(RepetitionTypeSelection.prototype.setTestAndPlatform):
(RepetitionTypeSelection.prototype.labelForRepetitionType):
(RepetitionTypeSelection.prototype.render):
(RepetitionTypeSelection.prototype._renderRepetitionTypeList):
(RepetitionTypeSelection.htmlTemplate):

  • public/v3/components/test-group-form.js: Adopt 'repetition-type-selection'.

(TestGroupForm.prototype.setTestAndPlatform):
(TestGroupForm.prototype.updateWithTestGroup):
(TestGroupForm.prototype.startTesting):

  • public/v3/index.html:
  • public/v3/models/manifest.js: Pass 'supportedRepetitionTypes' and 'id' for TriggerableConfiguration.

(Manifest.reset):
(Manifest._didFetchManifest):
(Manifest):

  • public/v3/models/test-group.js: Updated logic to share retry logic of 'alternating' test group with 'paired-parallel'

test group.
(TestGroup.prototype.async scheduleMoreRequestsOrClearFlag):

  • public/v3/models/triggerable.js: Added TriggerableConfiguration model.

Added code to creat TriggerableConfiguration in 'Triggerable' constructor.
(Triggerable):
(Triggerable.findByTestConfiguration):
(prototype.get triggerable):
(prototype.get supportedRepetitionTypes):
(findByTestAndPlatform):

  • public/v3/pages/analysis-task-page.js: Added code to update repetition type in the UI based on (test, platform) pair.

(AnalysisTaskResultsPane.prototype.setTestGroups):
(AnalysisTaskTestGroupPane.prototype._renderCurrentTestGroup):
(AnalysisTaskTestGroupPane.prototype._renderTestGroupForm):

  • public/v3/pages/chart-pane.js: Adopt 'repetition-type-selection'.

(ChartPane.prototype.didConstructShadowTree):
(ChartPane.prototype.async _analyzeRange):
(ChartPane.prototype._renderActionToolbar):

  • server-tests/api-manifest-tests.js:
  • server-tests/api-update-triggerable-tests.js: Added and updated unit tests.

(updateWithMacWebKitRepositoryGroups):

  • server-tests/api-upload-root-tests.js: Updated unit tests.
  • server-tests/privileged-api-add-build-requests-tests.js: Added and updated unit tests.

(async addTriggerableAndCreateTask):

  • server-tests/privileged-api-create-analysis-task-tests.js: Added and updated unit tests.
  • server-tests/privileged-api-create-test-group-tests.js: Added and updated unit tests.
  • server-tests/privileged-api-update-test-group-tests.js: Updated unit tests.

(async addTriggerableAndCreateTask):

  • server-tests/resources/mock-data.js:

(MockData.someTestConfigurationId):
(MockData.otherTestConfigurationId):
(MockData.addMockConfiguration):
(MockData.set mockTestSyncConfigWithSingleBuilder):
(MockData.mockTestSyncConfigWithPatchAcceptingBuilder):
(MockData.mockTestSyncConfigWithTwoBuilders):

  • server-tests/tools-sync-buildbot-integration-tests.js: Added and updated unit tests.
  • tools/js/buildbot-syncer.js: Added code to update supported repetition types on triggerable updates.

Update configuration match code to only scheduler build requests the repetition types of which are both
supported by builder and triggerable configuration.
(BuildbotSyncer):
(BuildbotSyncer.prototype.addTestConfiguration):
(BuildbotSyncer.prototype.matchesConfiguration):
(BuildbotSyncer._loadConfig):

  • tools/js/buildbot-triggerable.js:

(BuildbotTriggerable.prototype.updateTriggerable):
(BuildbotTriggerable.prototype.async syncOnce): Move the code that fetches all related test groups before
invoking 'BuildbotTriggerable._validateRequests' which needs repetition types stored in test group in
'BuildbotSyncer.matchesConfiguration'.

  • tools/js/v3-models.js:
  • unit-tests/buildbot-syncer-tests.js: Added and updated unit tests.

(sampleiOSConfig):
(sampleiOSConfigWithExpansions):
(smallConfiguration):
(smallConfigurationWithCustomRepetitionTypes):
(createSampleBuildRequest):

  • unit-tests/measurement-set-analyzer-tests.js: Updated unit tests.
  • unit-tests/resources/mock-v3-models.js:

(MockModels.inject):

3:19 PM Changeset in webkit [285188] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

[WTF] Minor clean-up for format-related functions
<https://webkit.org/b/232514>

Reviewed by Yusuke Suzuki.

  • wtf/Assertions.cpp:

(WTF::createWithFormatAndArguments):

  • Put WTF_ATTRIBUTE_PRINTF() on its own line to match other functions.

(WTF::vprintf_stderr_with_prefix):
(WTF::vprintf_stderr_with_trailing_newline):

  • Move ALLOW_NONLITERAL_FORMAT_{BEGIN,END} around specific function calls that need them.
3:09 PM Changeset in webkit [285187] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Fails to execute JavaScript when soft stack limit is unlimited
https://bugs.webkit.org/show_bug.cgi?id=232328

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-11-02
Reviewed by Yusuke Suzuki.

Fall back to assuming an 8 MB stack limit when the real limit is unlimited. JSC needs to
have some maximum stack size to work with, and this is as good as any.

  • wtf/StackBounds.cpp:

(WTF::StackBounds::currentThreadStackBoundsInternal):

2:52 PM Changeset in webkit [285186] by don.olmstead@sony.com
  • 20 edits in trunk/Source/WebCore

SVG elements should include SVGElementInlines not ElementInlines
https://bugs.webkit.org/show_bug.cgi?id=232637

Reviewed by Yusuke Suzuki.

Replace usages of ElementInlines.h with SVGElementInlines.h in WebCore/svg. Add
SVGElementInlines.h to files that need them when compiled without unified builds.

  • svg/SVGAElement.cpp:
  • svg/SVGAltGlyphElement.cpp:
  • svg/SVGAnimationElement.cpp:
  • svg/SVGFEImageElement.cpp:
  • svg/SVGFilterPrimitiveStandardAttributes.cpp:
  • svg/SVGFontFaceNameElement.cpp:
  • svg/SVGFontFaceUriElement.cpp:
  • svg/SVGHKernElement.cpp:
  • svg/SVGImageElement.cpp:
  • svg/SVGMaskElement.cpp:
  • svg/SVGPatternElement.cpp:
  • svg/SVGStyleElement.cpp:
  • svg/SVGTRefElement.cpp:
  • svg/SVGTSpanElement.cpp:
  • svg/SVGTextElement.cpp:
  • svg/SVGTextPathElement.cpp:
  • svg/SVGVKernElement.cpp:
  • svg/animation/SVGSMILElement.cpp:
  • svg/properties/SVGAttributeAnimator.cpp:
2:50 PM Changeset in webkit [285185] by don.olmstead@sony.com
  • 3 edits in trunk/Source/WebCore

[MSVC] Remove unused friend class in filter code
https://bugs.webkit.org/show_bug.cgi?id=232636

Reviewed by Yusuke Suzuki.

In r284857 the WTF prefix was removed from ParallelJobs in filter code. During a
non-unified build MSVC thinks that there is a WebCore::ParallelJobs due to a friend
declaration in filter code and fails to build. Remove the friend declaration as they are
not used.

  • platform/graphics/filters/FEGaussianBlur.h:
  • platform/graphics/filters/FETurbulence.h:
2:48 PM Changeset in webkit [285184] by pvollan@apple.com
  • 2 edits in trunk/Tools

REGRESSION (r268421): TestWebKitAPI.WebKit.PreferenceChanges* tests are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=221848
<rdar://problem/70966379>

Reviewed by Brent Fulgham.

After r268421, the preferences are set asynchronously in the WebContent process, which introduced this flakiness.
This patch addresses this by modifying the flaky tests to loop until the preference value is equal to the expected
value.

  • TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm:

(TEST):

2:25 PM Changeset in webkit [285183] by Kocsen Chung
  • 5 edits in branches/safari-612.3.3.1-branch/Source

Cherry-pick r283732. rdar://problem/84944569

Add feature flag for COOP / COEP violation reporting and turn off by default
https://bugs.webkit.org/show_bug.cgi?id=231371

Reviewed by Youenn Fablet.

Add feature flag for COOP / COEP violation reporting and turn off by default since our
implementation doesn't match the latest specification.

Source/WebCore:

  • loader/CrossOriginEmbedderPolicy.cpp: (WebCore::sendCOEPPolicyInheritenceViolation): (WebCore::sendCOEPCORPViolation):
  • loader/CrossOriginOpenerPolicy.cpp: (WebCore::sendViolationReportWhenNavigatingToCOOPResponse): (WebCore::sendViolationReportWhenNavigatingAwayFromCOOPResponse):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

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

2:24 PM Changeset in webkit [285182] by Kocsen Chung
  • 8 edits in branches/safari-612.3.3.1-branch/Source

Versioning.

WebKit-7612.3.3.1.1

2:20 PM Changeset in webkit [285181] by Kocsen Chung
  • 5 edits in branches/safari-612.3.3.0-branch/Source

Cherry-pick r283732. rdar://problem/84944569

Add feature flag for COOP / COEP violation reporting and turn off by default
https://bugs.webkit.org/show_bug.cgi?id=231371

Reviewed by Youenn Fablet.

Add feature flag for COOP / COEP violation reporting and turn off by default since our
implementation doesn't match the latest specification.

Source/WebCore:

  • loader/CrossOriginEmbedderPolicy.cpp: (WebCore::sendCOEPPolicyInheritenceViolation): (WebCore::sendCOEPCORPViolation):
  • loader/CrossOriginOpenerPolicy.cpp: (WebCore::sendViolationReportWhenNavigatingToCOOPResponse): (WebCore::sendViolationReportWhenNavigatingAwayFromCOOPResponse):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

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

2:08 PM Changeset in webkit [285180] by Kocsen Chung
  • 1 copy in branches/safari-612.3.3.1-branch

New branch.

1:44 PM Changeset in webkit [285179] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Crash under WebPage::sendCOEPCORPViolation()
https://bugs.webkit.org/show_bug.cgi?id=232631
<rdar://84919898>

Reviewed by Alex Christensen.

Add missing null checks for the frame after calling WebProcess::singleton().webFrame(frameID).

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::sendCOEPPolicyInheritenceViolation):
(WebKit::WebPage::sendCOEPCORPViolation):
(WebKit::WebPage::sendViolationReportWhenNavigatingToCOOPResponse):
(WebKit::WebPage::sendViolationReportWhenNavigatingAwayFromCOOPResponse):

12:57 PM Changeset in webkit [285178] by commit-queue@webkit.org
  • 27 edits
    7 adds in trunk

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

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

JSTests:

  • stress/temporal-instant.js: Added.

(shouldBe):
(shouldNotBe):
(shouldThrow):
(instants.forEach):
(shouldThrow.new.Temporal.Instant):
(const.maxValue.new.Temporal.Instant):
(shouldBe.epoch.subtract):

  • test262/config.yaml: No need to ignore all Temporal.Instant tests anymore, only the ones for the unimplemented methods.

Source/JavaScriptCore:

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • runtime/ISO8601.cpp:

(JSC::ISO8601::parseInstant): Add a parsing function for Instant strings

reusing as much as possible from the other parsing functions.

(JSC::ISO8601::ExactTime::fromISOPartsAndOffset): Static method for

creating from ISO calendar components and UTC offset.

(JSC::ISO8601::checkedCastDoubleToInt128): Helper function for checking

whether a double can fit into an int128 without overflow.

(JSC::ISO8601::ExactTime::add const):
(JSC::ISO8601::ExactTime::round):
(JSC::ISO8601::ExactTime::difference const):
(JSC::ISO8601::ExactTime::round const):

  • runtime/ISO8601.h:

(JSC::ISO8601::ExactTime::ExactTime): Add an ExactTime type that wraps

an Int128 and can do the basic operations. This type can be reused in
Temporal.ZonedDateTime.

(JSC::ISO8601::ExactTime::fromEpochSeconds):
(JSC::ISO8601::ExactTime::fromEpochMilliseconds):
(JSC::ISO8601::ExactTime::fromEpochMicroseconds):
(JSC::ISO8601::ExactTime::epochSeconds const):
(JSC::ISO8601::ExactTime::epochMilliseconds const):
(JSC::ISO8601::ExactTime::epochMicroseconds const):
(JSC::ISO8601::ExactTime::epochNanoseconds const):
(JSC::ISO8601::ExactTime::nanosecondsFraction const):
(JSC::ISO8601::ExactTime::asString const):
(JSC::ISO8601::ExactTime::isValid const):
(JSC::ISO8601::ExactTime::operator< const):
(JSC::ISO8601::ExactTime::operator<= const):
(JSC::ISO8601::ExactTime::operator== const):
(JSC::ISO8601::ExactTime::operator!= const):
(JSC::ISO8601::ExactTime::operator>= const):
(JSC::ISO8601::ExactTime::operator> const):

  • runtime/IntlDateTimeFormat.h:
  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormat::handleDateTimeValue): Add a minimal

implementation of the HandleDateTimeValue abstract op from the
Temporal specification, only covering Temporal.Instant.

(JSC::JSC_DEFINE_HOST_FUNCTION): Use it in the existing

Intl.DateTimeFormat methods.

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::createFrom): Add an overload that takes an Int128.

  • runtime/JSBigInt.h: Remove declaration for nonexistent toUint64Heap().
  • runtime/JSDateMath.cpp: Move timeToMS() into WTF.
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildrenImpl):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::instantStructure):

  • runtime/TemporalDuration.cpp:

(JSC::TemporalDuration::toLimitedDuration): Added.

  • runtime/TemporalDuration.h:
  • runtime/TemporalInstant.cpp: Added.

(JSC::TemporalInstant::createStructure):
(JSC::TemporalInstant::TemporalInstant):
(JSC::TemporalInstant::create):
(JSC::TemporalInstant::tryCreateIfValid):
(JSC::TemporalInstant::toInstant):
(JSC::TemporalInstant::from):
(JSC::TemporalInstant::fromEpochSeconds):
(JSC::TemporalInstant::fromEpochMilliseconds):
(JSC::TemporalInstant::fromEpochMicroseconds):
(JSC::TemporalInstant::fromEpochNanoseconds):
(JSC::TemporalInstant::compare):

  • runtime/TemporalInstant.h: Added.
  • runtime/TemporalInstantConstructor.cpp: Added.

(JSC::TemporalInstantConstructor::create):
(JSC::TemporalInstantConstructor::createStructure):
(JSC::TemporalInstantConstructor::TemporalInstantConstructor):
(JSC::TemporalInstantConstructor::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/TemporalInstantConstructor.h: Added.
  • runtime/TemporalInstantPrototype.cpp: Added.

(JSC::TemporalInstantPrototype::create):
(JSC::TemporalInstantPrototype::createStructure):
(JSC::TemporalInstantPrototype::TemporalInstantPrototype):
(JSC::TemporalInstantPrototype::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSC_DEFINE_CUSTOM_GETTER):

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

(JSC::createInstantConstructor): Added.
(JSC::formatSecondsStringPart): Added.
(JSC::abs): Added for clarity.
(JSC::roundNumberToIncrement): Add overload for Int128.

  • runtime/TemporalObject.h:
  • runtime/VM.cpp:
  • runtime/VM.h:

Source/WTF:

  • wtf/CheckedArithmetic.h: Don't use builtin operations if int128 is being emulated using WTF::Int128. Also work around Clang/Linux bug where builtin_mul_overflow() doesn't work on int128. See https://bugs.llvm.org/show_bug.cgi?id=16404
  • wtf/DateMath.h:

(WTF::timeToMS): Moved from JSDateMath.h.

12:42 PM Changeset in webkit [285177] by sihui_liu@apple.com
  • 6 edits in trunk/Source/WebKit

Terminate unresponsive network process by crashing it
https://bugs.webkit.org/show_bug.cgi?id=232603

Reviewed by Chris Dumez.

UI process currently kills network process when it does not respond message in some time (network process being
unresponsive). We've found one common case where network process becomes unresponsive is that it is blocked by
some slow operation on the main thread (like file operation in rdar://84511633). To understand what the
operations are and make a fix, we now ask network process to crash itself on IPC thread. In this way, we can get
crash report that includes the call stack of the main thread. To avoid generating too many crash reports, we
only send the crash message to network process when it becomes unresponsive multiple times in a short time
period.

  • Platform/IPC/Connection.cpp:

(IPC::terminateDueToIPCTerminateMessage):
(IPC::Connection::processIncomingMessage):

  • Scripts/webkit/model.py:
  • Scripts/webkit/tests/MessageNames.cpp:

(IPC::description):
(IPC::receiverName):
(IPC::isValidMessageName):

  • Scripts/webkit/tests/MessageNames.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::shouldTerminateNetworkProcessBySendingMessage):
(WebKit::NetworkProcessProxy::didBecomeUnresponsive):

12:38 PM Changeset in webkit [285176] by Russell Epstein
  • 8 edits in branches/safari-612.3.3.0-branch/Source

Versioning.

WebKit 7612.3.3.0.1

12:35 PM Changeset in webkit [285175] by Jonathan Bedard
  • 7 edits in trunk/Tools

[webkitscmpy] Reduce autoinstalls on import
https://bugs.webkit.org/show_bug.cgi?id=232574
<rdar://problem/84894275>

Reviewed by Stephanie Lewis.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Remove whichcraft (webkitcorepy registers it).
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: Remove unused webkitscmpy imports.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py: Remote unused webkitcorepy import.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py: Move whichcraft to function.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py: Move jinja2 to function.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py: Move fasteners, xmltodict import to functions.

Canonical link: https://commits.webkit.org/243809@main

12:31 PM Changeset in webkit [285174] by Russell Epstein
  • 5 edits in branches/safari-612-branch/Source

Cherry-pick r283732. rdar://problem/84349027

Add feature flag for COOP / COEP violation reporting and turn off by default
https://bugs.webkit.org/show_bug.cgi?id=231371

Reviewed by Youenn Fablet.

Add feature flag for COOP / COEP violation reporting and turn off by default since our
implementation doesn't match the latest specification.

Source/WebCore:

  • loader/CrossOriginEmbedderPolicy.cpp: (WebCore::sendCOEPPolicyInheritenceViolation): (WebCore::sendCOEPCORPViolation):
  • loader/CrossOriginOpenerPolicy.cpp: (WebCore::sendViolationReportWhenNavigatingToCOOPResponse): (WebCore::sendViolationReportWhenNavigatingAwayFromCOOPResponse):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

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

12:26 PM Changeset in webkit [285173] by Ross Kirsling
  • 3 edits in trunk/Source/JavaScriptCore

[JSC][LLInt] Reverse unintended effects of r285152
https://bugs.webkit.org/show_bug.cgi?id=232633

Reviewed by Saam Barati.

The previous patch was not intended to change the generated assembly whatsoever,
but it turns out that 3-argument syntax produces, e.g. vsub instead of sub on x86.

As such, this patch does away with the 3-arg cases and merely clarifies names as rhs, lhs across the board.

(Also: Fix a line from the previous patch where a macro was not referring to a passed label properly.)

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
12:20 PM Changeset in webkit [285172] by Russell Epstein
  • 1 copy in branches/safari-612.3.3.0-branch

New branch.

12:02 PM Changeset in webkit [285171] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Provide bidi properties when constructing TextRun
https://bugs.webkit.org/show_bug.cgi?id=232632

Reviewed by Alan Bujtas.

Enable correct painting of bidi text runs.

  • layout/integration/InlineIteratorBoxModernPath.h:

(WebCore::InlineIterator::BoxModernPath::createTextRun const):
(WebCore::InlineIterator::BoxModernPath::renderText const):
(WebCore::InlineIterator::BoxModernPath::direction const):

11:36 AM Changeset in webkit [285170] by Kate Cheney
  • 12 edits in trunk

PCM: Safari on iOS and macOS are not sending ad click attribution reports for Private Click Measurement
https://bugs.webkit.org/show_bug.cgi?id=228104
<rdar://problem/80991209>

Reviewed by John Wilander.

Source/WebCore:

No new tests. Several existing tests would timeout with the removal of
m_firePendingAttributionRequestsTimer.startOneShot(m_isRunningTest ? 0_s : seconds)
if the fix wasn't in place.

  • loader/PrivateClickMeasurement.cpp:

(WebCore::randomlyBetweenTwentyFourAndFortyEightHours):
(WebCore::PrivateClickMeasurement::attributeAndGetEarliestTimeToSend):

  • loader/PrivateClickMeasurement.h:

Source/WebKit:

firePendingAttributionRequests() was sometimes scheduling the next timer
fire to be the raw time value instead of the difference between now
and the scheduled send time. This was resulting in some reports not being
sent within the 24-48 hour range.

To test this, this patch removes the immediate timer fire for testing
and instead sets the earliest time to send values to both be 1 second.
This will test that the proper timer gets set to send both reports.

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp:

(WebKit::PCM::Database::attributePrivateClickMeasurement):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::startTimer):
(WebKit::PrivateClickMeasurementManager::attribute):
(WebKit::PrivateClickMeasurementManager::randomlyBetweenFifteenAndThirtyMinutes const):
(WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests):
In the case of both times being past due to report, schedule one for
15 - 30 minutes later.

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.cpp:

(WebKit::PCM::Store::attributePrivateClickMeasurement):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:

(TestWebKitAPI::TEST):

11:34 AM Changeset in webkit [285169] by commit-queue@webkit.org
  • 22 edits in trunk

AX: WebKit needs to include NSAccessibilityChildrenInNavigationOrderAttribute in accessibilityAttributeNames
https://bugs.webkit.org/show_bug.cgi?id=232595

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-11-02
Reviewed by Andres Gonzalez.

This patch adds NSAccessibilityChildrenInNavigationOrderAttribute
(a.k.a. AXChildrenInNavigationOrder) to
WebAccessibilityObjectWrapperMac::accessibilityAttributeNames. The Mac
wrapper supported this attribute prior to this patch, but we didn't
advertise that we supported it because we didn't include it in our
exported attribute names.

Source/WebCore:

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

Add NSAccessibilityChildrenInNavigationOrderAttribute to list of base
supported attributes.

LayoutTests:

  • accessibility/image-link-expected.txt:
  • accessibility/image-map2-expected.txt:
  • accessibility/internal-link-anchors2-expected.txt:
  • accessibility/mac/aria-columnrowheaders-expected.txt:
  • accessibility/mac/bounds-for-range-expected.txt:
  • accessibility/mac/document-attributes-expected.txt:
  • accessibility/mac/document-links-expected.txt:
  • accessibility/mac/internal-link-anchors-expected.txt:
  • accessibility/math-multiscript-attributes-expected.txt:
  • accessibility/table-attributes-expected.txt:
  • accessibility/table-cell-spans-expected.txt:
  • accessibility/table-cells-expected.txt:
  • accessibility/table-detection-expected.txt:
  • accessibility/table-one-cell-expected.txt:
  • accessibility/table-sections-expected.txt:
  • accessibility/table-with-rules-expected.txt:
  • accessibility/transformed-element-expected.txt:
  • platform/mac/accessibility/lists-expected.txt:
  • platform/mac/accessibility/parent-delete-expected.txt:

Add expected AXChildrenInNavigationOrder attribute output.

10:50 AM Changeset in webkit [285168] by timothy_horton@apple.com
  • 8 edits in trunk/Tools

dumpAsText() tests don't get the ref-test treatment when using --self-compare-with-header
https://bugs.webkit.org/show_bug.cgi?id=232611

Reviewed by Jonathan Bedard.

One oversight in r285132: a test can disable pixel dumping by calling
dumpAsText(). This causes --self-compare-with-header to fall over because
it expects every test to have pixel results (and that is the whole point).

Add an un-overrideable --force-dump-pixels TestCommand argument,
and adopt it for self-comparison tests.

  • Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:

(SingleTestRunner._run_self_comparison_test):

  • Scripts/webkitpy/port/driver.py:

(DriverInput.init):
(DriverInput.repr):
(Driver._command_from_driver_input):

  • TestRunnerShared/TestCommand.cpp:

(WTR::parseInputLine):

  • TestRunnerShared/TestCommand.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::runTest):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::dumpResults):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

  • WebKitTestRunner/TestInvocation.h:
10:25 AM Changeset in webkit [285167] by sbarati@apple.com
  • 4 edits
    1 add in trunk

EnumeratorGetByVal for IndexedMode+OwnStructureMode doesn't always recover the property name
https://bugs.webkit.org/show_bug.cgi?id=231321
<rdar://problem/84211697>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/enumerator-get-by-val-needs-to-recover-property-name.js: Added.

Source/JavaScriptCore:

When running an EnumeratorGetByVal in IndexedMode+OwnStructureMode, we may
go to the slow path. However, we were incorrectly going to the slow path
before recovering the actual property name. Instead, we were passing in
the integer index value to the get by val.

  • dfg/DFGSpeculativeJIT.cpp:

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

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

10:11 AM Changeset in webkit [285166] by Kate Cheney
  • 5 edits in trunk/LayoutTests

Followup fix to https://bugs.webkit.org/show_bug.cgi?id=231928

Unreviewed. Update test expectations now that we report HTTP status
code in console messages.

  • http/tests/app-privacy-report/app-attribution-preflight-async-expected.txt:
  • http/tests/app-privacy-report/app-attribution-preflight-sync-expected.txt:
  • http/tests/app-privacy-report/user-attribution-preflight-async-expected.txt:
  • http/tests/app-privacy-report/user-attribution-preflight-sync-expected.txt:
10:09 AM Changeset in webkit [285165] by Simon Fraser
  • 5 edits in trunk/Source/WebKit

Revert the wheel event coalescing added in r277587
https://bugs.webkit.org/show_bug.cgi?id=232602
<rdar://84908023>

Reviewed by Wenson Hsieh.

This wheel event coalescing was added to allow the tail end of momentum scrolls on
120Hz devices to fall back to 60fps for power reasons. However, the OS does this for
us, so we don't need to do our own coalescing.

  • Shared/WebWheelEventCoalescer.cpp:

(WebKit::WebWheelEventCoalescer::shouldDispatchEvent):
(WebKit::WebWheelEventCoalescer::isMomentumPhaseEvent): Deleted.

  • Shared/WebWheelEventCoalescer.h:

(WebKit::WebWheelEventCoalescer::shouldCoalesceEventsDuringDeceleration const): Deleted.
(WebKit::WebWheelEventCoalescer::setShouldCoalesceEventsDuringDeceleration): Deleted.
(): Deleted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::wheelEventCoalescer):
(WebKit::WebPageProxy::windowScreenDidChange):
(WebKit::WebPageProxy::shouldCoalesceWheelEventsDuringDeceleration const): Deleted.

  • UIProcess/WebPageProxy.h:
10:01 AM Changeset in webkit [285164] by Patrick Angle
  • 7 edits in trunk/Source

WebDriver: [Cocoa] support acceptInsecureCerts capability
https://bugs.webkit.org/show_bug.cgi?id=231789

Reviewed by BJ Burg.

Add necessary plumbing to support the acceptInsecureCerts WebDriver capability.

Source/JavaScriptCore:

  • inspector/remote/RemoteInspectorConstants.h:
  • inspector/remote/cocoa/RemoteInspectorCocoa.mm:

(Inspector::RemoteInspector::receivedAutomationSessionRequestMessage):

Source/WebKit:

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

(-[_WKAutomationSessionConfiguration init]):
(-[_WKAutomationSessionConfiguration copyWithZone:]):

  • UIProcess/Cocoa/AutomationClient.mm:

(WebKit::AutomationClient::requestAutomationSession):

9:37 AM Changeset in webkit [285163] by Kate Cheney
  • 7 edits in trunk

https://bugs.webkit.org/show_bug.cgi?id=232593
Remove isAppInitiated from _WKSessionState

Reviewed by Brent Fulgham.

Source/WebKit:

After https://bugs.webkit.org/show_bug.cgi?id=232486 we no longer need
the isAppInitiated value on _WKSessionState. It will be set
automatically when session state is retrieved.

No new tests. Confirmed by existing RestoreFromSessionState* API
tests.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _restoreSessionState:andNavigate:]):

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

(-[_WKSessionState _sessionStateWithAppInitiatedValue]): Deleted.

  • UIProcess/API/Cocoa/_WKSessionStateInternal.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:
9:01 AM Changeset in webkit [285162] by Antti Koivisto
  • 7 edits in trunk/Source/WebCore

[LFC][Integration] Add support for IFC preferred width computation
https://bugs.webkit.org/show_bug.cgi?id=232621

Reviewed by Alan Bujtas.

The functionality is behind a #define and not enabled yet.

  • layout/formattingContexts/inline/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):

Return the cached value if it exists.

  • layout/formattingContexts/inline/InlineFormattingContext.h:
  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::computeIntrinsicWidthConstraints):

Interface with IFC.

  • layout/integration/LayoutIntegrationLineLayout.h:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::computeAndSetLineLayoutPath):

Factor into a function.

(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
(WebCore::RenderBlockFlow::tryComputePreferredWidthsUsingModernPath):

Test if we the content can use the IFC preferred width computation. This way the
feature can be enabled incrementally.

  • rendering/RenderBlockFlow.h:
8:59 AM Changeset in webkit [285161] by Chris Lord
  • 9 edits in trunk/Source/WebCore

[GTK][WPE] Use the display refresh to drive scrolling animations (async scroll)
https://bugs.webkit.org/show_bug.cgi?id=232432

Reviewed by Simon Fraser.

Implement missing API in nicosia async scroll path to have scroll
animations driven by the display refresh instead of a 60Hz timer.

No new tests, covered by existing tests.

  • page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:

(WebCore::ScrollingCoordinatorNicosia::didCompleteRenderingUpdate):
(WebCore::ScrollingCoordinatorNicosia::hasNodeWithAnimatedScrollChanged):

  • page/scrolling/nicosia/ScrollingCoordinatorNicosia.h:
  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeFrameScrollingNodeNicosia::serviceScrollAnimation):

  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::serviceScrollAnimation):

  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp:

(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::startAnimationCallback):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::stopAnimationCallback):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::serviceScrollAnimation):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::animationTimerFired): Deleted.

  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.h:
8:56 AM Changeset in webkit [285160] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Line should keep track of whether the content needs visual reordering
https://bugs.webkit.org/show_bug.cgi?id=232601

Reviewed by Antti Koivisto.

  • layout/formattingContexts/inline/InlineLine.cpp:

(WebCore::Layout::Line::initialize):
(WebCore::Layout::Line::append):

  • layout/formattingContexts/inline/InlineLine.h:

(WebCore::Layout::Line::contentNeedsBidiReordering const):

8:42 AM Changeset in webkit [285159] by Chris Dumez
  • 9 edits in trunk/Source

Use higher QoS for WheelEvent and DisplayWasRefreshed IPCs
https://bugs.webkit.org/show_bug.cgi?id=232458
<rdar://82657744>

Reviewed by Simon Fraser.

Source/WebKit:

Use higher QoS for WheelEvent and DisplayWasRefreshed IPCs since those are high priority. The
UIProcess's main thread has high UserInteractive QoS but the IPC thread has a lower QoS by default.

We cannot raise the QoS of the IPC thread without regressing some performance benchmarks since not
all IPC is high priority.

Making this change helps with responsiveness under heavy load scenarios.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::sendMessage):

  • Platform/IPC/Connection.h:

(IPC::Connection::send):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::sendWheelEvent):

  • UIProcess/mac/DisplayLink.cpp:

(WebKit::DisplayLink::notifyObserversDisplayWasRefreshed):

Source/WTF:

Add dispatchWithQOS() function to WorkQueue to dispatch a task with a given QoS.

  • wtf/WorkQueue.cpp:

(WTF::WorkQueueBase::dispatchWithQOS):

  • wtf/WorkQueue.h:
  • wtf/cocoa/WorkQueueCocoa.cpp:

(WTF::WorkQueueBase::dispatchWithQOS):

8:11 AM Changeset in webkit [285158] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Generalize pull-request title generation.
https://bugs.webkit.org/show_bug.cgi?id=232463
<rdar://problem/84784354>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:

(PullRequest.title_for): Compute pull-request title for a set of commits.
(PullRequest.main): Generalize pull-request title generation.

7:56 AM Changeset in webkit [285157] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Pass in the visual order list to display box construction
https://bugs.webkit.org/show_bug.cgi?id=232600

Reviewed by Antti Koivisto.

In this patch we compute the visual order for the bidi runs if needed. This visual order is then passed
in to the display box builder so that the final display boxes are constructed in the right order (horizontal positions are not yet adjusted).

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineContent):

  • layout/formattingContexts/inline/InlineLine.h:

(WebCore::Layout::Line::contentNeedsBidiReordering const):

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::layoutInlineContent):

  • layout/formattingContexts/inline/InlineLineBuilder.h:
6:56 AM Changeset in webkit [285156] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Use the isLineSpanningInlineBoxStart line run type to update spanning inline box geometry
https://bugs.webkit.org/show_bug.cgi?id=232578

Reviewed by Antti Koivisto.

Now that we have dedicated LineSpanningInlineBoxStart line run type, let's use it to update the associated inline box geometry.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::build):
(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineContent): Move the update logic over here from the createBoxesAndUpdateGeometryForLineSpanningInlineBoxes loop.
(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineSpanningInlineBoxes): Deleted.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.h:
1:47 AM Changeset in webkit [285155] by commit-queue@webkit.org
  • 19 edits
    4 adds in trunk

[GTK][WPE] Support setting status code and getting HTTP method in custom URI scheme handlers
https://bugs.webkit.org/show_bug.cgi?id=231880

Patch by Zixing Liu <liushuyu011@gmail.com> on 2021-11-02
Reviewed by Carlos Garcia Campos.

Source/WebKit:

  • SourcesGTK.txt: Added WebKitURISchemeResponse.cpp
  • SourcesWPE.txt: Added WebKitURISchemeResponse.cpp
  • UIProcess/API/glib/WebKitURISchemeRequest.cpp:

(webkit_uri_scheme_request_get_http_method): Added new API function
(webkit_uri_request_finish_with_response): Added new API function

  • UIProcess/API/glib/WebKitURISchemeRequestPrivate.h: Added.
  • UIProcess/API/glib/WebKitURISchemeResponse.cpp: Added.

(webkit_uri_scheme_response_class_init): Added init function for the new type
(webkit_uri_scheme_response_new): Added new API function
(webkit_uri_scheme_response_set_status): Added new API function
(webkit_uri_scheme_response_set_content_type): Added new API function

  • UIProcess/API/glib/WebKitURISchemeResponsePrivate.h: Copied from Source/WebKit/UIProcess/API/glib/WebKitURISchemeRequestPrivate.h.
  • UIProcess/API/gtk/WebKitAutocleanups.h: Register clean-up function for WebkitURISchemeResponse
  • UIProcess/API/gtk/WebKitURISchemeRequest.h: Added function prototype for

webkit_uri_scheme_request_get_http_method

  • UIProcess/API/gtk/WebKitURISchemeResponse.h: Added.
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Added new symbols and new types
  • UIProcess/API/gtk/webkit2.h: Include a new header: WebKitURISchemeResponse.h
  • UIProcess/API/wpe/WebKitURISchemeRequest.h: Added function prototype for

webkit_uri_scheme_request_get_http_method

  • UIProcess/API/gtk/WebKitURISchemeResponse.h: Added.
  • UIProcess/API/wpe/webkit.h: Include a new header: WebKitURISchemeResponse.h
  • UIProcess/API/wpe/docs/wpe-1.0-sections.txt: Added new symbols and new types

Tools:

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:

(testWebContextURIScheme): Added tests to test new public APIs for WebKitGtk

Nov 1, 2021:

11:56 PM Changeset in webkit [285154] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Remove some unused Heap fields.
https://bugs.webkit.org/show_bug.cgi?id=232604

Reviewed by Yusuke Suzuki.

  • heap/Heap.cpp:

(JSC::Heap::notifyThreadStopping):

  • heap/Heap.h:
9:55 PM Changeset in webkit [285153] by Russell Epstein
  • 8 edits in branches/safari-612-branch/Source

Versioning.

WebKit-7612.3.4

8:42 PM Changeset in webkit [285152] by Ross Kirsling
  • 3 edits in trunk/Source/JavaScriptCore

[JSC][LLInt] Non-commutative binops are hard to reason about when operands are labelled in reverse
https://bugs.webkit.org/show_bug.cgi?id=232598

Reviewed by Saam Barati.

In offlineasm, OP a, b, c is c = a OP b but OP a, b is b = b OP a.

This can make identifiers like left and right quite confusing --
simple cases like subd left, right are already misleading, while OpDiv literally
passes its RHS to a macro as left and then checks left for division by zero.
It becomes difficult to keep this all in one's brain without rewriting it on paper.

This patch may not constitute a "complete solution", but it at least makes our naming honest:

  1. Use 3-argument syntax (as left, right, result) whenever possible.
  2. When not possible (e.g. because bsubio isn't flexible about its arguments or because x86 doesn't have 3-argument shift operations), then say rhs, lhs explicitly.
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
8:25 PM Changeset in webkit [285151] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebCore

[Curl] Fix -Wreorder-ctor in CurlRequest
https://bugs.webkit.org/show_bug.cgi?id=232591

Reviewed by Ross Kirsling.

Reorder member initializer list in CurlRequest::CurlRequest to follow the ordering of
members in its declaration.

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::CurlRequest):

7:30 PM Changeset in webkit [285150] by Fujii Hironori
  • 2 edits in trunk/Tools

ImageDiff.cpp(74): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 2 has type 'size_t'
https://bugs.webkit.org/show_bug.cgi?id=232596

Reviewed by Don Olmstead.

Since r284764, MSVC reports the following warning and a suggestion.

Tools\ImageDiff\ImageDiff.cpp(74): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 2 has type 'size_t'
Tools\ImageDiff\ImageDiff.cpp(74): note: consider using '%zu' in the format string

  • ImageDiff/ImageDiff.cpp:

(processImages): Use %zu for size_t.

6:14 PM Changeset in webkit [285149] by ysuzuki@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

[JSC] LLIntCallee should have two replacements
https://bugs.webkit.org/show_bug.cgi?id=228552
rdar://81217357

Reviewed by Saam Barati.

LLIntCallee can be used for signaling memory and bounds-checking memory.
Thus it should have two replacements for each mode.

  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::work):

  • wasm/WasmCallee.h:

(JSC::Wasm::Callee::setOSREntryCallee):

  • wasm/WasmOMGForOSREntryPlan.cpp:

(JSC::Wasm::OMGForOSREntryPlan::work):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::updateCallSitesToCallUs):

  • wasm/WasmSlowPaths.cpp:

(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::WASM_SLOW_PATH_DECL):

6:06 PM Changeset in webkit [285148] by beidson@apple.com
  • 2 edits in trunk/Source/WebKitLegacy/mac

Make WebChromeClient's m_webView pointer weak.
https://bugs.webkit.org/show_bug.cgi?id=232588

Reviewed by David Kilzer.

  • WebCoreSupport/WebChromeClient.h:
4:56 PM Changeset in webkit [285147] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebCore

[AX] Fix signature of childrenChanged when !ENABLE(ACCESSIBILITY)
https://bugs.webkit.org/show_bug.cgi?id=232590
<rdar://problem/84904540>

Unreviewed build fix.

In r285092 the signature of childrenChanged went from AXCoreObject* to AccessibilityObject*
but wasn't updated when accessibility is disabled.

  • accessibility/AXObjectCache.h:

(WebCore::AXObjectCache::checkedStateChanged):
(WebCore::AXObjectCache::childrenChanged):

4:50 PM Changeset in webkit [285146] by don.olmstead@sony.com
  • 5 edits in trunk

[Curl] Explicitly disable libcurl's internal cookie support
https://bugs.webkit.org/show_bug.cgi?id=232586

Reviewed by Ross Kirsling.

.:

Setting CURLOPT_COOKIEFILE to NULL to disable the cookie engine was not added till 7.77.0
so require that version or later.

  • Source/cmake/OptionsPlayStation.cmake:
  • Source/cmake/OptionsWinCairo.cmake:

Source/WebCore:

Explicitly disable the cookie engine inside curl.

  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::CurlHandle):

4:33 PM Changeset in webkit [285145] by commit-queue@webkit.org
  • 122 edits in trunk

[WebInspector][CORS] Show HTTP status code in CORS messages.
https://bugs.webkit.org/show_bug.cgi?id=231928

LayoutTests/imported/w3c:

Patch by Michael[tm] Smith <sideshowbarker (Michael[tm] Smith)> on 2021-11-01
Reviewed by Darin Adler

Update tests with CORS messages, by adding the status code.

  • web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/track-data-url-expected.txt:
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox_032-expected.txt:
  • web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-crossorigin-change.sub-expected.txt:
  • web-platform-tests/referrer-policy/generic/sandboxed-iframe-with-opaque-origin-expected.txt:
  • web-platform-tests/workers/modules/dedicated-worker-import-data-url-cross-origin-expected.txt:
  • web-platform-tests/worklets/audio-worklet-credentials.https-expected.txt:
  • web-platform-tests/worklets/audio-worklet-import.https-expected.txt:
  • web-platform-tests/worklets/audio-worklet-referrer.https-expected.txt:

Source/WebCore:

Patch by Michael Smith <sideshowbarker (Michael[tm] Smith)> on 2021-11-01
Reviewed by Darin Adler

Make the HTTP status be included in all CORS messages that might
get logged to the Inspector console when a 4xx or 5xx error occurs.
That means these:

  • Failed to load resource: Origin foo is not allowed by

Access-Control-Allow-Origin

  • Failed to load resource: Preflight response is not successful

The change makes those messages read as follows (in the case of,
for example, a 500 error):

  • Failed to load resource: Origin foo is not allowed by

Access-Control-Allow-Origin. Status code: 500

  • Failed to load resource: Preflight response is not successful.

Status code: 500

Tests: Updates 100+ existing tests, by changing expected messages.

  • loader/CrossOriginAccessControl.cpp:

(WebCore::passesAccessControlCheck):
(WebCore::validatePreflightResponse):

Source/WebKit:

Patch by Michael[tm] Smith <sideshowbarker (Michael[tm] Smith)> on 2021-11-01
Reviewed by Darin Adler

Make the HTTP status be included in all CORS messages that might
get logged to the Inspector console when a 4xx or 5xx error occurs.
That means these:

  • Failed to load resource: Origin foo is not allowed by

Access-Control-Allow-Origin

  • Failed to load resource: Preflight response is not successful

The change makes those messages read as follows (in the case of,
for example, a 500 error):

  • Failed to load resource: Origin foo is not allowed by

Access-Control-Allow-Origin. Status code: 500

  • Failed to load resource: Preflight response is not successful.

Status code: 500

Tests: Updates 100+ existing tests, by changing expected messages.

  • NetworkProcess/NetworkCORSPreflightChecker.cpp:

(WebKit::NetworkCORSPreflightChecker::willPerformHTTPRedirection):

LayoutTests:

Patch by Michael Smith <sideshowbarker (Michael[tm] Smith)> on 2021-11-01
Reviewed by Darin Adler

Update tests with CORS messages, by adding the status code.

  • http/tests/eventsource/eventsource-cors-basic-expected.txt:
  • http/tests/loading/cross-origin-XHR-willLoadRequest-expected.txt:
  • http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive-expected.txt:
  • http/tests/security/cached-cross-origin-preloaded-css-stylesheet-expected.txt:
  • http/tests/security/cached-cross-origin-preloading-css-stylesheet-expected.txt:
  • http/tests/security/cannot-read-cssrules-expected.txt:
  • http/tests/security/cannot-read-cssrules-redirect-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-expected.txt:
  • http/tests/security/cookie-module-import-propagate-expected.txt:
  • http/tests/security/cross-origin-cached-images-expected.txt:
  • http/tests/security/cross-origin-cached-resource-expected.txt:
  • http/tests/security/cross-origin-cached-scripts-expected.txt:
  • http/tests/security/cross-origin-cached-scripts-parallel-expected.txt:
  • http/tests/security/img-with-failed-cors-check-fails-to-load-expected.txt:
  • http/tests/security/import-module-crossorigin-loads-error-expected.txt:
  • http/tests/security/import-module-crossorigin-loads-error-src-expected.txt:
  • http/tests/security/import-script-crossorigin-loads-error-expected.txt:
  • http/tests/security/isolatedWorld/cross-origin-xhr-expected.txt:
  • http/tests/security/load-image-after-redirection-2-expected.txt:
  • http/tests/security/load-image-after-redirection-expected.txt:
  • http/tests/security/script-with-failed-cors-check-fails-to-load-expected.txt:
  • http/tests/security/shape-image-cors-redirect-error-message-logging-1-expected.txt:
  • http/tests/security/shape-image-cors-redirect-error-message-logging-2-expected.txt:
  • http/tests/security/shape-image-cors-redirect-error-message-logging-3-expected.txt:
  • http/tests/security/text-track-crossorigin-expected.txt:
  • http/tests/security/video-cross-origin-accessfailure-expected.txt:
  • http/tests/security/video-poster-cross-origin-crash-expected.txt:
  • http/tests/security/video-poster-cross-origin-crash2-expected.txt:
  • http/tests/subresource-integrity/sri-fetch-expected.txt:
  • http/tests/subresource-integrity/sri-fetch-worker-expected.txt:
  • http/tests/subresource-integrity/sri-module-expected.txt:
  • http/tests/subresource-integrity/sri-script-expected.txt:
  • http/tests/subresource-integrity/sri-style-expected.txt:
  • http/tests/workers/service/service-worker-crossorigin-fetch-expected.txt:
  • http/tests/workers/service/serviceworkerclients-claim.https-expected.txt:
  • http/tests/workers/service/shift-reload-navigation-expected.txt:
  • http/tests/xmlhttprequest/access-control-and-redirects-async-expected.txt:
  • http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
  • http/tests/xmlhttprequest/access-control-basic-denied-expected.txt:
  • http/tests/xmlhttprequest/access-control-basic-denied-preflight-cache-expected.txt:
  • http/tests/xmlhttprequest/access-control-basic-get-fail-non-simple-expected.txt:
  • http/tests/xmlhttprequest/access-control-basic-post-fail-non-simple-content-type-expected.txt:
  • http/tests/xmlhttprequest/access-control-preflight-async-not-supported-expected.txt:
  • http/tests/xmlhttprequest/access-control-preflight-not-successful-expected.txt:
  • http/tests/xmlhttprequest/access-control-preflight-sync-not-supported-expected.txt:
  • http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash-expected.txt:
  • http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-expected.txt:
  • http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-without-wildcard-expected.txt:
  • http/tests/xmlhttprequest/cross-origin-no-credential-prompt-expected.txt:
  • http/tests/xmlhttprequest/cross-site-denied-response-expected.txt:
  • http/tests/xmlhttprequest/cross-site-denied-response-sync-2-expected.txt:
  • http/tests/xmlhttprequest/cross-site-denied-response-sync-expected.txt:
  • http/tests/xmlhttprequest/onerror-event-expected.txt:
  • http/tests/xmlhttprequest/origin-allow-list-https-expected.txt:
  • http/tests/xmlhttprequest/origin-allow-list-ip-addresses-with-subdomains-expected.txt:
  • http/tests/xmlhttprequest/origin-allow-list-removal-expected.txt:
  • http/tests/xmlhttprequest/origin-exact-matching-expected.txt:
  • http/tests/xmlhttprequest/post-blob-content-type-async-expected.txt:
  • http/tests/xmlhttprequest/post-blob-content-type-sync-expected.txt:
  • http/tests/xmlhttprequest/redirect-cross-origin-2-expected.txt:
  • http/tests/xmlhttprequest/redirect-cross-origin-expected.txt:
  • http/tests/xmlhttprequest/redirect-cross-origin-post-expected.txt:
  • http/tests/xmlhttprequest/redirect-cross-origin-post-sync-expected.txt:
  • http/tests/xmlhttprequest/redirect-cross-origin-sync-expected.txt:
  • http/tests/xmlhttprequest/redirect-cross-origin-tripmine-expected.txt:
  • http/tests/xmlhttprequest/simple-cross-origin-denied-events-expected.txt:
  • http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt:
  • http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-sync-expected.txt:
  • http/tests/xmlhttprequest/simple-cross-origin-denied-events-sync-expected.txt:
  • http/tests/xmlhttprequest/simple-cross-origin-progress-events-expected.txt:
  • http/tests/xmlhttprequest/upload-request-error-event-order-expected.txt:
  • http/tests/xmlhttprequest/workers/access-control-basic-get-fail-non-simple-expected.txt:
  • http/tests/xmlhttprequest/xmlhttprequest-sync-no-progress-events-expected.txt:
  • http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt:
  • http/wpt/resource-timing/rt-resource-errors-expected.txt:
  • http/wpt/webaudio/audioworklet-addModule-cors.sub.https-expected.txt:
  • platform/glib/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt:
  • platform/gtk/http/tests/security/video-cross-origin-accessfailure-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-worker-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin-worker-expected.txt:
  • platform/ios/http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive-expected.txt:
  • platform/mac-wk1/http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
  • platform/mac-wk1/http/tests/xmlhttprequest/access-control-preflight-not-successful-expected.txt:
  • platform/mac-wk1/http/tests/xmlhttprequest/post-blob-content-type-async-expected.txt:
  • platform/mac-wk1/http/tests/xmlhttprequest/post-blob-content-type-sync-expected.txt:
  • platform/mac-wk1/http/tests/xmlhttprequest/redirect-cross-origin-post-expected.txt:
  • platform/mac-wk1/http/tests/xmlhttprequest/redirect-cross-origin-tripmine-expected.txt:
  • platform/mac-wk1/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt:
  • platform/mac-wk1/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/none-sw-from-none.https-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/none-sw-from-require-corp.https-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/require-corp-sw-from-none.https-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/require-corp-sw-from-require-corp.https-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-worker-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin-worker-expected.txt:
  • platform/win/http/tests/xmlhttprequest/access-control-and-redirects-async-expected.txt:
  • platform/win/http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
  • platform/win/http/tests/xmlhttprequest/access-control-preflight-not-successful-expected.txt:
  • platform/win/http/tests/xmlhttprequest/redirect-cross-origin-post-expected.txt:
  • platform/win/http/tests/xmlhttprequest/redirect-cross-origin-tripmine-expected.txt:
  • platform/win/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt:
  • platform/win/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt:
  • platform/wincairo-wk1/http/tests/xmlhttprequest/redirect-cross-origin-post-expected.txt:
  • platform/wincairo-wk1/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt:
  • platform/wincairo/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt:
4:29 PM Changeset in webkit [285144] by ddkilzer@apple.com
  • 2 edits in trunk

Add ddkilzer's GitHub name to contributors.json
<https://webkit.org/b/232587>

Reviewed by Jonathan Bedard.

  • metadata/contributors.json:
4:21 PM Changeset in webkit [285143] by Fujii Hironori
  • 3 edits in trunk/Source/WebCore

[CMake] Can't stat Source/WebCore/Modules/webgpu: No such file or directory
https://bugs.webkit.org/show_bug.cgi?id=232583

Reviewed by Konstantin Tokarev.

r285096 removed WebCore/Modules/webgpu directory.

  • CMakeLists.txt: Removed Modules/webgpu directory from

WebCore_IDL_INCLUDES and WebCore_PRIVATE_INCLUDE_DIRECTORIES.

  • PlatformMac.cmake:
4:13 PM Changeset in webkit [285142] by Jonathan Bedard
  • 5 edits in trunk/Tools

[webkitscmpy] Only respect the latest review
https://bugs.webkit.org/show_bug.cgi?id=231987
<rdar://problem/84434991>

Reviewed by Dewei Zhu.

GitHub will report the entire history of a review, we should only
respect the latest review state.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:

(GitHub.PRGenerator.reviewers):

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:

(TestNetworkPullRequestGitHub.test_approved_edits):

4:05 PM Changeset in webkit [285141] by mmaxfield@apple.com
  • 4 edits
    2 moves in trunk/Source/WebCore

Rename GPUDevice to GPUPrewarming because it conflicts with WebGPU's GPUDevice
https://bugs.webkit.org/show_bug.cgi?id=232549

Reviewed by Tim Horton.

We should have called it GPUPrewarming from the beginning, because that's what it does.

No new tests because there is no behavior change.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • page/ProcessWarming.cpp:
  • platform/graphics/gpu/GPUPrewarming.h: Renamed from Source/WebCore/platform/graphics/gpu/GPUDevice.h.
  • platform/graphics/gpu/cocoa/GPUPrewarmingMetal.mm: Renamed from Source/WebCore/platform/graphics/gpu/cocoa/GPUDeviceMetal.mm.
3:50 PM Changeset in webkit [285140] by Russell Epstein
  • 1 copy in tags/Safari-613.1.6.6

Tag Safari-613.1.6.6.

3:28 PM Changeset in webkit [285139] by Russell Epstein
  • 8 edits in branches/safari-613.1.6-branch/Source

Versioning.

WebKit-7613.1.6.6

3:27 PM Changeset in webkit [285138] by Chris Dumez
  • 5 edits in trunk/Source/WebKit

Avoid heap-allocating ImportanceAssertion
https://bugs.webkit.org/show_bug.cgi?id=232579

Reviewed by Alex Christensen.

Avoid heap-allocating ImportanceAssertion since this is just a wrapper around a
mach_port.

Also update the ImportanceAssertion destructor to null out the mach port as
hardening given <rdar://75139294>.

  • Platform/IPC/Decoder.cpp:

(IPC::Decoder::setImportanceAssertion):

  • Platform/IPC/Decoder.h:
  • Platform/IPC/cocoa/ConnectionCocoa.mm:

(IPC::Connection::receiveSourceEventHandler):

  • Platform/IPC/cocoa/ImportanceAssertion.h:

(IPC::ImportanceAssertion::ImportanceAssertion):
(IPC::ImportanceAssertion::operator=):
(IPC::ImportanceAssertion::~ImportanceAssertion):

3:15 PM Changeset in webkit [285137] by Sam Sneddon
  • 4 edits in trunk/Tools

Improve LayoutTestFinder test coverage
https://bugs.webkit.org/show_bug.cgi?id=232576

Reviewed by Jonathan Bedard.

Some of these are largely copied from layout_tests/run_webkit_tests_integrationtest.py, but
in unit test form for the test finder.

  • Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py:

(LayoutTestFinderTests.init):
(LayoutTestFinderTests):
(LayoutTestFinderTests.setUp):
(LayoutTestFinderTests.tearDown):
(LayoutTestFinderTests.test_find_no_paths_specified):
(LayoutTestFinderTests.test_find_no_paths_sorted):
(LayoutTestFinderTests.test_find_all_no_paths):
(LayoutTestFinderTests.test_includes_other_platforms):
(LayoutTestFinderTests.test_find_one_test):
(LayoutTestFinderTests.test_find_platform):
(LayoutTestFinderTests.test_find_platform_self):
(LayoutTestFinderTests.test_find_platform_other):
(LayoutTestFinderTests.test_find_platform_specific):
(LayoutTestFinderTests.test_find_platform_specific_directory):
(LayoutTestFinderTests.test_find_directory_includes_platform_specific):
(LayoutTestFinderTests.test_find_glob):
(LayoutTestFinderTests.test_find_glob_mixed_file_type_sorted):
(LayoutTestFinderTests.test_find_glob_directory):
(LayoutTestFinderTests.test_find_glob_directory_b):
(LayoutTestFinderTests.test_find_glob_directory_e):
(LayoutTestFinderTests.test_find_directory):
(LayoutTestFinderTests.test_find_directory_trailing_slash):
(LayoutTestFinderTests.test_find_directory_star):
(LayoutTestFinderTests.test_preserves_order):
(LayoutTestFinderTests.test_preserves_order_multiple_times):
(LayoutTestFinderTests.test_preserves_order_directories):
(LayoutTestFinderTests.test_preserves_order_mixed_file_type):
(LayoutTestFinderTests.test_preserves_order_mixed_file_type_b):
(LayoutTestFinderTests.test_find_directory_multiple_times):
(LayoutTestFinderTests.test_no_reference):
(LayoutTestFinderTests.test_glob_no_references):
(LayoutTestFinderTests.test_find_with_skipped_directories):
(LayoutTestFinderTests.test_find_with_skipped_directories_2):
(LayoutTestFinderTests.test_is_test_file):
(LayoutTestFinderTests.test_is_w3c_resource_file):
(LayoutTestFinderTests.make_finder): Deleted.

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RunTest.setUp): Re-enable tests on Python 3, as this now works
(RunTest.test_child_processes_min): Also ignore tests in platform/

  • Scripts/webkitpy/port/test.py:
3:09 PM Changeset in webkit [285136] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Stop measuring text while collecting inline items when content needs bidi split
https://bugs.webkit.org/show_bug.cgi?id=232571

Reviewed by Antti Koivisto.

When we know we are going to do bidi processing, these inline item width results will most likely become stale at breakAndComputeBidiLevels.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):
(WebCore::Layout::InlineItemsBuilder::handleTextContent):
(WebCore::Layout::InlineItemsBuilder::enterBidiContext):
(WebCore::Layout::InlineItemsBuilder::exitBidiContext):
(WebCore::Layout::InlineItemsBuilder::buildPreviousTextContent):

  • layout/formattingContexts/inline/InlineItemsBuilder.h:

(WebCore::Layout::InlineItemsBuilder::isBiDiContent const):

3:09 PM Changeset in webkit [285135] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Catalina Debug wk1 EWS-only ] media/track/track-element-load-event.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=232585.

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
3:04 PM Changeset in webkit [285134] by Nikos Mouchtaris
  • 4 edits
    4 moves
    9 adds in trunk/LayoutTests

Add platform test expectations for imported/w3c/web-platform-tests/mathml/relations/html5-tree/dynamic-childlist-001.html
https://bugs.webkit.org/show_bug.cgi?id=232504

Reviewed by Myles C. Maxfield.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/mac-bigsur/imported/w3c/web-platform-tests/mathml/relations/html5-tree/dynamic-childlist-001-expected.txt: Added.
  • platform/mac/TestExpectations:
2:58 PM Changeset in webkit [285133] by Jenner@apple.com
  • 2 edits in trunk

Add my GitHub name (robert-jenner) to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=232581

Reviewed by Jonathan Bedard.

  • metadata/contributors.json:
2:30 PM Changeset in webkit [285132] by timothy_horton@apple.com
  • 9 edits in trunk/Tools

Add a run-webkit-tests mode to A/B test a given feature
https://bugs.webkit.org/show_bug.cgi?id=232553

Reviewed by Jonathan Bedard.

Add the argument --self-compare-with-header to run-webkit-tests, which
can be used to test the impact of a given feature (or set of features;
it accepts the standard test features header format).

When tests are run in this mode, all tests are run in the ref-test
style, but with the expected and actual results loading the same
test file (ignoring the usual -expected.html or whatever); they differ
only in the set of features/preferences enabled.

This is especially useful for testing the impact of e.g. platform
graphics features, where the difference between the shipping behavior
and in-development behavior is more interesting than whether or not
it actually makes the tests, as written, fail.

  • Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:

(SingleTestRunner):
(SingleTestRunner._run_comparison_test):
Add the comparison test runner, and prefer it if requested.

One note here: the run with the options derived from the given header is
considered the "actual" result and the default configuration the "expected".

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(parse_args):

  • Scripts/webkitpy/port/driver.py:

(DriverInput.init):
(DriverInput.repr):
(Driver._command_from_driver_input):
Pass the comparison test header along to the test runner.

Also, fix a longstanding error where --dump-jsconsolelog-in-stderr
could get inserted immediately after --pixel-test, causing the test runner
to consume it as the expected image hash! And leave a comment so nobody
else has to debug this again...

  • TestRunnerShared/TestCommand.cpp:

(WTR::parseInputLine):

  • TestRunnerShared/TestCommand.h:
  • TestRunnerShared/TestFeatures.cpp:

(WTR::parseTestHeaderString):
(WTR::parseTestHeader):
(WTR::featureDefaultsFromComparisonTestHeader):
Factor out the parsing of the part of the test header inside the [ ],
since we use this format for the value of --self-compare-with-header as well.

  • TestRunnerShared/TestFeatures.h:
  • WebKitTestRunner/Options.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::testOptionsForTest const):
Merge the comparison header's options in to the test options before
the test's own header, so that the comparison header wins.

2:24 PM Changeset in webkit [285131] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Remove obsolete port name
https://bugs.webkit.org/show_bug.cgi?id=169302
<rdar://problem/30953024>

Reviewed by Alex Christensen.

Removing a temporary workaround from r213654.

  • Scripts/webkitpy/common/config/ports.py:

(DeprecatedPort.port): Remove mapping from 'ios' to 'ios-device.'

2:04 PM Changeset in webkit [285130] by pvollan@apple.com
  • 4 edits in trunk/Source

[macOS] Opening local html files is failing
https://bugs.webkit.org/show_bug.cgi?id=232572
<rdar://81330442>

Reviewed by Brent Fulgham.

Source/WebKit:

On some macOS versions, opening local html files is failing. In order for the WebContent process
to successfully issue the file extension to the Networking process, the flags for the extension
in the WebContent process must include the user intent flag when the extension is issued with an
audit token.

  • Shared/Cocoa/SandboxExtensionCocoa.mm:

(WebKit::SandboxExtensionImpl::sandboxExtensionForType):

Source/WTF:

Declare sandbox flag.

  • wtf/spi/darwin/SandboxSPI.h:
1:54 PM Changeset in webkit [285129] by Beth Dakin
  • 2 edits in trunk

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

Reviewed by Alexey Proskuryakov.

  • metadata/contributors.json:
1:33 PM Changeset in webkit [285128] by Fujii Hironori
  • 2 edits in trunk/Tools

TestWTF.WTF_CompactUniquePtrTuple.Subclassing is randomly failing on WinCairo tester bots
https://bugs.webkit.org/show_bug.cgi?id=232556

Reviewed by Yusuke Suzuki.

"EXPECT_NE(oldPointer, a.pointer())" of line 241 was randomly
failing on WinCairo tester bots. This seems a simple mistake of
the test case. 'oldPointer' should be updated before destructing
the old value.

  • TestWebKitAPI/Tests/WTF/CompactUniquePtrTuple.cpp:

(WTF_CompactUniquePtrTuple::Subclassing):

1:32 PM Changeset in webkit [285127] by Fujii Hironori
  • 3 edits in trunk/Source/WebKit

[WinCairo] Enable gpu_process_canvas_rendering and gpu_process_webgl by default
https://bugs.webkit.org/show_bug.cgi?id=232555

Reviewed by Don Olmstead.

They can be disabled by the registry.

reg add HKEY_CURRENT_USER\Software\WebKit /v gpu_process_canvas_rendering /t REG_DWORD /d 0 /f
reg add HKEY_CURRENT_USER\Software\WebKit /v gpu_process_webgl /t REG_DWORD /d 0 /f

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultUseGPUProcessForCanvasRenderingEnabled):
(WebKit::defaultUseGPUProcessForWebGLEnabled):

  • Shared/win/WebPreferencesDefaultValuesWin.cpp:

(WebKit::isFeatureFlagEnabled):

1:27 PM Changeset in webkit [285126] by Russell Epstein
  • 1 copy in tags/Safari-613.1.6.5

Tag Safari-613.1.6.5.

1:24 PM Changeset in webkit [285125] by Fujii Hironori
  • 3 edits in trunk/Source/WebKit

HashMap<GraphicsContextGLIdentifier, IPC::ScopedActiveMessageReceiveQueue<RemoteGraphicsContextGL>>::get can't compile
https://bugs.webkit.org/show_bug.cgi?id=232554

Reviewed by Kimmo Kinnunen.

Because IPC::ScopedActiveMessageReceiveQueue didn't have own
HashTraits, it used GenericHashTraits. So, HashMap::get tried to
return PeekType, that was ScopedActiveMessageReceiveQueue. But, it
couldn't construct ScopedActiveMessageReceiveQueue from "const
ScopedActiveMessageReceiveQueue&".

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::findRemoteGraphicsContextGL):
Use get() instead of find().

  • Platform/IPC/ScopedActiveMessageReceiveQueue.h: Added HashTraits for it.
1:16 PM Changeset in webkit [285124] by Russell Epstein
  • 8 edits in branches/safari-613.1.6-branch/Source

Versioning.

WebKit-7613.1.6.5

1:10 PM Changeset in webkit [285123] by sbarati@apple.com
  • 3 edits
    1 add in trunk

ArrayBuffer species watchpoint being invalidated doesn't mean it's not an ArrayBuffer constructor from the same global object
https://bugs.webkit.org/show_bug.cgi?id=231322
<rdar://problem/84212078>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/array-buffer-species-watchpoint-should-not-dictate-if-constructor-is-correct.js: Added.

(main.async v23):
(main):

Source/JavaScriptCore:

We were relying on the watchpoint to tell us if the Array species watchpoint
for 'constructor' is set to the right value. However, the watchpoint being
fired doesn't guarantee that it won't be the right value. For example, we
might not be able to install the watchpoint because the replacement watchpoint
may already be fired.

  • runtime/JSArrayBufferPrototype.cpp:

(JSC::arrayBufferSpeciesConstructorSlow):

1:08 PM Changeset in webkit [285122] by BJ Burg
  • 2 edits in trunk

Add bburg's GitHub username to contributors.json.

Unreviewed.

  • metadata/contributors.json:

Also, canonicalize a recent change.

12:31 PM Changeset in webkit [285121] by beidson@apple.com
  • 23 edits in trunk

webpushd: Add mock in-memory registration, and the WKWebsiteDataStore SPI to manage them
https://bugs.webkit.org/show_bug.cgi?id=232539

Reviewed by Alex Christensen.

Source/WebKit:

Covered by API test.

The old SPI to ask the client if notifications should be allowed will remain.

Assuming the client okays notifications, in the case of built-in notifications, the *actual*
registration interaction with the system will take place as an additional step in webpushd

This patch:

  • Adds in-memory notification registration for webpushd
  • Adds SPI to WKWebsiteDataStore to manage registrations
  • Tests the SPI
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::deletePushAndNotificationRegistration):
(WebKit::NetworkProcess::getOriginsWithPushAndNotificationPermissions):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::notificationManager):

  • NetworkProcess/Notifications/NetworkNotificationManager.cpp:

(WebKit::NetworkNotificationManager::requestSystemNotificationPermission):
(WebKit::NetworkNotificationManager::deletePushAndNotificationRegistration):
(WebKit::NetworkNotificationManager::getOriginsWithPushAndNotificationPermissions):
(WebKit::ReplyCaller<bool>::callReply):
(WebKit::ReplyCaller<Vector<String>::callReply):

  • NetworkProcess/Notifications/NetworkNotificationManager.h:
  • Shared/API/APISecurityOrigin.h:

(API::SecurityOrigin::create):

  • Shared/Notifications/NotificationManagerMessageHandler.h:
  • Shared/Notifications/NotificationManagerMessageHandler.messages.in:
  • Shared/WebPushDaemonConstants.h:

(WebKit::WebPushD::messageTypeSendsReply):

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _deletePushAndNotificationRegistration:completionHandler:]):
(-[WKWebsiteDataStore _getOriginsWithPushAndNotificationPermissions:]):

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::deletePushAndNotificationRegistration):
(WebKit::NetworkProcessProxy::getOriginsWithPushAndNotificationPermissions):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Notifications/WebNotificationManagerMessageHandler.cpp:

(WebKit::WebNotificationManagerMessageHandler::requestSystemNotificationPermission):

  • UIProcess/Notifications/WebNotificationManagerMessageHandler.h:
  • WebProcess/Notifications/NotificationPermissionRequestManager.cpp:

(WebKit::NotificationPermissionRequestManager::startRequest):

  • webpushd/WebPushDaemon.h:
  • webpushd/WebPushDaemon.mm:

(WebPushD::MessageInfo::getOriginsWithPushAndNotificationPermissions::encodeReply):
(WebPushD::MessageInfo::deletePushAndNotificationRegistration::encodeReply):
(WebPushD::MessageInfo::requestSystemNotificationPermission::encodeReply):
(WebPushD::Daemon::decodeAndHandleMessage):
(WebPushD::Daemon::requestSystemNotificationPermission):
(WebPushD::Daemon::getOriginsWithPushAndNotificationPermissions):
(WebPushD::Daemon::deletePushAndNotificationRegistration):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

(-[NotificationPermissionDelegate _webView:requestNotificationPermissionForSecurityOrigin:decisionHandler:]):
(-[NotificationPermissionDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TestWebKitAPI::then):

12:22 PM Changeset in webkit [285120] by Devin Rousso
  • 4 edits in trunk

[ iOS15 EWS ] TestWebKitAPI.CSSViewportUnits.SameUnobscuredSizeOverrides flaky fails on EWS
https://bugs.webkit.org/show_bug.cgi?id=232158
<rdar://problem/84555218>

Reviewed by Megan Gardner.

Source/WebCore:

Tests: CSSViewportUnits.AllSame

CSSViewportUnits.EmptyUnobscuredSizeOverrides
CSSViewportUnits.SameUnobscuredSizeOverrides
CSSViewportUnits.DifferentUnobscuredSizeOverrides

  • page/FrameView.cpp:

(WebCore::FrameView::sizeForCSSDynamicViewportUnits const):
This should use unobscuredContentRectIncludingScrollbars to match DOMWindow::inner{width,height}.
I think I accidentally left in the old code when I was testing some other configurations
while working on r284628.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm:

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

12:22 PM Changeset in webkit [285119] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][IFC] Start using ubidi to find bidi boundaries
https://bugs.webkit.org/show_bug.cgi?id=232552

Reviewed by Antti Koivisto.

In this patch, we start using ubidi to find the bidi boundaries in the paragraph content.
We also set the bidi levels on the associated inline item range. Later we'll be using these levels
to compute the visual order (after line breaking).
(see breakAndComputeBidiLevels for details)

  • layout/formattingContexts/inline/InlineItem.h:

(WebCore::Layout::InlineItem::setBidiLevel):

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):

  • layout/formattingContexts/inline/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::splitAt):

  • layout/formattingContexts/inline/InlineTextItem.h:
12:21 PM Changeset in webkit [285118] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Crash under HIDDevice::HIDDevice()
https://bugs.webkit.org/show_bug.cgi?id=232567
<rdar://79414185>

Reviewed by Simon Fraser.

Make sure we null check values returned by IOHIDDeviceGetProperty() before calling
CFNumberGetValue() on them.

  • platform/mac/HIDDevice.cpp:

(WebCore::getDevicePropertyAsInt):
(WebCore::HIDDevice::HIDDevice):

11:01 AM Changeset in webkit [285117] by rmorisset@apple.com
  • 8 edits
    5 adds in trunk

JSGenericTypedArrayView<Adaptor>::set crashes if the length + objectOffset is > UINT32_MAX
https://bugs.webkit.org/show_bug.cgi?id=231975
rdar://84402043

Reviewed by Yusuke Suzuki.

JSTests:

  • regress-84402043 is the testcase that revealed the problem.
  • typed-array-set-large(-offset) test the same function, in the typed-array to typed-array case
  • typed-array-large-slice tests the only caller that passes a non-0 objectOffset, and found other issues with it
  • typed-array-large-oob-eventually-not.js is just another test of the Wasm4GB change that I had forgotten to commit
  • stress/regress-84402043.js: Added.
  • stress/typed-array-large-oob-eventually-not.js: Added.

(test):

  • stress/typed-array-large-slice.js: Added.

(expect):

  • stress/typed-array-set-large-offset.js: Added.
  • stress/typed-array-set-large.js: Added.

Source/JavaScriptCore:

UINT_MAX (and anything above it) is not a valid array index, so we cannot use JSObject::get(JSGlobalObject*, unsigned) with an index that big.
This was pointed by Yusuke in his review of my recent patch that introduced the problem (https://bugs.webkit.org/show_bug.cgi?id=229353#c21),
but I misunderstood the code and thought we could never get values that big at that point, thus only putting a RELEASE_ASSERT.
In this patch I instead apply his original suggestion to have a first loop using the (fast) JSObject::get(),
and a second loop for any large indices, using a slower but safe code path.

I also fixed an unrelated bug I noticed in Clobberize/AbstractInterpreter while testing the rest of the patch:
they were not aware that NewTypedArray can take a Int52RepUse child.

Finally, while trying to properly test this change, I discovered that genericTypedArrayViewProtoFuncSlice
(which is the only caller of JSGenericTypedArrayView<Adaptor>::set which passes it a non-0 objectOffset)
was still using unsigned everywhere instead of size_t, and that the same was true of all other functions in the same file.
So I fixed it in the same patch.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • runtime/JSArrayBufferConstructor.cpp:

(JSC::JSGenericArrayBufferConstructor<sharingMode>::constructImpl):

  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::constructGenericTypedArrayViewImpl):

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::set):

  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h:

(JSC::argumentClampedIndexFromStartOrEnd):
(JSC::genericTypedArrayViewProtoFuncSet):
(JSC::genericTypedArrayViewProtoFuncCopyWithin):
(JSC::genericTypedArrayViewProtoFuncIncludes):
(JSC::genericTypedArrayViewProtoFuncIndexOf):
(JSC::genericTypedArrayViewProtoFuncJoin):
(JSC::genericTypedArrayViewProtoFuncFill):
(JSC::genericTypedArrayViewProtoFuncLastIndexOf):
(JSC::genericTypedArrayViewProtoFuncSlice):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):

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

GPU process WebKit logging is not initialised
https://bugs.webkit.org/show_bug.cgi?id=232563

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-11-01
Reviewed by Chris Dumez.

The file was not including LogInitialization.h.
"using namespace WebCore" caused
WebKit::logChannels() to mean WebCore::logChannels().

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::initializeGPUProcess):

10:45 AM Changeset in webkit [285115] by sihui_liu@apple.com
  • 7 edits in trunk/Source/WebKit

Increase responsiveness timeout for network process
https://bugs.webkit.org/show_bug.cgi?id=232505

Reviewed by Chris Dumez.

  • UIProcess/AuxiliaryProcessProxy.cpp:

(WebKit::AuxiliaryProcessProxy::AuxiliaryProcessProxy):

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

(WebKit::NetworkProcessProxy::NetworkProcessProxy):
(WebKit::NetworkProcessProxy::getNetworkProcessConnection):

  • UIProcess/ResponsivenessTimer.cpp:

(WebKit::ResponsivenessTimer::ResponsivenessTimer):
(WebKit::ResponsivenessTimer::timerFired):
(WebKit::ResponsivenessTimer::start):
(): Deleted.

  • UIProcess/ResponsivenessTimer.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::getNetworkProcessConnection):

10:14 AM Changeset in webkit [285114] by timothy_horton@apple.com
  • 10 edits in trunk/Source

Add a testing preference to replay CG display lists manually
https://bugs.webkit.org/show_bug.cgi?id=232566

Reviewed by Wenson Hsieh.

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):

  • Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:

(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):

  • UIProcess/RemoteLayerTree/RemoteLayerTreeHost.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:

(WebKit::RemoteLayerTreeHost::replayCGDisplayListsIntoBackingStore const):
Plumb the preference through to _setWKContents.

  • UIProcess/RemoteLayerTree/cocoa/RemoteLayerTreeLayers.h:
  • UIProcess/RemoteLayerTree/cocoa/RemoteLayerTreeLayers.mm:

(-[WKCompositingLayer _setWKContents:withDisplayList:replayForTesting:]):
(-[WKCompositingLayer drawInContext:]):
(-[WKCompositingLayer _setWKContents:withDisplayList:]): Deleted.
If the preference is set, store the display list instead of setting it on the layer,
and call setNeedsDisplay, and then replay the display list in drawInContext.

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml:
10:12 AM Changeset in webkit [285113] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS Debug ] http/wpt/push-api tests are flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=232570

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
10:04 AM Changeset in webkit [285112] by Chris Dumez
  • 8 edits in trunk

Align XSLTProcessor with Blink and get closer to Gecko in the process
https://bugs.webkit.org/show_bug.cgi?id=232485

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline WPT test now that more checks are passing.

  • web-platform-tests/dom/idlharness.window-expected.txt:

Source/WebCore:

Align XSLTProcessor with Blink and get closer to Gecko (and the specification [1]) in the process.
The changes include making the parameters mandatory and non-nullable, as well as treating null
as the empty string for some parameters.

[1] https://dom.spec.whatwg.org/#xsltprocessor

No new tests, rebaselined existing test.

  • xml/XSLTProcessor.cpp:

(WebCore::XSLTProcessor::transformToDocument):
(WebCore::XSLTProcessor::transformToFragment):

  • xml/XSLTProcessor.h:

(WebCore::XSLTProcessor::importStylesheet):

  • xml/XSLTProcessor.idl:
9:43 AM Changeset in webkit [285111] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] fast/events/ios/viewport-device-width-allows-double-tap-zoom-out.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=232568

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
9:27 AM Changeset in webkit [285110] by Ayumi Kojima
  • 5 edits in trunk/Source

Unreviewed, reverting r285055.

Reverting because this commit may have caused
webgl/1.0.x/conformance/textures/misc/texture-corner-case-
videos.html and webgl/2.0.y/conformance/textures/misc/texture-
corner-case-videos.html to time out

Reverted changeset:

"Avoid sending video data to Web process for
canvas.drawImage(video)"
https://bugs.webkit.org/show_bug.cgi?id=230766
https://commits.webkit.org/r285055

9:23 AM Changeset in webkit [285109] by Simon Fraser
  • 7 edits in trunk/Tools

ImageDiff no longer needs a --tolerance argument, and fix sometimes-black diff images
https://bugs.webkit.org/show_bug.cgi?id=232522

Reviewed by Martin Robinson.

ImageDiff no longer deals with tolerance, so remove --tolerance handling code in ImageDiff
and the driving script.

Also fix an issue where the diff image could be all black pixels even when there was a diff;
we need to ensure that a pixel with any diff is non-zero before scaling, and we need to
ensure that scaling by legacyDistanceMax doesn't overflow.

  • ImageDiff/ImageDiff.cpp:

(processImages):
(main):

  • ImageDiff/PlatformImage.cpp:

(ImageDiff::PlatformImage::difference):

  • ImageDiff/PlatformImage.h:
  • ImageDiff/cg/PlatformImageCG.cpp:

(ImageDiff::PlatformImage::createFromFile):

  • Scripts/webkitpy/port/image_diff.py:

(ImageDiffer.diff_image):
(ImageDiffer._start): No need to restart ImageDiff if the tolerance changed, since
ImageDiff doesn't consult it. Tolerance in the python here just feeds into
the ImageDiffResult.

  • Scripts/webkitpy/port/port_testcase.py:

(PortTestCase.test_diff_image):

9:02 AM Changeset in webkit [285108] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Addressing post-commit comment (r285093).

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::handleInlineBoxStart):
(WebCore::Layout::InlineItemsBuilder::handleInlineBoxEnd):

8:58 AM Changeset in webkit [285107] by Russell Epstein
  • 8 edits in trunk/Source

Versioning.

WebKit-7613.1.8

8:55 AM Changeset in webkit [285106] by Chris Dumez
  • 3 edits in trunk/LayoutTests

REGRESSION (r283935): fast/css/style-element-process-crash.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=232456
<rdar://problem/84779240>

Reviewed by Wenson Hsieh.

After r283935, focus may happen asynchronously when using autofocus. As a result, we need to
update the test to use waitUntilDone() / notifyDone().

  • fast/css/style-element-process-crash.html:
  • platform/ios-wk2/TestExpectations:
8:52 AM Changeset in webkit [285105] by Russell Epstein
  • 1 copy in branches/safari-613.1.7-branch

New branch.

8:40 AM Changeset in webkit [285104] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Introduce paragraph content building to InlineItemsBuilder::handleTextContent
https://bugs.webkit.org/show_bug.cgi?id=232546

Reviewed by Antti Koivisto.

Let's check for directional control characters in text content and build
the paragraph content accordingly. Now that we've got both the inline box and
the text bidi content (atomic inline level boxes are still missing) breakInlineItemsAtBidiBoundaries
can start calling into ubidi to find content boundaries.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::handleTextContent):
(WebCore::Layout::InlineItemsBuilder::enterBidiContext):
(WebCore::Layout::InlineItemsBuilder::buildPreviousTextContent):

  • layout/formattingContexts/inline/InlineItemsBuilder.h:
  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForFontAndText):

7:11 AM Changeset in webkit [285103] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Fix a typo in EWS emails

6:17 AM Changeset in webkit [285102] by ddkilzer@apple.com
  • 4 edits in trunk/Source/ThirdParty/ANGLE

[ANGLE] Enable -Wformat=2 warnings
<https://webkit.org/b/232358>
<rdar://problem/84568935>

Reviewed by Kimmo Kinnunen.

  • Configurations/Base.xcconfig:

(WARNING_CFLAGS):

  • Add -Wformat=2 switch, which includes -Wformat-nonliteral.
  • src/common/angleutils.h:

(FormatStringIntoVector):

  • Move below definition of ANGLE_FORMAT_PRINTF() and add macro to the function declaration to fix -Wformat-nonliteral warning.
  • src/compiler/translator/Common.h:

(sh::str):

  • Make formatStr a constexpr to fix -Wformat-nonliteral warning.
1:42 AM Changeset in webkit [285101] by commit-queue@webkit.org
  • 4 edits in trunk/Source

Fix build with GCC 8.4 on Ubuntu 18.04
https://bugs.webkit.org/show_bug.cgi?id=232305

Patch by Daniel Kolesa <Daniel Kolesa> on 2021-11-01
Reviewed by Adrian Perez de Castro.

Source/WebCore:

Fix build with GCC 8.4 on Ubuntu 18.04

Thes sections of the code trigger an internal compiler error with
GCC 8.4, segfaulting the compiler. This adds a workaround that
makes it work again.

  • Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:

(WebCore::ClipboardItemBindingsDataSource::collectDataForWriting):

Source/WebKit:

Thes sections of the code trigger an internal compiler error with
GCC 8.4, segfaulting the compiler. This adds a workaround that
makes it work again.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):

Oct 31, 2021:

11:20 PM Changeset in webkit [285100] by Antti Koivisto
  • 4 edits in trunk

Fix :host invalidation when combined with pseudo classes in descendant position
https://bugs.webkit.org/show_bug.cgi?id=232544

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-scoping/host-functional-descendant-invalidation-expected.txt:

Source/WebCore:

  • style/RuleSet.cpp:

(WebCore::Style::isHostSelectorMatchingInShadowTree):

Make more readable and accurate.

(WebCore::Style::RuleSet::addRule):

Compute m_hasHostPseudoClassRulesMatchingInShadowTree before bailing out for pseudo elements.

5:56 PM Changeset in webkit [285099] by Fujii Hironori
  • 25 edits
    12 copies
    18 adds in trunk

[WinCairo] New GraphicsLayer for GPU process mode
https://bugs.webkit.org/show_bug.cgi?id=228308

Reviewed by Don Olmstead.

.:

  • Source/cmake/OptionsWinCairo.cmake:

Source/WebCore:

  • PlatformWinCairo.cmake:
  • platform/graphics/RemoteGraphicsContextGLProxyBase.cpp:
  • platform/graphics/RemoteGraphicsContextGLProxyBase.h:
  • platform/graphics/wc/RemoteGraphicsContextGLProxyBaseWC.cpp: Added.

(WebCore::RemoteGraphicsContextGLProxyBase::platformInitialize):
(WebCore::RemoteGraphicsContextGLProxyBase::platformLayer const):
(WebCore::RemoteGraphicsContextGLProxyBase::setPlatformLayer):

  • platform/graphics/wc/WCPlatformLayer.h: Added.
  • platform/graphics/win/GraphicsContextWin.cpp:

(WebCore::GraphicsContext::getWindowsContext): DisplayList
GraphicsContext doesn't have a HDC. Do nothing for DisplayList
context.

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame):
Paint a frame by using GraphicsContext::drawNativeImage instead of
Cairo API for DisplayList.

Source/WebKit:

Added a new GraphicsLayer implementation GraphicsLayerWC which
transfers GraphicsLayer tree to GPU process and runs the
compositor (TextureMapper) in GPU process.

In GPU process mode, WebGL is run in GPU process. So, the
compositor should be run in GPU process. Otherwise, the output
texture of WebGL has to be transferred from GPU process to the
compositor process (UI process or web process).

Because ANGLE isn't thread-safe, the compositor and WebGL should
be run in the same thread in GPU process.

Enabling gpu_process_webgl also enables GPU process compositing now.

reg add HKEY_CURRENT_USER\Software\WebKit /v gpu_process_webgl /t REG_DWORD /d 1 /f

gpu_process_canvas_rendering can also be enabled.

reg add HKEY_CURRENT_USER\Software\WebKit /v gpu_process_canvas_rendering /t REG_DWORD /d 1 /f

Enabling gpu_process_dom_rendering is still experimental.

reg add HKEY_CURRENT_USER\Software\WebKit /v gpu_process_dom_rendering /t REG_DWORD /d 1 /f

The following commands restore the non-GPU process mode.

reg delete HKEY_CURRENT_USER\Software\WebKit /v gpu_process_canvas_rendering /f
reg delete HKEY_CURRENT_USER\Software\WebKit /v gpu_process_webgl /f
reg delete HKEY_CURRENT_USER\Software\WebKit /v gpu_process_dom_rendering /f

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::createWCLayerTreeHost):
(WebKit::GPUConnectionToWebProcess::releaseWCLayerTreeHost):
(WebKit::GPUConnectionToWebProcess::findRemoteGraphicsContextGL):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/GPUConnectionToWebProcess.messages.in:
  • GPUProcess/GPUProcess.h:

(WebKit::GPUProcess::sharedSceneContext):

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:

(WebKit::RemoteGraphicsContextGL::platformLayer const):

  • GPUProcess/graphics/ScopedWebGLRenderingResourcesRequest.cpp:

(WebKit::ScopedWebGLRenderingResourcesRequest::scheduleFreeWebGLRenderingResources):

  • GPUProcess/graphics/wc/RemoteWCLayerTreeHost.cpp: Added.

(WebKit::RemoteWCLayerTreeHost::create):
(WebKit::RemoteWCLayerTreeHost::RemoteWCLayerTreeHost):
(WebKit::RemoteWCLayerTreeHost::~RemoteWCLayerTreeHost):
(WebKit::RemoteWCLayerTreeHost::messageSenderConnection const):
(WebKit::RemoteWCLayerTreeHost::messageSenderDestinationID const):
(WebKit::RemoteWCLayerTreeHost::update):

  • GPUProcess/graphics/wc/RemoteWCLayerTreeHost.h: Added.
  • GPUProcess/graphics/wc/RemoteWCLayerTreeHost.messages.in: Added.
  • GPUProcess/graphics/wc/WCScene.cpp: Added.

(WebKit::WCScene::initialize):
(WebKit::WCScene::~WCScene):
(WebKit::WCScene::update):

  • GPUProcess/graphics/wc/WCScene.h: Added.
  • GPUProcess/graphics/wc/WCSceneContext.cpp: Added.

(WebKit::WCSceneContext::WCSceneContext):
(WebKit::WCSceneContext::makeContextCurrent):
(WebKit::WCSceneContext::createTextureMapper):
(WebKit::WCSceneContext::swapBuffers):

  • GPUProcess/graphics/wc/WCSceneContext.h: Added.
  • GPUProcess/graphics/wc/WCSharedSceneContextHolder.h: Added.

(WebKit::WCSharedSceneContextHolder::ensureHolderForWindow):
(WebKit::WCSharedSceneContextHolder::removeHolder):

  • GPUProcess/win/GPUProcessMainWin.cpp:

(WebKit::GPUProcessMain):

  • PlatformWin.cmake:
  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):
(conditions_for_header):

  • Shared/DrawingAreaInfo.h:
  • UIProcess/wc/DrawingAreaProxyWC.cpp: Added.

(WebKit::DrawingAreaProxyWC::DrawingAreaProxyWC):
(WebKit::DrawingAreaProxyWC::paint):
(WebKit::DrawingAreaProxyWC::sizeDidChange):
(WebKit::DrawingAreaProxyWC::update):
(WebKit::DrawingAreaProxyWC::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyWC::incorporateUpdate):
(WebKit::DrawingAreaProxyWC::discardBackingStore):

  • UIProcess/wc/DrawingAreaProxyWC.h: Added.
  • UIProcess/win/PageClientImpl.cpp:

(WebKit::PageClientImpl::createDrawingAreaProxy):

  • UIProcess/win/WebView.cpp:

(WebKit::WebView::paint):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::RemoteGraphicsContextGLProxy):

  • WebProcess/GPU/graphics/wc/RemoteWCLayerTreeHostProxy.cpp: Added.

(WebKit::RemoteWCLayerTreeHostProxy::RemoteWCLayerTreeHostProxy):
(WebKit::RemoteWCLayerTreeHostProxy::~RemoteWCLayerTreeHostProxy):
(WebKit::RemoteWCLayerTreeHostProxy::messageSenderConnection const):
(WebKit::RemoteWCLayerTreeHostProxy::ensureGPUProcessConnection):
(WebKit::RemoteWCLayerTreeHostProxy::disconnectGpuProcessIfNeeded):
(WebKit::RemoteWCLayerTreeHostProxy::gpuProcessConnectionDidClose):
(WebKit::RemoteWCLayerTreeHostProxy::messageSenderDestinationID const):
(WebKit::RemoteWCLayerTreeHostProxy::update):
(WebKit::RemoteWCLayerTreeHostProxy::didUpdate):

  • WebProcess/GPU/graphics/wc/RemoteWCLayerTreeHostProxy.h: Added.

(WebKit::RemoteWCLayerTreeHostProxy::wcLayerTreeHostIdentifier const):

  • WebProcess/GPU/graphics/wc/RemoteWCLayerTreeHostProxy.messages.in: Added.
  • WebProcess/GPU/graphics/wc/WCLayerTreeHostIdentifier.h: Added.
  • WebProcess/GPU/graphics/wc/WCPlatformLayerGCGL.h: Added.

(WebKit::WCPlatformLayerGCGL::WCPlatformLayerGCGL):
(WebKit::WCPlatformLayerGCGL::graphicsContextGLIdentifier):

  • WebProcess/WebPage/DrawingArea.cpp:

(WebKit::DrawingArea::create):
(WebKit::DrawingArea::supportsGPUProcessRendering):

  • WebProcess/WebPage/DrawingArea.h:

(WebKit::DrawingArea::updateGeometry):

  • WebProcess/WebPage/DrawingArea.messages.in:
  • WebProcess/WebPage/wc/DrawingAreaWC.cpp: Added.

(WebKit::DrawingAreaWC::DrawingAreaWC):
(WebKit::DrawingAreaWC::~DrawingAreaWC):
(WebKit::DrawingAreaWC::graphicsLayerFactory):
(WebKit::DrawingAreaWC::updateRootLayers):
(WebKit::DrawingAreaWC::setRootCompositingLayer):
(WebKit::DrawingAreaWC::attachViewOverlayGraphicsLayer):
(WebKit::DrawingAreaWC::setLayerTreeStateIsFrozen):
(WebKit::DrawingAreaWC::updateGeometry):
(WebKit::DrawingAreaWC::setNeedsDisplay):
(WebKit::DrawingAreaWC::setNeedsDisplayInRect):
(WebKit::DrawingAreaWC::scroll):
(WebKit::DrawingAreaWC::triggerRenderingUpdate):
(WebKit::flushLayerImageBuffers):
(WebKit::DrawingAreaWC::isCompositingMode):
(WebKit::DrawingAreaWC::updateRendering):
(WebKit::DrawingAreaWC::sendUpdateAC):
(WebKit::shouldPaintBoundsRect):
(WebKit::DrawingAreaWC::sendUpdateNonAC):
(WebKit::DrawingAreaWC::graphicsLayerAdded):
(WebKit::DrawingAreaWC::graphicsLayerRemoved):
(WebKit::DrawingAreaWC::commitLayerUpateInfo):
(WebKit::DrawingAreaWC::createImageBuffer):
(WebKit::DrawingAreaWC::didUpdate):
(WebKit::DrawingAreaWC::RootLayerClient::RootLayerClient):
(WebKit::DrawingAreaWC::RootLayerClient::paintContents):
(WebKit::DrawingAreaWC::RootLayerClient::deviceScaleFactor const):

  • WebProcess/WebPage/wc/DrawingAreaWC.h: Added.
  • WebProcess/WebPage/wc/GraphicsLayerWC.cpp: Added.

(WebKit::GraphicsLayerWC::GraphicsLayerWC):
(WebKit::GraphicsLayerWC::~GraphicsLayerWC):
(WebKit::GraphicsLayerWC::generateLayerID):
(WebKit::GraphicsLayerWC::primaryLayerID const):
(WebKit::GraphicsLayerWC::setNeedsDisplay):
(WebKit::GraphicsLayerWC::setNeedsDisplayInRect):
(WebKit::GraphicsLayerWC::setContentsNeedsDisplay):
(WebKit::GraphicsLayerWC::setChildren):
(WebKit::GraphicsLayerWC::addChild):
(WebKit::GraphicsLayerWC::addChildAtIndex):
(WebKit::GraphicsLayerWC::addChildBelow):
(WebKit::GraphicsLayerWC::addChildAbove):
(WebKit::GraphicsLayerWC::replaceChild):
(WebKit::GraphicsLayerWC::removeFromParent):
(WebKit::GraphicsLayerWC::setMaskLayer):
(WebKit::GraphicsLayerWC::setReplicatedLayer):
(WebKit::GraphicsLayerWC::setReplicatedByLayer):
(WebKit::GraphicsLayerWC::setPosition):
(WebKit::GraphicsLayerWC::setAnchorPoint):
(WebKit::GraphicsLayerWC::setSize):
(WebKit::GraphicsLayerWC::setBoundsOrigin):
(WebKit::GraphicsLayerWC::setTransform):
(WebKit::GraphicsLayerWC::setChildrenTransform):
(WebKit::GraphicsLayerWC::setPreserves3D):
(WebKit::GraphicsLayerWC::setMasksToBounds):
(WebKit::GraphicsLayerWC::setOpacity):
(WebKit::GraphicsLayerWC::setContentsRect):
(WebKit::GraphicsLayerWC::setContentsClippingRect):
(WebKit::GraphicsLayerWC::setDrawsContent):
(WebKit::GraphicsLayerWC::setContentsVisible):
(WebKit::GraphicsLayerWC::setBackfaceVisibility):
(WebKit::GraphicsLayerWC::setContentsToSolidColor):
(WebKit::GraphicsLayerWC::setContentsToPlatformLayer):
(WebKit::GraphicsLayerWC::usesContentsLayer const):
(WebKit::GraphicsLayerWC::setShowDebugBorder):
(WebKit::GraphicsLayerWC::setDebugBorder):
(WebKit::GraphicsLayerWC::setShowRepaintCounter):
(WebKit::filtersCanBeComposited):
(WebKit::GraphicsLayerWC::setFilters):
(WebKit::GraphicsLayerWC::setBackdropFilters):
(WebKit::GraphicsLayerWC::setBackdropFiltersRect):
(WebKit::GraphicsLayerWC::noteLayerPropertyChanged):
(WebKit::GraphicsLayerWC::flushCompositingState):
(WebKit::GraphicsLayerWC::flushCompositingStateForThisLayerOnly):

  • WebProcess/WebPage/wc/GraphicsLayerWC.h: Added.
  • WebProcess/WebPage/wc/WCBackingStore.h: Added.

(WebKit::WCBackingStore::WCBackingStore):
(WebKit::WCBackingStore::imageBuffer):
(WebKit::WCBackingStore::setImageBuffer):
(WebKit::WCBackingStore::bitmap const):
(WebKit::WCBackingStore::encode const):
(WebKit::WCBackingStore::decode):

  • WebProcess/WebPage/wc/WCLayerFactory.cpp: Added.

(WebKit::WCLayerFactory::WCLayerFactory):
(WebKit::WCLayerFactory::createGraphicsLayer):

  • WebProcess/WebPage/wc/WCLayerFactory.h: Added.
  • WebProcess/WebPage/wc/WCUpateInfo.h: Added.

(WebKit::WCLayerUpateInfo::encode const):
(WebKit::WCLayerUpateInfo::decode):
(WebKit::WCUpateInfo::encode const):
(WebKit::WCUpateInfo::decode):

2:40 PM Changeset in webkit [285098] by Cameron McCormack
  • 14 edits in trunk/Source

Update Web IDL links to new URL
https://bugs.webkit.org/show_bug.cgi?id=232533
<rdar://problem/84842937>

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

Source/WebCore:

  • Modules/mediastream/OverconstrainedError.idl:
  • bindings/js/JSCallbackData.cpp:
  • bindings/js/JSDOMAbstractOperations.h:
  • bindings/js/JSDOMConvertPromise.h:
  • bindings/scripts/CodeGenerator.pm:
  • bindings/scripts/CodeGeneratorJS.pm:

(AddMapLikeAttributesAndOperationIfNeeded):
(AddSetLikeAttributesAndOperationIfNeeded):
(GenerateGetOwnPropertySlot):
(GenerateGetOwnPropertySlotByIndex):
(GenerateDeletePropertyCommon):
(GenerateDeleteProperty):
(GenerateDeletePropertyByIndex):
(GenerateNamedDeleterDefinition):
(AttributeShouldBeOnInstance):
(OperationShouldBeOnInstance):
(GenerateDictionaryImplementationContent):
(GenerateAttributeSetterBodyDefinition):
(GenerateOperationBodyDefinition):
(GenerateDefaultToJSONOperationDefinition):
(GenerateConstructorHelperMethods):

  • bindings/scripts/IDLAttributes.json:
  • bindings/scripts/IDLParser.pm:
  • bindings/scripts/preprocess-idls.pl:
  • dom/ExceptionCode.h:
1:31 PM Changeset in webkit [285097] by Fujii Hironori
  • 5 edits in trunk/LayoutTests

[WinCairo] Unreviewed test gardening

  • platform/wincairo/TestExpectations:
  • platform/wincairo/editing/selection/3690703-2-expected.txt:
  • platform/wincairo/editing/selection/3690703-expected.txt:
  • platform/wincairo/editing/selection/3690719-expected.txt:
11:20 AM Changeset in webkit [285096] by mmaxfield@apple.com
  • 1 edit
    1 delete in trunk/Source/WebCore

Remove some straggling files after r280467
https://bugs.webkit.org/show_bug.cgi?id=232541

Reviewed by Sam Weinig.

Somehow I must have missed some files.

No new tests because there is no behavior change.

  • Modules/webgpu/WHLSL/AST/WHLSLStatement.cpp: Removed.
  • Modules/webgpu/WHLSL/AST/WHLSLStatementList.h: Removed.
  • Modules/webgpu/WHLSL/AST/WHLSLType.cpp: Removed.
  • Modules/webgpu/WHLSL/WHLSLProgram.cpp: Removed.
10:26 AM Changeset in webkit [285095] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Keep track of the text box offset in ubidi's paragraph content
https://bugs.webkit.org/show_bug.cgi?id=232540

Reviewed by Antti Koivisto.

This hashmap helps to map bidi boundary positions back to inline items.

The paragraph content string holds the InlineTextBox content (and injected control characters)
in DOM order. InlineTextItems hold start/end positions relative to their InlineTextBoxes.
We'll use this hashmap to figure out which InlineTextItems need splitting at bidi boundaries.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::handleInlineBox):
(WebCore::Layout::InlineItemsBuilder::enterBidiContext):
(WebCore::Layout::InlineItemsBuilder::exitBidiContext):

  • layout/formattingContexts/inline/InlineItemsBuilder.h:
8:18 AM Changeset in webkit [285094] by Simon Fraser
  • 21 edits in trunk/Source

Scroll animations should run at 120Hz on 120Hz displays
https://bugs.webkit.org/show_bug.cgi?id=232534

Reviewed by Tim Horton.

Source/WebCore:

Scroll animations on the scrolling thread were driven by a 60Hz timer in
ScrollingTreeScrollingNodeDelegateMac. Replace that with a mechanism that drives them from
ThreadedScrollingTree::displayDidRefreshOnScrollingThread(), which is called at the maximum
display refresh frequency.

We leverage startAnimationCallback/stopAnimationCallback which update the HashSet of
animating nodes on scrolling tree, and iterate this set in the callback to service the
animations.

Change some ScrollingTree terminology from "AnimatedScroll" to "ScrollAnimation" to indicate
that they are about all kinds of scroll animations (e.g. rubberbanding), not just animated
scrolls.

A side effect of removing the ScrollingTreeScrollingNodeDelegateMac was that there was no
code path that triggered continual "displayDidRefresh" notifications (which originate in the
UI process). We need something to keep the displayDidRefresh notifications coming. To fix
this, have ScrollingCoordinatorMac call scheduleRenderingUpdate() when an animation starts,
and in each rendering update while there are active animations. This doesn't trigger
additional rendering updates; these will happen anyway as a side effect of scrolling tree
scrolls bouncing to the main thread. Also worth noting is that the scrolling thread will get
120Hz updates, even if we're only triggering main thread rendering updates, because of
existing WebPageProxy hasActiveAnimatedScroll state.

Exercised by existing tests.

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::isScrollAnimationInProgressForNode):
(WebCore::ScrollingTree::setScrollAnimationInProgressForNode):
(WebCore::ScrollingTree::hasNodeWithActiveScrollAnimations):
(WebCore::ScrollingTree::nodesWithActiveScrollAnimations):
(WebCore::ScrollingTree::isAnimatedScrollInProgressForNode): Deleted.
(WebCore::ScrollingTree::setAnimatedScrollInProgressForNode): Deleted.
(WebCore::ScrollingTree::hasNodeWithActiveAnimatedScroll): Deleted.

  • page/scrolling/ScrollingTree.h:
  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::willStartAnimatedScroll):
(WebCore::ScrollingTreeScrollingNode::didStopAnimatedScroll):
(WebCore::ScrollingTreeScrollingNode::setScrollAnimationInProgress):

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/ScrollingTreeScrollingNodeDelegate.h:
  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::scrollingThreadIsActive):
(WebCore::ThreadedScrollingTree::serviceScrollAnimations):
(WebCore::ThreadedScrollingTree::displayDidRefreshOnScrollingThread):

  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::didCompleteRenderingUpdate):
(WebCore::ScrollingCoordinatorMac::hasNodeWithAnimatedScrollChanged):

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::startAnimatedScrollToPosition):
(WebCore::ScrollingTreeFrameScrollingNodeMac::serviceScrollAnimation):
(WebCore::ScrollingTreeFrameScrollingNodeMac::currentScrollPositionChanged):

  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:

(WebCore::ScrollingTreeOverflowScrollingNodeMac::serviceScrollAnimation):

  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:

(WebCore::ScrollingTreeScrollingNodeDelegateMac::createTimer):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::startAnimationCallback):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::stopAnimationCallback):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::serviceScrollAnimation):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::scrollControllerAnimationTimerFired): Deleted.

  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp:

(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::animationTimerFired):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::serviceScrollAnimation):

  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.h:

Source/WebKit:

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationScrollingCoordinator.mm:

(WebKit::TiledCoreAnimationScrollingCoordinator::hasNodeWithAnimatedScrollChanged):

7:25 AM Changeset in webkit [285093] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Add unicode-bidi control characters
https://bugs.webkit.org/show_bug.cgi?id=232538

Reviewed by Antti Koivisto.

This is preparation for injecting entering/exiting control characters into the paragraph string used by ubidi.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::handleInlineBox):
(WebCore::Layout::InlineItemsBuilder::enterBidiContext):
(WebCore::Layout::InlineItemsBuilder::exitBidiContext):

  • layout/formattingContexts/inline/InlineItemsBuilder.h:
6:41 AM Changeset in webkit [285092] by Andres Gonzalez
  • 15 edits in trunk/Source/WebCore

Move handling of ChildrenChanged notifications out of the AccessibilityObjects into AXObjectCache.
https://bugs.webkit.org/show_bug.cgi?id=232503
<rdar://problem/84820154>

Reviewed by Chris Fleizach.

ChildrenChanged notifications were handled in
AXObjectCache::performDeferredCacheUpdate by calling into an AX object
method. While in principle this may seem as a good design, it obscures
significantly what exactly happens in response to a notification. This
is aggravated by the fact that the object's handlers may call back into
the AXObjectCache to post or further defer notifications to platform
clients.
This patch atempts to straightline this flow by handling the
ChildrenChanged notifications in AXObjectCache.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::textChanged):
(WebCore::AXObjectCache::handleChildrenChanged):
The name indicates that this is the actual handler for the notification
as opposed as the other childrenChanged(...) methods that just queue
the notifications for a later time.

(WebCore::AXObjectCache::childrenChanged):
(WebCore::AXObjectCache::notificationPostTimerFired):
(WebCore::AXObjectCache::handleAriaRoleChanged):
(WebCore::AXObjectCache::recomputeIsIgnored):
(WebCore::AXObjectCache::performDeferredCacheUpdate):

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

(WebCore::AccessibilityMenuList::childrenChanged):
Deleted, now handled in AXObjectCache::handleChildrenChanged.

  • accessibility/AccessibilityMenuList.h:
  • accessibility/AccessibilityMenuListPopup.cpp:

(WebCore::AccessibilityMenuListPopup::handleChildrenChanged):
(WebCore::AccessibilityMenuListPopup::childrenChanged):
Renamed handleChildrenChanged. It is the only AXObject subclass that
still has this method to update its children. It does not post or
schedule any platform client notification.

  • accessibility/AccessibilityMenuListPopup.h:
  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::updateAccessibilityRole):
(WebCore::AccessibilityNodeObject::childrenChanged): Deleted.

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

(WebCore::AccessibilityObject::hasIgnoredValueChanged):
(WebCore::AccessibilityObject::notifyIfIgnoredValueChanged):
Renamed hasIgnoredValueChanged since the actual notifications are posted
in AXObjectCache.

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::updateAccessibilityRole):

  • accessibility/AccessibilityObjectInterface.h:

Several methods can now be removed from the AXCoreObject interface since
they are internal to the AXObject class hierarchy.

  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::addChildren):

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

Now able to delete several unnecessary methods from the isolated objects.
(WebCore::AXIsolatedObject::childrenChanged): Deleted.
(WebCore::AXIsolatedObject::updateAccessibilityRole): Deleted.
(WebCore::AXIsolatedObject::lastKnownIsIgnoredValue): Deleted.
(WebCore::AXIsolatedObject::setLastKnownIsIgnoredValue): Deleted.
(WebCore::AXIsolatedObject::notifyIfIgnoredValueChanged): Deleted.

  • accessibility/isolatedtree/AXIsolatedObject.h:
1:49 AM Changeset in webkit [285091] by Cameron McCormack
  • 2 edits in trunk/Source/WebCore

Change some bitwise OR operators to logical OR
https://bugs.webkit.org/show_bug.cgi?id=232537
<rdar://problem/84845378>

Reviewed by Alexey Proskuryakov.

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::translate):
(WebCore::CanvasRenderingContext2DBase::transform):
(WebCore::CanvasRenderingContext2DBase::setTransform):
(WebCore::validateRectForCanvas):
(WebCore::CanvasRenderingContext2DBase::canDrawText):

Note: See TracTimeline for information about the timeline view.