Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 45c24f4e4c763cb4cf586f1f87b685c485743119
      
https://github.com/WebKit/WebKit/commit/45c24f4e4c763cb4cf586f1f87b685c485743119
  Author: Brent Fulgham <[email protected]>
  Date:   2025-11-14 (Fri, 14 Nov 2025)

  Changed paths:
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h
    M Source/WebCore/page/QuirksData.h
    M Source/WebCore/style/StyleAdjuster.cpp

  Log Message:
  -----------
  Use a BitSet to hold quirk state
https://bugs.webkit.org/show_bug.cgi?id=302333
rdar://164490282

Reviewed by Brandon Stewart.

Rather than an ever-growing set of `bool` values, let's represent quirks state 
using a
BitSet. This allows us to do a quick check of whether *any* quirks are active 
in the
current domain, rather than individually testing each one. In theory, this 
should be a
small performance benefit since most sites do not have any relevant quirk and 
quickly
determining this requires fewer steps.

Tested by existing Quirks regression tests.

* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::needsFormControlToBeMouseFocusable const):
(WebCore::Quirks::needsAutoplayPlayPauseEvents const):
(WebCore::Quirks::needsSeekingSupportDisabled const):
(WebCore::Quirks::needsPerDocumentAutoplayBehavior const):
(WebCore::Quirks::shouldAutoplayWebAudioForArbitraryUserGesture const):
(WebCore::Quirks::hasBrokenEncryptedMediaAPISupportQuirk const):
(WebCore::Quirks::isTouchBarUpdateSuppressedForHiddenContentEditable const):
(WebCore::Quirks::isNeverRichlyEditableForTouchBar const):
(WebCore::Quirks::shouldSuppressAutocorrectionAndAutocapitalizationInHiddenEditableAreas
 const):
(WebCore::Quirks::shouldDispatchSyntheticMouseEventsWhenModifyingSelection 
const):
(WebCore::Quirks::needsYouTubeMouseOutQuirk const):
(WebCore::Quirks::shouldDisableWritingSuggestionsByDefault const):
(WebCore::Quirks::storageAccessUserAgentStringQuirkForDomain):
(WebCore::Quirks::shouldDisableElementFullscreenQuirk const):
(WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
(WebCore::Quirks::shouldDispatchedSimulatedMouseEventsAssumeDefaultPrevented 
const):
(WebCore::Quirks::shouldPreventDispatchOfTouchEvent const):
(WebCore::Quirks::shouldAvoidResizingWhenInputViewBoundsChange const):
(WebCore::Quirks::shouldDisablePointerEventsQuirk const):
(WebCore::Quirks::needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommand 
const):
(WebCore::Quirks::needsGMailOverflowScrollQuirk const):
(WebCore::Quirks::needsYouTubeOverflowScrollQuirk const):
(WebCore::Quirks::needsPrimeVideoUserSelectNoneQuirk const):
(WebCore::Quirks::needsFacebookRemoveNotSupportedQuirk const):
(WebCore::Quirks::needsScrollbarWidthThinDisabledQuirk const):
(WebCore::Quirks::needsBodyScrollbarWidthNoneDisabledQuirk const):
(WebCore::Quirks::needsFullscreenDisplayNoneQuirk const):
(WebCore::Quirks::needsFullscreenObjectFitQuirk const):
(WebCore::Quirks::needsZomatoEmailLoginLabelQuirk const):
(WebCore::Quirks::needsGoogleMapsScrollingQuirk const):
(WebCore::Quirks::needsGoogleTranslateScrollingQuirk const):
(WebCore::Quirks::shouldSilenceResizeObservers const):
(WebCore::Quirks::shouldSilenceWindowResizeEventsDuringApplicationSnapshotting 
const):
(WebCore::Quirks::shouldSilenceMediaQueryListChangeEvents const):
(WebCore::Quirks::shouldAvoidScrollingWhenFocusedContentIsVisible const):
(WebCore::Quirks::shouldUseLegacySelectPopoverDismissalBehaviorInDataActivation 
const):
(WebCore::Quirks::shouldIgnoreAriaForFastPathContentObservationCheck const):
(WebCore::Quirks::shouldIgnoreViewportArgumentsToAvoidExcessiveZoom const):
(WebCore::Quirks::shouldIgnoreViewportArgumentsToAvoidEnlargedView const):
(WebCore::Quirks::shouldOpenAsAboutBlank const):
(WebCore::Quirks::needsPreloadAutoQuirk const):
(WebCore::Quirks::shouldBypassBackForwardCache const):
(WebCore::Quirks::shouldBypassAsyncScriptDeferring const):
(WebCore::Quirks::shouldEnableFacebookFlagQuirk const):
(WebCore::Quirks::applyFacebookFlagQuirk):
(WebCore::Quirks::shouldEnableLegacyGetUserMediaQuirk const):
(WebCore::Quirks::shouldDisableImageCaptureQuirk const):
(WebCore::Quirks::shouldEnableCameraAndMicrophonePermissionStateQuirk const):
(WebCore::Quirks::shouldEnableRemoteTrackLabelQuirk const):
(WebCore::Quirks::shouldEnableSpeakerSelectionPermissionsPolicyQuirk const):
(WebCore::Quirks::shouldEnableEnumerateDeviceQuirk const):
(WebCore::Quirks::shouldEnableRTCEncodedStreamsQuirk const):
(WebCore::Quirks::shouldUnloadHeavyFrame const):
(WebCore::Quirks::needsCanPlayAfterSeekedQuirk const):
(WebCore::Quirks::shouldLayOutAtMinimumWindowWidthWhenIgnoringScalingConstraints
 const):
(WebCore::Quirks::shouldNotAutoUpgradeToHTTPSNavigation):
(WebCore::Quirks::triggerOptionalStorageAccessQuirk const):
(WebCore::Quirks::needsVP9FullRangeFlagQuirk const):
(WebCore::Quirks::requiresUserGestureToPauseInPictureInPicture const):
(WebCore::Quirks::returnNullPictureInPictureElementDuringFullscreenChange 
const):
(WebCore::Quirks::requiresUserGestureToLoadInPictureInPicture const):
(WebCore::Quirks::blocksReturnToFullscreenFromPictureInPictureQuirk const):
(WebCore::Quirks::blocksEnteringStandardFullscreenFromPictureInPictureQuirk 
const):
(WebCore::Quirks::shouldDisableEndFullscreenEventWhenEnteringPictureInPictureFromFullscreenQuirk
 const):
(WebCore::Quirks::allowLayeredFullscreenVideos const):
(WebCore::Quirks::shouldDisableFullscreenVideoAspectRatioAdaptiveSizing const):
(WebCore::Quirks::shouldEnableFontLoadingAPIQuirk const):
(WebCore::Quirks::shouldDisableAdSkippingInPip const):
(WebCore::Quirks::needsVideoShouldMaintainAspectRatioQuirk const):
(WebCore::Quirks::shouldExposeShowModalDialog const):
(WebCore::Quirks::shouldNavigatorPluginsBeEmpty const):
(WebCore::Quirks::shouldDisableLazyIframeLoadingQuirk const):
(WebCore::Quirks::shouldDisableFetchMetadata const):
(WebCore::Quirks::shouldBlockFetchWithNewlineAndLessThan const):
(WebCore::Quirks::shouldDisablePushStateFilePathRestrictions const):
(WebCore::Quirks::needsConfigurableIndexedPropertiesQuirk const):
(WebCore::Quirks::advancedPrivacyProtectionSubstituteDataURLForScriptWithFeatures
 const):
(WebCore::Quirks::needsResettingTransitionCancelsRunningTransitionQuirk const):
(WebCore::Quirks::shouldDisableDataURLPaddingValidation const):
(WebCore::Quirks::needsDisableDOMPasteAccessQuirk const):
(WebCore::Quirks::shouldPreventOrientationMediaQueryFromEvaluatingToLandscape 
const):
(WebCore::Quirks::shouldFlipScreenDimensions const):
(WebCore::Quirks::requirePageVisibilityToPlayAudioQuirk const):
(WebCore::Quirks::shouldIgnorePlaysInlineRequirementQuirk const):
(WebCore::Quirks::shouldUseEphemeralPartitionedStorageForDOMCookies const):
(WebCore::Quirks::needsLaxSameSiteCookieQuirk const):
(WebCore::Quirks::shouldIgnoreTextAutoSizing const):
(WebCore::Quirks::scriptToEvaluateBeforeRunningScriptFromURL):
(WebCore::Quirks::shouldHideCoarsePointerCharacteristics const):
(WebCore::Quirks::implicitMuteWhenVolumeSetToZero const):
(WebCore::Quirks::shouldDispatchPointerOutAfterHandlingSyntheticClick const):
(WebCore::Quirks::needsZeroMaxTouchPointsQuirk const):
(WebCore::Quirks::needsChromeMediaControlsPseudoElement const):
(WebCore::Quirks::shouldHideSoftTopScrollEdgeEffectDuringFocus const):
(WebCore::Quirks::shouldTreatAddingMouseOutEventListenerAsContentChange const):
(WebCore::Quirks::shouldSynthesizeTouchEventsAfterNonSyntheticClick const):
(WebCore::Quirks::shouldIgnoreContentObservationForClick const):
(WebCore::Quirks::needsMozillaFileTypeForDataTransfer const):
(WebCore::Quirks::needsBingGestureEventQuirk const):
(WebCore::Quirks::shouldAvoidStartingSelectionOnMouseDownOverPointerCursor 
const):
(WebCore::Quirks::shouldReuseLiveRangeForSelectionUpdate const):
(WebCore::Quirks::needsPointerTouchCompatibility const):
(WebCore::Quirks::needsFacebookStoriesCreationFormQuirk const):
(WebCore::Quirks::needsHotelsAnimationQuirk const):
(WebCore::Quirks::needsClaudeSidebarViewportUnitQuirk const):
(WebCore::Quirks::needsCustomUserAgentData const):
(WebCore::Quirks::needsNavigatorUserAgentDataQuirk const):
(WebCore::Quirks::needsNowPlayingFullscreenSwapQuirk const):
(WebCore::Quirks::needsSuppressPostLayoutBoundaryEventsQuirk const):
(WebCore::Quirks::needsTikTokOverflowingContentQuirk const):
(WebCore::Quirks::needsWebKitMediaTextTrackDisplayQuirk const):
(WebCore::Quirks::shouldSupportHoverMediaQueries const):
(WebCore::Quirks::shouldRewriteMediaRangeRequestForURL const):
(WebCore::Quirks::shouldEnterNativeFullscreenWhenCallingElementRequestFullscreenQuirk
 const):
(WebCore::Quirks::shouldDelayReloadWhenRegisteringServiceWorker const):
(WebCore::Quirks::shouldDisableDOMAudioSessionQuirk const):
(WebCore::handle365ScoresQuirks):
(WebCore::handleNYTimesQuirks):
(WebCore::handleASQuirks):
(WebCore::handleATTQuirks):
(WebCore::handleCBSSportsQuirks):
(WebCore::handleSteamQuirks):
(WebCore::handleCNNQuirks):
(WebCore::handleDigitalTrendsQuirks):
(WebCore::handleGizmodoQuirks):
(WebCore::handleInstagramQuirks):
(WebCore::handleMailChimpQuirks):
(WebCore::handleRalphLaurenQuirks):
(WebCore::handleSlackQuirks):
(WebCore::handleWalmartQuirks):
(WebCore::handleScriptToEvaluateBeforeRunningScriptFromURLQuirk):
(WebCore::handleICloudQuirks):
(WebCore::handleTMobileQuirks):
(WebCore::handleCEACStateGovQuirks):
(WebCore::handleTrixEditorQuirks):
(WebCore::handleWeatherQuirks):
(WebCore::handleTikTokQuirks):
(WebCore::handleDisneyPlusQuirks):
(WebCore::handleGuardianQuirks):
(WebCore::handleMaxQuirks):
(WebCore::handleBaiduQuirks):
(WebCore::handleCodepenQuirks):
(WebCore::handleWarbyParkerQuirks):
(WebCore::handleACTestingQuirks):
(WebCore::handleDailyMailCoUkQuirks):
(WebCore::handleClaudeQuirks):
(WebCore::handleYCombinatorQuirks):
(WebCore::handleSoylentQuirks):
(WebCore::handleFacebookQuirks):
(WebCore::handleFacebookMessengerQuirks):
(WebCore::handleForbesQuirks):
(WebCore::handleRedditQuirks):
(WebCore::handleAmazonQuirks):
(WebCore::handleBBCQuirks):
(WebCore::handleBankOfAmericaQuirks):
(WebCore::handleBingQuirks):
(WebCore::handleBungalowQuirks):
(WebCore::handleDescriptQuirks):
(WebCore::handleESPNQuirks):
(WebCore::handleGoogleQuirks):
(WebCore::handleHBOMaxQuirks):
(WebCore::handleHotelsQuirks):
(WebCore::handleHuluQuirks):
(WebCore::handleIMDBQuirks):
(WebCore::handleLiveQuirks):
(WebCore::handleMarcusQuirks):
(WebCore::handleMediumQuirks):
(WebCore::handleMenloSecurityQuirks):
(WebCore::handleNBAQuirks):
(WebCore::handleNHLQuirks):
(WebCore::handleNetflixQuirks):
(WebCore::handlePandoraQuirks):
(WebCore::handlePremierLeagueQuirks):
(WebCore::handleSFUSDQuirks):
(WebCore::handleSharePointQuirks):
(WebCore::handleSoundCloudQuirks):
(WebCore::handleSpotifyQuirks):
(WebCore::handleVictoriasSecretQuirks):
(WebCore::handleTympanusQuirks):
(WebCore::handleVimeoQuirks):
(WebCore::handleWeeblyQuirks):
(WebCore::handleWikipediaQuirks):
(WebCore::handleTwitterXQuirks):
(WebCore::handleYouTubeQuirks):
(WebCore::handleZillowQuirks):
(WebCore::handleZomatoQuirks):
(WebCore::handleZoomQuirks):
(WebCore::handleCapitalGroupQuirks):
(WebCore::handleCrunchyRollQuirks):
(WebCore::Quirks::determineRelevantQuirks):
(WebCore::Quirks::hasRelevantQuirks const):
* Source/WebCore/page/Quirks.h:
* Source/WebCore/page/QuirksData.h:
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjustForSiteSpecificQuirks const):

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



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

Reply via email to