Title: [250181] trunk/Source/WebCore
- Revision
- 250181
- Author
- za...@apple.com
- Date
- 2019-09-21 06:51:17 -0700 (Sat, 21 Sep 2019)
Log Message
[LFC] LayoutContext::m_formattingContextRootListForLayout should be a WeakHashSet
https://bugs.webkit.org/show_bug.cgi?id=202068
<rdar://problem/55579352>
Reviewed by Alex Christensen.
* layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::layout):
(WebCore::Layout::LayoutContext::styleChanged):
(WebCore::Layout::LayoutContext::markNeedsUpdate):
* layout/LayoutContext.h:
* page/FrameViewLayoutContext.cpp:
(WebCore::layoutUsingFormattingContext):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (250180 => 250181)
--- trunk/Source/WebCore/ChangeLog 2019-09-21 11:39:57 UTC (rev 250180)
+++ trunk/Source/WebCore/ChangeLog 2019-09-21 13:51:17 UTC (rev 250181)
@@ -1,3 +1,19 @@
+2019-09-21 Zalan Bujtas <za...@apple.com>
+
+ [LFC] LayoutContext::m_formattingContextRootListForLayout should be a WeakHashSet
+ https://bugs.webkit.org/show_bug.cgi?id=202068
+ <rdar://problem/55579352>
+
+ Reviewed by Alex Christensen.
+
+ * layout/LayoutContext.cpp:
+ (WebCore::Layout::LayoutContext::layout):
+ (WebCore::Layout::LayoutContext::styleChanged):
+ (WebCore::Layout::LayoutContext::markNeedsUpdate):
+ * layout/LayoutContext.h:
+ * page/FrameViewLayoutContext.cpp:
+ (WebCore::layoutUsingFormattingContext):
+
2019-09-19 Andy Estes <aes...@apple.com>
[Apple Pay] Clean up handling of summary items and payment method updates
Modified: trunk/Source/WebCore/layout/LayoutContext.cpp (250180 => 250181)
--- trunk/Source/WebCore/layout/LayoutContext.cpp 2019-09-21 11:39:57 UTC (rev 250180)
+++ trunk/Source/WebCore/layout/LayoutContext.cpp 2019-09-21 13:51:17 UTC (rev 250181)
@@ -59,9 +59,9 @@
{
PhaseScope scope(Phase::Type::Layout);
- ASSERT(!m_formattingContextRootListForLayout.isEmpty());
- for (auto* layoutRoot : m_formattingContextRootListForLayout)
- layoutFormattingContextSubtree(*layoutRoot);
+ ASSERT(!m_formattingContextRootListForLayout.computesEmpty());
+ for (auto& layoutRoot : m_formattingContextRootListForLayout)
+ layoutFormattingContextSubtree(layoutRoot);
m_formattingContextRootListForLayout.clear();
}
@@ -86,13 +86,13 @@
else
ASSERT_NOT_IMPLEMENTED_YET();
ASSERT(invalidationRoot);
- m_formattingContextRootListForLayout.addVoid(invalidationRoot);
+ m_formattingContextRootListForLayout.add(invalidationRoot);
}
void LayoutContext::markNeedsUpdate(const Box& layoutBox, OptionSet<UpdateType>)
{
// FIXME: This should trigger proper invalidation instead of just adding the formatting context root to the dirty list.
- m_formattingContextRootListForLayout.addVoid(&(layoutBox.isInitialContainingBlock() ? downcast<Container>(layoutBox) : layoutBox.formattingContextRoot()));
+ m_formattingContextRootListForLayout.add(&(layoutBox.isInitialContainingBlock() ? downcast<Container>(layoutBox) : layoutBox.formattingContextRoot()));
}
std::unique_ptr<FormattingContext> LayoutContext::createFormattingContext(const Container& formattingContextRoot, LayoutState& layoutState)
Modified: trunk/Source/WebCore/layout/LayoutContext.h (250180 => 250181)
--- trunk/Source/WebCore/layout/LayoutContext.h 2019-09-21 11:39:57 UTC (rev 250180)
+++ trunk/Source/WebCore/layout/LayoutContext.h 2019-09-21 13:51:17 UTC (rev 250181)
@@ -29,9 +29,9 @@
#include "LayoutContainer.h"
#include "LayoutState.h"
-#include <wtf/HashSet.h>
#include <wtf/IsoMalloc.h>
#include <wtf/OptionSet.h>
+#include <wtf/WeakHashSet.h>
namespace WebCore {
@@ -79,7 +79,7 @@
LayoutState& layoutState() { return m_layoutState; }
LayoutState& m_layoutState;
- HashSet<const Container*> m_formattingContextRootListForLayout;
+ WeakHashSet<const Container> m_formattingContextRootListForLayout;
};
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes