Changeset 248463 in webkit


Ignore:
Timestamp:
Aug 9, 2019 12:17:44 AM (5 years ago)
Author:
rniwa@webkit.org
Message:

REGRESSION (iOS 13): united.com web forms do not respond to taps
https://bugs.webkit.org/show_bug.cgi?id=200531

Reviewed by Antti Koivisto and Wenson Hsieh.

The bug is caused by the content change observer detecting “Site Feedback” link at the bottom of
the page (https://www.united.com/ual/en/US/account/enroll/default) constantly getting re-generated
in every frame via requestAnimationFrame when the page is opened with iPhone UA string.
Note that the content re-generation can be reproduced even in Chrome if iPhone UA string is used.

Ignore this constant content change in ContentChangeObserver as a site specific quirk.

In the future, we should make ContentChangeObserver observe the final location of each element
being observed so that we can ignore content that like this which is placed outside the viewport,
and/or far away from where the user tapped.

  • page/Quirks.cpp:

(WebCore::Quirks::shouldIgnoreContentChange const): Added.

  • page/Quirks.h:
  • page/ios/ContentChangeObserver.cpp:

(WebCore::ContentChangeObserver::shouldObserveVisibilityChangeForElement):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r248454 r248463  
     12019-08-09  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION (iOS 13): united.com web forms do not respond to taps
     4        https://bugs.webkit.org/show_bug.cgi?id=200531
     5
     6        Reviewed by Antti Koivisto and Wenson Hsieh.
     7
     8        The bug is caused by the content change observer detecting “Site Feedback” link at the bottom of
     9        the page (https://www.united.com/ual/en/US/account/enroll/default) constantly getting re-generated
     10        in every frame via requestAnimationFrame when the page is opened with iPhone UA string.
     11        Note that the content re-generation can be reproduced even in Chrome if iPhone UA string is used.
     12
     13        Ignore this constant content change in ContentChangeObserver as a site specific quirk.
     14
     15        In the future, we should make ContentChangeObserver observe the final location of each element
     16        being observed so that we can ignore content that like this which is placed outside the viewport,
     17        and/or far away from where the user tapped.
     18
     19        * page/Quirks.cpp:
     20        (WebCore::Quirks::shouldIgnoreContentChange const): Added.
     21        * page/Quirks.h:
     22        * page/ios/ContentChangeObserver.cpp:
     23        (WebCore::ContentChangeObserver::shouldObserveVisibilityChangeForElement):
     24
    1252019-08-08  Devin Rousso  <drousso@apple.com>
    226
  • trunk/Source/WebCore/page/Quirks.cpp

    r248295 r248463  
    411411}
    412412
     413bool Quirks::shouldIgnoreContentChange(const Element& element) const
     414{
     415#if PLATFORM(IOS_FAMILY)
     416    if (!needsQuirks())
     417        return false;
     418
     419    auto* parentElement = element.parentElement();
     420    if (!parentElement || !parentElement->hasClass())
     421        return false;
     422
     423    DOMTokenList& classList = parentElement->classList();
     424    if (!classList.contains("feedback") || !classList.contains("feedback-mid"))
     425        return false;
     426
     427    if (!equalLettersIgnoringASCIICase(topPrivatelyControlledDomain(m_document->url().host().toString()), "united.com"))
     428        return false;
     429
     430    return true;
     431#else
     432    UNUSED_PARAM(element);
     433    return false;
     434#endif
     435}
     436
    413437// FIXME(<rdar://problem/50394969>): Remove after desmos.com adopts inputmode="none".
    414438bool Quirks::needsInputModeNoneImplicitly(const HTMLElement& element) const
  • trunk/Source/WebCore/page/Quirks.h

    r248018 r248463  
    3232
    3333class Document;
     34class Element;
    3435class EventTarget;
    3536class HTMLElement;
     
    5657#endif
    5758    bool shouldDisablePointerEventsQuirk() const;
     59    bool shouldIgnoreContentChange(const Element&) const;
    5860    bool needsInputModeNoneImplicitly(const HTMLElement&) const;
    5961    bool needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommand() const;
  • trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp

    r248080 r248463  
    3737#include "NodeRenderStyle.h"
    3838#include "Page.h"
     39#include "Quirks.h"
    3940#include "RenderDescendantIterator.h"
    4041#include "Settings.h"
     
    597598bool ContentChangeObserver::shouldObserveVisibilityChangeForElement(const Element& element)
    598599{
    599     return isObservingContentChanges() && !hasVisibleChangeState() && !visibleRendererWasDestroyed(element);
     600    return isObservingContentChanges() && !hasVisibleChangeState() && !visibleRendererWasDestroyed(element) && !element.document().quirks().shouldIgnoreContentChange(element);
    600601}
    601602
Note: See TracChangeset for help on using the changeset viewer.