Changeset 242689 in webkit
- Timestamp:
- Mar 10, 2019 1:08:54 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r242688 r242689 1 2019-03-10 Zalan Bujtas <zalan@apple.com> 2 3 [ContentChangeObserver] Fix failing test cases 4 https://bugs.webkit.org/show_bug.cgi?id=195524 5 <rdar://problem/48745101> 6 7 Reviewed by Simon Fraser. 8 9 They've been failing ever since the 32ms fixed time window was introduced. 10 11 * fast/events/touch/ios/content-observation/click-instead-of-hover-simple.html: 12 * fast/events/touch/ios/content-observation/stuck-with-hover-state.html: 13 1 14 2019-03-10 Simon Fraser <simon.fraser@apple.com> 2 15 -
trunk/LayoutTests/fast/events/touch/ios/content-observation/click-instead-of-hover-simple.html
r242621 r242689 26 26 await tapAtPoint(x, y); 27 27 28 testRunner.notifyDone();28 setTimeout("testRunner.notifyDone()", 50); 29 29 } 30 30 </script> -
trunk/LayoutTests/fast/events/touch/ios/content-observation/stuck-with-hover-state.html
r242621 r242689 26 26 await tapAtPoint(x, y); 27 27 28 testRunner.notifyDone();28 setTimeout("testRunner.notifyDone()", 50); 29 29 } 30 30 </script> -
trunk/LayoutTests/fast/events/touch/ios/content-observation/visibility-change-happens-at-the-second-timer.html
r242621 r242689 51 51 becomesVisible.style.visibility = "visible"; 52 52 document.body.offsetHeight; 53 if (window.testRunner) 54 setTimeout(testRunner.notifyDone(), 0); 53 setTimeout("testRunner.notifyDone()", 0); 55 54 }, 20); 56 55 }, false); -
trunk/LayoutTests/fast/events/touch/ios/content-observation/visibility-change-happens-on-timer-hops.html
r242628 r242689 51 51 becomesVisible.style.visibility = "visible"; 52 52 document.body.offsetHeight; 53 if (window.testRunner) 54 setTimeout(testRunner.notifyDone(), 0); 53 setTimeout("testRunner.notifyDone()", 0); 55 54 }, 10); 56 55 }, 0); -
trunk/Source/WebCore/ChangeLog
r242687 r242689 1 2019-03-10 Zalan Bujtas <zalan@apple.com> 2 3 [ContentChangeObserver] Fix failing test cases 4 https://bugs.webkit.org/show_bug.cgi?id=195524 5 <rdar://problem/48745101> 6 7 Reviewed by Simon Fraser. 8 9 1. Do not start DOM timer install observation when we already detected change at touchstart. 10 2. hasPendingActivity() should only care about ContentChangeObserver flags. 11 3. Do not try to notify the client when we are in the mouseMoved dispatch call (currently it could happen 12 when a timer gets intalled and removed right away). 13 14 * page/ios/ContentChangeObserver.cpp: 15 (WebCore::ContentChangeObserver::adjustObservedState): 16 (WebCore::ContentChangeObserver::isNotifyContentChangeAllowed const): Deleted. 17 * page/ios/ContentChangeObserver.h: 18 (WebCore::ContentChangeObserver::hasPendingActivity const): 19 (WebCore::ContentChangeObserver::isObservationTimeWindowActive const): 20 1 21 2019-03-10 Simon Fraser <simon.fraser@apple.com> 2 22 -
trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp
r242679 r242689 226 226 } 227 227 228 #if !ASSERT_DISABLED229 bool ContentChangeObserver::isNotifyContentChangeAllowed() const230 {231 return m_document.settings().contentChangeObserverEnabled() && !m_mouseMovedEventIsBeingDispatched;232 }233 #endif234 235 228 void ContentChangeObserver::adjustObservedState(Event event) 236 229 { … … 240 233 setHasNoChangeState(); 241 234 242 if (!hasDeterminateState()) { 243 LOG(ContentObservation, "notifyContentChangeIfNeeded: not in a determined state yet."); 235 // Do not notify the client unless we couldn't make the decision synchronously. 236 if (m_mouseMovedEventIsBeingDispatched) { 237 LOG(ContentObservation, "adjustStateAndNotifyContentChangeIfNeeded: in mouseMoved call. No need to notify the client."); 244 238 return; 245 239 } 246 LOG_WITH_STREAM(ContentObservation, stream << "notifyContentChangeIfNeeded: sending observedContentChange ->" << observedContentChange()); 247 ASSERT(isNotifyContentChangeAllowed()); 240 if (!hasDeterminateState()) { 241 LOG(ContentObservation, "adjustStateAndNotifyContentChangeIfNeeded: not in a determined state yet."); 242 return; 243 } 244 LOG_WITH_STREAM(ContentObservation, stream << "adjustStateAndNotifyContentChangeIfNeeded: sending observedContentChange ->" << observedContentChange()); 248 245 ASSERT(m_document.page()); 249 246 ASSERT(m_document.frame()); … … 266 263 setHasNoChangeState(); 267 264 clearObservedDOMTimers(); 268 } 265 setShouldObserveDOMTimerScheduling(true); 266 } else 267 setShouldObserveDOMTimerScheduling(!hasVisibleChangeState()); 269 268 setIsBetweenTouchEndAndMouseMoved(false); 270 setShouldObserveDOMTimerScheduling(true);271 269 break; 272 270 case Event::EndedMouseMovedEventDispatching: -
trunk/Source/WebCore/page/ios/ContentChangeObserver.h
r242675 r242689 140 140 bool isBetweenTouchEndAndMouseMoved() const { return m_isBetweenTouchEndAndMouseMoved; } 141 141 142 bool hasPendingActivity() const { return hasObservedDOMTimer() || m_ document.hasPendingStyleRecalc()|| isObservationTimeWindowActive(); }142 bool hasPendingActivity() const { return hasObservedDOMTimer() || m_isWaitingForStyleRecalc || isObservationTimeWindowActive(); } 143 143 bool isObservationTimeWindowActive() const { return m_contentObservationTimer.isActive(); } 144 #if !ASSERT_DISABLED145 bool isNotifyContentChangeAllowed() const;146 #endif147 144 148 145 void completeDurationBasedContentObservation();
Note: See TracChangeset
for help on using the changeset viewer.