Changeset 242654 in webkit
- Timestamp:
- Mar 8, 2019, 1:11:41 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
page/ios/ContentChangeObserver.cpp (modified) (6 diffs)
-
page/ios/ContentChangeObserver.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r242651 r242654 1 2019-03-08 Zalan Bujtas <zalan@apple.com> 2 3 [ContentChangeObserver] Add StartedDOMTimerExecution and StartedStyleRecalc 4 https://bugs.webkit.org/show_bug.cgi?id=195463 5 <rdar://problem/48714762> 6 7 Reviewed by Simon Fraser. 8 9 This is in preparation for introducing m_isObservingContentChanges flag to track observing state across events (touchStart -> mouseMoved). 10 11 * page/ios/ContentChangeObserver.cpp: 12 (WebCore::ContentChangeObserver::domTimerExecuteDidStart): 13 (WebCore::ContentChangeObserver::styleRecalcDidStart): 14 (WebCore::ContentChangeObserver::styleRecalcDidFinish): 15 (WebCore::ContentChangeObserver::setShouldObserveNextStyleRecalc): 16 (WebCore::ContentChangeObserver::adjustObservedState): 17 * page/ios/ContentChangeObserver.h: 18 (WebCore::ContentChangeObserver::isObservingPendingStyleRecalc const): 19 (WebCore::ContentChangeObserver::isObservingStyleRecalc const): Deleted. 20 1 21 2019-03-08 Chris Fleizach <cfleizach@apple.com> 2 22 -
trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp
r242635 r242654 95 95 96 96 m_domTimerIsBeingExecuted = true; 97 adjustObservedState(Event::StartedDOMTimerExecution); 97 98 } 98 99 … … 111 112 void ContentChangeObserver::styleRecalcDidStart() 112 113 { 113 if (!is ObservingStyleRecalc())114 if (!isWaitingForStyleRecalc()) 114 115 return; 115 116 if (hasVisibleChangeState()) … … 118 119 119 120 m_styleRecalcIsBeingExecuted = true; 121 adjustObservedState(Event::StartedStyleRecalc); 120 122 } 121 123 122 124 void ContentChangeObserver::styleRecalcDidFinish() 123 125 { 124 if (!is ObservingStyleRecalc())126 if (!isWaitingForStyleRecalc()) 125 127 return; 126 128 LOG(ContentObservation, "stopObservingStyleRecalc: stop observing style recalc"); 127 129 128 130 m_styleRecalcIsBeingExecuted = false; 129 setShouldObserveNextStyleRecalc(false); 130 adjustObservedState(Event::StyleRecalcFinished); 131 adjustObservedState(Event::EndedStyleRecalc); 131 132 } 132 133 … … 210 211 if (shouldObserve) 211 212 LOG(ContentObservation, "Wait until next style recalc fires."); 212 m_is ObservingStyleRecalc = shouldObserve;213 m_isWaitingForStyleRecalc = shouldObserve; 213 214 } 214 215 … … 257 258 m_isMouseMovedPrecededByTouch = false; 258 259 break; 260 case Event::StartedDOMTimerExecution: 261 case Event::StartedStyleRecalc: 262 ASSERT(observedContentChange() == WKContentIndeterminateChange); 263 break; 259 264 case Event::EndedTouchStartEventDispatching: 260 265 case Event::EndedMouseMovedEventDispatching: … … 267 272 setHasIndeterminateState(); 268 273 break; 274 case Event::EndedStyleRecalc: 275 setShouldObserveNextStyleRecalc(false); 276 FALLTHROUGH; 269 277 case Event::RemovedDOMTimer: 270 case Event::StyleRecalcFinished:271 278 case Event::EndedDOMTimerExecution: 272 279 case Event::EndedFixedObservationTimeWindow: -
trunk/Source/WebCore/page/ios/ContentChangeObserver.h
r242635 r242654 118 118 void styleRecalcDidFinish(); 119 119 void setShouldObserveNextStyleRecalc(bool); 120 bool is ObservingStyleRecalc() const { return m_isObservingStyleRecalc; }120 bool isWaitingForStyleRecalc() const { return m_isWaitingForStyleRecalc; } 121 121 122 122 bool isObservingContentChanges() const { return m_mouseMovedEventIsBeingDispatched || m_touchEventIsBeingDispatched || m_domTimerIsBeingExecuted || m_styleRecalcIsBeingExecuted || m_contentObservationTimer.isActive(); } … … 146 146 InstalledDOMTimer, 147 147 RemovedDOMTimer, 148 StartedDOMTimerExecution, 148 149 EndedDOMTimerExecution, 149 St yleRecalcFinished,150 ContentVisibilityChanged,150 StartedStyleRecalc, 151 EndedStyleRecalc, 151 152 StartedFixedObservationTimeWindow, 152 EndedFixedObservationTimeWindow 153 EndedFixedObservationTimeWindow, 154 ContentVisibilityChanged 153 155 }; 154 156 void adjustObservedState(Event); … … 158 160 HashSet<const DOMTimer*> m_DOMTimerList; 159 161 bool m_touchEventIsBeingDispatched { false }; 160 bool m_is ObservingStyleRecalc { false };162 bool m_isWaitingForStyleRecalc { false }; 161 163 bool m_styleRecalcIsBeingExecuted { false }; 162 164 bool m_isObservingDOMTimerScheduling { false };
Note:
See TracChangeset
for help on using the changeset viewer.