Changeset 248759 in webkit
- Timestamp:
- Aug 15, 2019 7:20:57 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r248756 r248759 1 2019-08-15 Zalan Bujtas <zalan@apple.com> 2 3 [ContentChangeObserver] Keep track of all the visibility candidates. 4 https://bugs.webkit.org/show_bug.cgi?id=200777 5 <rdar://problem/54356331> 6 7 Reviewed by Simon Fraser. 8 9 * fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden2-expected.txt: Added. 10 * fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden2.html: Added. 11 1 12 2019-08-15 Myles C. Maxfield <mmaxfield@apple.com> 2 13 -
trunk/Source/WTF/ChangeLog
r248755 r248759 1 2019-08-15 Zalan Bujtas <zalan@apple.com> 2 3 [ContentChangeObserver] Keep track of all the visibility candidates. 4 https://bugs.webkit.org/show_bug.cgi?id=200777 5 <rdar://problem/54356331> 6 7 Reviewed by Simon Fraser. 8 9 * wtf/WeakHashSet.h: 10 1 11 2019-08-15 Brent Fulgham <bfulgham@apple.com> 2 12 -
trunk/Source/WTF/wtf/WeakHashSet.h
r248546 r248759 113 113 } 114 114 115 void clear() { m_set.clear(); } 116 115 117 template <typename U> 116 118 bool contains(const U& value) const -
trunk/Source/WebCore/ChangeLog
r248756 r248759 1 2019-08-15 Zalan Bujtas <zalan@apple.com> 2 3 [ContentChangeObserver] Keep track of all the visibility candidates. 4 https://bugs.webkit.org/show_bug.cgi?id=200777 5 <rdar://problem/54356331> 6 7 Reviewed by Simon Fraser. 8 9 In order to find out whether a visible (and actionable) content change happened, we need to keep track of all the candidate elements. 10 11 Test: fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden2.html 12 13 * page/ios/ContentChangeObserver.cpp: 14 (WebCore::ContentChangeObserver::reset): 15 (WebCore::ContentChangeObserver::rendererWillBeDestroyed): 16 (WebCore::ContentChangeObserver::contentVisibilityDidChange): 17 (WebCore::ContentChangeObserver::shouldObserveVisibilityChangeForElement): 18 * page/ios/ContentChangeObserver.h: 19 1 20 2019-08-15 Myles C. Maxfield <mmaxfield@apple.com> 2 21 -
trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp
r248750 r248759 372 372 m_observedDomTimerIsBeingExecuted = false; 373 373 374 m_visibilityCandidate Element = { };374 m_visibilityCandidateList.clear(); 375 375 376 376 m_contentObservationTimer.stop(); … … 402 402 m_elementsWithDestroyedVisibleRenderer.add(&element); 403 403 // Candidate element is no longer visible. 404 if (m_visibilityCandidate Element == &element) {404 if (m_visibilityCandidateList.remove(element)) { 405 405 // FIXME: We should also check for other type of visiblity changes. 406 406 ASSERT(hasVisibleChangeState()); 407 m_visibilityCandidateElement = { };408 setHasIndeterminateState();407 if (m_visibilityCandidateList.computesEmpty()) 408 setHasIndeterminateState(); 409 409 } 410 410 } … … 413 413 { 414 414 LOG(ContentObservation, "contentVisibilityDidChange: visible content change did happen."); 415 // FIXME: This should evolve into a list of candidate elements. 416 m_visibilityCandidateElement = makeWeakPtr(element); 415 m_visibilityCandidateList.add(element); 417 416 adjustObservedState(Event::ContentVisibilityChanged); 418 417 } … … 624 623 bool ContentChangeObserver::shouldObserveVisibilityChangeForElement(const Element& element) 625 624 { 626 return isObservingContentChanges() && ! hasVisibleChangeState() && !visibleRendererWasDestroyed(element) && !element.document().quirks().shouldIgnoreContentChange(element);625 return isObservingContentChanges() && !visibleRendererWasDestroyed(element) && !element.document().quirks().shouldIgnoreContentChange(element); 627 626 } 628 627 -
trunk/Source/WebCore/page/ios/ContentChangeObserver.h
r248750 r248759 208 208 WKContentChange m_observedContentState { WKContentNoChange }; 209 209 WeakPtr<Element> m_hiddenTouchTargetElement; 210 Weak Ptr<Element> m_visibilityCandidateElement;210 WeakHashSet<Element> m_visibilityCandidateList; 211 211 bool m_touchEventIsBeingDispatched { false }; 212 212 bool m_isWaitingForStyleRecalc { false };
Note: See TracChangeset
for help on using the changeset viewer.