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

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

Issue 2700183003: Revert of Avoid pathological layout on nested percent height tables (Closed)
Patch Set: Created 3 years, 10 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
Index: third_party/WebKit/Source/core/layout/LayoutTable.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.cpp b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
index 80bb882d844af6466454e22cc83f7b55ce2f5fd8..b0a6337f490370f973cdadea505b036af51ef7b8 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
@@ -451,13 +451,12 @@
layouter.setChildNeedsLayout(&section);
if (!section.needsLayout())
markChildForPaginationRelayoutIfNeeded(section, layouter);
- if (section.needsLayout()) {
- section.layout();
- section.setLogicalHeight(LayoutUnit(section.calcRowLogicalHeight()));
- }
+ section.layoutIfNeeded();
+ int sectionLogicalHeight = section.calcRowLogicalHeight();
+ section.setLogicalHeight(LayoutUnit(sectionLogicalHeight));
if (view()->layoutState()->isPaginated())
updateFragmentationInfoForChild(section);
- setLogicalHeight(logicalHeight() + section.logicalHeight());
+ setLogicalHeight(logicalHeight() + sectionLogicalHeight);
}
LayoutUnit LayoutTable::logicalHeightFromStyle() const {
@@ -502,8 +501,8 @@
extraLogicalHeight -=
section->distributeExtraLogicalHeightToRows(extraLogicalHeight);
- // crbug.com/690087: We really would like to enable this ASSERT to ensure that
- // all the extra space has been distributed.
+ // FIXME: We really would like to enable this ASSERT to ensure that all the
+ // extra space has been distributed.
// However our current distribution algorithm does not round properly and thus
// we can have some remaining height.
// ASSERT(!topSection() || !extraLogicalHeight);

Powered by Google App Engine
This is Rietveld 408576698