Title: [243035] trunk/Source/WebCore
Revision
243035
Author
[email protected]
Date
2019-03-16 00:37:24 -0700 (Sat, 16 Mar 2019)

Log Message

Remove LayoutAssertionDisableScope after r241289
https://bugs.webkit.org/show_bug.cgi?id=195848

Reviewed by Antti Koivisto.

Remove LayoutAssertionDisableScope for good now that the underlying bug has been fixed in r241289.

* dom/Document.cpp:
(WebCore::isSafeToUpdateStyleOrLayout):
* dom/ScriptDisallowedScope.h:
(WebCore::ScriptDisallowedScope::LayoutAssertionDisableScope): Deleted.
* page/FrameViewLayoutContext.cpp:
(WebCore::FrameViewLayoutContext::layout):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (243034 => 243035)


--- trunk/Source/WebCore/ChangeLog	2019-03-16 05:44:22 UTC (rev 243034)
+++ trunk/Source/WebCore/ChangeLog	2019-03-16 07:37:24 UTC (rev 243035)
@@ -1,3 +1,19 @@
+2019-03-16  Ryosuke Niwa  <[email protected]>
+
+        Remove LayoutAssertionDisableScope after r241289
+        https://bugs.webkit.org/show_bug.cgi?id=195848
+
+        Reviewed by Antti Koivisto.
+
+        Remove LayoutAssertionDisableScope for good now that the underlying bug has been fixed in r241289.
+
+        * dom/Document.cpp:
+        (WebCore::isSafeToUpdateStyleOrLayout):
+        * dom/ScriptDisallowedScope.h:
+        (WebCore::ScriptDisallowedScope::LayoutAssertionDisableScope): Deleted.
+        * page/FrameViewLayoutContext.cpp:
+        (WebCore::FrameViewLayoutContext::layout):
+
 2019-03-15  Eric Carlson  <[email protected]>
 
         Add media stream release logging

Modified: trunk/Source/WebCore/dom/Document.cpp (243034 => 243035)


--- trunk/Source/WebCore/dom/Document.cpp	2019-03-16 05:44:22 UTC (rev 243034)
+++ trunk/Source/WebCore/dom/Document.cpp	2019-03-16 07:37:24 UTC (rev 243035)
@@ -333,8 +333,6 @@
 static const unsigned cMaxWriteRecursionDepth = 21;
 bool Document::hasEverCreatedAnAXObjectCache = false;
 
-unsigned ScriptDisallowedScope::LayoutAssertionDisableScope::s_layoutAssertionDisableCount = 0;
-
 // DOM Level 2 says (letters added):
 //
 // a) Name start characters must have one of the categories Ll, Lu, Lo, Lt, Nl.
@@ -2031,8 +2029,7 @@
     bool isSafeToExecuteScript = ScriptDisallowedScope::InMainThread::isScriptAllowed();
     auto* frameView = document.view();
     bool isInFrameFlattening = frameView && frameView->isInChildFrameWithFrameFlattening();
-    bool isAssertionDisabled = ScriptDisallowedScope::LayoutAssertionDisableScope::shouldDisable();
-    return isSafeToExecuteScript || isInFrameFlattening || !isInWebProcess() || isAssertionDisabled;
+    return isSafeToExecuteScript || isInFrameFlattening || !isInWebProcess();
 }
 
 bool Document::updateStyleIfNeeded()

Modified: trunk/Source/WebCore/dom/ScriptDisallowedScope.h (243034 => 243035)


--- trunk/Source/WebCore/dom/ScriptDisallowedScope.h	2019-03-16 05:44:22 UTC (rev 243034)
+++ trunk/Source/WebCore/dom/ScriptDisallowedScope.h	2019-03-16 07:37:24 UTC (rev 243035)
@@ -162,25 +162,6 @@
         unsigned m_originalCount { 0 };
     };
 
-    // FIXME: Remove all uses of this class.
-    class LayoutAssertionDisableScope {
-    public:
-        LayoutAssertionDisableScope()
-        {
-            s_layoutAssertionDisableCount++;
-        }
-
-        ~LayoutAssertionDisableScope()
-        {
-            s_layoutAssertionDisableCount--;
-        }
-
-        static bool shouldDisable() { return s_layoutAssertionDisableCount; }
-
-    private:
-        static unsigned s_layoutAssertionDisableCount;
-    };
-
 private:
     WEBCORE_EXPORT static unsigned s_count;
 };

Modified: trunk/Source/WebCore/page/FrameViewLayoutContext.cpp (243034 => 243035)


--- trunk/Source/WebCore/page/FrameViewLayoutContext.cpp	2019-03-16 05:44:22 UTC (rev 243034)
+++ trunk/Source/WebCore/page/FrameViewLayoutContext.cpp	2019-03-16 07:37:24 UTC (rev 243035)
@@ -148,7 +148,7 @@
 {
     LOG_WITH_STREAM(Layout, stream << "FrameView " << &view() << " FrameViewLayoutContext::layout() with size " << view().layoutSize());
 
-    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!frame().document()->inRenderTreeUpdate() || ScriptDisallowedScope::LayoutAssertionDisableScope::shouldDisable());
+    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!frame().document()->inRenderTreeUpdate());
     ASSERT(LayoutDisallowedScope::isLayoutAllowed());
     ASSERT(!view().isPainting());
     ASSERT(frame().view() == &view());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to