Changeset 243307 in webkit
- Timestamp:
- Mar 21, 2019, 11:49:52 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/events/touch/ios/content-observation/0ms-transition-on-touch-start-expected.txt (added)
-
LayoutTests/fast/events/touch/ios/content-observation/0ms-transition-on-touch-start.html (added)
-
LayoutTests/fast/events/touch/ios/content-observation/100ms-transition-on-touch-start-expected.txt (added)
-
LayoutTests/fast/events/touch/ios/content-observation/100ms-transition-on-touch-start.html (added)
-
LayoutTests/fast/events/touch/ios/content-observation/10ms-delay-transition-on-touch-start-expected.txt (added)
-
LayoutTests/fast/events/touch/ios/content-observation/10ms-delay-transition-on-touch-start.html (added)
-
LayoutTests/fast/events/touch/ios/content-observation/transition-on-touch-start-and-remove-expected.txt (added)
-
LayoutTests/fast/events/touch/ios/content-observation/transition-on-touch-start-and-remove.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/ios/ContentChangeObserver.cpp (modified) (8 diffs)
-
Source/WebCore/page/ios/ContentChangeObserver.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r243292 r243307 1 2019-03-21 Zalan Bujtas <zalan@apple.com> 2 3 [ContentChangeObserver] Start tracking implicit transitions at touchStart 4 https://bugs.webkit.org/show_bug.cgi?id=196051 5 <rdar://problem/49092952> 6 7 Reviewed by Simon Fraser. 8 9 * fast/events/touch/ios/content-observation/0ms-transition-on-touch-start-expected.txt: Added. 10 * fast/events/touch/ios/content-observation/0ms-transition-on-touch-start.html: Added. 11 * fast/events/touch/ios/content-observation/100ms-transition-on-touch-start-expected.txt: Added. 12 * fast/events/touch/ios/content-observation/100ms-transition-on-touch-start.html: Added. 13 * fast/events/touch/ios/content-observation/10ms-delay-transition-on-touch-start-expected.txt: Added. 14 * fast/events/touch/ios/content-observation/10ms-delay-transition-on-touch-start.html: Added. 15 * fast/events/touch/ios/content-observation/transition-on-touch-start-and-remove-expected.txt: Added. 16 * fast/events/touch/ios/content-observation/transition-on-touch-start-and-remove.html: Added. 17 1 18 2019-03-21 Shawn Roberts <sroberts@apple.com> 2 19 -
trunk/Source/WebCore/ChangeLog
r243305 r243307 1 2019-03-21 Zalan Bujtas <zalan@apple.com> 2 3 [ContentChangeObserver] Start tracking implicit transitions at touchStart 4 https://bugs.webkit.org/show_bug.cgi?id=196051 5 <rdar://problem/49092952> 6 7 Reviewed by Simon Fraser. 8 9 This patch enables transition tracking on touchStart. 10 11 1. Start observing for new transitions at touchStart 12 2. Stop observing at touchEnd 13 3. Check the next style recalc when the transition is finished (at onAnimationEnd we don't yet have the final computed style). 14 4. Remove the tracked transition when it is canceled. 15 16 Tests: fast/events/touch/ios/content-observation/0ms-transition-on-touch-start.html 17 fast/events/touch/ios/content-observation/100ms-transition-on-touch-start.html 18 fast/events/touch/ios/content-observation/10ms-delay-transition-on-touch-start.html 19 fast/events/touch/ios/content-observation/transition-on-touch-start-and-remove.html 20 21 * page/ios/ContentChangeObserver.cpp: 22 (WebCore::ContentChangeObserver::didAddTransition): 23 (WebCore::ContentChangeObserver::didFinishTransition): 24 (WebCore::ContentChangeObserver::didRemoveTransition): 25 (WebCore::ContentChangeObserver::adjustObservedState): 26 * page/ios/ContentChangeObserver.h: 27 (WebCore::ContentChangeObserver::setShouldObserveTransitions): 28 (WebCore::ContentChangeObserver::clearObservedTransitions): 29 (WebCore::ContentChangeObserver::hasObservedTransition const): 30 (WebCore::ContentChangeObserver::hasPendingActivity const): 31 1 32 2019-03-21 Zalan Bujtas <zalan@apple.com> 2 33 -
trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp
r243305 r243307 142 142 143 143 m_elementsWithTransition.add(&element); 144 // FIXME: report state change.144 adjustObservedState(Event::AddedTransition); 145 145 } 146 146 … … 152 152 return; 153 153 LOG_WITH_STREAM(ContentObservation, stream << "didFinishTransition: transition finished (" << &element << ")."); 154 // FIXME: report state change. 154 155 adjustObservedState(Event::EndedTransition); 155 156 } 156 157 … … 162 163 return; 163 164 LOG_WITH_STREAM(ContentObservation, stream << "didRemoveTransition: transition got interrupted (" << &element << ")."); 164 // FIXME: report state change. 165 166 adjustObservedState(Event::CanceledTransition); 165 167 } 166 168 … … 335 337 setHasNoChangeState(); 336 338 clearObservedDOMTimers(); 339 clearObservedTransitions(); 337 340 setIsBetweenTouchEndAndMouseMoved(false); 338 341 ASSERT(!m_isObservingDOMTimerScheduling); … … 350 353 if (m_mouseMovedEventIsBeingDispatched) { 351 354 LOG(ContentObservation, "adjustStateAndNotifyContentChangeIfNeeded: in mouseMoved call. No need to notify the client."); 355 return; 356 } 357 if (isBetweenTouchEndAndMouseMoved()) { 358 LOG(ContentObservation, "adjustStateAndNotifyContentChangeIfNeeded: Not reached mouseMoved yet. No need to notify the client."); 352 359 return; 353 360 } … … 366 373 reset(); 367 374 setShouldObserveDOMTimerScheduling(true); 375 setShouldObserveTransitions(true); 368 376 break; 369 377 case Event::EndedTouchStartEventDispatching: 370 378 setShouldObserveDOMTimerScheduling(false); 379 setShouldObserveTransitions(false); 371 380 setIsBetweenTouchEndAndMouseMoved(true); 372 381 break; … … 395 404 case Event::InstalledDOMTimer: 396 405 case Event::StartedFixedObservationTimeWindow: 406 case Event::AddedTransition: 397 407 ASSERT(!hasVisibleChangeState()); 398 408 setHasIndeterminateState(); 399 409 break; 400 410 case Event::EndedDOMTimerExecution: 411 case Event::EndedTransition: 401 412 setShouldObserveNextStyleRecalc(m_document.hasPendingStyleRecalc()); 402 413 FALLTHROUGH; 403 414 case Event::EndedStyleRecalc: 404 415 case Event::RemovedDOMTimer: 416 case Event::CanceledTransition: 405 417 if (!isObservationTimeWindowActive()) 406 418 adjustStateAndNotifyContentChangeIfNeeded(); … … 414 426 setShouldObserveNextStyleRecalc(false); 415 427 clearObservedDOMTimers(); 428 clearObservedTransitions(); 416 429 break; 417 430 } -
trunk/Source/WebCore/page/ios/ContentChangeObserver.h
r243305 r243307 121 121 void setShouldObserveDOMTimerScheduling(bool observe) { m_isObservingDOMTimerScheduling = observe; } 122 122 bool isObservingDOMTimerScheduling() const { return m_isObservingDOMTimerScheduling; } 123 void setShouldObserveTransitions(bool observe) { m_isObservingTransitions = observe; } 123 124 bool isObservingTransitions() const { return m_isObservingTransitions; } 124 125 bool isObservedPropertyForTransition(CSSPropertyID propertyId) const { return propertyId == CSSPropertyLeft; } … … 128 129 void unregisterDOMTimer(const DOMTimer& timer) { m_DOMTimerList.remove(&timer); } 129 130 void clearObservedDOMTimers() { m_DOMTimerList.clear(); } 131 void clearObservedTransitions() { m_elementsWithTransition.clear(); } 130 132 bool containsObservedDOMTimer(const DOMTimer& timer) const { return m_DOMTimerList.contains(&timer); } 131 133 … … 145 147 bool hasVisibleChangeState() const { return observedContentChange() == WKContentVisibilityChange; } 146 148 bool hasObservedDOMTimer() const { return !m_DOMTimerList.isEmpty(); } 149 bool hasObservedTransition() const { return !m_elementsWithTransition.isEmpty(); } 147 150 bool hasDeterminateState() const; 148 151 … … 150 153 bool isBetweenTouchEndAndMouseMoved() const { return m_isBetweenTouchEndAndMouseMoved; } 151 154 152 bool hasPendingActivity() const { return hasObservedDOMTimer() || m_isWaitingForStyleRecalc || isObservationTimeWindowActive(); }155 bool hasPendingActivity() const { return hasObservedDOMTimer() || hasObservedTransition() || m_isWaitingForStyleRecalc || isObservationTimeWindowActive(); } 153 156 bool isObservationTimeWindowActive() const { return m_contentObservationTimer.isActive(); } 154 157 … … 167 170 StartedStyleRecalc, 168 171 EndedStyleRecalc, 172 AddedTransition, 173 EndedTransition, 174 CanceledTransition, 169 175 StartedFixedObservationTimeWindow, 170 176 EndedFixedObservationTimeWindow,
Note:
See TracChangeset
for help on using the changeset viewer.