Title: [242212] trunk/Source/WebCore
- Revision
- 242212
- Author
- za...@apple.com
- Date
- 2019-02-28 11:58:11 -0800 (Thu, 28 Feb 2019)
Log Message
Unreviewed, rolling out r242210.
https://bugs.webkit.org/show_bug.cgi?id=195179
it broke hover menus on losaltosonline.com (Requested by zalan
on #webkit).
Reverted changeset:
"[ContentChangeObserver] Move timer removal code from
DOMWindow::clearTimeout to DOMTimer::removeById"
https://bugs.webkit.org/show_bug.cgi?id=195143
https://trac.webkit.org/changeset/242210
Patch by Commit Queue <commit-qu...@webkit.org> on 2019-02-28
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (242211 => 242212)
--- trunk/Source/WebCore/ChangeLog 2019-02-28 19:25:38 UTC (rev 242211)
+++ trunk/Source/WebCore/ChangeLog 2019-02-28 19:58:11 UTC (rev 242212)
@@ -1,3 +1,18 @@
+2019-02-28 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, rolling out r242210.
+ https://bugs.webkit.org/show_bug.cgi?id=195179
+
+ it broke hover menus on losaltosonline.com (Requested by zalan
+ on #webkit).
+
+ Reverted changeset:
+
+ "[ContentChangeObserver] Move timer removal code from
+ DOMWindow::clearTimeout to DOMTimer::removeById"
+ https://bugs.webkit.org/show_bug.cgi?id=195143
+ https://trac.webkit.org/changeset/242210
+
2019-02-28 Zalan Bujtas <za...@apple.com>
[ContentChangeObserver] Move timer removal code from DOMWindow::clearTimeout to DOMTimer::removeById
Modified: trunk/Source/WebCore/page/DOMTimer.cpp (242211 => 242212)
--- trunk/Source/WebCore/page/DOMTimer.cpp 2019-02-28 19:25:38 UTC (rev 242211)
+++ trunk/Source/WebCore/page/DOMTimer.cpp 2019-02-28 19:58:11 UTC (rev 242212)
@@ -236,14 +236,6 @@
if (timeoutId <= 0)
return;
-#if PLATFORM(IOS_FAMILY)
- if (is<Document>(context) && downcast<Document>(context).page()) {
- auto& document = downcast<Document>(context);
- if (auto* timer = document.findTimeout(timeoutId))
- document.page()->contentChangeObserver().didRemoveDOMTimer(*timer);
- }
-#endif
-
if (NestedTimersMap* nestedTimers = NestedTimersMap::instanceForContext(context))
nestedTimers->remove(timeoutId);
Modified: trunk/Source/WebCore/page/DOMWindow.cpp (242211 => 242212)
--- trunk/Source/WebCore/page/DOMWindow.cpp 2019-02-28 19:25:38 UTC (rev 242211)
+++ trunk/Source/WebCore/page/DOMWindow.cpp 2019-02-28 19:58:11 UTC (rev 242212)
@@ -140,6 +140,10 @@
#include "PointerLockController.h"
#endif
+#if PLATFORM(IOS_FAMILY)
+#include "ContentChangeObserver.h"
+#endif
+
namespace WebCore {
using namespace Inspector;
@@ -1679,6 +1683,18 @@
void DOMWindow::clearTimeout(int timeoutId)
{
+#if PLATFORM(IOS_FAMILY)
+ auto handleObservedTimerCancelIfNeeded = [&] {
+ if (!frame() || !frame()->document() || !frame()->document()->page())
+ return;
+ if (timeoutId <= 0)
+ return;
+ auto& document = *frame()->document();
+ if (auto* timer = document.findTimeout(timeoutId))
+ document.page()->contentChangeObserver().removeDOMTimer(*timer);
+ };
+ handleObservedTimerCancelIfNeeded();
+#endif
ScriptExecutionContext* context = scriptExecutionContext();
if (!context)
return;
Modified: trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp (242211 => 242212)
--- trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp 2019-02-28 19:25:38 UTC (rev 242211)
+++ trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp 2019-02-28 19:58:11 UTC (rev 242212)
@@ -117,7 +117,7 @@
m_page.chrome().client().observedContentChange(m_page.mainFrame());
}
-void ContentChangeObserver::didRemoveDOMTimer(const DOMTimer& timer)
+void ContentChangeObserver::removeDOMTimer(const DOMTimer& timer)
{
if (!containsObservedDOMTimer(timer))
return;
Modified: trunk/Source/WebCore/page/ios/ContentChangeObserver.h (242211 => 242212)
--- trunk/Source/WebCore/page/ios/ContentChangeObserver.h 2019-02-28 19:25:38 UTC (rev 242211)
+++ trunk/Source/WebCore/page/ios/ContentChangeObserver.h 2019-02-28 19:58:11 UTC (rev 242212)
@@ -39,7 +39,7 @@
ContentChangeObserver(Page&);
void didInstallDOMTimer(const DOMTimer&, Seconds timeout, bool singleShot);
- void didRemoveDOMTimer(const DOMTimer&);
+ void removeDOMTimer(const DOMTimer&);
void startObservingDOMTimerExecute(const DOMTimer&);
void stopObservingDOMTimerExecute(const DOMTimer&);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes