Changeset 247167 in webkit


Ignore:
Timestamp:
Jul 5, 2019 12:12:43 PM (5 years ago)
Author:
Alan Bujtas
Message:

[ContentChangeObserver] REGRESSION (r247015): facebook photo/video upload button is unresponsive to user interaction.
https://bugs.webkit.org/show_bug.cgi?id=199502
<rdar://problem/52547473>

Reviewed by Simon Fraser.

Source/WebKit:

Apparently it's a common practice to put transparent elements over visible click targets (button like divs) and use the invisible
elements to catch the user input (e.g. Facebook's Photo/Video button).
This patch modifies the original "do not trigger click on invisible targets" heuristic to a more restrictive "do not trigger
click if the click target was previously hidden and became visible through touch start".
If this still breaks some use cases, we could turn it into YouTube quirk.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::handleSyntheticClick):

LayoutTests:

  • fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3-expected.txt: Added.
  • fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r247165 r247167  
     12019-07-05  Zalan Bujtas  <zalan@apple.com>
     2
     3        [ContentChangeObserver] REGRESSION (r247015): facebook photo/video upload button is unresponsive to user interaction.
     4        https://bugs.webkit.org/show_bug.cgi?id=199502
     5        <rdar://problem/52547473>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3-expected.txt: Added.
     10        * fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3.html: Added.
     11
    1122019-07-05  Youenn Fablet  <youenn@apple.com>
    213
  • trunk/Source/WebKit/ChangeLog

    r247162 r247167  
     12019-07-05  Zalan Bujtas  <zalan@apple.com>
     2
     3        [ContentChangeObserver] REGRESSION (r247015): facebook photo/video upload button is unresponsive to user interaction.
     4        https://bugs.webkit.org/show_bug.cgi?id=199502
     5        <rdar://problem/52547473>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Apparently it's a common practice to put transparent elements over visible click targets (button like divs) and use the invisible
     10        elements to catch the user input (e.g. Facebook's Photo/Video button).
     11        This patch modifies the original "do not trigger click on invisible targets" heuristic to a more restrictive "do not trigger
     12        click if the click target was previously hidden and became visible through touch start".
     13        If this still breaks some use cases, we could turn it into YouTube quirk.       
     14
     15        * WebProcess/WebPage/ios/WebPageIOS.mm:
     16        (WebKit::WebPage::handleSyntheticClick):
     17
    1182019-07-05  Ryan Haddad  <ryanhaddad@apple.com>
    219
  • trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r247158 r247167  
    670670    auto& respondingDocument = nodeRespondingToClick.document();
    671671    auto& contentChangeObserver = respondingDocument.contentChangeObserver();
    672     auto targetNodeisConsideredHidden = contentChangeObserver.hiddenTouchTarget() == &nodeRespondingToClick || ContentChangeObserver::isConsideredHidden(nodeRespondingToClick);
     672    auto targetNodeWentFromHiddenToVisible = contentChangeObserver.hiddenTouchTarget() == &nodeRespondingToClick && !ContentChangeObserver::isConsideredHidden(nodeRespondingToClick);
    673673    {
    674674        LOG_WITH_STREAM(ContentObservation, stream << "handleSyntheticClick: node(" << &nodeRespondingToClick << ") " << location);
     
    681681    }
    682682
    683     if (targetNodeisConsideredHidden) {
    684         LOG(ContentObservation, "handleSyntheticClick: target node is considered hidden -> hover.");
     683    if (targetNodeWentFromHiddenToVisible) {
     684        LOG(ContentObservation, "handleSyntheticClick: target node was hidden and now is visible -> hover.");
    685685        return;
    686686    }
Note: See TracChangeset for help on using the changeset viewer.