Diff
Modified: trunk/Source/WebCore/ChangeLog (238690 => 238691)
--- trunk/Source/WebCore/ChangeLog 2018-11-29 21:22:02 UTC (rev 238690)
+++ trunk/Source/WebCore/ChangeLog 2018-11-29 21:25:29 UTC (rev 238691)
@@ -1,3 +1,26 @@
+2018-11-29 Zalan Bujtas <[email protected]>
+
+ [ContentObservation] Decouple content change and DOM timer scheduling observation
+ https://bugs.webkit.org/show_bug.cgi?id=192170
+
+ Reviewed by Simon Fraser.
+
+ This is in preparation for adding style recalc scheduling observation (the main goal here is to simplify the indeterminate change logic).
+
+ * page/DOMTimer.cpp:
+ (WebCore::DOMTimer::fired):
+ * page/ios/EventHandlerIOS.mm:
+ (WebCore::EventHandler::mouseMoved):
+ * platform/ios/wak/WKContentObservation.cpp:
+ (WKStartObservingContentChanges):
+ (WKStopObservingContentChanges):
+ (WKStartObservingDOMTimerSchedules):
+ (WKStopObservingDOMTimerSchedules):
+ (WKSetObservedContentChange):
+ (WebThreadAddObservedDOMTimer):
+ (WKBeginObservingContentChanges): Deleted.
+ * platform/ios/wak/WKContentObservation.h:
+
2018-11-29 Frederic Wang <[email protected]>
Make reconcileViewportConstrainedLayerPositions start from a specified scrolling node
Modified: trunk/Source/WebCore/page/DOMTimer.cpp (238690 => 238691)
--- trunk/Source/WebCore/page/DOMTimer.cpp 2018-11-29 21:22:02 UTC (rev 238690)
+++ trunk/Source/WebCore/page/DOMTimer.cpp 2018-11-29 21:25:29 UTC (rev 238691)
@@ -352,7 +352,7 @@
}
if (shouldBeginObservingChanges) {
- WKBeginObservingContentChanges(false);
+ WKStartObservingContentChanges();
WebThreadRemoveObservedDOMTimer(this);
}
#endif
Modified: trunk/Source/WebCore/page/ios/EventHandlerIOS.mm (238690 => 238691)
--- trunk/Source/WebCore/page/ios/EventHandlerIOS.mm 2018-11-29 21:22:02 UTC (rev 238690)
+++ trunk/Source/WebCore/page/ios/EventHandlerIOS.mm 2018-11-29 21:25:29 UTC (rev 238691)
@@ -493,12 +493,14 @@
m_frame.document()->updateStyleIfNeeded();
- WKBeginObservingContentChanges(true);
+ WKStartObservingContentChanges();
+ WKStartObservingDOMTimerScheduling();
CurrentEventScope scope(event);
event.wasHandled = mouseMoved(currentPlatformMouseEvent());
// FIXME: Why is this here?
m_frame.document()->updateStyleIfNeeded();
+ WKStopObservingDOMTimerScheduling();
WKStopObservingContentChanges();
END_BLOCK_OBJC_EXCEPTIONS;
Modified: trunk/Source/WebCore/platform/ios/wak/WKContentObservation.cpp (238690 => 238691)
--- trunk/Source/WebCore/platform/ios/wak/WKContentObservation.cpp 2018-11-29 21:22:02 UTC (rev 238690)
+++ trunk/Source/WebCore/platform/ios/wak/WKContentObservation.cpp 2018-11-29 21:25:29 UTC (rev 238691)
@@ -36,7 +36,7 @@
WKContentChange _WKContentChange = WKContentNoChange;
bool _WKObservingContentChanges = false;
-bool _WKObservingIndeterminateChanges = false;
+bool _WKObservingDOMTimerScheduling = false;
bool WKObservingContentChanges(void)
@@ -44,22 +44,29 @@
return _WKObservingContentChanges;
}
+void WKStartObservingContentChanges()
+{
+ _WKContentChange = WKContentNoChange;
+ _WKObservingContentChanges = true;
+}
+
void WKStopObservingContentChanges(void)
{
_WKObservingContentChanges = false;
- _WKObservingIndeterminateChanges = false;
}
-void WKBeginObservingContentChanges(bool allowsIntedeterminateChanges)
+
+void WKStartObservingDOMTimerScheduling(void)
{
- _WKContentChange = WKContentNoChange;
- _WKObservingContentChanges = true;
-
- _WKObservingIndeterminateChanges = allowsIntedeterminateChanges;
- if (_WKObservingIndeterminateChanges)
- WebThreadClearObservedDOMTimers();
+ _WKObservingDOMTimerScheduling = true;
+ WebThreadClearObservedDOMTimers();
}
+void WKStopObservingDOMTimerScheduling(void)
+{
+ _WKObservingDOMTimerScheduling = false;
+}
+
WKContentChange WKObservedContentChange(void)
{
return _WKContentChange;
@@ -67,7 +74,7 @@
void WKSetObservedContentChange(WKContentChange aChange)
{
- if (aChange > _WKContentChange && (_WKObservingIndeterminateChanges || aChange != WKContentIndeterminateChange)) {
+ if (aChange > _WKContentChange && (_WKObservingDOMTimerScheduling || aChange != WKContentIndeterminateChange)) {
_WKContentChange = aChange;
if (_WKContentChange == WKContentVisibilityChange)
WebThreadClearObservedDOMTimers();
@@ -99,7 +106,7 @@
void WebThreadAddObservedDOMTimer(void* timer)
{
- if (_WKContentChange != WKContentVisibilityChange && _WKObservingIndeterminateChanges)
+ if (_WKContentChange != WKContentVisibilityChange && _WKObservingDOMTimerScheduling)
WebThreadGetObservedDOMTimers().add(timer);
}
Modified: trunk/Source/WebCore/platform/ios/wak/WKContentObservation.h (238690 => 238691)
--- trunk/Source/WebCore/platform/ios/wak/WKContentObservation.h 2018-11-29 21:22:02 UTC (rev 238690)
+++ trunk/Source/WebCore/platform/ios/wak/WKContentObservation.h 2018-11-29 21:25:29 UTC (rev 238691)
@@ -39,9 +39,12 @@
WKContentIndeterminateChange = 1
} WKContentChange;
+WEBCORE_EXPORT void WKStartObservingContentChanges(void);
WEBCORE_EXPORT void WKStopObservingContentChanges(void);
-WEBCORE_EXPORT void WKBeginObservingContentChanges(bool allowsIntedeterminateChanges);
+WEBCORE_EXPORT void WKStartObservingDOMTimerScheduling(void);
+WEBCORE_EXPORT void WKStopObservingDOMTimerScheduling(void);
+
WEBCORE_EXPORT WKContentChange WKObservedContentChange(void);
WEBCORE_EXPORT int WebThreadCountOfObservedDOMTimers(void);
Modified: trunk/Source/WebKit/ChangeLog (238690 => 238691)
--- trunk/Source/WebKit/ChangeLog 2018-11-29 21:22:02 UTC (rev 238690)
+++ trunk/Source/WebKit/ChangeLog 2018-11-29 21:25:29 UTC (rev 238691)
@@ -1,3 +1,13 @@
+2018-11-29 Zalan Bujtas <[email protected]>
+
+ [ContentObservation] Decouple content change and DOM timer scheduling observation
+ https://bugs.webkit.org/show_bug.cgi?id=192170
+
+ Reviewed by Simon Fraser.
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::handleSyntheticClick):
+
2018-11-29 Eric Carlson <[email protected]>
[iOS] Tell AirPlay picker when a file has video
Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (238690 => 238691)
--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2018-11-29 21:22:02 UTC (rev 238690)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2018-11-29 21:25:29 UTC (rev 238691)
@@ -550,11 +550,13 @@
IntPoint roundedAdjustedPoint = roundedIntPoint(location);
Frame& mainframe = m_page->mainFrame();
- WKBeginObservingContentChanges(true);
+ WKStartObservingContentChanges();
+ WKStartObservingDOMTimerScheduling();
mainframe.eventHandler().mouseMoved(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, WallTime::now(), WebCore::ForceAtClick, WebCore::NoTap));
mainframe.document()->updateStyleIfNeeded();
+ WKStopObservingDOMTimerScheduling();
WKStopObservingContentChanges();
m_pendingSyntheticClickNode = nullptr;