Title: [248761] trunk/Source/WebCore
Revision 248761
Author za...@apple.com
Date 2019-08-15 21:28:49 -0700 (Thu, 15 Aug 2019)
Log Message
[ContentChangeObserver] Rename contentVisibilityDidChange to elementDidBecomeVisible
https://bugs.webkit.org/show_bug.cgi?id=200780
Reviewed by Simon Fraser.
"elementDidBecomeVisible" name is more accurate and also we'll probably start tracking changes from visible to hidden soon.
* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::didFinishTransition):
(WebCore::ContentChangeObserver::visibilityChangedFromHiddenToVisible):
(WebCore::ContentChangeObserver::adjustObservedState):
(WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope):
(WebCore::ContentChangeObserver::contentVisibilityDidChange): Deleted.
* page/ios/ContentChangeObserver.h:
Modified Paths
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp
trunk/Source/WebCore/page/ios/ContentChangeObserver.h
Diff
Modified: trunk/Source/WebCore/ChangeLog (248760 => 248761)
--- trunk/Source/WebCore/ChangeLog 2019-08-16 03:03:32 UTC (rev 248760)
+++ trunk/Source/WebCore/ChangeLog 2019-08-16 04:28:49 UTC (rev 248761)
@@ -1,5 +1,23 @@
2019-08-15 Zalan Bujtas
+[ContentChangeObserver] Rename contentVisibilityDidChange to elementDidBecomeVisible
+https://bugs.webkit.org/show_bug.cgi?id=200780
+
+
+Reviewed by Simon Fraser.
+
+"elementDidBecomeVisible" name is more accurate and also we'll probably start tracking changes from visible to hidden soon.
+
+* page/ios/ContentChangeObserver.cpp:
+(WebCore::ContentChangeObserver::didFinishTransition):
+(WebCore::ContentChangeObserver::visibilityChangedFromHiddenToVisible):
+(WebCore::ContentChangeObserver::adjustObservedState):
+(WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope):
+(WebCore::ContentChangeObserver::contentVisibilityDidChange): Deleted.
+* page/ios/ContentChangeObserver.h:
+
+2019-08-15 Zalan Bujtas
+
[ContentChangeObserver] Keep track of all the visibility candidates.
https://bugs.webkit.org/show_bug.cgi?id=200777
Modified: trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp (248760 => 248761)
--- trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp 2019-08-16 03:03:32 UTC (rev 248760)
+++ trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp 2019-08-16 04:28:49 UTC (rev 248761)
@@ -253,7 +253,7 @@
return;
}
if (isConsideredClickable(*targetElement, ElementHadRenderer::Yes))
-weakThis->contentVisibilityDidChange(*targetElement);
+weakThis->elementDidBecomeVisible(*targetElement);
weakThis->adjustObservedState(Event::CompletedTransition);
});
}
@@ -409,11 +409,11 @@
}
}
-void ContentChangeObserver::contentVisibilityDidChange(const Element& element)
+void ContentChangeObserver::elementDidBecomeVisible(const Element& element)
{
-LOG(ContentObservation, "contentVisibilityDidChange: visible content change did happen.");
+LOG(ContentObservation, "elementDidBecomeVisible: visible content change did happen.");
m_visibilityCandidateList.add(element);
-adjustObservedState(Event::ContentVisibilityChanged);
+adjustObservedState(Event::ElementDidBecomeVisible);
}
void ContentChangeObserver::touchEventDidStart(PlatformEvent::Type eventType)
@@ -612,7 +612,7 @@
return;
}
// The page produced an visible change on an actionable content.
-if (event == Event::ContentVisibilityChanged) {
+if (event == Event::ElementDidBecomeVisible) {
setHasVisibleChangeState();
// Stop pending activities. We don't need to observe them anymore.
stopObservingPendingActivities();
@@ -641,7 +641,7 @@
};
if (changedFromHiddenToVisible() && isConsideredClickable(m_element, m_hadRenderer ? ElementHadRenderer::Yes : ElementHadRenderer::No))
-m_contentChangeObserver.contentVisibilityDidChange(m_element);
+m_contentChangeObserver.elementDidBecomeVisible(m_element);
}
#if ENABLE(TOUCH_EVENTS)
Modified: trunk/Source/WebCore/page/ios/ContentChangeObserver.h (248760 => 248761)
--- trunk/Source/WebCore/page/ios/ContentChangeObserver.h 2019-08-16 03:03:32 UTC (rev 248760)
+++ trunk/Source/WebCore/page/ios/ContentChangeObserver.h 2019-08-16 04:28:49 UTC (rev 248761)
@@ -128,7 +128,7 @@
void didRecognizeLongPress();
-void contentVisibilityDidChange(const Element&);
+void elementDidBecomeVisible(const Element&);
void setShouldObserveDOMTimerSchedulingAndTransitions(bool);
bool isObservingDOMTimerScheduling() const { return m_isObservingDOMTimerScheduling; }
@@ -195,7 +195,7 @@
CanceledTransition,
StartedFixedObservationTimeWindow,
EndedFixedObservationTimeWindow,
-ContentVisibilityChanged
+ElementDidBecomeVisible