Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5988703a14ecb92b02c407f7a319ac19a88f41c3
      
https://github.com/WebKit/WebKit/commit/5988703a14ecb92b02c407f7a319ac19a88f41c3
  Author: Jessica Cheung <[email protected]>
  Date:   2024-11-11 (Mon, 11 Nov 2024)

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

  Log Message:
  -----------
  [Quirk] maps.google.com: [iPad] unable to scroll on google maps print page
https://bugs.webkit.org/show_bug.cgi?id=282721
rdar://67358928

Reviewed by Wenson Hsieh.

Currently, we cannot scroll on maps.google.com via touch b/c there is a 
`touch-action: none`
on `<body>`. In their code, they recieve all the expected touch events but they 
do not
move the page to "scroll".

There is a `div .UJrD4b` which touch events are happening on.
There is another `div #print` which is the grandparent of `div .UJrD4b`.
`div #print` has `display: none` on all pages except the printing pages.
Based on the pointer events “Determining supported direct manipulation 
behavior”spec,
we travel up to the inclusive ancestor which is `<body>`
that has a `touch-action: none` style.

1. To quirk and make touches affect scrolling, we set `<body>`
to have `touch-action: auto` instead. To do so, we check if `.PUtLdf` is 
present on body.
While this seems to be a generated class name, the proper quirk for this would 
require
breaking CSS inheritance since `<body>` would now depend on the `display` 
styling of the
descendant `div #print`, resulting in a circular dependency.
2. Remove `#if ENABLE(TOUCH_EVENTS)` for `Quirks::isGoogleMaps()`.

* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::needsGoogleMapsScrollingQuirk const):
* Source/WebCore/page/Quirks.h:
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjustForSiteSpecificQuirks const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to