[webkit-changes] [WebKit/WebKit] 40952a: hotels.com: clicking on "Shop Travel" causes the d...

Antoine Quint noreply at github.com
Tue Feb 4 04:04:33 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 40952a420c5e3b6a980d8fd5ca4a0746876b703a
      https://github.com/WebKit/WebKit/commit/40952a420c5e3b6a980d8fd5ca4a0746876b703a
  Author: Antoine Quint <graouts at webkit.org>
  Date:   2025-02-04 (Tue, 04 Feb 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:
  -----------
  hotels.com: clicking on "Shop Travel" causes the drop down UI to flicker
https://bugs.webkit.org/show_bug.cgi?id=286995
rdar://126631968

Reviewed by Tim Horton and Tim Nguyen.

Hotels.com targets WebKit specifically with the following style rule that disables animations
for the element in question:

```
@supports (-webkit-hyphens:none) and (stroke-color:transparent)
.uitk-menu-mounted .uitk-menu-container.uitk-menu-container-autoposition.uitk-menu-container-has-intersection-root-el {
    animation: none;
    opacity: 1;
    transform: translate(var(--menu-grow-x),var(--menu-grow-y));
}
```

To address this, we add a site-specific quirk which will reset the `animation` property to its
computed values should that style not apply:

```
animation-delay: 0s, 0.06s;
animation-duration: 0.18s, 0.06s;
animation-fill-mode: none, forwards;
animation-name: menu-grow-left, menu-fade-in;
```

Applying this quirk relies on three criteria:

1. the top-level domain name must match "hotels.com"
2. the style being resolved must not have any animations defined
3. the element for which style is being resolved must match the specified CSS selector

This second provision should make it so that this quirk will automatically stop applying
should the site stop disabling animations for this UI element.

* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::needsHotelsAnimationQuirk const):
(WebCore::handleHotelsQuirks):
(WebCore::Quirks::determineRelevantQuirks):
* 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/289777@main



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


More information about the webkit-changes mailing list