Title: [238699] trunk/Source/WebCore
- Revision
- 238699
- Author
- za...@apple.com
- Date
- 2018-11-29 15:08:21 -0800 (Thu, 29 Nov 2018)
Log Message
[ContentObservation] Make WKSetObservedContentChange logic more explicit.
https://bugs.webkit.org/show_bug.cgi?id=192183
Reviewed by Simon Fraser.
* platform/ios/wak/WKContentObservation.cpp:
(WKSetObservedContentChange):
(WebThreadRemoveObservedDOMTimer):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (238698 => 238699)
--- trunk/Source/WebCore/ChangeLog 2018-11-29 23:06:43 UTC (rev 238698)
+++ trunk/Source/WebCore/ChangeLog 2018-11-29 23:08:21 UTC (rev 238699)
@@ -1,3 +1,14 @@
+2018-11-29 Zalan Bujtas <za...@apple.com>
+
+ [ContentObservation] Make WKSetObservedContentChange logic more explicit.
+ https://bugs.webkit.org/show_bug.cgi?id=192183
+
+ Reviewed by Simon Fraser.
+
+ * platform/ios/wak/WKContentObservation.cpp:
+ (WKSetObservedContentChange):
+ (WebThreadRemoveObservedDOMTimer):
+
2018-11-29 Youenn Fablet <you...@apple.com>
CSS subresource loads should not be observable from resource timing if the stylesheet is opaque
Modified: trunk/Source/WebCore/platform/ios/wak/WKContentObservation.cpp (238698 => 238699)
--- trunk/Source/WebCore/platform/ios/wak/WKContentObservation.cpp 2018-11-29 23:06:43 UTC (rev 238698)
+++ trunk/Source/WebCore/platform/ios/wak/WKContentObservation.cpp 2018-11-29 23:08:21 UTC (rev 238699)
@@ -55,7 +55,6 @@
_WKObservingContentChanges = false;
}
-
void WKStartObservingDOMTimerScheduling(void)
{
_WKObservingDOMTimerScheduling = true;
@@ -77,13 +76,24 @@
return _WKContentChange;
}
-void WKSetObservedContentChange(WKContentChange aChange)
+void WKSetObservedContentChange(WKContentChange change)
{
- if (aChange > _WKContentChange && (_WKObservingDOMTimerScheduling || aChange != WKContentIndeterminateChange)) {
- _WKContentChange = aChange;
- if (_WKContentChange == WKContentVisibilityChange)
- WebThreadClearObservedDOMTimers();
+ // We've already have a definite answer.
+ if (_WKContentChange == WKContentVisibilityChange)
+ return;
+
+ if (change == WKContentVisibilityChange) {
+ _WKContentChange = change;
+ // Don't need to listen to DOM timers anymore.
+ WebThreadClearObservedDOMTimers();
+ return;
}
+
+ if (change == WKContentIndeterminateChange) {
+ _WKContentChange = change;
+ return;
+ }
+ ASSERT_NOT_REACHED();
}
using DOMTimerList = HashSet<void*>;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes