From 51a237c46065e305f9073c88da9fc387fda98356 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Thu, 11 May 2023 01:32:17 -0700 Subject: [PATCH] Delete unused LocalFrameViewLayoutContext's startDisallowingLayout and endDisallowingLayout https://bugs.webkit.org/show_bug.cgi?id=256630 Reviewed by Antti Koivisto. Deleted the unused code. * Source/WebCore/page/LocalFrameView.h: * Source/WebCore/page/LocalFrameViewLayoutContext.cpp: (WebCore::LocalFrameViewLayoutContext::performLayout): (WebCore::LocalFrameViewLayoutContext::canPerformLayout const): * Source/WebCore/page/LocalFrameViewLayoutContext.h: (WebCore::LocalFrameViewLayoutContext::startDisallowingLayout): Deleted. (WebCore::LocalFrameViewLayoutContext::endDisallowingLayout): Deleted. (WebCore::LocalFrameViewLayoutContext::layoutDisallowed const): Deleted. Canonical link: https://commits.webkit.org/263955@main --- Source/WebCore/page/LocalFrameView.h | 3 --- Source/WebCore/page/LocalFrameViewLayoutContext.cpp | 3 --- Source/WebCore/page/LocalFrameViewLayoutContext.h | 5 ----- 3 files changed, 11 deletions(-) diff --git a/Source/WebCore/page/LocalFrameView.h b/Source/WebCore/page/LocalFrameView.h index 7c7184f3a47f7..7097b83f0818f 100644 --- a/Source/WebCore/page/LocalFrameView.h +++ b/Source/WebCore/page/LocalFrameView.h @@ -443,9 +443,6 @@ class LocalFrameView final : public FrameView { WEBCORE_EXPORT Color documentBackgroundColor() const; - void startDisallowingLayout() { layoutContext().startDisallowingLayout(); } - void endDisallowingLayout() { layoutContext().endDisallowingLayout(); } - static MonotonicTime currentPaintTimeStamp() { return sCurrentPaintTimeStamp; } // returns 0 if not painting WEBCORE_EXPORT void updateLayoutAndStyleIfNeededRecursive(); diff --git a/Source/WebCore/page/LocalFrameViewLayoutContext.cpp b/Source/WebCore/page/LocalFrameViewLayoutContext.cpp index a7a30da6e2beb..63450be94e853 100644 --- a/Source/WebCore/page/LocalFrameViewLayoutContext.cpp +++ b/Source/WebCore/page/LocalFrameViewLayoutContext.cpp @@ -503,9 +503,6 @@ bool LocalFrameViewLayoutContext::canPerformLayout() const if (isInRenderTreeLayout()) return false; - if (layoutDisallowed()) - return false; - if (view().isPainting()) return false; diff --git a/Source/WebCore/page/LocalFrameViewLayoutContext.h b/Source/WebCore/page/LocalFrameViewLayoutContext.h index c51e8bca7d49c..653d1a2fd3e86 100644 --- a/Source/WebCore/page/LocalFrameViewLayoutContext.h +++ b/Source/WebCore/page/LocalFrameViewLayoutContext.h @@ -63,9 +63,6 @@ class LocalFrameViewLayoutContext { void scheduleSubtreeLayout(RenderElement& layoutRoot); void unscheduleLayout(); - void startDisallowingLayout() { ++m_layoutDisallowedCount; } - void endDisallowingLayout() { ASSERT(m_layoutDisallowedCount > 0); --m_layoutDisallowedCount; } - void disableSetNeedsLayout(); void enableSetNeedsLayout(); @@ -125,7 +122,6 @@ class LocalFrameViewLayoutContext { void performLayout(); bool canPerformLayout() const; - bool layoutDisallowed() const { return m_layoutDisallowedCount; } bool isLayoutSchedulingEnabled() const { return m_layoutSchedulingIsEnabled; } void layoutTimerFired(); @@ -176,7 +172,6 @@ class LocalFrameViewLayoutContext { LayoutNestedState m_layoutNestedState { LayoutNestedState::NotInLayout }; unsigned m_layoutCount { 0 }; unsigned m_disableSetNeedsLayoutCount { 0 }; - int m_layoutDisallowedCount { 0 }; unsigned m_paintOffsetCacheDisableCount { 0 }; LayoutStateStack m_layoutStateStack; std::unique_ptr m_layoutTree;