Title: [242467] trunk
Revision
242467
Author
ryanhad...@apple.com
Date
2019-03-05 09:18:30 -0800 (Tue, 05 Mar 2019)

Log Message

Unreviewed, rolling out r242403.

Caused layout test crashes on iOS simulator.

Reverted changeset:

"[ContentChangeObserver] Introduce fixed duration content
observation"
https://bugs.webkit.org/show_bug.cgi?id=195295
https://trac.webkit.org/changeset/242403

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (242466 => 242467)


--- trunk/LayoutTests/ChangeLog	2019-03-05 16:18:43 UTC (rev 242466)
+++ trunk/LayoutTests/ChangeLog	2019-03-05 17:18:30 UTC (rev 242467)
@@ -1,3 +1,16 @@
+2019-03-05  Ryan Haddad  <ryanhad...@apple.com>
+
+        Unreviewed, rolling out r242403.
+
+        Caused layout test crashes on iOS simulator.
+
+        Reverted changeset:
+
+        "[ContentChangeObserver] Introduce fixed duration content
+        observation"
+        https://bugs.webkit.org/show_bug.cgi?id=195295
+        https://trac.webkit.org/changeset/242403
+
 2019-03-04  Diego Pino Garcia  <dp...@igalia.com>
 
         [GTK] Unreviewed test gardening

Deleted: trunk/LayoutTests/fast/events/touch/ios/visibility-change-happens-on-timer-hops-expected.txt (242466 => 242467)


--- trunk/LayoutTests/fast/events/touch/ios/visibility-change-happens-on-timer-hops-expected.txt	2019-03-05 16:18:43 UTC (rev 242466)
+++ trunk/LayoutTests/fast/events/touch/ios/visibility-change-happens-on-timer-hops-expected.txt	2019-03-05 17:18:30 UTC (rev 242467)
@@ -1,2 +0,0 @@
-PASS if 'clicked' text is not shown below.
-

Deleted: trunk/LayoutTests/fast/events/touch/ios/visibility-change-happens-on-timer-hops.html (242466 => 242467)


--- trunk/LayoutTests/fast/events/touch/ios/visibility-change-happens-on-timer-hops.html	2019-03-05 16:18:43 UTC (rev 242466)
+++ trunk/LayoutTests/fast/events/touch/ios/visibility-change-happens-on-timer-hops.html	2019-03-05 17:18:30 UTC (rev 242467)
@@ -1,66 +0,0 @@
-<html>
-<head>
-<title>This tests the case when nested timers trigger visible content change</title>
-<script src=""
-<style>
-#tapthis {
-    width: 400px;
-    height: 400px;
-    border: 1px solid green;
-}
-
-#becomesVisible {
-    visibility: hidden;
-    width: 100px;
-    height: 100px;
-    background-color: green;
-}
-</style>
-<script>
-async function test() {
-    if (!window.testRunner || !testRunner.runUIScript)
-        return;
-
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-
-    let rect = tapthis.getBoundingClientRect();
-    let x = rect.left + rect.width / 2;
-    let y = rect.top + rect.height / 2;
-
-    await tapAtPoint(x, y);
-}
-</script>
-</head>
-<body _onload_="test()">
-<div id=tapthis>PASS if 'clicked' text is not shown below.</div>
-<div id=becomesVisible></div>
-<pre id=result></pre>
-<script>
-tapthis.addEventListener("mouseover", function( event ) {
-    // 1. Install a short timer on hover
-    setTimeout(function() {
-        // 2. Trigger some non-visibility style change with forcing offsetHeight.
-        becomesVisible.style.marginLeft = "5px";
-        document.body.offsetHeight;
-
-        // 3. Install a nested timer with visibility change.
-        setTimeout(function() {
-            becomesVisible.style.visibility = "visible";
-            document.body.offsetHeight;
-            if (window.testRunner)
-                setTimeout(testRunner.notifyDone(), 0);
-        }, 10);
-    }, 0);
-}, false);
-
-becomesVisible.addEventListener("click", function( event ) {   
-    result.innerHTML = "clicked hidden";
-}, false);
-
-tapthis.addEventListener("click", function( event ) {   
-    result.innerHTML = "clicked";
-}, false);
-</script>
-</body>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (242466 => 242467)


--- trunk/Source/WebCore/ChangeLog	2019-03-05 16:18:43 UTC (rev 242466)
+++ trunk/Source/WebCore/ChangeLog	2019-03-05 17:18:30 UTC (rev 242467)
@@ -1,3 +1,16 @@
+2019-03-05  Ryan Haddad  <ryanhad...@apple.com>
+
+        Unreviewed, rolling out r242403.
+
+        Caused layout test crashes on iOS simulator.
+
+        Reverted changeset:
+
+        "[ContentChangeObserver] Introduce fixed duration content
+        observation"
+        https://bugs.webkit.org/show_bug.cgi?id=195295
+        https://trac.webkit.org/changeset/242403
+
 2019-03-05  Frederic Wang  <fw...@igalia.com>
 
         Web Inspector: Better categorize CPU usage per-thread / worker

Modified: trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp (242466 => 242467)


--- trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp	2019-03-05 16:18:43 UTC (rev 242466)
+++ trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp	2019-03-05 17:18:30 UTC (rev 242467)
@@ -38,26 +38,9 @@
 
 ContentChangeObserver::ContentChangeObserver(Document& document)
     : m_document(document)
-    , m_contentObservationTimer([this] { stopDurationBasedContentObservation(); })
 {
 }
 
-void ContentChangeObserver::startContentObservationForDuration(Seconds duration)
-{
-    if (hasVisibleChangeState())
-        return;
-    LOG_WITH_STREAM(ContentObservation, stream << "startContentObservationForDuration: start observing the content for " << duration.milliseconds() << "ms");
-    adjustObservedState(Event::StartedFixedObservationTimeWindow);
-    m_contentObservationTimer.startOneShot(duration);
-}
-
-void ContentChangeObserver::stopDurationBasedContentObservation()
-{
-    LOG_WITH_STREAM(ContentObservation, stream << "stopDurationBasedContentObservation: stop duration based content observing ");
-    adjustObservedState(Event::EndedFixedObservationTimeWindow);
-    notifyContentChangeIfNeeded();
-}
-
 void ContentChangeObserver::didInstallDOMTimer(const DOMTimer& timer, Seconds timeout, bool singleShot)
 {
     if (m_document.activeDOMObjectsAreSuspended())
@@ -196,7 +179,7 @@
 {
     if (hasVisibleChangeState())
         return true;
-    return observedContentChange() == WKContentNoChange && !hasPendingActivity();
+    return observedContentChange() == WKContentNoChange && !hasObservedDOMTimer() && !m_document.hasPendingStyleRecalc();
 }
 
 void ContentChangeObserver::adjustObservedState(Event event)
@@ -206,7 +189,6 @@
         setHasNoChangeState();
         break;
     case Event::InstalledDOMTimer:
-    case Event::StartedFixedObservationTimeWindow:
         // Expecting a timer fire. Promote to an indeterminate state.
         ASSERT(!hasVisibleChangeState());
         setHasIndeterminateState();
@@ -213,9 +195,8 @@
         break;
     case Event::RemovedDOMTimer:
     case Event::StyleRecalcFinished:
-    case Event::EndedFixedObservationTimeWindow:
         // Demote to "no change" when there's no pending activity anymore.
-        if (observedContentChange() == WKContentIndeterminateChange && !hasPendingActivity())
+        if (observedContentChange() == WKContentIndeterminateChange && !hasObservedDOMTimer() && !m_document.hasPendingStyleRecalc())
             setHasNoChangeState();
         break;
     case Event::ContentVisibilityChanged:

Modified: trunk/Source/WebCore/page/ios/ContentChangeObserver.h (242466 => 242467)


--- trunk/Source/WebCore/page/ios/ContentChangeObserver.h	2019-03-05 16:18:43 UTC (rev 242466)
+++ trunk/Source/WebCore/page/ios/ContentChangeObserver.h	2019-03-05 17:18:30 UTC (rev 242467)
@@ -27,7 +27,6 @@
 
 #if PLATFORM(IOS_FAMILY)
 
-#include "Timer.h"
 #include "WKContentObservation.h"
 
 namespace WebCore {
@@ -39,7 +38,6 @@
 public:
     ContentChangeObserver(Document&);
 
-    WEBCORE_EXPORT void startContentObservationForDuration(Seconds duration);
     WEBCORE_EXPORT WKContentChange observedContentChange() const;
 
     void didInstallDOMTimer(const DOMTimer&, Seconds timeout, bool singleShot);
@@ -104,7 +102,7 @@
     void setShouldObserveNextStyleRecalc(bool);
     bool isObservingStyleRecalc() const { return m_isObservingStyleRecalc; }
 
-    bool isObservingContentChanges() const { return m_domTimerisBeingExecuted || m_styleRecalcIsBeingExecuted || m_contentObservationTimer.isActive(); }
+    bool isObservingContentChanges() const { return m_domTimerisBeingExecuted || m_styleRecalcIsBeingExecuted; }
 
     void clearObservedDOMTimers() { m_DOMTimerList.clear(); }
     void clearTimersAndReportContentChange();
@@ -119,23 +117,16 @@
 
     void notifyContentChangeIfNeeded();
 
-    void stopDurationBasedContentObservation();
-
-    bool hasPendingActivity() const { return hasObservedDOMTimer() || m_document.hasPendingStyleRecalc() || m_contentObservationTimer.isActive(); }
-
     enum class Event {
         ContentObservationStarted,
         InstalledDOMTimer,
         RemovedDOMTimer,
         StyleRecalcFinished,
-        ContentVisibilityChanged,
-        StartedFixedObservationTimeWindow,
-        EndedFixedObservationTimeWindow
+        ContentVisibilityChanged
     };
     void adjustObservedState(Event);
 
     Document& m_document;
-    Timer m_contentObservationTimer;
     HashSet<const DOMTimer*> m_DOMTimerList;
     bool m_isObservingStyleRecalc { false };
     bool m_styleRecalcIsBeingExecuted { false };

Modified: trunk/Source/WebKit/ChangeLog (242466 => 242467)


--- trunk/Source/WebKit/ChangeLog	2019-03-05 16:18:43 UTC (rev 242466)
+++ trunk/Source/WebKit/ChangeLog	2019-03-05 17:18:30 UTC (rev 242467)
@@ -1,3 +1,16 @@
+2019-03-05  Ryan Haddad  <ryanhad...@apple.com>
+
+        Unreviewed, rolling out r242403.
+
+        Caused layout test crashes on iOS simulator.
+
+        Reverted changeset:
+
+        "[ContentChangeObserver] Introduce fixed duration content
+        observation"
+        https://bugs.webkit.org/show_bug.cgi?id=195295
+        https://trac.webkit.org/changeset/242403
+
 2019-03-05  Loïc Yhuel  <loic.yh...@softathome.com>
 
         [WPE] Do not create a PlatformDisplay in the Service Worker process

Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (242466 => 242467)


--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2019-03-05 16:18:43 UTC (rev 242466)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2019-03-05 17:18:30 UTC (rev 242467)
@@ -552,9 +552,6 @@
         mainframe.document()->updateStyleIfNeeded();
     }
 
-    const Seconds observationDuration = 32_ms;
-    respondingDocument.contentChangeObserver().startContentObservationForDuration(observationDuration);
-
     m_pendingSyntheticClickNode = nullptr;
     m_pendingSyntheticClickLocation = FloatPoint();
     m_pendingSyntheticClickModifiers = { };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to