⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243310 in webkit


Ignore:
Timestamp:
Mar 21, 2019, 12:01:47 PM (7 years ago)
Author:
Alan Bujtas
Message:

[ContentChangeObserver] Start tracking implicit transitions at mousemove
https://bugs.webkit.org/show_bug.cgi?id=196054
<rdar://problem/49093840>

Reviewed by Simon Fraser.

Source/WebCore:

This patch fixes the hover menu issue on seriouseats.com. After tapping on the menu items, the submenus show up now.

  1. Start observing at mousemove
  2. Check if the style change is synchronous or not and start observing it accordingly.

Tests: fast/events/touch/ios/content-observation/0ms-delay-0ms-transition-on-mousemove.html

fast/events/touch/ios/content-observation/100ms-delay-10ms-transition-on-mousemove.html
fast/events/touch/ios/content-observation/10ms-delay-0ms-transition-on-mousemove.html
fast/events/touch/ios/content-observation/10ms-delay-0ms-transition-on-touch-start.html

  • page/ios/ContentChangeObserver.cpp:

(WebCore::ContentChangeObserver::adjustObservedState):

LayoutTests:

  • fast/events/touch/ios/content-observation/0ms-delay-0ms-transition-on-mousemove-expected.txt: Added.
  • fast/events/touch/ios/content-observation/0ms-delay-0ms-transition-on-mousemove.html: Added.
  • fast/events/touch/ios/content-observation/100ms-delay-10ms-transition-on-mousemove-expected.txt: Added.
  • fast/events/touch/ios/content-observation/100ms-delay-10ms-transition-on-mousemove.html: Added.
  • fast/events/touch/ios/content-observation/10ms-delay-0ms-transition-on-mousemove-expected.txt: Added.
  • fast/events/touch/ios/content-observation/10ms-delay-0ms-transition-on-mousemove.html: Added.
  • fast/events/touch/ios/content-observation/10ms-delay-0ms-transition-on-touch-start-expected.txt: Added.
  • fast/events/touch/ios/content-observation/10ms-delay-0ms-transition-on-touch-start.html: Added.
Location:
trunk
Files:
8 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r243309 r243310  
     12019-03-21  Zalan Bujtas  <zalan@apple.com>
     2
     3        [ContentChangeObserver] Start tracking implicit transitions at mousemove
     4        https://bugs.webkit.org/show_bug.cgi?id=196054
     5        <rdar://problem/49093840>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * fast/events/touch/ios/content-observation/0ms-delay-0ms-transition-on-mousemove-expected.txt: Added.
     10        * fast/events/touch/ios/content-observation/0ms-delay-0ms-transition-on-mousemove.html: Added.
     11        * fast/events/touch/ios/content-observation/100ms-delay-10ms-transition-on-mousemove-expected.txt: Added.
     12        * fast/events/touch/ios/content-observation/100ms-delay-10ms-transition-on-mousemove.html: Added.
     13        * fast/events/touch/ios/content-observation/10ms-delay-0ms-transition-on-mousemove-expected.txt: Added.
     14        * fast/events/touch/ios/content-observation/10ms-delay-0ms-transition-on-mousemove.html: Added.
     15        * fast/events/touch/ios/content-observation/10ms-delay-0ms-transition-on-touch-start-expected.txt: Added.
     16        * fast/events/touch/ios/content-observation/10ms-delay-0ms-transition-on-touch-start.html: Added.
     17
    1182019-03-21  Simon Fraser  <simon.fraser@apple.com>
    219
  • trunk/Source/WebCore/ChangeLog

    r243309 r243310  
     12019-03-21  Zalan Bujtas  <zalan@apple.com>
     2
     3        [ContentChangeObserver] Start tracking implicit transitions at mousemove
     4        https://bugs.webkit.org/show_bug.cgi?id=196054
     5        <rdar://problem/49093840>
     6
     7        Reviewed by Simon Fraser.
     8
     9        This patch fixes the hover menu issue on seriouseats.com. After tapping on the menu items, the submenus show up now.
     10
     11        1. Start observing at mousemove
     12        2. Check if the style change is synchronous or not and start observing it accordingly.
     13
     14        Tests: fast/events/touch/ios/content-observation/0ms-delay-0ms-transition-on-mousemove.html
     15               fast/events/touch/ios/content-observation/100ms-delay-10ms-transition-on-mousemove.html
     16               fast/events/touch/ios/content-observation/10ms-delay-0ms-transition-on-mousemove.html
     17               fast/events/touch/ios/content-observation/10ms-delay-0ms-transition-on-touch-start.html
     18
     19        * page/ios/ContentChangeObserver.cpp:
     20        (WebCore::ContentChangeObserver::adjustObservedState):
     21
    1222019-03-21  Simon Fraser  <simon.fraser@apple.com>
    223
  • trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp

    r243307 r243310  
    385385    case Event::StartedMouseMovedEventDispatching:
    386386        ASSERT(!m_document.hasPendingStyleRecalc());
    387         if (!isBetweenTouchEndAndMouseMoved()) {
    388             setHasNoChangeState();
    389             clearObservedDOMTimers();
    390             setShouldObserveDOMTimerScheduling(true);
    391         } else
    392             setShouldObserveDOMTimerScheduling(!hasVisibleChangeState());
     387        if (!isBetweenTouchEndAndMouseMoved())
     388            reset();
    393389        setIsBetweenTouchEndAndMouseMoved(false);
     390        setShouldObserveDOMTimerScheduling(!hasVisibleChangeState());
     391        setShouldObserveTransitions(!hasVisibleChangeState());
    394392        break;
    395393    case Event::EndedMouseMovedEventDispatching:
    396394        setShouldObserveDOMTimerScheduling(false);
     395        setShouldObserveTransitions(false);
    397396        break;
    398397    case Event::StartedStyleRecalc:
     
    409408        break;
    410409    case Event::EndedDOMTimerExecution:
    411     case Event::EndedTransition:
    412410        setShouldObserveNextStyleRecalc(m_document.hasPendingStyleRecalc());
    413411        FALLTHROUGH;
     
    417415        if (!isObservationTimeWindowActive())
    418416            adjustStateAndNotifyContentChangeIfNeeded();
     417        break;
     418    case Event::EndedTransition:
     419        // onAnimationEnd can be called while in the middle of resolving the document (synchronously) or
     420        // asynchronously right before the style update is issued.
     421        if (m_document.inStyleRecalc()) {
     422            // We need to start observing this style change synchronously.
     423            m_isInObservedStyleRecalc = true;
     424        } else
     425            setShouldObserveNextStyleRecalc(true);
    419426        break;
    420427    case Event::EndedFixedObservationTimeWindow:
Note: See TracChangeset for help on using the changeset viewer.