Skip to content
Permalink
main
Switch branches/tags

Commits on May 28, 2022

  1. CRASH: Exception thrown from QueuedVideoOutput::invalidate

    https://bugs.webkit.org/show_bug.cgi?id=241052
    <rdar://93953827>
    
    Reviewed by Eric Carlson.
    
    * Source/WebCore/platform/graphics/avfoundation/objc/QueuedVideoOutput.mm:
    (WebCore::QueuedVideoOutput::QueuedVideoOutput):
    
    An Objective-C exception is thrown from -removeObserver: stating the observer
    was never added in the first place. Clear out ivars in the early return to avoid
    doing work in invalidate() which (in addition to being unnecessary) will trigger
    the exception.
    
    Canonical link: https://commits.webkit.org/251092@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    jernoble committed May 28, 2022
  2. Use desktop User Agent when preconnecting for loads that are predicte…

    …d to use desktop content mode
    
    https://bugs.webkit.org/show_bug.cgi?id=240938
    
    Reviewed by Geoffrey Garen.
    
    * Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
    (-[WKWebView _preconnectToServer:]):
    * Source/WebKit/UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::loadRequestWithNavigationShared):
    (WebKit::WebPageProxy::preconnectTo):
    * Source/WebKit/UIProcess/WebPageProxy.h:
    * Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
    (WebKit::WebPageProxy::useDesktopClassBrowsing const):
    (WebKit::WebPageProxy::predictedUserAgentForRequest const):
    (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
    * Source/WebKit/UIProcess/mac/WebPageProxyMac.mm:
    (WebKit::WebPageProxy::predictedUserAgentForRequest const):
    
    Canonical link: https://commits.webkit.org/251091@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    mattwoodrow committed May 28, 2022
  3. Trigger element fullscreen video extraction after the seeked event

    https://bugs.webkit.org/show_bug.cgi?id=241053
    
    Reviewed by Devin Rousso.
    
    * Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:
    (WebKit::WebFullScreenManager::handleEvent):
    (WebKit::WebFullScreenManager::setMainVideoElement):
    
    Canonical link: https://commits.webkit.org/251090@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    whsieh committed May 28, 2022
  4. Web Inspector: CSS property name counts should be updated atomically

    https://bugs.webkit.org/show_bug.cgi?id=240994
    
    Reviewed by Patrick Angle.
    
    Consider the following example:
    ```
    display: foo;
    display: bar;
    ```
    
    Before this change, the following would happen:
    a. get the cached count of `display: foo`
    b. increment the cached count of `display: foo` by 1
    c. get the stored count of `display: foo`
    d. get the cached count of `display: bar`
    e. increment the cached count of `display: bar` by 1
    f. get the stored count of `display: bar`
    (async)
    g. increment the stored count of `display: foo` (from c) by 1
    (async)
    h. increment the stored count of `display: bar` (from f) by 1
    
    The problem is that g/h get the same stored count because c/f happened before any updates occurred.
    
    After this change, the following would happen:
    a. get the cached count of `display: foo`
    b. increment the cached count of `display: foo` by 1
    c. get the cached count of `display: bar`
    d. increment the cached count of `display: bar` by 1
    (async)
    e. get the stored count of `display: foo`
    (async)
    f. increment the stored count of `display: foo` (from e) by 1
    (async)
    g. get the stored count of `display: bar`
    (async)
    h. increment the stored count of `display: bar` (from g) by 1
    
    By ensuring there is never more than one active operation on `WI.objectStores.cssPropertyNameCounts`
    at a time, it is guaranteed that values will never be trampled over (though it takes a bit longer).
    
    * Source/WebInspectorUI/UserInterface/Models/CSSProperty.js:
    (WI.CSSProperty._initializePropertyNameCounts):
    (WI.CSSProperty.prototype._updateName.changeCount):
    
    Canonical link: https://commits.webkit.org/251089@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    dcrousso committed May 28, 2022
  5. Optimize InputType::create() by reducing calls to AtomString::convert…

    …ToASCIILowercase()
    
    https://bugs.webkit.org/show_bug.cgi?id=241043
    
    Reviewed by Cameron McCormack.
    
    In the common case, InputType::create() gets called with a `type` string that
    is already lowercase. As a result, we would iterate over the whole string
    unnecessarily under convertToASCIILowercase() to verify that it is already
    lowercase, just to look up the type in a HashMap.
    
    To avoid this, we now trying to look up the type in the HashMap directly, and
    only fallback to calling convertToASCIILowercase() in the rare case where the
    look up failed.
    
    On my Apple Silicon MacBook Pro, this reduces the number of samples under
    convertToASCIILowercase() from 17 to 4. Also reduces the number of samples
    under InputType::create() from 21 to 12.
    
    * Source/WebCore/html/InputType.cpp:
    (WebCore::createInputTypeFactoryMap):
    (WebCore::findFactory):
    (WebCore::InputType::create):
    
    Canonical link: https://commits.webkit.org/251088@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    cdumez committed May 28, 2022
  6. Introduce base-size to the flex algorithm

    https://bugs.webkit.org/show_bug.cgi?id=241001
    
    Reviewed by Antti Koivisto.
    
    This is in preparation for supporting flex-basis, where the flex-basis value is used as the base for flexing.
    
    * Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:
    (WebCore::Layout::FlexFormattingContext::computeLogicalWidthForShrinkingFlexItems):
    (WebCore::Layout::FlexFormattingContext::computeLogicalWidthForFlexItems):
    
    Canonical link: https://commits.webkit.org/251087@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    alanbujtas committed May 28, 2022
  7. Rename the WebKit2 Image logging category to ImageAnalysis

    https://bugs.webkit.org/show_bug.cgi?id=241032
    
    Reviewed by Devin Rousso.
    
    This existing logging category is only used for image analysis -- as such, the logging category
    should be renamed to reflect that. This also avoids confusing these logs with the Images logging
    category in WebCore, which is really about image decoding, rendering and painting.
    
    No change in behavior.
    
    * Source/WebKit/Platform/Logging.h:
    * Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:
    (WebKit::WebViewImpl::requestTextRecognition):
    (WebKit::WebViewImpl::computeHasVisualSearchResults):
    (WebKit::WebViewImpl::installImageAnalysisOverlayView): Deleted.
    (WebKit::WebViewImpl::uninstallImageAnalysisOverlayView): Deleted.
    * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
    (-[WKContentView _cancelImageAnalysis]):
    (-[WKContentView validateImageAnalysisRequestIdentifier:]):
    (-[WKContentView imageAnalysisGestureDidBegin:]):
    (-[WKContentView _completeImageAnalysisRequestForContextMenu:requestIdentifier:hasTextResults:]):
    (-[WKContentView imageAnalysisGestureDidTimeOut:]):
    (-[WKContentView installImageAnalysisInteraction:]): Deleted.
    (-[WKContentView uninstallImageAnalysisInteraction]): Deleted.
    
    Canonical link: https://commits.webkit.org/251086@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294982 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    whsieh committed May 28, 2022
  8. Fix sense of the display list AsTextFlags

    https://bugs.webkit.org/show_bug.cgi?id=240939
    
    Reviewed by Simon Fraser.
    
    They do the opposite of what their names suggest.
    
    * Source/WebCore/platform/graphics/displaylists/DisplayList.cpp:
    (WebCore::DisplayList::DisplayList::shouldDumpForFlags):
    (WebCore::DisplayList::DisplayList::dump const):
    * Source/WebCore/platform/graphics/displaylists/DisplayListItemType.h:
    * Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp:
    (WebCore::DisplayList::dumpItem):
    * Source/WebCore/platform/graphics/displaylists/DisplayListItems.h:
    (WebCore::DisplayList::operator<<):
    * Source/WebCore/testing/Internals.cpp:
    (WebCore::Internals::displayListForElement):
    (WebCore::Internals::replayDisplayListForElement):
    (WebCore::Internals::cachedGlyphDisplayListsForTextNode):
    * Source/WebCore/testing/Internals.h:
    * Source/WebCore/testing/Internals.idl:
    
    Canonical link: https://commits.webkit.org/251085@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    heycam committed May 28, 2022
  9. Remove some unnecessary work from the Node destructor

    https://bugs.webkit.org/show_bug.cgi?id=241035
    
    Reviewed by Geoffrey Garen.
    
    Remove some unnecessary work from the Node destructor as it shows on
    Speedometer profiles.
    
    In particular, stop calling clearRareData() as this is just clearing a data
    member. Also move work that only applies to non-ContainerNode to the Text
    and CharacterData destructors since those are the only two non-ContainerNodes.
    
    * Source/WebCore/dom/Attr.cpp:
    (WebCore::Attr::~Attr):
    * Source/WebCore/dom/CharacterData.cpp:
    (WebCore::CharacterData::~CharacterData):
    * Source/WebCore/dom/CharacterData.h:
    * Source/WebCore/dom/Node.cpp:
    (WebCore::Node::~Node):
    
    Canonical link: https://commits.webkit.org/251084@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    cdumez committed May 28, 2022
  10. Fix typo in ConcatenateCTM display list item serialization

    https://bugs.webkit.org/show_bug.cgi?id=240935
    
    Reviewed by Simon Fraser.
    
    * LayoutTests/displaylists/extent-includes-transforms-expected.txt:
    * LayoutTests/platform/mac-wk1/displaylists/extent-includes-transforms-expected.txt:
    * Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp:
    (WebCore::DisplayList::operator<<):
    
    Canonical link: https://commits.webkit.org/251083@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294979 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    heycam committed May 28, 2022
  11. Refactor opaque root logic in WebCore in preparation for Node GC opti…

    …mizations
    
    https://bugs.webkit.org/show_bug.cgi?id=240998
    
    Reviewed by Geoffrey Garen.
    
    Refactor opaque root logic in WebCore in preparation for Node GC optimizations.
    Introduce addWebCoreOpaqueRoot() / containsWebCoreOpaqueRoot() functions for
    WebCore to deal with opaque roots, instead of interacting with the SlotVisitor
    directly. This introduce a nice central point in WebCore where we will be
    able to set / check flags on Node to speed up GC.
    
    Also introduce a WebCoreOpaqueRoot type to replace `void*` as type of opaque
    roots in WebCore. This is useful because we will need to know whether an
    opaque root in a Node or not in a future patch.
    
    There is no expected behavior change from this patch, this is just pure
    refactoring to make it a lot easier for us to optimize Node gargabe collection.
    
    * Source/WebCore/Modules/fetch/FetchRequest.cpp:
    (WebCore::root):
    * Source/WebCore/Modules/fetch/FetchRequest.h:
    * Source/WebCore/Modules/indexeddb/IDBIndex.cpp:
    (WebCore::IDBIndex::opaqueRoot):
    (WebCore::root):
    * Source/WebCore/Modules/indexeddb/IDBIndex.h:
    * Source/WebCore/Modules/indexeddb/IDBIndex.idl:
    * Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp:
    (WebCore::IDBObjectStore::visitReferencedIndexes const):
    (WebCore::root):
    * Source/WebCore/Modules/indexeddb/IDBObjectStore.h:
    * Source/WebCore/Modules/indexeddb/IDBRequest.cpp:
    (WebCore::root):
    * Source/WebCore/Modules/indexeddb/IDBRequest.h:
    * Source/WebCore/Modules/indexeddb/IDBTransaction.cpp:
    (WebCore::IDBTransaction::visitReferencedObjectStores const):
    * Source/WebCore/Modules/mediasource/SourceBuffer.cpp:
    (WebCore::SourceBuffer::opaqueRoot):
    * Source/WebCore/Modules/mediasource/SourceBuffer.h:
    * Source/WebCore/Modules/mediasource/SourceBufferList.cpp:
    (WebCore::root):
    * Source/WebCore/Modules/mediasource/SourceBufferList.h:
    * Source/WebCore/Modules/remoteplayback/RemotePlayback.cpp:
    (WebCore::RemotePlayback::opaqueRootConcurrently const):
    * Source/WebCore/Modules/remoteplayback/RemotePlayback.h:
    * Source/WebCore/Modules/webaudio/AudioBuffer.cpp:
    (WebCore::root):
    * Source/WebCore/Modules/webaudio/AudioBuffer.h:
    * Source/WebCore/Modules/webaudio/AudioWorkletGlobalScope.cpp:
    (WebCore::AudioWorkletGlobalScope::visitProcessors):
    * Source/WebCore/Modules/webaudio/AudioWorkletProcessor.cpp:
    (WebCore::root):
    * Source/WebCore/Modules/webaudio/AudioWorkletProcessor.h:
    * Source/WebCore/Modules/webxr/WebXRSession.cpp:
    (WebCore::root):
    * Source/WebCore/Modules/webxr/WebXRSession.h:
    * Source/WebCore/Sources.txt:
    * Source/WebCore/WebCore.xcodeproj/project.pbxproj:
    * Source/WebCore/bindings/js/JSAbortSignalCustom.cpp:
    (WebCore::JSAbortSignalOwner::isReachableFromOpaqueRoots):
    * Source/WebCore/bindings/js/JSAttrCustom.cpp:
    (WebCore::JSAttr::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp:
    (WebCore::JSAudioBufferSourceNode::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSCSSRuleCustom.cpp:
    (WebCore::JSCSSRule::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSCSSRuleCustom.h:
    (WebCore::root):
    * Source/WebCore/bindings/js/JSCSSRuleListCustom.cpp:
    (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
    * Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp:
    (WebCore::root):
    (WebCore::JSCSSStyleDeclaration::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.h:
    * Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp:
    (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots):
    (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSDOMQuadCustom.cpp:
    (WebCore::JSDOMQuad::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSDOMWindowCustom.cpp:
    (WebCore::JSDOMWindow::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSDeprecatedCSSOMValueCustom.cpp:
    (WebCore::JSDeprecatedCSSOMValueOwner::isReachableFromOpaqueRoots):
    * Source/WebCore/bindings/js/JSDocumentCustom.cpp:
    (WebCore::JSDocument::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSFetchEventCustom.cpp:
    (WebCore::JSFetchEvent::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp:
    (WebCore::JSHTMLCanvasElement::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSHTMLTemplateElementCustom.cpp:
    (WebCore::JSHTMLTemplateElement::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSIDBCursorCustom.cpp:
    (WebCore::JSIDBCursor::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSIDBIndexCustom.cpp: Removed.
    (WebCore::JSIDBIndex::visitAdditionalChildren): Deleted.
    * Source/WebCore/bindings/js/JSIntersectionObserverCustom.cpp:
    (WebCore::JSIntersectionObserver::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSIntersectionObserverEntryCustom.cpp:
    (WebCore::JSIntersectionObserverEntry::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSMediaListCustom.h:
    (WebCore::root):
    * Source/WebCore/bindings/js/JSMessageChannelCustom.cpp:
    (WebCore::JSMessageChannel::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSMessagePortCustom.cpp:
    (WebCore::JSMessagePort::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSNavigatorCustom.cpp:
    (WebCore::JSNavigator::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSNodeCustom.cpp:
    (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
    (WebCore::JSNode::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSNodeCustom.h:
    (WebCore::root):
    * Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp:
    (WebCore::JSNodeIterator::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSNodeListCustom.cpp:
    (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
    * Source/WebCore/bindings/js/JSOffscreenCanvasRenderingContext2DCustom.cpp:
    (WebCore::root):
    (WebCore::JSOffscreenCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots):
    (WebCore::JSOffscreenCanvasRenderingContext2D::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSPaintRenderingContext2DCustom.cpp:
    (WebCore::root):
    (WebCore::JSPaintRenderingContext2DOwner::isReachableFromOpaqueRoots):
    (WebCore::JSPaintRenderingContext2D::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSResizeObserverEntryCustom.cpp:
    (WebCore::JSResizeObserverEntry::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSSVGViewSpecCustom.cpp:
    (WebCore::JSSVGViewSpec::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSServiceWorkerGlobalScopeCustom.cpp:
    (WebCore::JSServiceWorkerGlobalScope::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSStyleSheetCustom.cpp:
    (WebCore::JSStyleSheet::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSStyleSheetCustom.h:
    (WebCore::root):
    * Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp:
    (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots):
    (WebCore::JSTextTrackCue::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSTreeWalkerCustom.cpp:
    (WebCore::JSTreeWalker::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSUndoItemCustom.cpp:
    (WebCore::JSUndoItemOwner::isReachableFromOpaqueRoots):
    * Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp:
    (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp:
    (WebCore::JSWebGLRenderingContext::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSWebXRSessionCustom.cpp:
    (WebCore::JSWebXRSession::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSWorkerGlobalScopeCustom.cpp:
    (WebCore::JSWorkerGlobalScope::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSWorkerNavigatorCustom.cpp:
    (WebCore::JSWorkerNavigator::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp:
    (WebCore::JSXMLHttpRequest::visitAdditionalChildren):
    * Source/WebCore/bindings/js/JSXPathResultCustom.cpp:
    (WebCore::JSXPathResult::visitAdditionalChildren):
    * Source/WebCore/bindings/js/WebCoreOpaqueRoot.h: Added.
    (WebCore::WebCoreOpaqueRoot::WebCoreOpaqueRoot):
    (WebCore::WebCoreOpaqueRoot::isNode const):
    (WebCore::WebCoreOpaqueRoot::pointer const):
    (WebCore::addWebCoreOpaqueRoot):
    (WebCore::containsWebCoreOpaqueRoot):
    * Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
    (GenerateImplementation):
    * Source/WebCore/bindings/scripts/test/JS/JSTestGenerateAddOpaqueRoot.cpp:
    (WebCore::JSTestGenerateAddOpaqueRoot::visitChildrenImpl):
    * Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
    (WebCore::JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots):
    * Source/WebCore/crypto/CryptoKey.cpp:
    (WebCore::root):
    * Source/WebCore/crypto/CryptoKey.h:
    * Source/WebCore/dom/AbortController.cpp:
    (WebCore::AbortController::opaqueRoot):
    * Source/WebCore/dom/AbortController.h:
    * Source/WebCore/dom/AbortController.idl:
    * Source/WebCore/dom/AbortSignal.cpp:
    (WebCore::root):
    * Source/WebCore/dom/AbortSignal.h:
    * Source/WebCore/dom/DOMPointReadOnly.cpp:
    (WebCore::root):
    * Source/WebCore/dom/DOMPointReadOnly.h:
    * Source/WebCore/dom/DOMRectReadOnly.cpp:
    (WebCore::root):
    * Source/WebCore/dom/DOMRectReadOnly.h:
    * Source/WebCore/dom/DocumentInlines.h:
    (WebCore::Node::opaqueRoot const):
    * Source/WebCore/dom/MessagePort.cpp:
    (WebCore::root):
    * Source/WebCore/dom/MessagePort.h:
    * Source/WebCore/dom/MutationObserverRegistration.cpp:
    (WebCore::MutationObserverRegistration::isReachableFromOpaqueRoots const):
    * Source/WebCore/dom/MutationRecord.cpp:
    * Source/WebCore/dom/Node.cpp:
    (WebCore::Node::traverseToOpaqueRoot const):
    * Source/WebCore/dom/Node.h:
    (WebCore::Node::opaqueRoot const): Deleted.
    * Source/WebCore/dom/NodeFilter.h:
    (WebCore::root):
    * Source/WebCore/dom/Range.cpp:
    (WebCore::Range::visitNodesConcurrently const):
    * Source/WebCore/dom/ScriptExecutionContext.cpp:
    (WebCore::root):
    * Source/WebCore/dom/ScriptExecutionContext.h:
    * Source/WebCore/dom/StaticRange.cpp:
    (WebCore::StaticRange::visitNodesConcurrently const):
    * Source/WebCore/fileapi/Blob.cpp:
    (WebCore::root):
    * Source/WebCore/fileapi/Blob.h:
    * Source/WebCore/html/CanvasBase.cpp:
    (WebCore::root):
    * Source/WebCore/html/CanvasBase.h:
    * Source/WebCore/html/HTMLCanvasElement.cpp:
    (WebCore::root):
    * Source/WebCore/html/HTMLCanvasElement.h:
    * Source/WebCore/html/HTMLMediaElement.h:
    * Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:
    (WebCore::WebGL2RenderingContext::addMembersToOpaqueRoots):
    * Source/WebCore/html/canvas/WebGLFramebuffer.cpp:
    * Source/WebCore/html/canvas/WebGLObject.cpp:
    (WebCore::root):
    * Source/WebCore/html/canvas/WebGLObject.h:
    * Source/WebCore/html/canvas/WebGLProgram.cpp:
    (WebCore::WebGLProgram::addMembersToOpaqueRoots):
    * Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
    (WebCore::WebGLRenderingContextBase::addMembersToOpaqueRoots):
    (WebCore::root):
    * Source/WebCore/html/canvas/WebGLRenderingContextBase.h:
    * Source/WebCore/html/canvas/WebGLTransformFeedback.cpp:
    (WebCore::WebGLTransformFeedback::addMembersToOpaqueRoots):
    * Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.cpp:
    (WebCore::WebGLVertexArrayObjectBase::addMembersToOpaqueRoots):
    (WebCore::root):
    * Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.h:
    * Source/WebCore/html/track/TrackBase.cpp:
    (WebCore::TrackBase::opaqueRoot):
    * Source/WebCore/html/track/TrackBase.h:
    (WebCore::root):
    * Source/WebCore/html/track/TrackListBase.cpp:
    (WebCore::TrackListBase::opaqueRoot):
    * Source/WebCore/html/track/TrackListBase.h:
    (WebCore::root):
    * Source/WebCore/page/DOMWindow.cpp:
    (WebCore::root):
    * Source/WebCore/page/DOMWindow.h:
    * Source/WebCore/page/IntersectionObserver.cpp:
    (WebCore::IntersectionObserver::isReachableFromOpaqueRoots const):
    * Source/WebCore/page/NavigatorBase.cpp:
    (WebCore::root):
    * Source/WebCore/page/NavigatorBase.h:
    * Source/WebCore/page/ResizeObserver.cpp:
    (WebCore::ResizeObserver::isReachableFromOpaqueRoots const):
    * Source/WebCore/workers/WorkerLocation.cpp:
    (WebCore::root):
    * Source/WebCore/workers/WorkerLocation.h:
    (WebCore::WorkerLocation::create):
    (WebCore::WorkerLocation::url const):
    (WebCore::WorkerLocation::WorkerLocation):
    * Source/WebCore/workers/service/ServiceWorkerClients.cpp:
    (WebCore::root):
    * Source/WebCore/workers/service/ServiceWorkerClients.h:
    * Source/WebCore/workers/service/ServiceWorkerRegistration.cpp:
    (WebCore::root):
    * Source/WebCore/workers/service/ServiceWorkerRegistration.h:
    * Source/WebCore/xml/XMLHttpRequestUpload.cpp:
    (WebCore::root):
    * Source/WebCore/xml/XMLHttpRequestUpload.h:
    
    Canonical link: https://commits.webkit.org/251082@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    cdumez committed May 28, 2022
  12. WKHTTPCookieStore tests should use removeDataOfTypes to delete all co…

    …okies
    
    https://bugs.webkit.org/show_bug.cgi?id=240726
    
    Reviewed by Sihui Liu.
    
    Call WKWebsiteDataStore.removeDataOfTypes when to clear all cookies
    instead of deleting them one by one. Besides simplifying the code it
    documents the API recommended for the clients.
    
    * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
    (clearCookies):
    (TEST):
    (deleteCookies): Deleted.
    
    Canonical link: https://commits.webkit.org/251081@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    yury-s committed May 28, 2022
  13. [WK2] Attachment icons do not update after updating filewrapper

    https://bugs.webkit.org/show_bug.cgi?id=241026
    rdar://86293273
    
    Reviewed by Wenson Hsieh.
    
    In the case of certain iWork file types downloaded from iCloud that require
    thumbnails, we don't remove the progress update once the filewrapper is updated
    with the complete attachment, which prevents the thumbnail from appearing.
    
    This patch removes the progress attribute once the thumbnail is updated
    so we know we can now paint the icon.
    
    No new tests. There's no clear way to test this change. For previous thumbnail bugs
    we swizzled the thumbnail generator code to make sure we were generating
    thumbnails; however, this bug is a case of the thumbnail being generated but not
    displayed. Similarly, we can't compare the attachment size because it is the same for
    the attachment with and without the correct thumbnail.
    
    * Source/WebCore/html/HTMLAttachmentElement.cpp:
    (WebCore::HTMLAttachmentElement::updateThumbnail):
    
    Canonical link: https://commits.webkit.org/251080@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    kcheney1 committed May 28, 2022
  14. [ iOS ] TestWebKitAPI.SOAuthorizationSubFrame.InterceptionErrorWithRe…

    …ferrer is a flaky timeout
    
    https://bugs.webkit.org/show_bug.cgi?id=239311
    <rdar://91723056>
    
    Reviewed by Brent Fulgham.
    
    There is a race condition when using waitForMessage that we hit here, causing flaky tests on
    some bots. This patch avoids this by specifying the messages waited for before loading the
    request.
    
    * Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:
    (-[TestSOAuthorizationScriptMessageHandler initWithExpectation:]):
    (-[TestSOAuthorizationScriptMessageHandler userContentController:didReceiveScriptMessage:]):
    (TestWebKitAPI::TEST):
    
    Canonical link: https://commits.webkit.org/251079@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294975 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    pascoej committed May 28, 2022
  15. [GLib] Properly deprecate WebKitSettings properties enable-accelerate…

    …d-2d-canvas, enable-plugins, and enable-xss-auditor
    
    https://bugs.webkit.org/show_bug.cgi?id=240993
    
    Patch by Michael Catanzaro <mcatanzaro@redhat.com> on 2022-05-27
    Reviewed by Adrian Perez de Castro.
    
    * Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp:
    (webkit_settings_class_init):
    
    Canonical link: https://commits.webkit.org/251078@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    mcatanzaro authored and webkit-commit-queue committed May 28, 2022
  16. Add a fake style bit for mouse click handlers

    https://bugs.webkit.org/show_bug.cgi?id=240924
    
    Reviewed by Antti Koivisto.
    
    Add a bit to `EventListenerRegionType` for mouse click events, and
    populate it via Node::willRespondToMouseClickEvents.
    
    To do so while avoiding recursive style computation, make it possible
    to plumb Editability through to willRespondToMouseClickEventsWithEditability.
    This short-circuits Node calling into computeEditability() from the base
    implementation of willRespondToMouseClickEvents, which reenters style computation
    via computedStyle() when called from StyleAdjuster (where `EventListenerRegionType`
    is populated).
    
    Also make a variant of computeEditability that takes a passed-in style, and
    do some refactoring to share more code between platforms (without changing
    behavior, even in cases where the behavior differences are suprising).
    
    * Source/WebCore/dom/Node.cpp:
    (WebCore::computeEditabilityFromComputedStyle):
    Instead of computing style, computeEditabilityFromComputedStyle is now passed a RenderStyle reference.
    
    (WebCore::Node::computeEditabilityWithStyle const):
    This subsumes most of the logic from computeEditability(), but will
    compute the style (only if we need it) if it is not passed in.
    
    (WebCore::Node::computeEditability const):
    computeEditability retains its "normal" API, passing through its arguments and a null style,
    indicating to computeEditabilityWithStyle that it should compute the style as usual.
    
    (WebCore::Node::computeEditabilityForMouseClickEvents const):
    A variant of `computeEditabilityWithStyle` that maintains an odd existing
    platform-specific difference in the `UserSelectAllTreatment` argument,
    and allows callers of `willRespondToMouseClickEventsWithEditability` to
    all be consistent.
    
    (WebCore::Node::willRespondToMouseClickEvents const):
    Maintain the existing behavior of willRespondToMouseClickEvents; compute editability as needed.
    
    (WebCore::Node::willRespondToMouseClickEventsWithEditability const):
    `willRespondToMouseClickEventsWithEditability` is now the override point, and
    will not itself cause a style update.
    Refactor this function a bit to share as much code as possible between platforms
    (and maintain an existing comment questioning the differences that we maintain).
    
    * Source/WebCore/dom/Node.h:
    
    * Source/WebCore/rendering/EventRegion.cpp:
    (WebCore::EventRegion::eventListenerRegionForType const):
    * Source/WebCore/rendering/RenderLayerBacking.cpp:
    (WebCore::patternForEventListenerRegionType):
    Add EventListenerRegionType::MouseClick to these two switches over EventListenerRegionType,
    but break and fall into the ASSERT_NOT_REACHED default state; these are only called
    for wheel event listeners.
    
    * Source/WebCore/rendering/style/RenderStyleConstants.cpp:
    (WebCore::operator<<):
    * Source/WebCore/rendering/style/RenderStyleConstants.h:
    * Source/WebCore/style/StyleAdjuster.cpp:
    (WebCore::Style::Adjuster::adjustEventListenerRegionTypesForRootStyle):
    (WebCore::Style::Adjuster::computeEventListenerRegionTypes):
    (WebCore::Style::Adjuster::adjust const):
    If we're building interaction regions, propagate EventListenerRegionType::MouseClick
    down the style tree like we do for wheel event listeners. This is a bit more complicated
    than wheel event listeners, using the Node method instead of just looking at the
    set of event listeners, because many elements accept mouse clicks *without* having
    event listeners installed; they just implement behaviors in their default event handlers.
    
    * Source/WebCore/style/StyleAdjuster.h:
    
    * Source/WebCore/page/InteractionRegion.cpp:
    (WebCore::interactionRegions):
    Adopt the new fake style bit. This is not the final intended use: we will use it from
    EventRegion::unite(), like we do for wheel events, in a future patch.
    
    * Source/WebCore/html/HTMLAnchorElement.cpp:
    (WebCore::HTMLAnchorElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::HTMLAnchorElement::willRespondToMouseClickEvents const): Deleted.
    * Source/WebCore/html/HTMLAnchorElement.h:
    * Source/WebCore/html/HTMLButtonElement.cpp:
    (WebCore::HTMLButtonElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::HTMLButtonElement::willRespondToMouseClickEvents const): Deleted.
    * Source/WebCore/html/HTMLButtonElement.h:
    * Source/WebCore/html/HTMLElement.cpp:
    (WebCore::HTMLElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::HTMLElement::willRespondToMouseClickEvents const): Deleted.
    * Source/WebCore/html/HTMLElement.h:
    * Source/WebCore/html/HTMLImageElement.cpp:
    (WebCore::HTMLImageElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::HTMLImageElement::willRespondToMouseClickEvents const): Deleted.
    * Source/WebCore/html/HTMLImageElement.h:
    * Source/WebCore/html/HTMLInputElement.cpp:
    (WebCore::HTMLInputElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::HTMLInputElement::willRespondToMouseClickEvents const): Deleted.
    * Source/WebCore/html/HTMLInputElement.h:
    * Source/WebCore/html/HTMLLabelElement.cpp:
    (WebCore::HTMLLabelElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::HTMLLabelElement::willRespondToMouseClickEvents const): Deleted.
    * Source/WebCore/html/HTMLLabelElement.h:
    * Source/WebCore/html/HTMLPlugInElement.cpp:
    (WebCore::HTMLPlugInElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::HTMLPlugInElement::willRespondToMouseClickEvents const): Deleted.
    * Source/WebCore/html/HTMLPlugInElement.h:
    * Source/WebCore/html/HTMLSelectElement.cpp:
    (WebCore::HTMLSelectElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::HTMLSelectElement::willRespondToMouseClickEvents const): Deleted.
    * Source/WebCore/html/HTMLSelectElement.h:
    * Source/WebCore/html/HTMLSummaryElement.cpp:
    (WebCore::HTMLSummaryElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::HTMLSummaryElement::willRespondToMouseClickEvents const): Deleted.
    * Source/WebCore/html/HTMLSummaryElement.h:
    * Source/WebCore/html/HTMLTextAreaElement.cpp:
    (WebCore::HTMLTextAreaElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::HTMLTextAreaElement::willRespondToMouseClickEvents const): Deleted.
    * Source/WebCore/html/HTMLTextAreaElement.h:
    * Source/WebCore/html/shadow/SliderThumbElement.cpp:
    (WebCore::SliderThumbElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::SliderThumbElement::willRespondToMouseClickEvents const): Deleted.
    * Source/WebCore/html/shadow/SliderThumbElement.h:
    * Source/WebCore/html/shadow/SpinButtonElement.cpp:
    (WebCore::SpinButtonElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::SpinButtonElement::willRespondToMouseClickEvents const): Deleted.
    * Source/WebCore/html/shadow/SpinButtonElement.h:
    * Source/WebCore/html/shadow/TextControlInnerElements.cpp:
    (WebCore::SearchFieldResultsButtonElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::SearchFieldResultsButtonElement::willRespondToMouseClickEvents const): Deleted.
    (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents const): Deleted.
    * Source/WebCore/html/shadow/TextControlInnerElements.h:
    * Source/WebCore/mathml/MathMLElement.cpp:
    (WebCore::MathMLElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::MathMLElement::willRespondToMouseClickEvents const): Deleted.
    * Source/WebCore/mathml/MathMLElement.h:
    * Source/WebCore/mathml/MathMLSelectElement.cpp:
    (WebCore::MathMLSelectElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::MathMLSelectElement::willRespondToMouseClickEvents const): Deleted.
    * Source/WebCore/mathml/MathMLSelectElement.h:
    * Source/WebCore/svg/SVGAElement.cpp:
    (WebCore::SVGAElement::willRespondToMouseClickEventsWithEditability const):
    (WebCore::SVGAElement::willRespondToMouseClickEvents const): Deleted.
    * Source/WebCore/svg/SVGAElement.h:
    Propagate editability through overrides of willRespondToMouseClickEvents(WithEditability).
    
    Canonical link: https://commits.webkit.org/251077@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    hortont424 committed May 28, 2022
  17. Add EXT_texture_compression_bptc WebGL extension support

    https://bugs.webkit.org/show_bug.cgi?id=235637
    
    Patch by Alexey Knyazev <3479527+lexaknyazev@users.noreply.github.com> on 2022-05-27
    Reviewed by Kenneth Russell.
    
    Support BPTC texture formats and slightly cleanup RGTC code.
    
    * Source/WebCore/CMakeLists.txt:
    * Source/WebCore/DerivedSources-input.xcfilelist:
    * Source/WebCore/DerivedSources-output.xcfilelist:
    * Source/WebCore/DerivedSources.make:
    * Source/WebCore/Sources.txt:
    * Source/WebCore/WebCore.xcodeproj/project.pbxproj:
    * Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp:
    (WebCore::convertToJSValue):
    * Source/WebCore/html/canvas/EXTTextureCompressionBPTC.cpp: Copied from Source/WebCore/html/canvas/EXTTextureCompressionRGTC.cpp.
    (WebCore::EXTTextureCompressionBPTC::EXTTextureCompressionBPTC):
    (WebCore::EXTTextureCompressionBPTC::getName const):
    (WebCore::EXTTextureCompressionBPTC::supported):
    * Source/WebCore/html/canvas/EXTTextureCompressionBPTC.h: Copied from Source/WebCore/html/canvas/EXTTextureCompressionRGTC.h.
    * Source/WebCore/html/canvas/EXTTextureCompressionBPTC.idl: Copied from Source/WebCore/html/canvas/EXTTextureCompressionRGTC.h.
    * Source/WebCore/html/canvas/EXTTextureCompressionRGTC.cpp:
    (WebCore::EXTTextureCompressionRGTC::EXTTextureCompressionRGTC):
    (WebCore::EXTTextureCompressionRGTC::supported):
    * Source/WebCore/html/canvas/EXTTextureCompressionRGTC.h:
    * Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:
    (WebCore::WebGL2RenderingContext::getExtension):
    (WebCore::WebGL2RenderingContext::getSupportedExtensions):
    * Source/WebCore/html/canvas/WebGLExtension.h:
    * Source/WebCore/html/canvas/WebGLRenderingContext.cpp:
    (WebCore::WebGLRenderingContext::getExtension):
    (WebCore::WebGLRenderingContext::getSupportedExtensions):
    * Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
    (WebCore::WebGLRenderingContextBase::extensionIsEnabled):
    (WebCore::WebGLRenderingContextBase::validateCompressedTexFuncData):
    (WebCore::WebGLRenderingContextBase::loseExtensions):
    * Source/WebCore/html/canvas/WebGLRenderingContextBase.h:
    * Source/WebCore/platform/graphics/GraphicsContextGL.h:
    
    Canonical link: https://commits.webkit.org/251076@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    lexaknyazev authored and webkit-commit-queue committed May 28, 2022
  18. Remove WebKit feature flags plist

    https://bugs.webkit.org/show_bug.cgi?id=241042
    
    Reviewed by Wenson Hsieh.
    
    * Source/WebKit/FeatureFlags/WebKit.plist: Removed.
    * Source/WebKit/WebKit.xcodeproj/project.pbxproj:
    Now that the blocking bug is resolved, we can remove this entirely.
    
    Canonical link: https://commits.webkit.org/251075@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    hortont424 committed May 28, 2022
  19. Optimize setting SVG element transforms

    https://bugs.webkit.org/show_bug.cgi?id=240825
    
    Reviewed by Said Abou-Hallawa.
    
    When parseTransformValueGeneric() creates SVGTransformValues, it default-constructed them
    and then called setRotate(), setScale() etc, which would reset m_matrix to identity a second time.
    
    Optimize by providing static helpers for creating translate, rotate and scale SVGTransformValues
    which initialize the matrix with the final value. Helpers are added to AffineTransform to
    create scale, translate and rotate transforms, renaming `translation` to `makeTranslation` so
    that the "scale" helper doesn't conflict with the `scale` member function.
    
    This reduces the time spent under the Element::setAttribute() function in the MotionMark
    Suits test by about 14%.
    
    * Source/WebCore/page/FrameView.cpp:
    (WebCore::FrameView::rectForViewportConstrainedObjects):
    * Source/WebCore/platform/graphics/FontCascade.cpp:
    (WebCore::GlyphToPathTranslator::GlyphToPathTranslator):
    * Source/WebCore/rendering/svg/LegacyRenderSVGRoot.cpp:
    (WebCore::LegacyRenderSVGRoot::paintReplaced):
    (WebCore::LegacyRenderSVGRoot::localToParentTransform const):
    * Source/WebCore/rendering/svg/RenderSVGResourceMarker.cpp:
    (WebCore::RenderSVGResourceMarker::localToParentTransform const):
    * Source/WebCore/rendering/svg/RenderSVGViewportContainer.cpp:
    (WebCore::RenderSVGViewportContainer::calculateLocalTransform):
    * Source/WebCore/svg/SVGTransform.h:
    (WebCore::SVGTransform::create):
    (WebCore::SVGTransform::SVGTransform):
    * Source/WebCore/svg/SVGTransformList.cpp:
    (WebCore::SVGTransformList::parseGeneric):
    * Source/WebCore/svg/SVGTransformValue.h:
    (WebCore::SVGTransformValue::translateTransformValue):
    (WebCore::SVGTransformValue::rotateTransformValue):
    (WebCore::SVGTransformValue::scaleTransformValue):
    (WebCore::SVGTransformValue::setMatrix):
    (WebCore::SVGTransformValue::matrixDidChange):
    (WebCore::SVGTransformValue::setTranslate):
    (WebCore::SVGTransformValue::setScale):
    (WebCore::SVGTransformValue::setRotate):
    * Source/WebCore/svg/SVGTransformable.cpp:
    (WebCore::parseTransformValueGeneric):
    * Source/WebCore/svg/properties/SVGValueProperty.h:
    * Tools/TestWebKitAPI/Tests/WebCore/AffineTransform.cpp:
    (TestWebKitAPI::TEST):
    
    Canonical link: https://commits.webkit.org/251074@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    smfr committed May 28, 2022
  20. [macOS][GPUP] Block unused system calls

    https://bugs.webkit.org/show_bug.cgi?id=240966
    <rdar://84826074>
    
    Reviewed by Chris Dumez.
    
    * Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
    
    Canonical link: https://commits.webkit.org/251073@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    pvollan committed May 28, 2022

Commits on May 27, 2022

  1. Web Inspector: Sources: editing a breakpoint action to cause the Code…

    …Mirror to wrap doesn't update the `WI.Popover` size
    
    https://bugs.webkit.org/show_bug.cgi?id=220643
    <rdar://problem/73225206>
    
    Reviewed by Patrick Angle.
    
    * Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.js:
    (WI.BreakpointActionView.prototype._updateBody):
    (WI.BreakpointActionView.prototype._handleJavaScriptCodeMirrorUpdate): Added.
    (WI.BreakpointActionView.prototype._codeMirrorViewportChanged): Deleted.
    Replace listening for `"viewportChange"` (and `"update"`) with `"updates"`, each time comparing the
    `getScrollInfo().clientHeight` (we don't care about the `clientWidth` because it's hardcoded in the
    CSS `.breakpoint-action-eval-editor > .CodeMirror`) with the last value. This is necessary because
    `"viewportChange"` is only fired when the number of lines changes, which a wrapped line doesn't do.
    
    Canonical link: https://commits.webkit.org/251072@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    dcrousso committed May 27, 2022
  2. Web Inspector: Timelines: switching between Events/Frames while editi…

    …ng instruments leaves the UI in a broken state
    
    https://bugs.webkit.org/show_bug.cgi?id=218700
    <rdar://problem/71180148>
    
    Reviewed by Patrick Angle.
    
    * Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js:
    (WI.TimelineOverview.prototype.set viewMode):
    (WI.TimelineOverview.prototype._viewModeDidChange):
    Forcibly stop editing instruments when switching between Events/Frames. Note that this will save the
    current state of edited instruments, so no changes will be lost.
    
    Canonical link: https://commits.webkit.org/251071@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    dcrousso committed May 27, 2022
  3. git-webkit pr: Show server response when updating an issue fails

    Reviewed by Jonathan Bedard.
    
    Small changes are also made to the request() method to make it more
    reusable: now it can handle methods other than GET, and can print custom
    error messages when requests fail.
    
    Bare usages of python-requests have been refactored to use
    self.request() where possible (that is, when the path being accessed is
    within the repo URL).
    
    * Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py:
    
    Canonical link: https://commits.webkit.org/251070@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    ntrrgc committed May 27, 2022
  4. Revert "Enable WasmLLInt on ARMv7"

    Unreviewed.
    
    This reverts commit 2a12d06.
    
    2a12d06 breaks WASM on 64-bit platforms.
    
    Canonical link: https://commits.webkit.org/251069@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294965 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    Mark Lam committed May 27, 2022
  5. [iOS] Performing the image markup action should reset `_imageAnalysis…

    …MarkupData`
    
    https://bugs.webkit.org/show_bug.cgi?id=241024
    
    Reviewed by Aditya Keerthi.
    
    * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
    (-[WKContentView imageAnalysisMarkupMenu]):
    
    Canonical link: https://commits.webkit.org/251068@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    whsieh committed May 27, 2022
  6. Update internal CSS to remove '-webkit-' prefixing where possible

    https://bugs.webkit.org/show_bug.cgi?id=240930
    <rdar://93934318>
    
    Patch by Sammy Gill <sgill26@apple.com> on 2022-05-27
    Reviewed by Brent Fulgham and Tim Nguyen.
    
    There are many instances in WebCore where prefixed versions of CSS
    attributes are being used even though these attributes have been
    standardized and have unprefixed versions. The prefixed versions no
    longer need to be used and can be replaced by their unprefixed
    equivalents.
    
    * Source/WebCore/Modules/mediacontrols/mediaControlsAdwaita.css:
    * Source/WebCore/Modules/mediacontrols/mediaControlsApple.css:
    * Source/WebCore/Modules/mediacontrols/mediaControlsBase.css:
    * Source/WebCore/css/html.css:
    * Source/WebCore/css/legacyFormControlsIOS.css:
    * Source/WebCore/css/mediaControls.css:
    * Source/WebCore/css/themeAdwaita.css:
    * Source/WebCore/html/shadow/imageOverlay.css:
    * Source/WebCore/html/shadow/mac/imageControlsMac.css:
    * Source/WebCore/html/shadow/meterElementShadow.css:
    * Source/WebCore/xml/XMLViewer.css:
    
    Canonical link: https://commits.webkit.org/251067@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    sgill26 authored and webkit-commit-queue committed May 27, 2022
  7. [Gardening]: [ iOS macOS ] two imported/w3c/web-platform-tests/html/c…

    …anvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage tests are a consistent failure
    
    https://bugs.webkit.org/show_bug.cgi?id=241048
    <rdar://94056966>
    
    Unreviewed test gardening.
    
    * LayoutTests/platform/ios/TestExpectations:
    * LayoutTests/platform/mac-wk1/TestExpectations:
    * LayoutTests/platform/mac-wk2/TestExpectations:
    
    Canonical link: https://commits.webkit.org/251066@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    karlrackler committed May 27, 2022
  8. Flakes in WebGL conformance[2]/textures/image_bitmap_from_image_bitma…

    …p/ tests
    
    https://bugs.webkit.org/show_bug.cgi?id=241027
    
    Patch by Kenneth Russell <kbr@chromium.org> on 2022-05-27
    Unreviewed test gardening.
    
    * LayoutTests/webgl/TestExpectations:
       Mark all tests under:
        webgl/2.0.0/conformance[2]/textures/image_bitmap_from_image_bitmap
       as flaky (Pass Failure) while the bug is being investigated.
    
    Canonical link: https://commits.webkit.org/251065@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    kenrussell authored and webkit-commit-queue committed May 27, 2022
  9. Revert "Non unified build fixes, lateish May 2022 edition"

    Unreviewed.
    
    This reverts commit 2db7e5e.
    
    We need to revert 2a12d06 because it broke WASM on
    64-bit platforms.  2db7e5e was builds on top of
    2a12d06, and hence, needs to be reverted too.
    
    Canonical link: https://commits.webkit.org/251064@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    Mark Lam committed May 27, 2022
  10. [Modern Media Controls] REGRESSION(r293684) cannot pause <video> if…

    … `controls` are added after `"play"`
    
    https://bugs.webkit.org/show_bug.cgi?id=240985
    <rdar://problem/93822316>
    
    Reviewed by Eric Carlson.
    
    * Source/WebCore/Modules/modern-media-controls/media/media-controller.js:
    (MediaController):
    Actually check if the `media` is playing and/or has played instead of always assuming `false`.
    
    * Source/WebCore/Modules/modern-media-controls/media/start-support.js:
    (StartSupport.prototype._shouldShowStartButton):
    Drive-by: It's no longer necessary to check `media.played.length` here it's part of `mediaController.hasPlayed`.
    
    * LayoutTests/media/modern-media-controls/ios-inline-media-controls/touch/ios-inline-media-controls-added-after-play.html: Added.
    * LayoutTests/media/modern-media-controls/ios-inline-media-controls/touch/ios-inline-media-controls-added-after-play-expected.txt: Added.
    
    Canonical link: https://commits.webkit.org/251063@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    dcrousso committed May 27, 2022
  11. Crash under RemoteDisplayListRecorder::restore()

    https://bugs.webkit.org/show_bug.cgi?id=240545
    
    Reviewed by Simon Fraser.
    
    * Source/WebKit/GPUProcess/graphics/RemoteImageBuffer.h:
    (WebKit::RemoteImageBuffer::~RemoteImageBuffer):
    Avoid restoring the GraphicsContext stack for volatile
    ImageBuffers. The buffers do not have a graphics context.
    
    * Source/WebCore/platform/graphics/ConcreteImageBuffer.h:
    Add an assertion to check that volatile image buffers
    do not try to access their context.
    
    Canonical link: https://commits.webkit.org/251062@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    webkit-commit-queue committed May 27, 2022
  12. CrashTracer: com.apple.WebKit.WebContent at com.apple.WebKit: WebKit:…

    …:TextCheckingControllerProxy::annotatedSubstringBetweenPositions
    
    https://bugs.webkit.org/show_bug.cgi?id=239909
    <rdar://problem/87885717>
    
    Reviewed by Wenson Hsieh.
    
    This exception happens when trying to add attributes for text that contains collapsed whitespace and
    has also been wrapped due to the size of its parent container. The exception specifically is about
    trying to add attributes beyond the current length of a `NSAttributedString`.
    
    * Source/WebCore/editing/TextIteratorBehavior.h:
    * Source/WebCore/editing/TextIterator.cpp:
    (WebCore::TextIterator::handleTextRun):
    In the case that `m_lastTextNodeEndedWithCollapsedSpace`, we only want to add the remaining text if
    we're still within the desired portion of the `m_textRun`. Otherwise, we'll iterate over too much of
    the text and result in a string that's longer than what would be the case if one manually calculated
    it from the given `offset` and `offsetEnd`. Add a new `TextIteratorBehavior::IgnoresWhiteSpaceAtEndOfRun`
    to not include the trailing whitespace.
    
    * Source/WebKit/WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm:
    (WebKit::TextCheckingControllerProxy::annotatedSubstringBetweenPositions):
    Use the new `WebCore::TextIteratorBehavior::IgnoresWhiteSpaceAtEndOfRun` to not include the trailing
    whitespace.
    Also add some defensive checks just in case.
    
    * Source/WebCore/testing/Internals.idl:
    * Source/WebCore/testing/Internals.h:
    * Source/WebCore/testing/Internals.cpp:
    (WebCore::toTextIteratorBehaviors): Added.
    (WebCore::Internals::locationFromRange):
    (WebCore::Internals::lengthFromRange):
    (WebCore::Internals::statesOfTextIterator): Added.
    Add a way to provide `TextIteratorBehaviors` to methods that use `TextIterator`.
    Add a method that gets the `text` and `range` of a `TextIterator` after every `advance`.
    
    * LayoutTests/editing/text-iterator/sequential-collapsed-ranges.html: Added.
    * LayoutTests/editing/text-iterator/sequential-collapsed-ranges-expected.txt: Added.
    * LayoutTests/editing/text-iterator/subrange-with-trailing-collapsed-whitespace.html: Added.
    * LayoutTests/editing/text-iterator/subrange-with-trailing-collapsed-whitespace-expected.txt: Added.
    
    Canonical link: https://commits.webkit.org/251061@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    dcrousso committed May 27, 2022
  13. [Xcode] Compute PGO profdata paths instead of searching for them at b…

    …uild time
    
    https://bugs.webkit.org/show_bug.cgi?id=239681
    
    Reviewed by Wenson Hsieh and Alexey Proskuryakov.
    
    Production builds should always use profdata from the SDK, internal
    release builds should use profdata from the local WebKitAdditions when
    available, and open source builds should use the stub profdata. Add a
    PROFILE_DATA_PATH build setting which implements these rules and replace
    the script phases that checked those paths dynamically.
    
    This fixes XCBuild validation issues in the open-source build, and
    should prevent production builders from using stale profdata in
    BUILT_PRODUCTS_DIR. Additionally, engineers can now build with custom
    profile data by overriding PROFILE_DATA_PATH.
    
    * Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig:
    * Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
    * Source/JavaScriptCore/Scripts/copy-profiling-data.sh: Added. This file
      is part of JavaScriptCore's private headers and replaces the "Copy
      Profiling Data" script phase logic all projects.
    * Source/WebKit/Configurations/BaseTarget.xcconfig:
    * Source/WebKit/WebKit.xcodeproj/project.pbxproj:
    * Source/WebCore/Configurations/WebCore.xcconfig:
    * Source/WebCore/WebCore.xcodeproj/project.pbxproj:
    
    Canonical link: https://commits.webkit.org/251060@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    emw-apple committed May 27, 2022
  14. Start allocating shared memory with MAP_MEM_VM_SHARE again on newer OSes

    https://bugs.webkit.org/show_bug.cgi?id=241014
    <rdar://94032696>
    
    Reviewed by Simon Fraser.
    
    When we started doing memory attribution in the GPUProcess, we stopped using
    the MAP_MEM_VM_SHARE flag when creating SharedMemory, because it was
    incompatible with attribution. However, creating shared memory would fail
    without the MAP_MEM_VM_SHARE flag under certain circumstances (due to size
    restriction iirc), in which case we would fall back to using MAP_MEM_VM_SHARE
    and fail memory attribution.
    
    As of <rdar://73715428>, MAP_MEM_VM_SHARE is now compatible with memory
    attribution so this patch starts using the flag again and unconditionally on
    newer OSes.
    
    * Source/WTF/wtf/PlatformHave.h:
    * Source/WebKit/Platform/cocoa/SharedMemoryCocoa.cpp:
    (WebKit::makeMemoryEntry):
    
    Canonical link: https://commits.webkit.org/251059@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    cdumez committed May 27, 2022
  15. [WebAuthn] Forward declare ASC SPI for internal needs.

    https://bugs.webkit.org/show_bug.cgi?id=240928
    rdar://problem/93930713
    
    Reviewed by Brent Fulgham.
    
    This fixes the build after an internal change for older macOS.
    
    * Source/WebKit/Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
    * Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:
    Remove unused import that isn't present in older macOS sdk.
    
    Canonical link: https://commits.webkit.org/251058@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294950 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    pascoej committed May 27, 2022
Older