Title: [251305] trunk/Source/WebCore
Revision
251305
Author
[email protected]
Date
2019-10-18 15:45:59 -0700 (Fri, 18 Oct 2019)

Log Message

Document::m_closeAfterStyleRecalc is unnecessary
https://bugs.webkit.org/show_bug.cgi?id=203143

Reviewed by Antti Koivisto.

Removed the code to defer implicit close until the style recalc is done
since we call FrameLoader::checkCompleted asynchronously via a timer these days.

* dom/Document.cpp:
(WebCore::Document::resolveStyle):
(WebCore::Document::implicitClose):
* dom/Document.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (251304 => 251305)


--- trunk/Source/WebCore/ChangeLog	2019-10-18 22:45:42 UTC (rev 251304)
+++ trunk/Source/WebCore/ChangeLog	2019-10-18 22:45:59 UTC (rev 251305)
@@ -1,3 +1,18 @@
+2019-10-17  Ryosuke Niwa  <[email protected]>
+
+        Document::m_closeAfterStyleRecalc is unnecessary
+        https://bugs.webkit.org/show_bug.cgi?id=203143
+
+        Reviewed by Antti Koivisto.
+
+        Removed the code to defer implicit close until the style recalc is done
+        since we call FrameLoader::checkCompleted asynchronously via a timer these days.
+
+        * dom/Document.cpp:
+        (WebCore::Document::resolveStyle):
+        (WebCore::Document::implicitClose):
+        * dom/Document.h:
+
 2019-10-17  Dean Jackson  <[email protected]>
 
         texImage2D for a half-float texture only accepts null

Modified: trunk/Source/WebCore/dom/Document.cpp (251304 => 251305)


--- trunk/Source/WebCore/dom/Document.cpp	2019-10-18 22:45:42 UTC (rev 251304)
+++ trunk/Source/WebCore/dom/Document.cpp	2019-10-18 22:45:59 UTC (rev 251305)
@@ -1978,12 +1978,6 @@
         // FIXME: Assert ASSERT(!needsStyleRecalc()) here. Do we still have some cases where it's not true?
     }
 
-    // If we wanted to call implicitClose() during recalcStyle, do so now that we're finished.
-    if (m_closeAfterStyleRecalc) {
-        m_closeAfterStyleRecalc = false;
-        implicitClose();
-    }
-
     InspectorInstrumentation::didRecalculateStyle(*this);
 
     // Some animated images may now be inside the viewport due to style recalc,
@@ -2920,12 +2914,7 @@
 
 void Document::implicitClose()
 {
-    // If we're in the middle of recalcStyle, we need to defer the close until the style information is accurate and all elements are re-attached.
-    if (m_inStyleRecalc) {
-        m_closeAfterStyleRecalc = true;
-        return;
-    }
-
+    RELEASE_ASSERT(!m_inStyleRecalc);
     bool wasLocationChangePending = frame() && frame()->navigationScheduler().locationChangePending();
     bool doload = !parsing() && m_parser && !m_processingLoadEvent && !wasLocationChangePending;
     

Modified: trunk/Source/WebCore/dom/Document.h (251304 => 251305)


--- trunk/Source/WebCore/dom/Document.h	2019-10-18 22:45:42 UTC (rev 251304)
+++ trunk/Source/WebCore/dom/Document.h	2019-10-18 22:45:59 UTC (rev 251305)
@@ -1992,7 +1992,6 @@
 
     bool m_needsFullStyleRebuild { false };
     bool m_inStyleRecalc { false };
-    bool m_closeAfterStyleRecalc { false };
     bool m_inRenderTreeUpdate { false };
     bool m_isResolvingTreeStyle { false };
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to