Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp

Issue 2869983003: *** DO NOT LAND *** Avoid multiple layout passes in flexbox. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
index 8aff1ea9f21be17d039296fd1b58b7aea2b8e0e3..c7b21ade18be8d55ca7ff85ddc248c8755075e54 100644
--- a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
@@ -1808,10 +1808,13 @@ void LayoutFlexibleBox::LayoutAndPlaceChildren(
// The flexed content size and the override size include the scrollbar
// width, so we need to compare to the size including the scrollbar.
// TODO(cbiesinger): Should it include the scrollbar?
+#if 0 // Disabling this eliminates most of the slowness.
if (flex_item.flexed_content_size !=
MainAxisContentExtentForChildIncludingScrollbar(*child)) {
child->SetChildNeedsLayout(kMarkOnlyThis);
- } else {
+ } else
+#endif
+ {
// To avoid double applying margin changes in
// updateAutoMarginsInCrossAxis, we reset the margins here.
ResetAutoMarginsAndLogicalTopInCrossAxis(*child);
@@ -1829,8 +1832,10 @@ void LayoutFlexibleBox::LayoutAndPlaceChildren(
force_child_relayout = true;
}
UpdateBlockChildDirtyBitsBeforeLayout(force_child_relayout, *child);
+#if 0 // Disabling this also improves speed somewhat.
if (!child->NeedsLayout())
MarkChildForPaginationRelayoutIfNeeded(*child, layout_scope);
+#endif
if (child->NeedsLayout())
relaid_out_children_.insert(child);
child->LayoutIfNeeded();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698