Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9f69b4f2982109b943131b634bebe4081a340cba
      
https://github.com/WebKit/WebKit/commit/9f69b4f2982109b943131b634bebe4081a340cba
  Author: Cole Carley <[email protected]>
  Date:   2026-10-01 (Thu, 01 Oct 2026)

  Changed paths:
    M LayoutTests/fast/quirks/active-quirks-by-domain-expected.txt
    M LayoutTests/platform/glib/fast/quirks/active-quirks-by-domain-expected.txt
    M 
LayoutTests/platform/mac-sequoia/fast/quirks/active-quirks-by-domain-expected.txt
    M 
LayoutTests/platform/mac-tahoe/fast/quirks/active-quirks-by-domain-expected.txt
    M LayoutTests/platform/mac-wk2/TestExpectations
    M Source/WebCore/CMakeLists.txt
    M Source/WebCore/DerivedSources-input.xcfilelist
    M Source/WebCore/DerivedSources-output.xcfilelist
    M Source/WebCore/DerivedSources.make
    M Source/WebCore/Headers.cmake
    A Source/WebCore/Scripts/GenerateQuirkBehaviors.rb
    A 
Source/WebCore/Scripts/QuirkBehaviorsTemplates/QuirkBehaviorDefinitions.h.erb
    A Source/WebCore/Scripts/QuirkBehaviorsTemplates/QuirkBehaviorID.h.erb
    A Source/WebCore/Scripts/QuirkBehaviorsTemplates/QuirksAccessors.cpp.erb
    A Source/WebCore/Scripts/QuirkBehaviorsTemplates/QuirksAccessors.h.erb
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/dom/Node.cpp
    M Source/WebCore/page/QuirkBehaviors.h
    A Source/WebCore/page/QuirkBehaviors.yaml
    M Source/WebCore/page/QuirkTable.cpp
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Tools/TestWebKitAPI/Tests/WebCore/Quirks.cpp

  Log Message:
  -----------
  [Quirks] generate QuirkBehaviors from a yaml file
https://bugs.webkit.org/show_bug.cgi?id=325558
rdar://188640805

Reviewed by Brent Fulgham.

This patch introduces QuirkBehaviors.yaml which defines each QuirkBehavior. By 
doing this, we can
generate much of the boilerplate involved in created a new QuirkBehavior, 
including adding an entry
to the QuirkBeahviorID enum class, defining a constexpr QuirkBehavior, and 
adding a new accessor
to the Quirks class. For the common case, defining a new behavior is as simple 
as adding an entry
to this file.

GenerateQuirkBehaviors.rb reads the yaml file and generates:
        QuirkBehaviorID.h: declares the QuirkBehaviorID enum
        QuirkBehaviorDefinitions.h: defines the constexpr QuirkBehaviors for 
use in the QuirkTable
        QuirkAccessors.h: defines a new QuirkAccessors class that the Quirk 
class inherits from

The yaml entries have the following shape:
        available:          BuildCondition expression; the table drops the 
behavior when false.
Default: always.
        conditions:         QuirkConditionsSupported that .when() may add.
        conditionsRequired: Every row must add all of the behavior's conditions.
        accessor:           Overrides the accessor name.
        static:             Takes a const URL& and resolves top-URL quirks for 
it; needs no
Document.
        export:             Adds WEBCORE_EXPORT to the declaration.
        implementation:     "custom" if the accessor is hand-written in Quirks. 
Only custom
behaviors may set parameters
        parameters:         QuirkParametersNeeded

Note that ShouldIgnorePlaysInlineRequirementQuirk was removed from the
active-quirks-by-domain-expected files because the behavior was declared with
BuildCondition::always, but the accessor wrapped the implementation in #if 
PLATFORM(IOS_FAMILY).
I marked the availability as iOSFamily in the yaml file, which caused the 
expected file to change.

Test: Tools/TestWebKitAPI/Tests/WebCore/Quirks.cpp

* LayoutTests/fast/quirks/active-quirks-by-domain-expected.txt:
* LayoutTests/platform/glib/fast/quirks/active-quirks-by-domain-expected.txt:
* 
LayoutTests/platform/mac-sequoia/fast/quirks/active-quirks-by-domain-expected.txt:
* 
LayoutTests/platform/mac-tahoe/fast/quirks/active-quirks-by-domain-expected.txt:
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Scripts/GenerateQuirkBehaviors.rb: Added.
* 
Source/WebCore/Scripts/QuirkBehaviorsTemplates/QuirkBehaviorDefinitions.h.erb: 
Added.
* Source/WebCore/Scripts/QuirkBehaviorsTemplates/QuirkBehaviorID.h.erb: Added.
* Source/WebCore/Scripts/QuirkBehaviorsTemplates/QuirksAccessors.cpp.erb: Added.
* Source/WebCore/Scripts/QuirkBehaviorsTemplates/QuirksAccessors.h.erb: Added.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/page/QuirkBehaviors.h:
* Source/WebCore/page/QuirkBehaviors.yaml: Added.
* Source/WebCore/page/QuirkTable.cpp:
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::Quirks):
(WebCore::Quirks::shouldDispatchedSimulatedMouseEventsAssumeDefaultPrevented 
const):
(WebCore::Quirks::triggerOptionalStorageAccessQuirk const):
(WebCore::Quirks::shouldAllowNavigationToCustomProtocolWithoutUserGesture):
(WebCore::Quirks::shouldEnableFontLoadingAPIQuirk const):
(WebCore::Quirks::elementMatchesSelectorCondition): Deleted.
(WebCore::Quirks::behaviorAppliesToNode const): Deleted.
(WebCore::Quirks::needsQuirks const): Deleted.
(WebCore::Quirks::needsAnchorToBeMouseFocusable const): Deleted.
(WebCore::Quirks::needsFormControlToBeMouseFocusable const): Deleted.
(WebCore::Quirks::needsSeekingSupportDisabled const): Deleted.
(WebCore::Quirks::shouldAutoplayWebAudioForArbitraryUserGesture const): Deleted.
(WebCore::Quirks::isTouchBarUpdateSuppressedForHiddenContentEditable const): 
Deleted.
(WebCore::Quirks::isNeverRichlyEditableForTouchBar const): Deleted.
(WebCore::Quirks::shouldSuppressAutocorrectionAndAutocapitalizationInHiddenEditableAreas
 const): Deleted.
(WebCore::Quirks::needsYouTubeCaptionsQuirk const): Deleted.
(WebCore::Quirks::needsCNNCaptionQuirk const): Deleted.
(WebCore::Quirks::needsYouTubeEmbedAutoplayQuirk const): Deleted.
(WebCore::Quirks::shouldDisableWritingSuggestionsByDefault const): Deleted.
(WebCore::Quirks::ensureCaptionVisibilityInFullscreenAndPictureInPicture 
const): Deleted.
(WebCore::Quirks::shouldDisableElementFullscreenQuirk const): Deleted.
(WebCore::Quirks::shouldComputeSimulatedMouseEventMovementDelta const): Deleted.
(WebCore::Quirks::shouldAllowNativeTapsOnMediaElements const): Deleted.
(WebCore::Quirks::shouldAvoidResizingWhenInputViewBoundsChange const): Deleted.
(WebCore::Quirks::shouldDisablePointerEventsQuirk const): Deleted.
(WebCore::Quirks::inputMethodMustUseCompositionEvents const): Deleted.
(WebCore::Quirks::shouldIgnoreInputModeNone const): Deleted.
(WebCore::Quirks::needsGMailOverflowScrollQuirk const): Deleted.
(WebCore::Quirks::needsYouTubeOverflowScrollQuirk const): Deleted.
(WebCore::Quirks::needsWebExScrollabilityQuirk const): Deleted.
(WebCore::Quirks::needsFacebookRemoveNotSupportedQuirk const): Deleted.
(WebCore::Quirks::needsScrollbarWidthThinDisabledQuirk const): Deleted.
(WebCore::Quirks::needsBodyScrollbarWidthNoneDisabledQuirk const): Deleted.
(WebCore::Quirks::needsAirIndiaExpressLayeringQuirk const): Deleted.
(WebCore::Quirks::needsFullscreenDisplayNoneQuirk const): Deleted.
(WebCore::Quirks::needsFullscreenObjectFitQuirk const): Deleted.
(WebCore::Quirks::needsZomatoEmailLoginLabelQuirk const): Deleted.
(WebCore::Quirks::needsGoogleMapsScrollingQuirk const): Deleted.
(WebCore::Quirks::needsGoogleTranslateScrollingQuirk const): Deleted.
(WebCore::Quirks::needsNetflixVolumeSliderQuirk const): Deleted.
(WebCore::Quirks::needsGeforcenowWarningDisplayNoneQuirk const): Deleted.
(WebCore::Quirks::needsYahooVolumeSliderQuirk const): Deleted.
(WebCore::Quirks::shouldDeferIntersectionObserversDuringResize const): Deleted.
(WebCore::Quirks::shouldAvoidScrollingWhenFocusedContentIsVisible const): 
Deleted.
(WebCore::Quirks::shouldUseLayoutViewportForClientRects const): Deleted.
(WebCore::Quirks::shouldTranscodeHeicImagesForURL): Deleted.
(WebCore::Quirks::shouldUseLegacySelectPopoverDismissalBehaviorInDataActivation 
const): Deleted.
(WebCore::Quirks::shouldIgnoreAriaForFastPathContentObservationCheck const): 
Deleted.
(WebCore::Quirks::shouldIgnoreViewportArgumentsToAvoidExcessiveZoom const): 
Deleted.
(WebCore::Quirks::shouldIgnoreViewportArgumentsToAvoidEnlargedView const): 
Deleted.
(WebCore::Quirks::shouldUseDynamicViewportUnitsAsDefault const): Deleted.
(WebCore::Quirks::needsPreloadAutoQuirk const): Deleted.
(WebCore::Quirks::needsSuppressedPauseEventOnFullscreenExitQuirk const): 
Deleted.
(WebCore::Quirks::shouldBypassAsyncScriptDeferring const): Deleted.
(WebCore::Quirks::shouldEnableFacebookFlagQuirk const): Deleted.
(WebCore::Quirks::shouldEnableLegacyGetUserMediaQuirk const): Deleted.
(WebCore::Quirks::shouldDisableImageCaptureQuirk const): Deleted.
(WebCore::Quirks::shouldAllowMediaStreamTrackSerializationQuirk const): Deleted.
(WebCore::Quirks::shouldEnableCameraAndMicrophonePermissionStateQuirk const): 
Deleted.
(WebCore::Quirks::shouldEnableRemoteTrackLabelQuirk const): Deleted.
(WebCore::Quirks::shouldEnableCameraBackgroundPlayback const): Deleted.
(WebCore::Quirks::shouldEnableSpeakerSelectionPermissionsPolicyQuirk const): 
Deleted.
(WebCore::Quirks::shouldEnableEnumerateDeviceQuirk const): Deleted.
(WebCore::Quirks::shouldAllowNotificationPermissionWithoutUserGesture const): 
Deleted.
(WebCore::Quirks::shouldUnloadHeavyFrame const): Deleted.
(WebCore::Quirks::needsCanPlayAfterSeekedQuirk const): Deleted.
(WebCore::Quirks::shouldLayOutAtMinimumWindowWidthWhenIgnoringScalingConstraints
 const): Deleted.
(WebCore::Quirks::isMicrosoftTeamsRedirectURL): Deleted.
(WebCore::Quirks::requiresUserGestureToPauseInPictureInPicture const): Deleted.
(WebCore::Quirks::requiresUserGestureToPauseInFullscreenAfterOrientationChange 
const): Deleted.
(WebCore::Quirks::requiresUserGestureToPlayInFullscreen const): Deleted.
(WebCore::Quirks::returnNullPictureInPictureElementDuringFullscreenChange 
const): Deleted.
(WebCore::Quirks::requiresUserGestureToLoadInPictureInPicture const): Deleted.
(WebCore::Quirks::blocksReturnToFullscreenFromPictureInPictureQuirk const): 
Deleted.
(WebCore::Quirks::blocksEnteringStandardFullscreenFromPictureInPictureQuirk 
const): Deleted.
(WebCore::Quirks::shouldDisableEndFullscreenEventWhenEnteringPictureInPictureFromFullscreenQuirk
 const): Deleted.
(WebCore::Quirks::allowLayeredFullscreenVideos const): Deleted.
(WebCore::Quirks::shouldDisableFullscreenVideoAspectRatioAdaptiveSizing const): 
Deleted.
(WebCore::Quirks::shouldDisableAdSkippingInPip const): Deleted.
(WebCore::Quirks::needsVideoShouldMaintainAspectRatioQuirk const): Deleted.
(WebCore::Quirks::shouldExposeShowModalDialog const): Deleted.
(WebCore::Quirks::shouldNavigatorPluginsBeEmpty const): Deleted.
(WebCore::Quirks::shouldDisableLazyIframeLoadingQuirk const): Deleted.
(WebCore::Quirks::shouldDisableMediaLayerTeardownOnPageVisibilityChangeQuirk 
const): Deleted.
(WebCore::Quirks::shouldDisableFetchMetadata const): Deleted.
(WebCore::Quirks::shouldBlockFetchWithNewlineAndLessThan const): Deleted.
(WebCore::Quirks::shouldDisablePushStateFilePathRestrictions const): Deleted.
(WebCore::Quirks::needsResettingTransitionCancelsRunningTransitionQuirk const): 
Deleted.
(WebCore::Quirks::shouldDisableDataURLPaddingValidation const): Deleted.
(WebCore::Quirks::shouldPreventOrientationMediaQueryFromEvaluatingToLandscape 
const): Deleted.
(WebCore::Quirks::shouldFlipScreenDimensions const): Deleted.
(WebCore::Quirks::shouldAvoidProgrammaticScrollClamping const): Deleted.
(WebCore::Quirks::needsIPadMiniUserAgent): Deleted.
(WebCore::Quirks::needsIPhoneUserAgent): Deleted.
(WebCore::Quirks::shouldIgnorePlaysInlineRequirementQuirk const): Deleted.
(WebCore::Quirks::shouldIgnoreTextAutoSizing const): Deleted.
(WebCore::Quirks::shouldHideCoarsePointerCharacteristics const): Deleted.
(WebCore::Quirks::implicitMuteWhenVolumeSetToZero const): Deleted.
(WebCore::Quirks::shouldOmitTouchEventDOMAttributesForDesktopWebsite): Deleted.
(WebCore::Quirks::shouldDispatchPointerOutAndLeaveAfterHandlingSyntheticClick 
const): Deleted.
(WebCore::Quirks::needsZeroMaxTouchPointsQuirk const): Deleted.
(WebCore::Quirks::needsChromeMediaControlsPseudoElement const): Deleted.
(WebCore::Quirks::shouldIgnoreContentObservationForClick const): Deleted.
(WebCore::Quirks::shouldHideSoftTopScrollEdgeEffectDuringFocus const): Deleted.
(WebCore::Quirks::shouldSynthesizeTouchEventsAfterNonSyntheticClick const): 
Deleted.
(WebCore::Quirks::shouldSendFakeTouchForceChangeEvent const): Deleted.
(WebCore::Quirks::shouldTreatAddingMouseOutEventListenerAsContentChange const): 
Deleted.
(WebCore::Quirks::needsMozillaFileTypeForDataTransfer const): Deleted.
(WebCore::Quirks::shouldLimitHLSPlaybackRate const): Deleted.
(WebCore::Quirks::shouldSuppressHLSSubtitles const): Deleted.
(WebCore::Quirks::shouldBlockAudiblePlaybackWhileAudioIsPlaying const): Deleted.
(WebCore::Quirks::shouldSuppressMediaSessionPauseActionOnInterruption const): 
Deleted.
(WebCore::Quirks::shouldReuseLiveRangeForSelectionUpdate const): Deleted.
(WebCore::Quirks::needsExpediaGroupAnimationQuirk const): Deleted.
(WebCore::Quirks::needsHideSelectionDuringOverflowScrollQuirk const): Deleted.
(WebCore::Quirks::needsLimitedMatroskaSupport const): Deleted.
(WebCore::Quirks::needsSupportsProgressMonitoring const): Deleted.
(WebCore::Quirks::needsCustomUserAgentData const): Deleted.
(WebCore::Quirks::needsNavigatorUserAgentDataQuirk const): Deleted.
(WebCore::Quirks::needsNowPlayingFullscreenSwapQuirk const): Deleted.
(WebCore::Quirks::needsSuppressPostLayoutBoundaryEventsQuirk const): Deleted.
(WebCore::Quirks::needsWebKitMediaTextTrackDisplayQuirk const): Deleted.
(WebCore::Quirks::shouldSupportHoverMediaQueries const): Deleted.
(WebCore::Quirks::shouldRewriteMediaRangeRequestForURL const): Deleted.
(WebCore::Quirks::shouldDisableThreadedAnimationsQuirk const): Deleted.
(WebCore::Quirks::shouldEnterNativeFullscreenWhenCallingElementRequestFullscreenQuirk
 const): Deleted.
(WebCore::Quirks::shouldDelayReloadWhenRegisteringServiceWorker const): Deleted.
(WebCore::Quirks::shouldDisableDOMAudioSessionQuirk const): Deleted.
(WebCore::Quirks::shouldComparareUsedValuesForBorderWidthForTriggeringTransitions
 const): Deleted.
(WebCore::Quirks::shouldReportVisibleDueToActivePictureInPictureContent const): 
Deleted.
(WebCore::Quirks::needsWebKitMediaKeysTransportStreamIsTypeSupportedQuirk 
const): Deleted.
(WebCore::Quirks::firstElementMatchingSelectorCondition): Deleted.
(WebCore::Quirks::elementMatchingDocumentSelectorCondition const): Deleted.
(WebCore::Quirks::behaviorAppliesToDocument const): Deleted.
* Source/WebCore/page/Quirks.h:
* Tools/TestWebKitAPI/Tests/WebCore/Quirks.cpp:
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/dom/Node.cpp:
(WebCore::Node::willRespondToMouseClickEventsWithEditability const):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::dispatchTouchEvent):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to