WebKit Bugzilla
Attachment 339431 Details for
Bug 185185
: [LFC] Enable multiple layout roots for incremental layout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185185-20180503111021.patch (text/plain), 3.70 KB, created by
zalan
on 2018-05-03 11:10:22 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-05-03 11:10:22 PDT
Size:
3.70 KB
patch
obsolete
>Subversion Revision: 231313 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 84d3e7f897832d7d35d389ea5900659f0da61bce..d01ae95b39fa53b68015be029f80e64845041005 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2018-05-03 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC] Enable multiple layout roots for incremental layout. >+ https://bugs.webkit.org/show_bug.cgi?id=185185 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ With certain type of style changes, we can stop the box invalidation at the formatting context boundary. >+ When multiple boxes need updating in different formatting contexts, instead of marking the parent containing block chain all >+ the way up to a common ancestor, we could just work with a list of layout entry points per layout frame. >+ >+ * layout/FormattingState.h: >+ * layout/LayoutContext.cpp: >+ (WebCore::Layout::LayoutContext::updateLayout): >+ (WebCore::Layout::LayoutContext::addLayoutEntryPoint): >+ * layout/LayoutContext.h: >+ > 2018-05-03 Zalan Bujtas <zalan@apple.com> > > [LFC] Box invalidation logic should go to dedicated classes. >diff --git a/Source/WebCore/layout/LayoutContext.cpp b/Source/WebCore/layout/LayoutContext.cpp >index d546f79a6824dae5f507c3a3764a07260486f7e9..32d89cedf362f83641d768e1482e93aade3ab2a4 100644 >--- a/Source/WebCore/layout/LayoutContext.cpp >+++ b/Source/WebCore/layout/LayoutContext.cpp >@@ -51,9 +51,15 @@ LayoutContext::LayoutContext(const Box& root) > > void LayoutContext::updateLayout() > { >- auto context = formattingContext(*m_root); >- auto& state = establishedFormattingState(*m_root, *context); >- context->layout(*this, state); >+ ASSERT(!m_formattingContextRootListForLayout.isEmpty()); >+ for (auto layoutRoot : m_formattingContextRootListForLayout) { >+ RELEASE_ASSERT(layoutRoot.get()); >+ RELEASE_ASSERT(layoutRoot->establishesFormattingContext()); >+ auto context = formattingContext(*layoutRoot); >+ auto& state = establishedFormattingState(*layoutRoot, *context); >+ context->layout(*this, state); >+ } >+ m_formattingContextRootListForLayout.clear(); > } > > Display::Box& LayoutContext::createDisplayBox(const Box& layoutBox) >diff --git a/Source/WebCore/layout/LayoutContext.h b/Source/WebCore/layout/LayoutContext.h >index 07c0a889398a628f31cb785b2de33cbe91357891..fe23062c94243215f77a7dbfe053b9d5923fb664 100644 >--- a/Source/WebCore/layout/LayoutContext.h >+++ b/Source/WebCore/layout/LayoutContext.h >@@ -46,7 +46,8 @@ enum class StyleDiff; > // LayoutContext is the entry point for layout. It takes a (formatting root)container which acts as the root of the layout context. > // LayoutContext::layout() generates the display tree for the root container's subtree (it does not run layout on the root though). > // Note, while the root container is suppposed to be the entry point for the initial layout, it does not necessarily need to be the entry point of any >-// subsequent layouts (subtree layout). >+// subsequent layouts (subtree layout). A non-initial, subtree layout could be initiated on multiple formatting contexts. >+// Each formatting context has an entry point for layout, which potenitally means multiple entry points per layout frame. > // LayoutContext also holds the formatting states. They cache formatting context specific data to enable performant incremental layouts. > class LayoutContext { > WTF_MAKE_ISO_ALLOCATED(LayoutContext); >@@ -75,6 +76,7 @@ public: > > private: > WeakPtr<Box> m_root; >+ Vector<WeakPtr<Box>> m_formattingContextRootListForLayout; > HashMap<const Box*, std::unique_ptr<FormattingState>> m_formattingStates; > HashMap<const Box*, std::unique_ptr<Display::Box>> m_layoutToDisplayBox; > };
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185185
:
339275
| 339431