Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 25984471060980f62bfebb858ea251568c0e78fd
      
https://github.com/WebKit/WebKit/commit/25984471060980f62bfebb858ea251568c0e78fd
  Author: Cole Carley <[email protected]>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M Source/WebCore/Headers.cmake
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    A Source/WebCore/page/QuirkBehaviors.h
    R Source/WebCore/page/QuirkNames.h
    M Source/WebCore/page/QuirkTable.cpp
    M Source/WebCore/page/QuirkTable.h
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h
    M Source/WebCore/page/QuirksData.h
    M Tools/TestWebKitAPI/Tests/WebCore/Quirks.cpp

  Log Message:
  -----------
  [Quirks] Introduce the QuirkBehavior struct
https://bugs.webkit.org/show_bug.cgi?id=323482
rdar://186709805

Reviewed by Brent Fulgham.

This patch introduces the QuirkBehavior struct. A Quirk is the composition
of matching conditions and the QuirkBehavior to run when the matching
conditions have been met.

The QuirkBehavior common case represents a flag that turns on some Quirking 
behavior
at runtime. Some QuirkBehaviors need to hold more than just a flag, like a 
script,
which is why we can no longer represent QuirkBehaviors with an enum.

This patch renamed the SiteSpecificQuirk enum to the more appropriate 
QuirkBehaviorID,
since it no longer represents the entire Quirk.

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

* Source/WebCore/Headers.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/page/QuirkBehaviors.h: Added.
* Source/WebCore/page/QuirkNames.h: Removed.
* Source/WebCore/page/QuirkTable.cpp:
(WebCore::SiteSpecificQuirks::shouldEmit):
(WebCore::SiteSpecificQuirks::prunedTable):
(WebCore::Quirk::apply const):
(WebCore::SiteSpecificQuirks::isAvailable): Deleted.
(WebCore::SiteSpecificQuirks::computeUnavailableQuirks): Deleted.
(WebCore::SiteSpecificQuirks::maskedQuirk): Deleted.
* Source/WebCore/page/QuirkTable.h:
(WebCore::QuirkBehaviors::QuirkBehaviors):
(WebCore::QuirkBehaviors::removeUnavailable):
(WebCore::QuirkBehaviors::exclude): Deleted.
* Source/WebCore/page/Quirks.cpp:
* Source/WebCore/page/Quirks.h:
(WebCore::Quirks::shouldAllowPopupFromMicrosoftOfficeToOneDrive const):
(WebCore::Quirks::quirkIsEnabledAfterProbing const):
* Source/WebCore/page/QuirksData.h:
(WebCore::QuirksData::quirkIsEnabled const):
(WebCore::QuirksData::enableQuirks):
(WebCore::QuirksData::enableQuirk):
(WebCore::QuirksData::setQuirkState):
* Tools/TestWebKitAPI/Tests/WebCore/Quirks.cpp:
(TestWebKitAPI::TEST_F(QuirksTest, EmbeddedQuirksResolveFromTheDocumentURL)):
(TestWebKitAPI::TEST_F(QuirksTest, SiteSpecificQuirksResolveWithoutADocument)):
(TestWebKitAPI::TEST_F(QuirksTest, IsMicrosoftTeamsRedirectURL)):

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



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

Reply via email to