Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Commits on Jan 28, 2023

  1. Add my github account to contributors.json

    Reviewed by Tim Nguyen.
    
    * metadata/contributors.json:
    
    Canonical link: https://commits.webkit.org/259521@main
    aestes authored and nt1m committed Jan 28, 2023
  2. vmEntryToJavaScript does not need to use the arity check entry.

    https://bugs.webkit.org/show_bug.cgi?id=251289
    <rdar://problem/104759274>
    
    Reviewed by Geoffrey Garen and Yusuke Suzuki.
    
    This is because we can tell the ProtoCallFrame to ensure that there is enough argument
    space to meet arity requirements instead.
    
    With this, we can also make the following changes:
    
    1. We no longer need to look up the arity check entry in JITCode.  Instead, we'll add
       a m_addressForCall CodePtr in the base JITCode which is common across all JITCode
       subclasses, and therefore can be accessed without a virtual call.  To enable this,
       we also change JITCodeWithCodeRef to not use a CodeRef.  Instead, we use the
       m_addressForCall CodePtr along with a m_executableMemory RefPtr in JITCodeWithCodeRef
       itself to track the equivalent information.
    
    2. Remove JITCode::execute().  Clients will not call vmEntryToJavaScript directly instead.
       Other than calling vmEntryToJavaScript, the other things that JITCode::execute() does are:
    
       a. Set vm.didEnterVM on exit.  The only client that doesn't already do this is
          Interpreter::executeCachedCall.  So, we'll just add it there.
    
       b. Change the return value of vmEntryToJavaScript to jsNull if an exception is present
          on exit.  I believe this was in to ensure that checkedReturn() does not complain.
          The purpose of checkeReturn() is for a legacy reason: back then, we didn't have exception
          check validation to ensure that exceptions are checked in all the right places.
          checkedReturn() adds an ASSERT to help ensure that we don't return a nullptr.  However, a
          null check doesn't really provide much of a guarantee that the return value is valid.  So,
          we'll just remove checkedReturn() especially since we now have exception check validation.
    
    3. We also change the return paths in vmEntrytoJavaScript for errors and unhandled exceptions
       to always return jsUndefined.  This is not strictly needed but it is extremely low cost, and
       helps make debugging an unchecked exception easier (as opposed to returning whatever random
       value was in the register).
    
    * Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
    * Source/JavaScriptCore/dfg/DFGOperations.cpp:
    * Source/JavaScriptCore/ftl/FTLJITCode.h:
    * Source/JavaScriptCore/interpreter/Interpreter.cpp:
    (JSC::eval):
    (JSC::Interpreter::executeProgram):
    (JSC::Interpreter::executeCall):
    (JSC::Interpreter::executeConstruct):
    (JSC::Interpreter::executeEval):
    (JSC::Interpreter::executeModuleProgram):
    * Source/JavaScriptCore/interpreter/Interpreter.h:
    (JSC::Interpreter::checkedReturn): Deleted.
    * Source/JavaScriptCore/interpreter/InterpreterInlines.h:
    (JSC::Interpreter::executeCachedCall):
    * Source/JavaScriptCore/interpreter/ProtoCallFrame.h:
    * Source/JavaScriptCore/interpreter/ProtoCallFrameInlines.h:
    (JSC::ProtoCallFrame::init):
    * Source/JavaScriptCore/jit/JITCode.cpp:
    (JSC::JITCode::JITCode):
    (JSC::JITCodeWithCodeRef::JITCodeWithCodeRef):
    (JSC::JITCodeWithCodeRef::~JITCodeWithCodeRef):
    (JSC::JITCodeWithCodeRef::executableAddressAtOffset):
    (JSC::JITCodeWithCodeRef::dataAddressAtOffset):
    (JSC::JITCodeWithCodeRef::offsetOf):
    (JSC::JITCodeWithCodeRef::size):
    (JSC::JITCodeWithCodeRef::contains):
    (JSC::JITCodeWithCodeRef::swapCodeRefForDebugger):
    (JSC::DirectJITCode::DirectJITCode):
    (JSC::DirectJITCode::initializeCodeRefForDFG):
    (JSC::DirectJITCode::addressForCall):
    (JSC::NativeJITCode::addressForCall):
    * Source/JavaScriptCore/jit/JITCode.h:
    (JSC::JITCode::addressForCall const):
    * Source/JavaScriptCore/jit/JITCodeInlines.h: Removed.
    * Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm:
    * Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:
    * Source/JavaScriptCore/runtime/Completion.cpp:
    (JSC::evaluate):
    * Source/JavaScriptCore/runtime/StringPrototype.cpp:
    * Source/JavaScriptCore/wasm/js/WebAssemblyFunction.h:
    
    Canonical link: https://commits.webkit.org/259520@main
    Mark Lam committed Jan 28, 2023
  3. Split ShorthandSerializer into its own file

    https://bugs.webkit.org/show_bug.cgi?id=251064
    rdar://problem/104586227
    
    Reviewed by Tim Nguyen.
    
    Split the StyleProperties.h/cpp file up so each file has only a single class.
    Make a few changes tso there's enough encapsulation.
    
    * Source/WebCore/Headers.cmake: Added ImmutableStyleProperties.h, MutableStyleProperties.h,
    ShorthandSerializer.h, and StylePropertiesInlines.h.
    
    * Source/WebCore/Modules/highlight/Highlight.cpp: Removed unneeded includes.
    
    * Source/WebCore/Sources.txt: Added ImmutableStyleProperties.cpp, MutableStyleProperties.cpp,
    and ShorthandSerializer.cpp.
    
    * Source/WebCore/WebCore.xcodeproj/project.pbxproj: Added all the new files.
    
    * Source/WebCore/animation/DocumentTimeline.cpp: Added an include.
    
    * Source/WebCore/animation/KeyframeEffect.cpp: Added an include.
    (WebCore::KeyframeEffect::ParsedKeyframe::ParsedKeyframe): Moved this out of the header so we can
    compile without the definition of MutableStyleProperties.
    (WebCore::KeyframeEffect::ParsedKeyframe::~ParsedKeyframe): Ditto.
    
    * Source/WebCore/animation/KeyframeEffect.h: Removed include of StyleProperties.h and made
    changes so everything can compile without it. Also tidied up a bit.
    
    * Source/WebCore/css/CSSComputedStyleDeclaration.cpp: Updated includes.
    * Source/WebCore/css/CSSFontFace.h: Ditto.
    * Source/WebCore/css/CSSFontFaceSet.cpp: Ditto.
    * Source/WebCore/css/CSSCounterStyleRule.cpp: Ditto.
    
    * Source/WebCore/css/CSSCounterStyleRule.h: Removed include of StyleProperties.h and made
    changes so everything can compile without it.
    * Source/WebCore/css/CSSKeyframeRule.h: Ditto.
    
    * Source/WebCore/css/ComputedStyleExtractor.cpp:
    (WebCore::ComputedStyleExtractor::copyProperties): Renamed from copyPropertiesInSet and updated
    to take a Span.
    * Source/WebCore/css/ComputedStyleExtractor.h: Ditto.
    
    * Source/WebCore/css/FontSelectionValueInlines.h: Deleted unused isCSS21Weight and
    fontWeightKeyword functions.
    
    * Source/WebCore/css/ImmutableStyleProperties.cpp: Added.
    * Source/WebCore/css/ImmutableStyleProperties.h: Added.
    * Source/WebCore/css/MutableStyleProperties.cpp: Added.
    * Source/WebCore/css/MutableStyleProperties.h: Added.
    * Source/WebCore/css/ShorthandSerializer.cpp: Added.
    * Source/WebCore/css/ShorthandSerializer.h: Added.
    * Source/WebCore/css/StyleProperties.cpp: Moved code out of this file.
    * Source/WebCore/css/StyleProperties.h: Removed most includes. Marked functions inline that need
    inline definitions that depend on the immutable and mutable derived classes. Got rid of
    StylePropertiesType and use a boolean m_isMutable instead. Changed copyProperties to take a Span.
    * Source/WebCore/css/StylePropertiesInlines.h: Added.
    
    * Source/WebCore/css/StylePropertyShorthand.h:
    (WebCore::isShorthandCSSProperty): Deleted. This is now generated along with isLonghand and is
    named isShorthand.
    
    * Source/WebCore/css/StyleRule.cpp:
    (WebCore::StyleRule::setProperties): Moved out of line so we can compile the header without
    including StyleProperties.h.
    
    * Source/WebCore/css/StyleRule.h: Removed include of StyleProperties.h and made changes so
    everything can compile without it.
    
    * Source/WebCore/css/parser/CSSParser.cpp: Updated includes.
    * Source/WebCore/css/parser/CSSParserImpl.cpp: Ditto.
    
    * Source/WebCore/css/parser/CSSParserMode.h: Give CSSParserMode an underlying integer type so
    it can be forward declared.
    
    * Source/WebCore/css/parser/CSSPropertyParser.cpp:
    (WebCore::CSSPropertyParser::parseValueStart): Call isShorthand.
    (WebCore::CSSPropertyParser::parseFontFaceDescriptor): Ditto.
    
    * Source/WebCore/css/process-css-properties.py:
    (GenerateCSSPropertyNames): Generate isShorthand alongside isLonghand.
    
    * Source/WebCore/css/typedom/CSSStyleValueFactory.cpp: Updated includes.
    (WebCore::CSSStyleValueFactory::parseStyleValue): Use isShorthand.
    
    * Source/WebCore/css/typedom/InlineStylePropertyMap.cpp: Updated includes.
    
    * Source/WebCore/css/typedom/MainThreadStylePropertyMapReadOnly.cpp:
    (WebCore::MainThreadStylePropertyMapReadOnly::get const): Use isShorthand.
    (WebCore::MainThreadStylePropertyMapReadOnly::getAll const): Ditto.
    * Source/WebCore/css/typedom/StylePropertyMap.cpp:
    (WebCore::StylePropertyMap::set): Ditto.
    
    * Source/WebCore/dom/Attr.cpp: Updated includes.
    
    * Source/WebCore/dom/ElementData.h: Use MutableStyleProperties instead of StyleProperties for
    the types where possible. More specific class gives us more efficient code.
    
    * Source/WebCore/dom/StyledElement.cpp: Updated includes.
    * Source/WebCore/dom/StyledElement.h: Use MutableStyleProperties instead of StyleProperties for
    the types where possible. More specific class gives us more efficient code.
    
    * Source/WebCore/editing/EditingStyle.cpp: Updated includes.
    (WebCore::copyEditingProperties): Use copyProperties.
    (WebCore::EditingStyle::extractAndRemoveBlockProperties): Use copyProperties and removeProperties.
    (WebCore::EditingStyle::removeBlockProperties): Use removeProperties.
    (WebCore::EditingStyle::triStateOfStyle const): Ditto.
    (WebCore::removePropertiesInStyle): Ditto.
    (WebCore::StyleChange::~StyleChanged): Moved this here sot he header does not need the definition
    of StyleProperties.
    
    * Source/WebCore/editing/EditingStyle.h: Removed include of StyleProperties.h and made changes so
    everything can compile without it.
    
    * Source/WebCore/editing/Editor.cpp: Updated includes.
    * Source/WebCore/editing/EditorCommand.cpp: Ditto.
    * Source/WebCore/editing/RemoveFormatCommand.cpp: Ditto.
    * Source/WebCore/editing/ReplaceSelectionCommand.cpp: Ditto.
    * Source/WebCore/editing/ios/EditorIOS.mm: Ditto.
    * Source/WebCore/editing/mac/EditorMac.mm: Ditto.
    * Source/WebCore/editing/markup.cpp: Ditto.
    * Source/WebCore/html/HTMLBodyElement.cpp: Ditto.
    * Source/WebCore/html/HTMLHRElement.cpp: Ditto.
    * Source/WebCore/html/HTMLPreElement.cpp: Ditto
    .
    * Source/WebCore/html/HTMLTableCellElement.cpp:
    (WebCore::HTMLTableCellElement::additionalPresentationalHintStyle const): Use
    MutableStyleProperties.
    * Source/WebCore/html/HTMLTableCellElement.h: Ditto.
    * Source/WebCore/html/HTMLTableColElement.cpp:
    (WebCore::HTMLTableColElement::additionalPresentationalHintStyle const): Ditto.
    * Source/WebCore/html/HTMLTableColElement.h: Ditto.
    
    * Source/WebCore/html/HTMLTableElement.cpp: Updated includes.
    (WebCore::leakBorderStyle): Use MutableStyleProperties.
    (WebCore::HTMLTableElement::additionalPresentationalHintStyle const): Ditto.
    (WebCore::HTMLTableElement::createSharedCellStyle const): Ditto.
    (WebCore::HTMLTableElement::additionalCellStyle const): Ditto.
    (WebCore::leakGroupBorderStyle): Ditto.
    (WebCore::HTMLTableElement::additionalGroupStyle const): Ditto.
    * Source/WebCore/html/HTMLTableElement.h: Ditto.
    * Source/WebCore/html/HTMLTableSectionElement.cpp:
    (WebCore::HTMLTableSectionElement::additionalPresentationalHintStyle const): DItto.
    * Source/WebCore/html/HTMLTableSectionElement.h: Ditto.
    
    * Source/WebCore/html/HTMLTextFormControlElement.cpp: Updated includes.
    (WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const): Use auto.
    
    * Source/WebCore/html/track/WebVTTParser.cpp: Updated includes.
    * Source/WebCore/inspector/agents/InspectorAnimationAgent.cpp: Ditto.
    
    * Source/WebCore/inspector/agents/InspectorCSSAgent.cpp:
    (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle): Use
    MutableStyleProperties.
    
    * Source/WebCore/loader/cache/CachedScript.h: Export some symbols used for testing.
    
    * Source/WebCore/page/DragController.cpp: Updated includes.
    * Source/WebCore/page/PageSerializer.cpp: Ditto.
    * Source/WebCore/platform/animation/TimingFunction.cpp: Ditto.
    * Source/WebCore/rendering/RenderTreeAsText.cpp: Ditto.
    * Source/WebCore/style/MatchResult.h: Ditto.
    
    * Source/WebCore/style/StyleBuilder.cpp:
    (WebCore::Style::Builder::applyProperty): Use isShorthand.
    * Source/WebCore/style/Styleable.cpp:
    (WebCore::compileTransitionPropertiesInStyle): Ditto.
    
    * Source/WebCore/svg/SVGElementRareData.h: Update includes.
    * Source/WebCore/svg/SVGFontFaceElement.cpp: Ditto.
    * Source/WebCore/svg/properties/SVGAttributeAnimator.cpp: Ditto.
    * Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp: Ditto.
    * Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm: Ditto.
    * Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm: Ditto.
    * Source/WebKitLegacy/mac/WebView/WebFrame.mm: Ditto.
    * Source/WebKitLegacy/mac/WebView/WebView.mm: Ditto.
    * Tools/TestWebKitAPI/Tests/WebCore/CSSParser.cpp: Ditto.
    
    Canonical link: https://commits.webkit.org/259519@main
    darinadler committed Jan 28, 2023
  4. REGRESSION(256180@main): Enabling accelerated drawing caused some Ima…

    …geOnly Failures (248018)
    
    https://bugs.webkit.org/show_bug.cgi?id=248018
    rdar://102449694
    
    Unreviewed test gardening.
    
    Adjusting pixel tolerance on tests that broke when accelrated drawing was enabled.
    
    * LayoutTests/svg/compositing/outermost-svg-with-border-padding.html:
    * LayoutTests/svg/gradients/spreadMethodAlpha.svg:
    
    Canonical link: https://commits.webkit.org/259518@main
    robert-jenner committed Jan 28, 2023
  5. Update API test after 259112@main

    https://bugs.webkit.org/show_bug.cgi?id=251292
    
    Unreviewed.
    
    * Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
    
    Canonical link: https://commits.webkit.org/259517@main
    Alex Christensen authored and achristensen07 committed Jan 28, 2023
  6. [ iOS ] accessibility/ios-simulator/table-cell-ranges.html is a const…

    …ant text only failure.
    
    https://bugs.webkit.org/show_bug.cgi?id=251302
    rdar://problem/104767364
    
    Unreviewed test gardening.
    
    * LayoutTests/platform/ios/TestExpectations:
    
    Canonical link: https://commits.webkit.org/259516@main
    btashawn authored and robert-jenner committed Jan 28, 2023
  7. [Gardening]: REGRESSION(256043@main): [ iOS Debug ] accessibility/vis…

    …ible-character-range-scrolling.html is a constant timeout
    
    webkit.org/b/251300
    
    Unreviewed test gardening.
    
    * LayoutTests/platform/ios/TestExpectations:
    
    Canonical link: https://commits.webkit.org/259515@main
    karlrackler committed Jan 28, 2023
  8. [JSC] Add strength reduction for SIMD Vector logic operations

    https://bugs.webkit.org/show_bug.cgi?id=251284
    rdar://104754015
    
    Reviewed by Keith Miller.
    
    On x64, we generate B3 nodes for wasm i8x16.shuffle
    
        @lhs = VectorSwizzle(@input0, @constantMask0)
        @rhs = VectorSwizzle(@input1, @constantMask1)
        @Result = VectorOr(@lhs, @rhs)
    
    We found that the hottest function in tfjs is using only one side of operand on shuffle.
    This is because wasm i8x16.shuffle always takes 2 operands, and actual use of tfjs is only needing one operand.
    As a result, one of the above constantMask becomes all 0xff on x64. And the resulted one is,
    
        @lhs = VectorSwizzle(@input0, @constantMask0)
        @rhs = VectorSwizzle(@input1, 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff) # It is always 0
        @Result = VectorOr(@lhs, @rhs)
    
    This should be converted to
    
        @Result = VectorSwizzle(@input0, @constantMask0)
    
    because (1) @rhs is always all-zeros and (2) we should optimize VectorOr(@lhs, all-zeros) to @lhs.
    
    This patch adds
    
    1. Bit logic strength reduction for VectorOr, VectorAnd, and VectorXor.
    2. Add strength reduction for VectorSwizzle when the mask is all OOB.
    
    This imporoves JetStream3/tfjs by 10% on x64 device.
    
    * Source/JavaScriptCore/b3/B3Const128Value.cpp:
    (JSC::B3::Const128Value::vectorAndConstant const):
    (JSC::B3::Const128Value::vectorOrConstant const):
    (JSC::B3::Const128Value::vectorXorConstant const):
    * Source/JavaScriptCore/b3/B3Const128Value.h:
    * Source/JavaScriptCore/b3/B3ReduceStrength.cpp:
    * Source/JavaScriptCore/b3/B3Value.cpp:
    (JSC::B3::Value::vectorAndConstant const):
    (JSC::B3::Value::vectorOrConstant const):
    (JSC::B3::Value::vectorXorConstant const):
    * Source/JavaScriptCore/b3/B3Value.h:
    * Source/JavaScriptCore/b3/B3ValueInlines.h:
    (JSC::B3::Value::isV128 const):
    * Source/JavaScriptCore/jit/SIMDInfo.h:
    (JSC::vectorAllOnes):
    (JSC::vectorAllZeros):
    (JSC::vectorOr):
    (JSC::vectorAnd):
    (JSC::vectorXor):
    * Source/JavaScriptCore/jit/SIMDShuffle.h:
    (JSC::SIMDShuffle::isAllOutOfBoundsForUnaryShuffle):
    (JSC::SIMDShuffle::isAllOutOfBoundsForBinaryShuffle):
    
    Canonical link: https://commits.webkit.org/259514@main
    Constellation committed Jan 28, 2023
  9. ASSERTION FAILED: m_element in WebFullScreenManager::setAnimatingFull…

    …Screen
    
    https://bugs.webkit.org/show_bug.cgi?id=251247
    rdar://104728830
    
    Reviewed by Youenn Fablet.
    
    Calling
        [self _manager]->didExitFullScreen();
    will prevent:
        [self _manager]->setAnimatingFullScreen(false);
    
    From doing anything as a pointer gets cleared. Considering that outside of this code the pattern
    to exit full screen is:
            [self _manager]->setAnimatingFullScreen(false);
            [self _manager]->didExitFullScreen();
    
    We make the code pattern to exit fullscreen consistent.
    
    No test was included because TestWebKitAPI is not allowed to enter fullscreen or PiP as its not
    a "real" application.
    
    * Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm:
    (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
    (-[WKFullScreenWindowController finishedExitFullScreenAnimationAndExitImmediately:]):
    
    Canonical link: https://commits.webkit.org/259513@main
    jyavenard committed Jan 28, 2023
  10. Reduce size of warning banner shown upon entering element fullscreen

    https://bugs.webkit.org/show_bug.cgi?id=251263
    rdar://104235363
    
    Reviewed by Jer Noble.
    
    Resize UILabel according to the text it contains and remove width constraints based on the screen's width.
    
    Manually tested.
    
    * Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
    (-[WKFullScreenViewController setLocation:]):
    (-[WKFullScreenViewController loadView]):
    
    Canonical link: https://commits.webkit.org/259512@main
    jyavenard committed Jan 28, 2023
  11. [ iOS Release ] imported/w3c/web-platform-tests/webcodecs/videoFrame-…

    …texImage.any.worker.html is a constant text only failure.
    
    https://bugs.webkit.org/show_bug.cgi?id=251234
    rdar://problem/104720207
    
    Unreviewed test gardening.
    
    Rebaselining test.
    
    * LayoutTests/platform/ios/imported/w3c/web-platform-tests/webcodecs/videoFrame-texImage.any.worker-expected.txt: Added.
    
    Canonical link: https://commits.webkit.org/259511@main
    btashawn authored and robert-jenner committed Jan 28, 2023

Commits on Jan 27, 2023

  1. Unreviewed, reverting r259421@main.

    https://bugs.webkit.org/show_bug.cgi?id=251295
    
    Regressed JetStream2/gcc-loop-wasm startup score
    
    Reverted changeset:
    
    "[WASM-Function-References] Fix block signature parsing for reftypes"
    https://bugs.webkit.org/show_bug.cgi?id=247383
    https://commits.webkit.org/259421@main
    
    Canonical link: https://commits.webkit.org/259510@main
    webkit-commit-queue authored and Constellation committed Jan 27, 2023
  2. Remove unused PaginateDuringLayoutEnabled flag

    https://bugs.webkit.org/show_bug.cgi?id=251283
    <rdar://problem/104753907>
    
    Reviewed by Alan Baradlay.
    
    During review of the WebKit feature flags, we discovered that PaginateDuringLayoutEnabled
    is not read or written to anywhere in the WebKit engine, and should be removed.
    
    The C API stubs are marked as Deprecated, but left in place to avoid breaking any
    existing code still calling the functions.
    
    * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
    * Source/WebKit/UIProcess/API/C/WKPreferences.cpp:
    (WKPreferencesSetPaginateDuringLayoutEnabled):
    (WKPreferencesGetPaginateDuringLayoutEnabled):
    * Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h:
    * Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h:
    * Source/WebKitLegacy/mac/WebView/WebPreferences.mm:
    (-[WebPreferences paginateDuringLayoutEnabled]): Deleted.
    (-[WebPreferences setPaginateDuringLayoutEnabled:]): Deleted.
    * Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h:
    
    Canonical link: https://commits.webkit.org/259509@main
    Brent Fulgham committed Jan 27, 2023
  3. [WebGPU] Unify Surface and SwapChain into a single class

    https://bugs.webkit.org/show_bug.cgi?id=251248
    rdar://104729119
    
    Reviewed by Dean Jackson.
    
    The WebGPU spec has unified GPUCanvasContext and GPUSwapChain into a single type, so that's
    what this patch does. However, I want to leave the door open for us to be able to implement
    browser features that have nothing to do with canvas using WebGPU, so I named this unified
    class PresentationContext instead of CanvasContext. This matches the same unification that
    I did in https://commits.webkit.org/258984@main.
    
    The previous model was:
    - You create a Surface using a descriptor
    - With the surface you could create a Swap Chain, using a descriptor
    - The Swap Chain could be destroyed
    
    The new model is:
    - You create a PresentationContext using a descriptor (this part is almost unchanged)
    - You configure the PresentationContext using a configuration. The configuration takes the
          place of the previous second descriptor.
    - You can unconfigure the PresentationContext.
    
    This patch doesn't modify WebGPU.h, and there's a pretty straightforward mapping between
    the two models in pal/graphics/WebGPU/Impl.
    
    * Source/WebCore/Modules/WebGPU/GPU.cpp:
    (WebCore::GPU::createPresentationContext):
    (WebCore::GPU::createSurface): Deleted.
    * Source/WebCore/Modules/WebGPU/GPU.h:
    * Source/WebCore/Modules/WebGPU/GPUDevice.cpp:
    (WebCore::GPUDevice::createSurfaceTexture):
    (WebCore::GPUDevice::createSwapChain): Deleted.
    * Source/WebCore/Modules/WebGPU/GPUDevice.h:
    * Source/WebCore/Modules/WebGPU/GPUPresentationConfiguration.h: Renamed from Source/WebCore/Modules/WebGPU/GPUSwapChainDescriptor.h.
    (WebCore::GPUPresentationConfiguration::convertToBacking const):
    * Source/WebCore/Modules/WebGPU/GPUPresentationContext.cpp: Renamed from Source/WebCore/Modules/WebGPU/GPUSwapChain.cpp.
    (WebCore::GPUPresentationContext::configure):
    (WebCore::GPUPresentationContext::unconfigure):
    (WebCore::GPUPresentationContext::getCurrentTexture):
    (WebCore::GPUPresentationContext::prepareForDisplay):
    * Source/WebCore/Modules/WebGPU/GPUPresentationContext.h: Renamed from Source/WebCore/Modules/WebGPU/GPUSwapChain.h.
    (WebCore::GPUPresentationContext::create):
    (WebCore::GPUPresentationContext::backing):
    (WebCore::GPUPresentationContext::backing const):
    (WebCore::GPUPresentationContext::GPUPresentationContext):
    * Source/WebCore/Modules/WebGPU/GPUPresentationContextDescriptor.h: Renamed from Source/WebCore/Modules/WebGPU/GPUSurfaceDescriptor.h.
    (WebCore::GPUPresentationContextDescriptor::convertToBacking const):
    * Source/WebCore/Modules/WebGPU/GPUSurface.cpp: Removed.
    * Source/WebCore/Modules/WebGPU/GPUSurface.h: Removed.
    * Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp:
    * Source/WebCore/Modules/highlight/AppHighlightStorage.h:
    * Source/WebCore/Modules/webaudio/BiquadFilterNode.cpp:
    * Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj:
    * Source/WebCore/PAL/pal/CMakeLists.txt:
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUConvertToBackingContext.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp:
    (PAL::WebGPU::DeviceImpl::createSurfaceTexture):
    (PAL::WebGPU::DeviceImpl::createSwapChain): Deleted.
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDowncastConvertToBackingContext.cpp:
    (PAL::WebGPU::DowncastConvertToBackingContext::convertToBacking):
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDowncastConvertToBackingContext.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.cpp:
    (PAL::WebGPU::GPUImpl::createPresentationContext):
    (PAL::WebGPU::GPUImpl::createSurface): Deleted.
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUPresentationContextImpl.cpp: Added.
    (PAL::WebGPU::PresentationContextImpl::PresentationContextImpl):
    (PAL::WebGPU::PresentationContextImpl::~PresentationContextImpl):
    (PAL::WebGPU::PresentationContextImpl::drawingBuffer const):
    (PAL::WebGPU::PresentationContextImpl::configure):
    (PAL::WebGPU::PresentationContextImpl::unconfigure):
    (PAL::WebGPU::PresentationContextImpl::getCurrentTexture):
    (PAL::WebGPU::PresentationContextImpl::prepareForDisplay):
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUPresentationContextImpl.h: Renamed from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUSurfaceImpl.h.
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUSurfaceImpl.cpp: Removed.
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUSwapChainImpl.cpp: Removed.
    * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUSwapChainImpl.h: Removed.
    * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPU.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUDevice.h:
    * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPresentationConfiguration.h: Renamed from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUSwapChainDescriptor.h.
    * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPresentationContext.h: Renamed from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUSwapChain.h.
    * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPresentationContextDescriptor.h: Renamed from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUSurfaceDescriptor.h.
    * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUSurface.h: Removed.
    * Source/WebCore/Sources.txt:
    * Source/WebCore/WebCore.xcodeproj/project.pbxproj:
    * Source/WebCore/html/canvas/GPUCanvasContextCocoa.cpp:
    (WebCore::GPUCanvasContextCocoa::reshape):
    (WebCore::GPUCanvasContextCocoa::createPresentationContextIfNeeded):
    (WebCore::GPUCanvasContextCocoa::getCurrentTexture):
    (WebCore::GPUCanvasContextCocoa::prepareForDisplay):
    (WebCore::GPUCanvasContextCocoa::createSwapChainIfNeeded): Deleted.
    * Source/WebCore/html/canvas/GPUCanvasContextCocoa.h:
    * Source/WebKit/CMakeLists.txt:
    * Source/WebKit/DerivedSources-input.xcfilelist:
    * Source/WebKit/DerivedSources-output.xcfilelist:
    * Source/WebKit/DerivedSources.make:
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.cpp:
    (WebKit::RemoteDevice::createSurfaceTexture):
    (WebKit::RemoteDevice::createSwapChain): Deleted.
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.h:
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.messages.in:
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.cpp:
    (WebKit::RemoteGPU::createPresentationContext):
    (WebKit::RemoteGPU::createSurface): Deleted.
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.h:
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.messages.in:
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemotePresentationContext.cpp: Renamed from Source/WebKit/GPUProcess/graphics/WebGPU/RemoteSwapChain.cpp.
    (WebKit::RemotePresentationContext::RemotePresentationContext):
    (WebKit::RemotePresentationContext::stopListeningForIPC):
    (WebKit::RemotePresentationContext::configure):
    (WebKit::RemotePresentationContext::unconfigure):
    (WebKit::RemotePresentationContext::getCurrentTexture):
    (WebKit::RemotePresentationContext::prepareForDisplay):
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemotePresentationContext.h: Renamed from Source/WebKit/GPUProcess/graphics/WebGPU/RemoteSwapChain.h.
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemotePresentationContext.messages.in: Renamed from Source/WebKit/GPUProcess/graphics/WebGPU/RemoteSwapChain.messages.in.
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteSurface.cpp: Removed.
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteSurface.h: Removed.
    * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteSurface.messages.in: Removed.
    * Source/WebKit/GPUProcess/graphics/WebGPU/WebGPUObjectHeap.cpp:
    (WebKit::WebGPU::ObjectHeap::addObject):
    (WebKit::WebGPU::ObjectHeap::convertPresentationContextFromBacking):
    (WebKit::WebGPU::ObjectHeap::ObjectHeap): Deleted.
    (WebKit::WebGPU::ObjectHeap::~ObjectHeap): Deleted.
    (WebKit::WebGPU::ObjectHeap::convertSurfaceFromBacking): Deleted.
    (WebKit::WebGPU::ObjectHeap::convertSwapChainFromBacking): Deleted.
    * Source/WebKit/GPUProcess/graphics/WebGPU/WebGPUObjectHeap.h:
    * Source/WebKit/Scripts/webkit/messages.py:
    (headers_for_type):
    * Source/WebKit/Shared/WebGPU/WebGPUConvertFromBackingContext.h:
    * Source/WebKit/Shared/WebGPU/WebGPUConvertToBackingContext.h:
    * Source/WebKit/Shared/WebGPU/WebGPUPresentationConfiguration.cpp: Renamed from Source/WebKit/Shared/WebGPU/WebGPUSwapChainDescriptor.cpp.
    (WebKit::WebGPU::ConvertToBackingContext::convertToBacking):
    (WebKit::WebGPU::ConvertFromBackingContext::convertFromBacking):
    * Source/WebKit/Shared/WebGPU/WebGPUPresentationConfiguration.h: Renamed from Source/WebKit/Shared/WebGPU/WebGPUSwapChainDescriptor.h.
    * Source/WebKit/Shared/WebGPU/WebGPUPresentationConfiguration.serialization.in: Renamed from Source/WebKit/Shared/WebGPU/WebGPUSwapChainDescriptor.serialization.in.
    * Source/WebKit/Shared/WebGPU/WebGPUPresentationContextDescriptor.cpp: Renamed from Source/WebKit/Shared/WebGPU/WebGPUSurfaceDescriptor.cpp.
    (WebKit::WebGPU::ConvertToBackingContext::convertToBacking):
    (WebKit::WebGPU::ConvertFromBackingContext::convertFromBacking):
    * Source/WebKit/Shared/WebGPU/WebGPUPresentationContextDescriptor.h: Renamed from Source/WebKit/Shared/WebGPU/WebGPUSurfaceDescriptor.h.
    * Source/WebKit/Shared/WebGPU/WebGPUPresentationContextDescriptor.serialization.in: Renamed from Source/WebKit/Shared/WebGPU/WebGPUSurfaceDescriptor.serialization.in.
    * Source/WebKit/Sources.txt:
    * Source/WebKit/WebKit.xcodeproj/project.pbxproj:
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.cpp:
    (WebKit::WebGPU::RemoteDeviceProxy::createSurfaceTexture):
    (WebKit::WebGPU::RemoteDeviceProxy::createSwapChain): Deleted.
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.h:
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp:
    (WebKit::RemoteGPUProxy::createPresentationContext):
    (WebKit::RemoteGPUProxy::createSurface): Deleted.
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.h:
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemotePresentationContextProxy.cpp: Renamed from Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteSwapChainProxy.cpp.
    (WebKit::WebGPU::RemotePresentationContextProxy::RemotePresentationContextProxy):
    (WebKit::WebGPU::RemotePresentationContextProxy::configure):
    (WebKit::WebGPU::RemotePresentationContextProxy::unconfigure):
    (WebKit::WebGPU::RemotePresentationContextProxy::getCurrentTexture):
    (WebKit::WebGPU::RemotePresentationContextProxy::prepareForDisplay):
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemotePresentationContextProxy.h: Renamed from Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteSurfaceProxy.h.
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteSurfaceProxy.cpp: Removed.
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteSwapChainProxy.h: Removed.
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/WebGPUDowncastConvertToBackingContext.cpp:
    (WebKit::WebGPU::DowncastConvertToBackingContext::convertToBacking):
    * Source/WebKit/WebProcess/GPU/graphics/WebGPU/WebGPUDowncastConvertToBackingContext.h:
    
    Canonical link: https://commits.webkit.org/259508@main
    litherum committed Jan 27, 2023
  4. Gamepad.vibrationActuator: Add support for "trigger-rumble" effect type

    https://bugs.webkit.org/show_bug.cgi?id=250352
    rdar://104315486
    
    Reviewed by Brent Fulgham and Geoffrey Garen.
    
    Gamepad.vibrationActuator: Add support for "trigger-rumble" effect type:
    -  https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/GamepadHapticsActuatorTriggerRumble/explainer.md
    
    It allows vibrating the triggers (which the XBox controller supports), while the
    existing "dual-rumble" only makes the handles vibrate.
    
    This isn't yet part of the specification at:
    - https://w3c.github.io/gamepad/extensions.html#dom-gamepadhapticeffecttype
    
    However, it is supported by Blink and used by XBox cloud games.
    
    I am adding support behind an experimental feature flag, off by default.
    
    * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
    * Source/WebCore/Modules/gamepad/GamepadEffectParameters.h:
    * Source/WebCore/Modules/gamepad/GamepadEffectParameters.idl:
    * Source/WebCore/Modules/gamepad/GamepadHapticActuator.cpp:
    (WebCore::GamepadHapticActuator::canPlayEffectType const):
    (WebCore::GamepadHapticActuator::playEffect):
    (WebCore::GamepadHapticActuator::stopEffects):
    (WebCore::GamepadHapticActuator::document const):
    (WebCore::GamepadHapticActuator::promiseForEffectType):
    * Source/WebCore/Modules/gamepad/GamepadHapticActuator.h:
    * Source/WebCore/Modules/gamepad/GamepadHapticEffectType.idl:
    * Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm:
    (WebCore::GameControllerGamepad::setupElements):
    * Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEffect.h:
    * Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEffect.mm:
    (WebCore::GameControllerHapticEffect::create):
    (WebCore::GameControllerHapticEffect::GameControllerHapticEffect):
    (WebCore::GameControllerHapticEffect::start):
    (WebCore::GameControllerHapticEffect::stop):
    (WebCore::GameControllerHapticEffect::leftEffectFinishedPlaying):
    (WebCore::GameControllerHapticEffect::rightEffectFinishedPlaying):
    (WebCore::GameControllerHapticEffect::strongEffectFinishedPlaying): Deleted.
    (WebCore::GameControllerHapticEffect::weakEffectFinishedPlaying): Deleted.
    * Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEngines.h:
    (WebCore::GameControllerHapticEngines::leftHandleEngine):
    (WebCore::GameControllerHapticEngines::rightHandleEngine):
    (WebCore::GameControllerHapticEngines::leftTriggerEngine):
    (WebCore::GameControllerHapticEngines::rightTriggerEngine):
    (WebCore::GameControllerHapticEngines::strongEngine): Deleted.
    (WebCore::GameControllerHapticEngines::weakEngine): Deleted.
    * Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEngines.mm:
    (WebCore::GameControllerHapticEngines::GameControllerHapticEngines):
    (WebCore::GameControllerHapticEngines::currentEffectForType):
    (WebCore::GameControllerHapticEngines::playEffect):
    (WebCore::GameControllerHapticEngines::stopEffects):
    (WebCore::GameControllerHapticEngines::ensureStarted):
    (WebCore::GameControllerHapticEngines::stop):
    * Source/WebCore/platform/gamepad/cocoa/GameControllerSoftLink.h:
    * Source/WebCore/platform/gamepad/cocoa/GameControllerSoftLink.mm:
    * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
    
    Canonical link: https://commits.webkit.org/259507@main
    cdumez committed Jan 27, 2023
  5. Detect complex custom property cycles involving multiple loops

    https://bugs.webkit.org/show_bug.cgi?id=251269
    <rdar://problem/104744972>
    
    Reviewed by Simon Fraser.
    
    We fail in some complex cycle cases.
    
    * LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-cycles-expected.txt:
    * Source/WebCore/style/StyleBuilder.cpp:
    (WebCore::Style::Builder::applyCustomProperty):
    
    Track property cycles with a separate m_inCycleCustomProperties map instead of eagerly computing them to
    an invalid value on first detection. This allows the detection of multiple cycles passing through
    the same property. It also simplifies the code.
    
    * Source/WebCore/style/StyleBuilderState.h:
    
    Canonical link: https://commits.webkit.org/259506@main
    anttijk committed Jan 27, 2023
  6. [REBASELINE][ iOS Release arm64 ] fast/forms/linebox-overflow-in-text…

    …area-padding-simple-lines.html is a constant image failure. (251188)
    
    https://bugs.webkit.org/show_bug.cgi?id=251188
    rdar://104676357
    
    Unreviewed test gardening.
    
    Adjusting pixel tolerance to accomodate running iOS simulators on apple silicon hardware.
    
    * LayoutTests/fast/forms/linebox-overflow-in-textarea-padding-simple-lines.html:
    * LayoutTests/platform/ios/TestExpectations:
    
    Canonical link: https://commits.webkit.org/259505@main
    robert-jenner committed Jan 27, 2023
  7. Interaction regions should support occlusions

    https://bugs.webkit.org/show_bug.cgi?id=250860
    <rdar://103928196>
    
    Reviewed by Tim Horton.
    
    Maintain a separate layer tree for Interaction Regions on top of the
    content. This "mirror layer tree" includes layers for occlusions and now
    comes with clear ordering rules.
    
    * LayoutTests/interaction-region/click-handler-dynamically-added-expected.txt:
    * LayoutTests/interaction-region/click-handler-expected.txt:
    * LayoutTests/interaction-region/click-handler-in-shadowed-layer-expected.txt:
    * LayoutTests/interaction-region/event-region-overflow-expected.txt:
    * LayoutTests/interaction-region/icon-inside-button-single-region-expected.txt:
    * LayoutTests/interaction-region/inline-link-dark-background-expected.txt:
    * LayoutTests/interaction-region/inline-link-expected.txt:
    * LayoutTests/interaction-region/inline-link-in-composited-iframe-expected.txt:
    * LayoutTests/interaction-region/inline-link-in-layer-expected.txt:
    * LayoutTests/interaction-region/inline-link-in-non-composited-iframe-expected.txt:
    * LayoutTests/interaction-region/inline-link-with-pointer-events-none-content-expected.txt:
    * LayoutTests/interaction-region/input-type-file-region-expected.txt:
    * LayoutTests/interaction-region/input-type-range-region-expected.txt:
    * LayoutTests/interaction-region/paused-video-regions-expected.txt:
    * LayoutTests/interaction-region/split-inline-link-expected.txt:
    * LayoutTests/interaction-region/wrapped-inline-link-expected.txt:
    Update expectations with the new dump format.
    
    * LayoutTests/interaction-region/layer-tree-expected.txt: Added.
    * LayoutTests/interaction-region/layer-tree.html: Added.
    Add test covering the final RemoteLayerTree structure.
    
    * LayoutTests/interaction-region/overlay-expected.txt: Renamed from LayoutTests/interaction-region/inline-link-in-aria-hidden-subtree-expected.txt.
    * LayoutTests/interaction-region/overlay.html: Renamed from LayoutTests/interaction-region/inline-link-in-aria-hidden-subtree.html.
    Remove the aria-hidden test.
    Add test for the occlusions detection.
    
    * LayoutTests/interaction-region/region-area-overflow-does-not-crash-expected.txt:
    * LayoutTests/interaction-region/region-area-overflow-does-not-crash.html:
    Update test to also include a big occlusion region.
    
    * LayoutTests/resources/ui-helper.js:
    (window.UIHelper.getCALayerTree):
    * Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
    * Tools/TestRunnerShared/UIScriptContext/UIScriptController.h:
    (WTR::UIScriptController::caLayerTreeAsText const):
    * Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.h:
    * Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm:
    (WTR::UIScriptControllerCocoa::caLayerTreeAsText const):
    * Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
    * Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm:
    (-[WKWebView _caLayerTreeAsText]):
    (dumpCALayer):
    Introduce a new test helper to get the full remote layer hierarchy.
    
    * Source/WebCore/page/InteractionRegion.cpp:
    (WebCore::interactionRegionForRenderedRegion):
    Remove the aria-hidden check. It was too strict and is not needed
    anymore.
    Generate regions for elements likely to occlude interactions.
    (WebCore::operator<<):
    Update the dump format to differentiate interactions and occlusions.
    
    * Source/WebCore/page/InteractionRegion.h:
    (WebCore::operator==):
    (WebCore::InteractionRegion::encode const):
    (WebCore::InteractionRegion::decode):
    Add a `type` enum to the InteractionRegion struct to differentiate
    interactions and occlusions.
    
    * Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
    (WebKit::applyGeometryPropertiesToLayer):
    (WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
    Extract the geometry related properties application code to a new
    method.
    (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
    Only update geometry and event region properties for Interaction Regions
    layers.
    (WebKit::applyInteractionRegionsHierarchyUpdate):
    (WebKit::RemoteLayerTreePropertyApplier::applyHierarchyUpdates):
    Apply all hierarchy updates to the Interaction Regions mirror layer tree.
    
    * Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
    (WebKit::RemoteLayerTreeHost::updateLayerTree):
    Keep the Interaction Regions mirror layer tree on top of the content after
    each layer tree update.
    
    * Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeInteractionRegionLayers.h:
    * Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeInteractionRegionLayers.mm:
    (WebKit::isInteractionLayer):
    (WebKit::isOcclusionLayer):
    (WebKit::isAnyInteractionRegionLayer):
    (WebKit::isInteractionRegionLayer): Deleted.
    (WebKit::setInteractionRegionOcclusion):
    Update utility functions to differentiate interactions and occlusions.
    (WebKit::insertInteractionRegionLayersForLayer):
    (WebKit::appendInteractionRegionLayersForLayer): Deleted.
    Insert the Interaction Regions back at the beginning of the sublayers array.
    (WebKit::updateLayersForInteractionRegions):
    Maintain the following order when updating Interaction Regions layers:
    1. Occlusions always come first (in no particular order).
    2. Interactions come next, ordered by area (biggest to smallest).
    3. Other siblings come last, in the same order as the content layers they mirror.
    
    * Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeNode.h:
    (WebKit::RemoteLayerTreeNode::interactionRegionsLayer const):
    * Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm:
    (WebKit::RemoteLayerTreeNode::detachFromParent):
    (WebKit::RemoteLayerTreeNode::initializeLayer):
    Add an `interactionRegionsLayer` property to the RemoteLayerTreeNode.
    
    Canonical link: https://commits.webkit.org/259504@main
    Etienne Segonzac authored and hortont424 committed Jan 27, 2023
  8. AX: Make element-reflection-arialabelledby.html and element-reflectio…

    …n-ariadescribedby.html async so they can pass in ITM
    
    https://bugs.webkit.org/show_bug.cgi?id=251175
    rdar://problem/104667374
    
    Reviewed by Andres Gonzalez.
    
    This patch also updates accessibility-isolated-tree/TestExpectations to
    mark a bunch of failures that have been broken for a long time (for
    example, see build https://build.webkit.org/#/builders/562/builds/6282).
    
    * LayoutTests/accessibility/element-reflection-ariadescribedby-expected.txt:
    * LayoutTests/accessibility/element-reflection-ariadescribedby.html:
    * LayoutTests/accessibility/element-reflection-arialabelledby-expected.txt:
    * LayoutTests/accessibility/element-reflection-arialabelledby.html:
    * LayoutTests/accessibility-isolated-tree/TestExpectations
    * LayoutTests/platform/glib/TestExpectations:
    
    Canonical link: https://commits.webkit.org/259503@main
    twilco committed Jan 27, 2023
  9. [ews-build.webkit.org] Delete BugzillaMixin.create_bug

    https://bugs.webkit.org/show_bug.cgi?id=251280
    rdar://104751558
    
    Reviewed by Aakash Jain.
    
    * Tools/CISupport/ews-build/steps.py:
    (BugzillaMixin.create_bug): Deleted.
    
    Canonical link: https://commits.webkit.org/259502@main
    JonWBedard committed Jan 27, 2023
  10. [git-webkit] Support --skip-ews option

    https://bugs.webkit.org/show_bug.cgi?id=251273
    rdar://104746176
    
    Reviewed by Geoffrey Garen.
    
    * Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
    * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
    * Tools/Scripts/libraries/webkitcorepy/webkitcorepy/arguments.py:
    (NoAction.__call__): Add --skip prefix.
    * Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
    * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
    * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
    (PullRequest.parser): Add --skip-ews.
    
    Canonical link: https://commits.webkit.org/259501@main
    JonWBedard committed Jan 27, 2023
  11. Add WeakListHashSet

    https://bugs.webkit.org/show_bug.cgi?id=251181
    
    Reviewed by Chris Dumez.
    
    Added WeakPtr version of ListHashSet.
    
    * Source/WTF/WTF.xcodeproj/project.pbxproj:
    * Source/WTF/wtf/CMakeLists.txt:
    * Source/WTF/wtf/WeakListHashSet.h: Added.
    (WTF::WeakListHashSet): Added.
    * Source/WTF/wtf/WeakPtr.h:
    * Tools/TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
    (TestWebKitAPI::computeSizeOfWeakListHashSet):
    (WTF_WeakPtr.WeakListHashSetBasic):
    (WTF_WeakPtr.WeakListHashMapConstObjects):
    (WTF_WeakPtr.WeakListHashSetRemoveIterator):
    (WTF_WeakPtr.WeakListHashSetExpansion):
    (WTF_WeakPtr.WeakListHashSetIsEmptyIgnoringNullReferences):
    (WTF_WeakPtr.WeakListHashSetRemoveNullReferences):
    (TestWebKitAPI::collectItemsInWeakListHashSet):
    (WTF_WeakPtr.WeakListHashSetIterators):
    (WTF_WeakPtr.WeakListHashSetAppendOrMoveToLast):
    (WTF_WeakPtr.WeakListHashSetPrependOrMoveToFirst):
    
    Canonical link: https://commits.webkit.org/259500@main
    rniwa committed Jan 27, 2023
  12. Move WEBGL_provoking_vertex out of draft

    https://bugs.webkit.org/show_bug.cgi?id=251259
    
    Reviewed by Kimmo Kinnunen.
    
    * LayoutTests/platform/ios-simulator/webgl/webgl-draft-extensions-flag-default-expected.txt:
    * LayoutTests/platform/ios-simulator/webgl/webgl-draft-extensions-flag-off-expected.txt:
    * LayoutTests/platform/ios-simulator/webgl/webgl-draft-extensions-flag-on-expected.txt:
    * LayoutTests/webgl/resources/webgl-draft-extensions-flag.js:
    * LayoutTests/webgl/webgl-draft-extensions-flag-default-expected.txt:
    * LayoutTests/webgl/webgl-draft-extensions-flag-off-expected.txt:
    * LayoutTests/webgl/webgl-draft-extensions-flag-on-expected.txt:
    * Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:
    (WebCore::WebGL2RenderingContext::getExtension):
    (WebCore::WebGL2RenderingContext::getSupportedExtensions):
    
    Canonical link: https://commits.webkit.org/259499@main
    lexaknyazev authored and kkinnunen-apple committed Jan 27, 2023
  13. Use WeakPtr to store RenderSVGResourceContainer

    https://bugs.webkit.org/show_bug.cgi?id=251077
    
    Reviewed by Chris Dumez.
    
    Replaced the use of raw pointers to RenderSVGResourceContainer by WeakPtr.
    
    * Source/WebCore/rendering/svg/LegacyRenderSVGRoot.cpp:
    (WebCore::LegacyRenderSVGRoot::layout):
    (WebCore::LegacyRenderSVGRoot::addResourceForClientInvalidation):
    * Source/WebCore/rendering/svg/LegacyRenderSVGRoot.h:
    * Source/WebCore/rendering/svg/RenderSVGRoot.cpp:
    (WebCore::RenderSVGRoot::layoutChildren):
    * Source/WebCore/rendering/svg/RenderSVGRoot.h:
    * Source/WebCore/rendering/svg/SVGResources.cpp:
    (WebCore::SVGResources::removeClientFromCache const):
    (WebCore::SVGResources::resourceDestroyed):
    (WebCore::SVGResources::buildSetOfResources):
    (WebCore::SVGResources::dump):
    * Source/WebCore/rendering/svg/SVGResources.h:
    (WebCore::SVGResources::clipper const):
    (WebCore::SVGResources::markerStart const):
    (WebCore::SVGResources::markerMid const):
    (WebCore::SVGResources::markerEnd const):
    (WebCore::SVGResources::masker const):
    (WebCore::SVGResources::filter const):
    (WebCore::SVGResources::fill const):
    (WebCore::SVGResources::stroke const):
    (WebCore::SVGResources::linkedResource const):
    (): Deleted.
    * Source/WebCore/rendering/svg/SVGResourcesCache.cpp:
    (WebCore::SVGResourcesCache::addResourcesFromRenderer):
    (WebCore::SVGResourcesCache::removeResourcesFromRenderer):
    * Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp:
    (WebCore::SVGResourcesCycleSolver::resourceContainsCycles const):
    (WebCore::SVGResourcesCycleSolver::resolveCycles):
    * Source/WebCore/rendering/svg/SVGResourcesCycleSolver.h:
    
    Canonical link: https://commits.webkit.org/259498@main
    rniwa committed Jan 27, 2023
  14. Fix negative shadow repaint issue

    Fix negative shadow repaint issue
    https://bugs.webkit.org/show_bug.cgi?id=251176
    
    Reviewed by Simon Fraser.
    
    Merge - https://src.chromium.org/viewvc/blink?view=revision&revision=164709
    
    When a box with negative v-shadow changes height, the repaint rect
    is inadequate resulting some part of shadow is not repainted.
    Fix the issue by considering negative shadow-top/shadow-left.
    
    * Source/WebCore/rendering/RenderElement.cpp:
    (RenderElement::repaintAfterLayout): Add consideration for negative shadows
    * LayoutTests/fast/box-shadow/negative-shadow-box-shrink.html: Add Test Case
    * LayoutTests/fast/box-shadow/negative-shadow-box-shrink-expected.txt: Add Test Case Expectation
    * LayoutTests/fast/box-shadow/negative-shadow-box-expand.html: Add Test Case
    * LayoutTests/fast/box-shadow/negative-shadow-box-shrink-expand.txt: Add Test Case Expectation
    
    Canonical link: https://commits.webkit.org/259497@main
    Ahmad-S792 authored and Ahmad Saleem committed Jan 27, 2023
  15. Revert [259432@main] Move Opaque Origin Identifier from SecurityOrigi…

    …n to SecurityOriginData
    
    https://bugs.webkit.org/show_bug.cgi?id=251048
    rdar://104578586
    
    Unreviewed, revert 259432@main as it regressed ProcessSwap.GetUserMediaCaptureState API test.
    
    * Source/WTF/wtf/Markable.h:
    (WTF::add): Deleted.
    * Source/WebCore/page/SecurityOrigin.cpp:
    (WebCore::SecurityOrigin::SecurityOrigin):
    (WebCore::SecurityOrigin::isSameOriginDomain const):
    (WebCore::SecurityOrigin::isSameOriginAs const):
    (WebCore::SecurityOrigin::create):
    (WebCore::SecurityOrigin::equal const):
    * Source/WebCore/page/SecurityOrigin.h:
    (WebCore::SecurityOrigin::isOpaque const):
    (WebCore::add):
    * Source/WebCore/page/SecurityOriginData.cpp:
    (WebCore::SecurityOriginData::securityOrigin const):
    (WebCore::SecurityOriginData::isolatedCopy const):
    (WebCore::SecurityOriginData::isolatedCopy):
    (WebCore::operator==):
    * Source/WebCore/page/SecurityOriginData.h:
    (WebCore::SecurityOriginData::SecurityOriginData):
    (WebCore::SecurityOriginData::isOpaque const):
    (WebCore::add):
    (): Deleted.
    (WebCore::SecurityOriginData::createOpaque): Deleted.
    (WebCore::SecurityOriginData::encode const): Deleted.
    (WebCore::SecurityOriginData::decode): Deleted.
    * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
    
    Canonical link: https://commits.webkit.org/259496@main
    cdumez committed Jan 27, 2023
  16. Do some cleanup around screenPropertiesStateChanged() and displayReco…

    …nfigurationCallBack()
    
    https://bugs.webkit.org/show_bug.cgi?id=251233
    rdar://104719183
    
    Reviewed by Tim Horton.
    
    WebProcessPool had both screenPropertiesStateChanged() and code in displayReconfigurationCallBack()
    that did similar things, sending new screen properties to the WebProcess and, on macOS, the GPU process,
    but the code was scattered around.
    
    Clean it up by moving the code in displayReconfigurationCallBack() into a WebProcessPool member function;
    this callback tells you about a specific display and what changed, but in it we gather properties for
    all displays, but keep that behavior for now.
    
    screenPropertiesStateChanged() is called via accessibility callbacks that indicate that screen-related
    settings like "invert colors" changed. To show its relationship to WebProcessPool::displayPropertiesChanged()
    put the two functions next to each other, but it was tricky to share code because this callback doesn't
    get a displayID.
    
    Add a DisplayLink::displayPropertiesChanged() stub that will be implemented in a future patch.
    
    * Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:
    (WebKit::WebProcessPool::registerNotificationObservers):
    (WebKit::WebProcessPool::screenPropertiesChanged):
    (WebKit::WebProcessPool::displayPropertiesChanged):
    (WebKit::displayReconfigurationCallBack):
    * Source/WebKit/UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::accessibilitySettingsDidChange):
    * Source/WebKit/UIProcess/WebProcessPool.cpp:
    (WebKit::WebProcessPool::screenPropertiesStateChanged): Deleted.
    * Source/WebKit/UIProcess/WebProcessPool.h:
    * Source/WebKit/UIProcess/mac/DisplayLink.cpp:
    (WebKit::DisplayLink::displayPropertiesChanged):
    * Source/WebKit/UIProcess/mac/DisplayLink.h:
    * Source/WebKit/UIProcess/mac/WebViewImpl.mm:
    (WebKit::WebViewImpl::screenDidChangeColorSpace):
    
    Canonical link: https://commits.webkit.org/259495@main
    smfr committed Jan 27, 2023
  17. Add mac-wk1 baseline for imported/w3c/web-platform-tests/css/selector…

    …s/dir-pseudo-on-input-element.html
    
    https://bugs.webkit.org/show_bug.cgi?id=251275
    rdar://104748241
    
    Unreviewed test gardening.
    
    This test was re-named as part of the re-sync in 258889@main, but the mac-wk1 baseline
    wasn't updated to match.
    
    * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/selectors/dir-pseudo-on-input-element-expected.txt: Renamed from LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-pseudo/dir-pseudo-on-input-element-expected.txt.
    
    Canonical link: https://commits.webkit.org/259494@main
    ryanhaddad committed Jan 27, 2023
  18. [ews] Run ValidateChange just before CompileWebKit and major steps

    https://bugs.webkit.org/show_bug.cgi?id=251222
    rdar://104710968
    
    Reviewed by Jonathan Bedard.
    
    To skip obsolete builds and PRs with skip-ews more frequently.
    
    * Tools/CISupport/ews-build/factories.py:
    (Factory.__init__):
    * Tools/CISupport/ews-build/factories_unittest.py:
    (TestExpectedBuildSteps):
    
    Canonical link: https://commits.webkit.org/259493@main
    aj062 committed Jan 27, 2023
  19. [Gardening]: REGRESSION(259484@main): [ iOS macOS Debug ] imported/w3…

    …c/web-platform-tests/fs/FileSystemFileHandle-create-sync-access-handle.https.tentative.window.html is a consistent failure
    
    webkit.org/b/251274
    
    Unreviewed test gardening.
    
    * LayoutTests/platform/ios/TestExpectations:
    
    Canonical link: https://commits.webkit.org/259492@main
    karlrackler committed Jan 27, 2023
  20. Elide manual auth validation check when FPAC is supported.

    https://bugs.webkit.org/show_bug.cgi?id=251244
    <rdar://problem/104725544>
    
    Reviewed by Yusuke Suzuki.
    
    With FPAC, the aut instruction will validate its own result.  Hence, the
    manual validation that we used to do after the aut is now redundant.
    
    * Source/JavaScriptCore/assembler/CPU.cpp:
    (JSC::isARM64E_FPAC):
    * Source/JavaScriptCore/assembler/CPU.h:
    (JSC::isARM64E_FPAC):
    (JSC::isARM64_LSE):
    * Source/JavaScriptCore/assembler/MacroAssemblerARM64E.h:
    (JSC::MacroAssemblerARM64E::validateUntaggedPtr):
    (JSC::MacroAssemblerARM64E::untagArrayPtr):
    (JSC::MacroAssemblerARM64E::untagArrayPtrLength64):
    * Source/JavaScriptCore/runtime/InitializeThreading.cpp:
    (JSC::initialize):
    * Source/JavaScriptCore/runtime/JSCConfig.h:
    
    Canonical link: https://commits.webkit.org/259491@main
    Mark Lam committed Jan 27, 2023
  21. Ensure FixedBitVector's WordType matches the type of BitVector::m_bit…

    …sOrPointer.
    
    https://bugs.webkit.org/show_bug.cgi?id=251251
    <rdar://problem/104731974>
    
    Reviewed by Yusuke Suzuki.
    
    The rest of FixedBitVector's code relies on this relationship.  So, let's make it explicit.
    
    Also, fixed a bug in BitMap's API tests: testBitmapConcurrentTestAndSet() and
    testBitmapConcurrentTestAndClear() were exercising testAndSet() and testAndClear()
    respectively instead of their concurrent versions.  This is now fixed.  This issue was
    originally found by Yijia Huang in https://bugs.webkit.org/show_bug.cgi?id=250847.
    
    * Source/WTF/wtf/FixedBitVector.h:
    * Tools/TestWebKitAPI/Tests/WTF/Bitmap.cpp:
    (TestWebKitAPI::testBitmapConcurrentTestAndSet):
    (TestWebKitAPI::testBitmapConcurrentTestAndClear):
    
    Canonical link: https://commits.webkit.org/259490@main
    Mark Lam committed Jan 27, 2023
  22. Fix Ed25519 public key generation from private key material

    https://bugs.webkit.org/show_bug.cgi?id=251252
    rdar://problem/104733721
    
    Reviewed by Chris Dumez.
    
    Use cced25519_make_pub to generate the public key.
    
    * LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey.https.any-expected.txt:
    * LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey.https.any.worker-expected.txt:
    * LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.https.any-expected.txt:
    * LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.https.any.worker-expected.txt:
    * Source/WebCore/crypto/mac/CryptoKeyOKPCocoa.cpp:
    (WebCore::CryptoKeyOKP::generateJwkX const):
    
    Canonical link: https://commits.webkit.org/259489@main
    youennf authored and cdumez committed Jan 27, 2023
  23. [WK2] Drop use of fixed-width types for size values in ArgumentCoder …

    …specializations
    
    https://bugs.webkit.org/show_bug.cgi?id=250777
    
    Reviewed by Kimmo Kinnunen.
    
    Instead of finding better or worse fixed-sized-type matches for size values in
    different ArgumentCoder specializations, the types of those size values should
    be used. This means simply encoding values of size_t or unsigned types.
    
    The target type of the size value should be noted in the code, just to provide
    the necessary context of what is being encoded and have it match the decoding
    side. This means the size type is explicitly used either in any temporary
    variable where the value is stored, or an additional static_cast is used to
    explicitly specify the type when the value is passed to the stream insertion
    operator.
    
    This still leaves open the possibility of using mismatched types, i.e. the
    size value type not matching what the encoding enforces. Some sort of validation
    could be implemented in the encoder class to make sure no undesired narrowing
    conversions occur.
    
    * Source/WebKit/Platform/IPC/ArgumentCoders.cpp:
    (IPC::ArgumentCoder<CString>::encode):
    (IPC::ArgumentCoder<CString>::decode):
    (IPC::ArgumentCoder<String>::encode):
    (IPC::decodeStringText):
    (IPC::ArgumentCoder<String>::decode):
    (IPC::ArgumentCoder<StringView>::encode):
    * Source/WebKit/Platform/IPC/ArgumentCoders.h:
    
    Canonical link: https://commits.webkit.org/259488@main
    zdobersek committed Jan 27, 2023
  24. [Gardening]: ipc/webpageproxy-correctionpanel-no-crash.html is a Mac-…

    …only test
    
    https://bugs.webkit.org/show_bug.cgi?id=251253
    rdar://104698580
    
    Unreviewed test gardening.
    
    Skipping playform-specific directory.
    
    * LayoutTests/platform/ios/TestExpectations:
    
    Canonical link: https://commits.webkit.org/259487@main
    karlrackler committed Jan 27, 2023
Older