Title: [242227] trunk/Source/WebCore
- Revision
- 242227
- Author
- za...@apple.com
- Date
- 2019-02-28 14:29:48 -0800 (Thu, 28 Feb 2019)
Log Message
[ContentChangeObserver] Make observed state reset explicit.
https://bugs.webkit.org/show_bug.cgi?id=195185
<rdar://problem/48488342>
Reviewed by Simon Fraser.
Use setObservedContentChange only for setting the observed change while observing.
* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::startObservingContentChanges):
(WebCore::ContentChangeObserver::resetObservedContentChange):
(WebCore::ContentChangeObserver::removeObservedDOMTimer):
* page/ios/ContentChangeObserver.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (242226 => 242227)
--- trunk/Source/WebCore/ChangeLog 2019-02-28 22:13:58 UTC (rev 242226)
+++ trunk/Source/WebCore/ChangeLog 2019-02-28 22:29:48 UTC (rev 242227)
@@ -1,3 +1,19 @@
+2019-02-28 Zalan Bujtas <za...@apple.com>
+
+ [ContentChangeObserver] Make observed state reset explicit.
+ https://bugs.webkit.org/show_bug.cgi?id=195185
+ <rdar://problem/48488342>
+
+ Reviewed by Simon Fraser.
+
+ Use setObservedContentChange only for setting the observed change while observing.
+
+ * page/ios/ContentChangeObserver.cpp:
+ (WebCore::ContentChangeObserver::startObservingContentChanges):
+ (WebCore::ContentChangeObserver::resetObservedContentChange):
+ (WebCore::ContentChangeObserver::removeObservedDOMTimer):
+ * page/ios/ContentChangeObserver.h:
+
2019-02-28 Commit Queue <commit-qu...@webkit.org>
Unreviewed, rolling out r242210.
Modified: trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp (242226 => 242227)
--- trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp 2019-02-28 22:13:58 UTC (rev 242226)
+++ trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp 2019-02-28 22:29:48 UTC (rev 242227)
@@ -150,7 +150,7 @@
void ContentChangeObserver::startObservingContentChanges()
{
startObservingDOMTimerScheduling();
- setObservedContentChange(WKContentNoChange);
+ resetObservedContentChange();
m_observingContentChanges = true;
}
@@ -221,6 +221,11 @@
m_DOMTimerList.clear();
}
+void ContentChangeObserver::resetObservedContentChange()
+{
+ WKSetObservedContentChange(WKContentNoChange);
+}
+
void ContentChangeObserver::setObservedContentChange(WKContentChange change)
{
if (observedContentChange() == WKContentVisibilityChange)
@@ -244,9 +249,9 @@
void ContentChangeObserver::removeObservedDOMTimer(const DOMTimer& timer)
{
m_DOMTimerList.remove(&timer);
- // Force reset the content change flag when the last observed content modifier is removed. We should not be in indeterminate state anymore.
+ // Force reset the content change flag when the last observed content modifier is removed. We should not be in an indeterminate state anymore.
if (!countOfObservedDOMTimers() && observedContentChange() == WKContentIndeterminateChange)
- setObservedContentChange(WKContentNoChange);
+ resetObservedContentChange();
}
static Visibility elementImplicitVisibility(const Element& element)
Modified: trunk/Source/WebCore/page/ios/ContentChangeObserver.h (242226 => 242227)
--- trunk/Source/WebCore/page/ios/ContentChangeObserver.h 2019-02-28 22:13:58 UTC (rev 242226)
+++ trunk/Source/WebCore/page/ios/ContentChangeObserver.h 2019-02-28 22:29:48 UTC (rev 242227)
@@ -87,6 +87,7 @@
bool isObservingStyleRecalcScheduling();
void setObservedContentChange(WKContentChange);
+ void resetObservedContentChange();
unsigned countOfObservedDOMTimers();
void clearObservedDOMTimers();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes