Skip to content
Permalink
main
Switch branches/tags

Commits on Jun 25, 2022

  1. Revert [251654@main] video.currentSrc should not be reset when a new …

    …load errors
    
    https://bugs.webkit.org/show_bug.cgi?id=225451
    
    Unreviewed.
    
    This change caused two API tests to frequently time out on macOS release bots (see webkit.org/b/241982)
    
    * LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-currentSrc-expected.txt:
    * LayoutTests/media/video-currentsrc-cleared-expected.txt: Added.
    * LayoutTests/media/video-currentsrc-cleared.html: Added.
    * Source/WebCore/html/HTMLMediaElement.cpp:
    (WebCore::HTMLMediaElement::prepareForLoad):
    
    Canonical link: https://commits.webkit.org/251841@main
    ryanhaddad committed Jun 25, 2022

Commits on Jun 24, 2022

  1. Expose Page identifier via WKBrowsingContextHandle SPI instead of WKP…

    …ageRef
    
    https://bugs.webkit.org/show_bug.cgi?id=241941
    rdar://problem/95814743
    
    Reviewed by Chris Dumez.
    
    * Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.mm:
    (-[WKBrowsingContextHandle _initWithPageProxyID:andWebPageID:]):
    (-[WKBrowsingContextHandle encodeWithCoder:]):
    (-[WKBrowsingContextHandle initWithCoder:]):
    (-[WKBrowsingContextHandle copyWithZone:]):
    (-[WKBrowsingContextHandle description]):
    * Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandleInternal.h:
    * Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandlePrivate.h: Copied from Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandleInternal.h.
    * Source/WebKit/UIProcess/API/C/WKPage.cpp:
    (WKPageDispatchActivityStateUpdateForTesting):
    (WKPageGetIdentifier): Deleted.
    * Source/WebKit/UIProcess/API/C/WKPage.h:
    * Source/WebKit/WebKit.xcodeproj/project.pbxproj:
    * Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
    (+[WKWebProcessPlugInBrowserContextController lookUpBrowsingContextFromHandle:]):
    * Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:
    (WebKit::WebProcess::transformHandlesToObjects):
    
    Canonical link: https://commits.webkit.org/251840@main
    pascoej committed Jun 24, 2022
  2. Web Inspector: REGRESSION(251279@main): Uncaught Exception: Reference…

    …Error: Can't find variable: sourceCode
    
    https://bugs.webkit.org/show_bug.cgi?id=241987
    
    Reviewed by Patrick Angle.
    
    * Source/WebInspectorUI/UserInterface/Views/LocalResourceOverrideWarningView.js:
    (WI.LocalResourceOverrideWarningView.prototype.initialLayout):
    
    Canonical link: https://commits.webkit.org/251839@main
    dcrousso committed Jun 24, 2022
  3. Delete WebKit Owners file

    https://bugs.webkit.org/show_bug.cgi?id=241989
    
    Reviewed by Alexey Proskuryakov.
    
    The problem the Owners file solved is obsolete. It hasn't been honored
    in years, and the last update to it was 5 years ago. It should just be
    deleted.
    
    (This is somewhat ironic because I'm not actually a WebKit Owner, yet
    I'm the one posting this patch...)
    
    * Source/WebKit/Owners: Removed.
    
    Canonical link: https://commits.webkit.org/251838@main
    litherum committed Jun 24, 2022
  4. Navigations via swipe gestures should also skip back/forward list ite…

    …ms without a user gesture
    
    https://bugs.webkit.org/show_bug.cgi?id=241932
    
    Reviewed by Geoffrey Garen.
    
    Navigations via swipe gestures should also skip back/forward list items without a user gesture.
    Previously, with Bug 241885, it only impacted navigations via the back/forward buttons.
    
    * Source/WebKit/UIProcess/ViewGestureController.cpp:
    (WebKit::ViewGestureController::startSwipeGesture):
    * Source/WebKit/UIProcess/WebBackForwardList.cpp:
    (WebKit::itemSkippingBackForwardItemsAddedByJSWithoutUserGesture):
    (WebKit::WebBackForwardList::goBackItemSkippingItemsWithoutUserGesture const):
    (WebKit::WebBackForwardList::goForwardItemSkippingItemsWithoutUserGesture const):
    * Source/WebKit/UIProcess/WebBackForwardList.h:
    * Source/WebKit/UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::goForward):
    (WebKit::WebPageProxy::goBack):
    (WebKit::itemSkippingBackForwardItemsAddedByJSWithoutUserGesture): Deleted.
    
    Canonical link: https://commits.webkit.org/251837@main
    cdumez committed Jun 24, 2022
  5. AX ITM: AXIsolatedTree::nodeChangeForObject should set the tree root …

    …only for ScrollViews.
    
    https://bugs.webkit.org/show_bug.cgi?id=241968
    
    Reviewed by Chris Fleizach.
    
    In addition to checking for invalid objectID, we now check for the object being an AXScrollView.
    
    * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
    (WebCore::AXIsolatedTree::nodeChangeForObject):
    
    Canonical link: https://commits.webkit.org/251836@main
    AndresGonzalezApple committed Jun 24, 2022
  6. Stripping whitespace in <animate> values attribute should use stripLe…

    …adingAndTrailingMatchedCharacters(isHTMLSpace<UChar>)
    
    https://bugs.webkit.org/show_bug.cgi?id=241867
    
    Reviewed by Chris Dumez and Darin Adler.
    
    * Source/WebCore/svg/SVGAnimationElement.cpp:
    (WebCore::SVGAnimationElement::attributeContainsJavaScriptURL const):
    (WebCore::SVGAnimationElement::parseAttribute):
    
    Canonical link: https://commits.webkit.org/251835@main
    nt1m committed Jun 24, 2022
  7. Replaced deprecated NSPasteboardNames with latest API constants

    https://bugs.webkit.org/show_bug.cgi?id=241884
    rdar://95716307
    
    Reviewed by Wenson Hsieh and Tim Horton.
    
    NSGeneralPboard, NSFontPboard, NSRulerPboard, NSFindPboard and NSDragPboard were all deprecated in macOS 10.13.
    
    * Source/WebCore/editing/cocoa/EditorCocoa.mm:
    (WebCore::Editor::takeFindStringFromSelection):
    (WebCore::Editor::replaceNodeFromPasteboard):
    * Source/WebCore/editing/mac/EditorMac.mm:
    (WebCore::Editor::pasteWithPasteboard):
    * Source/WebCore/platform/mac/PasteboardMac.mm:
    (WebCore::Pasteboard::createForCopyAndPaste):
    (WebCore::Pasteboard::createForDragAndDrop):
    * Source/WebKit/UIProcess/Cocoa/GlobalFindInPageState.mm:
    (WebKit::findPasteboard):
    * Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:
    (WebKit::WebViewImpl::startDrag):
    * Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:
    (-[WKPDFLayerControllerDelegate writeItemsToPasteboard:withTypes:]):
    (WebKit::PDFPlugin::handleEditingCommand):
    * Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
    (WebKit::WebDragClient::declareAndWriteDragImage):
    * Source/WebKitLegacy/mac/Misc/WebNSPasteboardExtras.h:
    * Source/WebKitLegacy/mac/Misc/WebNSPasteboardExtras.mm:
    (+[NSPasteboard _web_setFindPasteboardString:withOwner:]):
    (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
    * Source/WebKitLegacy/mac/WebView/WebHTMLView.mm:
    (-[WebHTMLView _fontAttributesFromFontPasteboard]):
    (-[WebHTMLView copyFont:]):
    
    Canonical link: https://commits.webkit.org/251834@main
    richardrobinson authored and whsieh committed Jun 24, 2022
  8. WKCGDisplayListContents does not take effect

    https://bugs.webkit.org/show_bug.cgi?id=241967
    <rdar://93674270>
    
    Reviewed by Wenson Hsieh.
    
    * Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
    (WebKit::RemoteLayerBackingStore::paintContents):
    Remove a now-unnecessary workaround.
    
    * Source/WebKit/UIProcess/RemoteLayerTree/cocoa/RemoteLayerTreeLayers.mm:
    (-[WKCompositingLayer _setWKContents:withDisplayList:replayForTesting:]):
    Call setNeedsDisplay to make the set display list actually take effect.
    It does not actually result in drawRect being called, in this case.
    
    Canonical link: https://commits.webkit.org/251833@main
    hortont424 committed Jun 24, 2022
  9. [JSC] Optimize wasm exception handling callsite emission

    https://bugs.webkit.org/show_bug.cgi?id=241969
    rdar://94867648
    
    Reviewed by Mark Lam.
    
    This patch optimizes wasm exception handling's callsite emission so that
    we only emit callsite when the code has exception handlers. We introduce
    std::optional<bool> hasExceptionHandlers parameter to indicate whether
    we can know this condition at that time. This is possible only when
    we are tiering up from the lower tier since this information cannot
    be known until we parse the entire function.
    
    * Source/JavaScriptCore/bytecode/BytecodeDumper.cpp:
    (JSC::Wasm::BytecodeDumper::dumpBlock):
    (JSC::Wasm::BytecodeDumper::dumpExceptionHandlers):
    * Source/JavaScriptCore/bytecode/BytecodeDumper.h:
    * Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:
    (JSC::Wasm::AirIRGenerator::AirIRGenerator):
    (JSC::Wasm::parseAndCompileAir):
    (JSC::Wasm::AirIRGenerator::preparePatchpointForExceptions):
    * Source/JavaScriptCore/wasm/WasmAirIRGenerator.h:
    * Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp:
    (JSC::Wasm::B3IRGenerator::B3IRGenerator):
    (JSC::Wasm::B3IRGenerator::insertConstants):
    (JSC::Wasm::B3IRGenerator::preparePatchpointForExceptions):
    (JSC::Wasm::B3IRGenerator::emitCatchImpl):
    (JSC::Wasm::B3IRGenerator::createCallPatchpoint):
    (JSC::Wasm::parseAndCompileB3):
    * Source/JavaScriptCore/wasm/WasmB3IRGenerator.h:
    * Source/JavaScriptCore/wasm/WasmBBQPlan.cpp:
    (JSC::Wasm::BBQPlan::BBQPlan):
    (JSC::Wasm::BBQPlan::compileFunction):
    * Source/JavaScriptCore/wasm/WasmBBQPlan.h:
    * Source/JavaScriptCore/wasm/WasmHandlerInfo.h:
    (JSC::Wasm::UnlinkedHandlerInfo::typeName const):
    * Source/JavaScriptCore/wasm/WasmIRGeneratorHelpers.h:
    (JSC::Wasm::PatchpointExceptionHandle::PatchpointExceptionHandle):
    (JSC::Wasm::PatchpointExceptionHandle::generate const):
    * Source/JavaScriptCore/wasm/WasmOMGPlan.cpp:
    (JSC::Wasm::OMGPlan::OMGPlan):
    (JSC::Wasm::OMGPlan::work):
    * Source/JavaScriptCore/wasm/WasmOMGPlan.h:
    * Source/JavaScriptCore/wasm/WasmOSREntryPlan.cpp:
    (JSC::Wasm::OSREntryPlan::OSREntryPlan):
    (JSC::Wasm::OSREntryPlan::work):
    * Source/JavaScriptCore/wasm/WasmOSREntryPlan.h:
    * Source/JavaScriptCore/wasm/WasmOperations.cpp:
    (JSC::Wasm::triggerOMGReplacementCompile):
    (JSC::Wasm::JSC_DEFINE_JIT_OPERATION):
    * Source/JavaScriptCore/wasm/WasmSlowPaths.cpp:
    (JSC::LLInt::jitCompileAndSetHeuristics):
    (JSC::LLInt::WASM_SLOW_PATH_DECL):
    
    Canonical link: https://commits.webkit.org/251832@main
    Constellation committed Jun 24, 2022
  10. Fix PushManager in ephemeral sessions

    https://bugs.webkit.org/show_bug.cgi?id=241934
    
    Reviewed by Geoffrey Garen.
    
    PushManager does not behave correctly when invoked in an ephemeral session. For instance:
    
     - PushManager.subscribe and PushManager.getSubscription fail with an AbortError.
     - PushManager.permissionState returns the persistent session's notification permissions for the
       given origin.
    
    This patch makes PushManager in ephemeral sessions behave as if a user denied notification
    permissions for all origins (which users can already do in persistent sessions via the appropriate
    checkbox). This also prevents these APIs from being used to detect private browsing mode.
    
    * LayoutTests/http/tests/push-api/permissions-ephemeral-expected.txt: Added.
    * LayoutTests/http/tests/push-api/permissions-ephemeral.html: Added.
    * LayoutTests/http/tests/push-api/resources/subscribe-tests.js
    * LayoutTests/http/tests/push-api/resources/subscribe-worker.js
    * LayoutTests/platform/gtk/TestExpectations:
    * LayoutTests/platform/ios/TestExpectations:
    * LayoutTests/platform/mac-wk1/TestExpectations:
    * LayoutTests/platform/win/TestExpectations:
    * Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.cpp:
    (WebKit::NetworkNotificationManager::getPushSubscription):
    (WebKit::NetworkNotificationManager::getPushPermissionState):
    * Source/WebKit/WebProcess/WebCoreSupport/WebNotificationClient.cpp:
    (WebKit::WebNotificationClient::requestPermission):
    (WebKit::WebNotificationClient::checkPermission):
    
    Canonical link: https://commits.webkit.org/251831@main
    bnham committed Jun 24, 2022
  11. Test gardening PR workflow is too noisy

    https://bugs.webkit.org/show_bug.cgi?id=239697
    <rdar://92572308>
    
    Reviewed by Ryan Haddad.
    
    * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py:
    (Land.merge_queue): Fix syntax errors, do not update issue when creating pull requests.
    * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
    (PullRequest.create_pull_request): Allow caller to opt-out of updating the associated issue.
    * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/land_unittest.py:
    (TestLandGitHub):
    
    Canonical link: https://commits.webkit.org/251830@main
    JonWBedard committed Jun 24, 2022
  12. IntersectionObserver stops tracking when cmd+ is used to zoom in

    https://bugs.webkit.org/show_bug.cgi?id=241730
    <rdar://92272892>
    
    Reviewed by Alan Bujtas.
    
    The root margin computation was broken when root margins used percentage values, and there was
    effective zoom.
    
    The existing code scaled the insets, computed via floatValueForLength(), by the zoom value. This
    makes sense for fixed length insets; localRootBounds already has zoom applied, and will be compared
    with element rectangles which have also taken zoom into account.
    
    However, for percentage insets, multiplying the result of floatValueForLength() double-scales the
    result (since the maximumValue is already scaled). So only multiply by zoomFactor for non-percentage
    inset values.
    
    * LayoutTests/intersection-observer/root-margin-percentage-units-with-zoom-expected.txt: Added.
    * LayoutTests/intersection-observer/root-margin-percentage-units-with-zoom.html: Added.
    * LayoutTests/platform/ios/TestExpectations:
    * Source/WebCore/dom/Document.cpp:
    (WebCore::expandRootBoundsWithRootMargin):
    
    Canonical link: https://commits.webkit.org/251829@main
    smfr committed Jun 24, 2022
  13. Right-click on links doesn't work in WebKit with Edit Menu enabled

    https://bugs.webkit.org/show_bug.cgi?id=241395
    
    Reviewed by Wenson Hsieh.
    
    UIKit is installing another UIContextMenuInteraction which was resulting in
    two UIContextMenuInteraction instances installed on the view. Right-click on links
    and some images showed an incorrect 'Select All' menu only.
    
    To avoid this, use the provided SPIs from UIKit which result in a single installed
    UIContextMenuInteraction handler.
    
    * Source/WebKit/Platform/spi/ios/UIKitSPI.h
    Stage changes for non-internal builds.
    
    * Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:
    Add convenience property for when USE(UICONTEXTMENU) is not defined.
    
    * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
    (-[WKContentView textInteractionAssistantContextMenuInteraction]):
    Helper for checking respondsToSelector before attempting to call SPI method.
    
    (-[WKContentView setUpInteraction]):
    The textSelectionAssistant needs to be created before registerPreview is called
    in order to decided if we should use the SPI.
    
    (-[WKContentView gestureRecognizer:shouldRequireFailureOfGestureRecognizer:]):
    (-[WKContentView gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:]):
    (-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):
    (-[WKContentView imageAnalysisGestureDidTimeOut:]):
    (-[WKContentView contextMenuInteraction]):
    Use helper method which returns the current UIContextMenuInteraction handler.
    
    (-[WKContentView _registerPreview]):
    Use the UIKit provided UIContextMenuInteraction if it exists and set the delegate
    to the same as what we would have passed to UIContextMenuInteraction's initializer.
    
    Otherwise use the previous shipping behavior.
    
    Canonical link: https://commits.webkit.org/251828@main
    mwyrzykowski authored and whsieh committed Jun 24, 2022
  14. Add some release logging for WebPageProxy::m_suppressVisibilityUpdates

    https://bugs.webkit.org/show_bug.cgi?id=241942
    
    Reviewed by Simon Fraser.
    
    * Source/WebKit/UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::setSuppressVisibilityUpdates):
    (WebKit::WebPageProxy::activityStateDidChange):
    
    Canonical link: https://commits.webkit.org/251827@main
    cdumez committed Jun 24, 2022
  15. [GTK][WPE] Unreviewed GPUProcess build fixes

    https://bugs.webkit.org/show_bug.cgi?id=241961
    
    Unreviewed build fixes for ENABLE(GPU_PROCESS) on GTK and WPE ports.
    
    * Source/WebKit/GPUProcess/GPUProcess.cpp:
    (WebKit::GPUProcess::updateGPUProcessPreferences): Add the ENABLE(VP9) guard to
    match the guards around GPUProcessPreferences::webMParserEnabled declaration.
    * Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp:
    Add a missing GraphicsContext header include.
    
    Canonical link: https://commits.webkit.org/251826@main
    zdobersek committed Jun 24, 2022
  16. [GLIB] Fix overloaded-virtual warnings

    https://bugs.webkit.org/show_bug.cgi?id=240221
    
    Fixes warnings introduced in 4db94c2.
    
    Reviewed by Michael Catanzaro.
    
    * Tools/TestWebKitAPI/glib/WebKitGLib/LoadTrackingTest.cpp:
    (LoadTrackingTest::loadHtml):
    * Tools/TestWebKitAPI/glib/WebKitGLib/LoadTrackingTest.h:
    
    Canonical link: https://commits.webkit.org/251825@main
    TingPing authored and philn committed Jun 24, 2022
  17. [WTF] Need specialization for DefaultHash<CompactPtr<StringImpl>> wit…

    …h StringHash
    
    https://bugs.webkit.org/show_bug.cgi?id=241955
    
    Reviewed by Tim Horton.
    
    AtomStringTable uses CompactPtr only when it is more efficient than PackedPtr, which means, it is non-simulator iOS family.
    And we lack the specialization of DefaultHash<CompactPtr<StringImpl>> with StringHash: usually, we can just use PtrHash.
    But for StringImpl, we have specialization of this hash function, so we must make DefaultHash StringHash for CompactPtr<StringImpl>
    case too. This patch also adds a test including HashMap<CompactPtr<StringImpl>> removal & re-addition to hit deleted cases.
    
    * Source/WTF/wtf/text/StringHash.h:
    (WTF::StringHash::hash):
    (WTF::StringHash::equal):
    (WTF::ASCIICaseInsensitiveHash::hash):
    (WTF::ASCIICaseInsensitiveHash::equal):
    * Source/WTF/wtf/text/StringImpl.h:
    * Tools/TestWebKitAPI/Tests/WTF/CompactPtr.cpp:
    (TestWebKitAPI::TEST):
    
    Canonical link: https://commits.webkit.org/251824@main
    Constellation committed Jun 24, 2022
  18. Revert https://commits.webkit.org/r295776 as it is crashing in debug

    https://bugs.webkit.org/show_bug.cgi?id=241958
    
    Unreviewed.
    
    Revert "[ Mac EWS ] imported/w3c/web-platform-tests/workers/semantics/multiple-workers/004.html is a flaky text failure"
    This reverts commit 4d36020.
    
    Canonical link: https://commits.webkit.org/251823@main
    youennf committed Jun 24, 2022
  19. [macOS] Unreviewed, fix unified source build error after r295757

    * Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm:
    (WebKit::WebProcessProxy::hardwareConsoleStateChanged):
    
    Canonical link: https://commits.webkit.org/251822@main
    dpino committed Jun 24, 2022
  20. AX: PAL::getAVSpeechSynthesisVoiceClass() is called without first che…

    …cking isAVFoundationFrameworkAvailable
    
    https://bugs.webkit.org/show_bug.cgi?id=241880
    
    Reviewed by Chris Fleizach.
    
    In order to get the list of voices or speak utterances, we rely on
    PAL::getAVSpeechSynthesisVoiceClass(). This will crash if the AVFoundation
    framework isn't available.
    
    This patch fixes this by returning early if !PAL::isAVFoundationFrameworkAvailable().
    
    * Source/WebCore/platform/cocoa/PlatformSpeechSynthesizerCocoa.mm:
    (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
    (WebCore::PlatformSpeechSynthesizer::speakUtterance):
    
    Canonical link: https://commits.webkit.org/251821@main
    twilco committed Jun 24, 2022
  21. [iOS 16] LayoutTests that synthesize touches with keyboard modifiers …

    …fail or time out
    
    https://bugs.webkit.org/show_bug.cgi?id=241938
    rdar://95418782
    
    Reviewed by Tim Horton.
    
    After the refactoring in rdar://90709069, the value of `-[UIGestureRecognizer modifierFlags]` is
    derived from `BKSHIDEventDigitizerAttributes` on the inner `IOHIDEventRef`, via the
    `-activeModifiers` property; normally, this is populated by logic in BackBoardServices, but in
    WebKitTestRunner, nothing sets these flags. As a result, layout tests that attempt to synthesize
    touches with modifier keys (with the expectation that resulting `UIEvent` and `UIGestureRecognizer`
    state will reflect this modifier state) now fail.
    
    To address these failures, we use BackBoardServices SPI to directly set the value of these modifier
    flags before queueing them for event dispatch.
    
    * LayoutTests/fast/events/touch/ios/pointer-events-with-modifiers.html:
    * LayoutTests/fast/events/touch/ios/touch-events-with-modifiers.html:
    
    Additionally make these tests `preventDefault()` on "touchstart", to prevent the context menu from
    showing up and intercepting subsequent touches, when performing a control-tap.
    
    * Source/WebKit/Platform/spi/ios/BackBoardServicesSPI.h:
    
    Add some SPI declarations; due to the inability to import the headers on internal builds, we
    explicitly redeclare these methods when using both internal and non-internal iOS SDKs.
    
    * Tools/WebKitTestRunner/ios/HIDEventGenerator.h:
    * Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:
    (ActiveModifierState::updateForUsageCode):
    (ActiveModifierState::flags const):
    (ActiveModifierState::update):
    
    Add a helper class to track modifier state when dispatching synthetic key events. This is owned by
    the shared `HIDEventGenerator`, and gets reset between layout tests.
    
    (-[HIDEventGenerator _sendIOHIDKeyboardEvent:usage:isKeyDown:]):
    (-[HIDEventGenerator resetActiveModifiers]):
    (-[HIDEventGenerator _sendHIDEvent:]):
    
    Set modifier flags on digitizer HID events, using the current `ActiveModifierState`.
    
    * Tools/WebKitTestRunner/ios/TestControllerIOS.mm:
    (WTR::TestController::platformResetStateToConsistentValues):
    
    Canonical link: https://commits.webkit.org/251820@main
    whsieh committed Jun 24, 2022
  22. Web Inspector: include integrity in "Copy as fetch"

    https://bugs.webkit.org/show_bug.cgi?id=241217
    <rdar://problem/94698949>
    
    Reviewed by Patrick Angle.
    
    * Source/JavaScriptCore/inspector/protocol/Network.json:
    * Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp:
    (WebCore::buildObjectForResourceRequest):
    Add an optional `integrity` string to `Network.Response` and pass it to the frontend.
    
    * Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js:
    (WI.NetworkManager.prototype.resourceRequestWillBeSent):
    * Source/WebInspectorUI/UserInterface/Models/Resource.js:
    (WI.Resource.prototype.get integrity): Added.
    (WI.Resource.prototype.updateForRedirectResponse):
    (WI.Resource.prototype.generateFetchCode):
    Pass along the `integrity` whenever updating a `WI.Resource` with a `Network.Request`.
    
    * LayoutTests/http/tests/inspector/network/copy-as-fetch.html:
    * LayoutTests/http/tests/inspector/network/copy-as-fetch-expected.txt:
    
    Canonical link: https://commits.webkit.org/251819@main
    dcrousso committed Jun 24, 2022
  23. Web Inspector: include referrerPolicy in "Copy as fetch"

    https://bugs.webkit.org/show_bug.cgi?id=241218
    <rdar://problem/94698964>
    
    Reviewed by Patrick Angle.
    
    * Source/JavaScriptCore/inspector/protocol/Network.json:
    * Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp:
    (WebCore::toProtocol):
    (WebCore::buildObjectForResourceRequest):
    (WebCore::InspectorNetworkAgent::willSendRequest):
    (WebCore::InspectorNetworkAgent::willSendRequestOfType):
    (WebCore::InspectorNetworkAgent::interceptRequest):
    Add a `Network.ReferrerPolicy` protocol enum (corresponding to `WebCore::ReferrerPolicy`) and pass it to the frontend.
    
    * Source/WebCore/inspector/InspectorInstrumentation.h:
    (WebCore::InspectorInstrumentation::willSendRequest):
    * Source/WebCore/inspector/InspectorInstrumentation.cpp:
    (WebCore::InspectorInstrumentation::willSendRequestImpl):
    * Source/WebCore/loader/ResourceLoadNotifier.h:
    * Source/WebCore/loader/ResourceLoadNotifier.cpp:
    (WebCore::ResourceLoadNotifier::willSendRequest):
    (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
    * Source/WebCore/loader/ResourceLoader.cpp:
    (WebCore::ResourceLoader::willSendRequestInternal):
    * Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp:
    (WebCore::ApplicationCacheGroup::update):
    (WebCore::ApplicationCacheGroup::startLoadingEntry):
    Pass along a `ResourceLoader*` when `willSendRequest` so that the `InspectorNetworkAgent` can look
    at it to get the `FetchOptions` for that request.
    
    * Source/WebInspectorUI/UserInterface/Models/Resource.js:
    (WI.Resource.prototype.get referrerPolicy): Added.
    (WI.Resource.prototype.updateForRedirectResponse):
    (WI.Resource.prototype.generateFetchCode):
    * Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js:
    (WI.NetworkManager.prototype.resourceRequestWillBeSent):
    Pass along the `Network.ReferrerPolicy` whenever creating/updating a `WI.Resource` with a `Network.Request`.
    
    * Source/WebCore/inspector/agents/InspectorPageAgent.h:
    * Source/WebCore/inspector/agents/InspectorPageAgent.cpp:
    (WebCore::InspectorPageAgent::cachedResource):
    Drive-by: Change to `const Frame*`.
    
    * LayoutTests/http/tests/inspector/network/copy-as-fetch.html:
    * LayoutTests/http/tests/inspector/network/copy-as-fetch-expected.txt:
    
    Canonical link: https://commits.webkit.org/251818@main
    dcrousso committed Jun 24, 2022
  24. AX ITM: AXIsolatedTree::updateNode doesn't update if the target node …

    …is a descendant of a barren object.
    
    https://bugs.webkit.org/show_bug.cgi?id=241915
    
    Reviewed by Chris Fleizach.
    
    AXIsolatedTree::updateNode doesn't update the target node if it is ignored, in particular if it is a descendant of a barren object like a button. With this patch, when the given node is a descendant of a barren object, we update its unignored parent.
    
    * LayoutTests/accessibility/button-title-change-expected.txt: Added.
    * LayoutTests/accessibility/button-title-change.html: Added.
    * Source/WebCore/accessibility/AXObjectCache.cpp:
    (WebCore::AXObjectCache::handleTextChanged):
    (WebCore::AXObjectCache::handleAttributeChange):
    (WebCore::AXObjectCache::performDeferredCacheUpdate):
    (WebCore::AXObjectCache::deferTextChangedIfNeeded):
    (WebCore::AXObjectCache::treeData):
    (WebCore::AXObjectCache::textChanged): Became handleTextChanged.
    * Source/WebCore/accessibility/AXObjectCache.h:
    (WebCore::AXObjectCache::handleTextChanged):
    (WebCore::AXObjectCache::textChanged): Deleted.
    * Source/WebCore/accessibility/AccessibilityObject.cpp:
    (WebCore::AccessibilityObject::setIsIgnoredFromParentDataForChild):
    * Source/WebCore/accessibility/AccessibilityObject.h:
    (WebCore::AccessibilityObject::isDescendantOfBarrenParent const):
    Removed from the AXCoreObject interface and made it a virtual method of this class.
    * Source/WebCore/accessibility/AccessibilityObjectInterface.h:
    * Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
    (WebCore::AXIsolatedObject::isDescendantOfBarrenParent const): Deleted.
    * Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
    * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
    (WebCore::AXIsolatedTree::updateNode):
    
    Canonical link: https://commits.webkit.org/251817@main
    AndresGonzalezApple committed Jun 24, 2022
  25. AX: CrashTracer: com.apple.WebKit.WebContent at com.apple.WebCore: We…

    …bCore::AccessibilityTableCell::ariaOwnedByParent const
    
    https://bugs.webkit.org/show_bug.cgi?id=241936
    <rdar://problem/95809097>
    
    Reviewed by Chris Fleizach.
    
    AXObjectCache::objectsForIDs was returning a Vector<RefPtr> that could contain nullptrs. This patch ensures that all items in the vector are not null.
    
    * Source/WebCore/accessibility/AXObjectCache.cpp:
    (WebCore::AXObjectCache::objectsForIDs const):
    
    Canonical link: https://commits.webkit.org/251816@main
    AndresGonzalezApple committed Jun 24, 2022
  26. IPC stream send is slow due to semaphore signal if receiver is faster…

    … than sender
    
    https://bugs.webkit.org/show_bug.cgi?id=239895
    
    Reviewed by Wenson Hsieh.
    
    Add a message property `StreamBatched`. Consecutive messages marked as such
    will not wake up the sleeping receiver. This skips the semaphore signal call
    in cases that the receiver is faster than the sender.
    
    Conservatively add batched property only to cases that are invoked by MotionMark
    Canvas test case.
    Conservatively use maximum batch size of 40, this seems to skip most signal
    invocations.
    
    * Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
    * Source/WebKit/Platform/IPC/StreamClientConnection.cpp:
    (IPC::StreamClientConnection::setSemaphores):
    (IPC::StreamClientConnection::wakeUpServer):
    (IPC::StreamClientConnection::wakeUpServerBatched):
    (IPC::StreamClientConnection::deferredWakeUpServer): Deleted.
    (IPC::StreamClientConnection::decrementRemainingMessageCountBeforeSendingWakeUp): Deleted.
    (IPC::StreamClientConnection::sendDeferredWakeUpMessageIfNeeded): Deleted.
    * Source/WebKit/Platform/IPC/StreamClientConnection.h:
    (IPC::StreamClientConnection::trySendStream):
    (IPC::StreamClientConnection::trySendSyncStream):
    (IPC::StreamClientConnection::trySendDestinationIDIfNeeded):
    (IPC::StreamClientConnection::sendProcessOutOfStreamMessage):
    * Source/WebKit/Scripts/webkit/messages.py:
    (message_to_struct_declaration):
    (generate_header_includes_from_conditions):
    * Source/WebKit/Scripts/webkit/tests/Makefile:
    * Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp:
    (IPC::jsValueForArguments):
    (IPC::messageArgumentDescriptions):
    * Source/WebKit/Scripts/webkit/tests/MessageNames.cpp:
    (IPC::description):
    (IPC::receiverName):
    (IPC::isValidMessageName):
    * Source/WebKit/Scripts/webkit/tests/MessageNames.h:
    * Source/WebKit/Scripts/webkit/tests/TestWithCVPixelBufferMessageReceiver.cpp:
    * Source/WebKit/Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp:
    * Source/WebKit/Scripts/webkit/tests/TestWithIfReceiver.messages.in: Added.
    * Source/WebKit/Scripts/webkit/tests/TestWithIfReceiverMessageReceiver.cpp: Copied from Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp.
    (WebKit::TestWithIfReceiver::didReceiveMessage):
    (IPC::jsValueForDecodedMessage<MessageName::TestWithIfReceiver_CompletePaymentSession>):
    * Source/WebKit/Scripts/webkit/tests/TestWithIfReceiverMessages.h: Copied from Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp.
    (Messages::TestWithIfReceiver::messageReceiverName):
    (Messages::TestWithIfReceiver::CompletePaymentSession::name):
    (Messages::TestWithIfReceiver::CompletePaymentSession::CompletePaymentSession):
    (Messages::TestWithIfReceiver::CompletePaymentSession::arguments const):
    * Source/WebKit/Scripts/webkit/tests/TestWithIfReceiverMessagesReplies.h: Copied from Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp.
    * Source/WebKit/Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp:
    * Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp:
    * Source/WebKit/Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp:
    * Source/WebKit/Scripts/webkit/tests/TestWithStreamBatched.messages.in: Added.
    * Source/WebKit/Scripts/webkit/tests/TestWithStreamBatchedMessageReceiver.cpp: Copied from Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp.
    (WebKit::TestWithStreamBatched::didReceiveStreamMessage):
    (IPC::jsValueForDecodedMessage<MessageName::TestWithStreamBatched_SendString>):
    * Source/WebKit/Scripts/webkit/tests/TestWithStreamBatchedMessages.h: Copied from Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp.
    (Messages::TestWithStreamBatched::messageReceiverName):
    (Messages::TestWithStreamBatched::SendString::name):
    (Messages::TestWithStreamBatched::SendString::SendString):
    (Messages::TestWithStreamBatched::SendString::arguments const):
    * Source/WebKit/Scripts/webkit/tests/TestWithStreamBatchedMessagesReplies.h: Copied from Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp.
    * Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp:
    * Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp:
    * Source/WebKit/Scripts/webkit/tests/TestWithStreamMessages.h:
    * Source/WebKit/Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp:
    * Source/WebKit/Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp:
    
    Canonical link: https://commits.webkit.org/251815@main
    kkinnunen-apple authored and smfr committed Jun 24, 2022
  27. Fix the Mac Catalyst build

    https://bugs.webkit.org/show_bug.cgi?id=241948
    rdar://87794804
    
    Reviewed by Ryan Haddad.
    
    * Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm:
    
    Canonical link: https://commits.webkit.org/251814@main
    eric-carlson authored and ryanhaddad committed Jun 24, 2022
  28. GIFImageReader: Be tolerant about invalid GIF files without a trailer(;)

    https://bugs.webkit.org/show_bug.cgi?id=241839
    
    GIF files should be terminated with a trailer(;). However, Safari,
    Chrome and Firefox can decode invalid GIF files without a trailer.
    
    Reviewed by Don Olmstead.
    
    * LayoutTests/fast/images/bad-trailer-gif-expected.html: Added.
    * LayoutTests/fast/images/bad-trailer-gif.html: Added.
    * LayoutTests/fast/images/resources/bad-trailer.gif: Added.
    * Source/WebCore/platform/image-decoders/gif/GIFImageReader.cpp:
    (GIFImageReader::parse): Don't return false in the case of no trailer.
    
    Canonical link: https://commits.webkit.org/251813@main
    fujii committed Jun 24, 2022
  29. Check weak linked symbol before use

    https://bugs.webkit.org/show_bug.cgi?id=241933
    <rdar://95797334>
    
    Reviewed by Chris Dumez.
    
    Check weak linked symbol from the Power log framework before use.
    
    * Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:
    (WebKit::WebProcessPool::registerNotificationObservers):
    (WebKit::WebProcessPool::unregisterNotificationObservers):
    
    Canonical link: https://commits.webkit.org/251812@main
    pvollan committed Jun 24, 2022
  30. Add JetBrains metadata directory to .gitignore

    https://bugs.webkit.org/show_bug.cgi?id=241946
    rdar://95817511
    
    Reviewed by Jonathan Bedard.
    
    * .gitignore: add *.idea/
    
    Canonical link: https://commits.webkit.org/251811@main
    alancoon authored and JonWBedard committed Jun 24, 2022
  31. MotionMark's multiply suite may generate incorrect score when request…

    …AnimationFrame runs at 120hz
    
    https://bugs.webkit.org/show_bug.cgi?id=240605
    
    Reviewed by Simon Fraser.
    
    This effectively increases the maximum complexity. Doing this for
    two reasons: both Chrome and Safari are getting close to the maximum
    complexity. Increasing the complexity ensures Chrome is scored
    correctly when requestAnimationFrame runs at 120Hz.
    
    * PerformanceTests/MotionMark/tests/master/resources/multiply.js:
    Increases complexity.
    
    Canonical link: https://commits.webkit.org/251810@main
    Scott Violet authored and kenrussell committed Jun 24, 2022

Commits on Jun 23, 2022

  1. [JSC] Fractional part of an ISO8601 Duration string must not be inter…

    …preted as floating-point
    
    https://bugs.webkit.org/show_bug.cgi?id=241940
    
    Reviewed by Yusuke Suzuki.
    
    The last time part of an ISO8601 Duration string is allowed to have 1 to 9 digits beyond the decimal point.
    If this fractional part is interpreted using floating-point arithmetic, off-by-one errors can occur.
    (https://tc39.es/proposal-temporal/#sec-temporal-parsetemporaldurationstring)
    
    Contrary to the spec, test262 tests had been expecting IEEE-754-aligned results.
    Tests were corrected in tc39/test262#3544; this patch corrects our implementation.
    
    * JSTests/test262/expectations.yaml:
    Mark 16 test cases as passing.
    
    * Source/JavaScriptCore/runtime/ISO8601.cpp:
    (JSC::ISO8601::handleFraction):
    
    Canonical link: https://commits.webkit.org/251809@main
    rkirsling committed Jun 23, 2022
  2. Update lldbWebKitTester's CLANG_DEBUG_INFORMATION_LEVEL workaround fo…

    …r workspace builds
    
    https://bugs.webkit.org/show_bug.cgi?id=241863
    
    Reviewed by Alexey Proskuryakov.
    
    When building lldbWebKitTester, we used to transparently filter out the
    CLANG_DEBUG_INFORMATION_LEVEL setting that buildbot passes. Now that
    builds are a single xcodebuild invocation, we cannot do that.
    
    Introduce a WK_OVERRIDE_DEBUG_INFORMATION_LEVEL setting, which
    lldbWebKitTester sets to its required debug info level. Change
    buildbot's overrides to prefer this setting over `line-tables-only`.
    
    * Tools/CISupport/build-webkit-org/steps.py:
    (CompileWebKit.start):
    * Tools/CISupport/ews-build/steps.py:
    (CompileWebKit.start):
    * Tools/Scripts/webkitdirs.pm:
    (buildXCodeProject):
    * Tools/lldb/lldbWebKitTester/Configurations/lldbWebKitTester.xcconfig:
    
    Canonical link: https://commits.webkit.org/251808@main
    emw-apple committed Jun 23, 2022
  3. Regression (247017@main): correct an ASSERT in SQLiteIDBBackingStore

    https://bugs.webkit.org/show_bug.cgi?id=241939
    
    Reviewed by Geoffrey Garen.
    
    https://commits.webkit.org/247017@main changed the assert by mistake; let's revert the change. Empty string is valid for
    database name per spec: https://www.w3.org/TR/IndexedDB/#name
    
    * Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
    (WebCore::IDBServer::SQLiteIDBBackingStore::encodeDatabaseName):
    
    Canonical link: https://commits.webkit.org/251807@main
    szewai committed Jun 23, 2022
Older