Changeset 248641 in webkit
- Timestamp:
- Aug 13, 2019 4:03:44 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r248640 r248641 1 2019-08-13 Zalan Bujtas <zalan@apple.com> 2 3 [ContentChangeObserver] adjustStateAndNotifyContentChangeIfNeeded should check isObservationTimeWindowActive() 4 https://bugs.webkit.org/show_bug.cgi?id=200687 5 <rdar://problem/54271221> 6 7 Reviewed by Simon Fraser. 8 9 Move the check to adjustStateAndNotifyContentChangeIfNeeded. 10 11 * page/ios/ContentChangeObserver.cpp: 12 (WebCore::ContentChangeObserver::adjustObservedState): 13 1 14 2019-08-13 John Wilander <wilander@apple.com> 2 15 -
trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp
r248635 r248641 495 495 }; 496 496 497 auto adjustStateAndNotifyContentChangeIfNeeded = [&] {498 // Demote to "no change" whenthere's no pending activity anymore.497 auto notifyClientIfNeeded = [&] { 498 // First demote to "no change" if there's no pending activity anymore. 499 499 if (observedContentChange() == WKContentIndeterminateChange && !hasPendingActivity()) 500 500 setHasNoChangeState(); 501 501 502 // Do not notify the client unless we couldn't make the decision synchronously. 502 if (isBetweenTouchEndAndMouseMoved()) { 503 LOG(ContentObservation, "adjustStateAndNotifyContentChangeIfNeeded: Not reached mouseMoved yet. No need to notify the client."); 504 return; 505 } 503 506 if (m_mouseMovedEventIsBeingDispatched) { 504 507 LOG(ContentObservation, "adjustStateAndNotifyContentChangeIfNeeded: in mouseMoved call. No need to notify the client."); 505 508 return; 506 509 } 507 if (is BetweenTouchEndAndMouseMoved()) {508 LOG(ContentObservation, "adjustStateAndNotifyContentChangeIfNeeded: Not reached mouseMoved yet. No need to notify the client.");510 if (isObservationTimeWindowActive()) { 511 LOG(ContentObservation, "adjustStateAndNotifyContentChangeIfNeeded: Inside the fixed window observation. No need to notify the client."); 509 512 return; 510 513 } … … 552 555 } 553 556 if (event == Event::EndedFixedObservationTimeWindow) { 554 adjustStateAndNotifyContentChangeIfNeeded();557 notifyClientIfNeeded(); 555 558 return; 556 559 } … … 564 567 } 565 568 if (event == Event::RemovedDOMTimer || event == Event::CanceledTransition) { 566 if (!isObservationTimeWindowActive()) 567 adjustStateAndNotifyContentChangeIfNeeded(); 569 notifyClientIfNeeded(); 568 570 return; 569 571 } … … 573 575 } 574 576 if (event == Event::EndedDOMTimerExecution) { 575 setShouldObserveNextStyleRecalc(m_document.hasPendingStyleRecalc()); 576 if (!isObservationTimeWindowActive()) 577 adjustStateAndNotifyContentChangeIfNeeded(); 577 if (m_document.hasPendingStyleRecalc()) { 578 setShouldObserveNextStyleRecalc(true); 579 return; 580 } 581 notifyClientIfNeeded(); 578 582 return; 579 583 } … … 584 588 // We need to start observing this style change synchronously. 585 589 m_isInObservedStyleRecalc = true; 586 } else 587 setShouldObserveNextStyleRecalc(true); 590 return; 591 } 592 setShouldObserveNextStyleRecalc(true); 588 593 return; 589 594 } 590 595 if (event == Event::CompletedTransition) { 591 if (m_document.inStyleRecalc()) 596 if (m_document.inStyleRecalc()) { 592 597 m_isInObservedStyleRecalc = true; 593 else if (!isObservationTimeWindowActive()) 594 adjustStateAndNotifyContentChangeIfNeeded(); 598 return; 599 } 600 notifyClientIfNeeded(); 595 601 return; 596 602 } … … 601 607 } 602 608 if (event == Event::EndedStyleRecalc) { 603 if (!isObservationTimeWindowActive()) 604 adjustStateAndNotifyContentChangeIfNeeded(); 609 notifyClientIfNeeded(); 605 610 return; 606 611 }
Note: See TracChangeset
for help on using the changeset viewer.