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

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

Issue 2528253003: [table] Stretching tables when needed due to self-alignment properties (Closed)
Patch Set: Created 4 years, 1 month 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 9ae716577e0dd6ffa1862617eff1887fbd144cd2..a7967d9a5e466831ba9e9132c2e20849f1dcd1e9 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
@@ -298,7 +298,9 @@ void LayoutTable::updateLogicalWidth() {
marginStart, marginEnd, toLayoutBlockFlow(cb));
// Ensure we aren't bigger than our available width.
- LayoutUnit maxWidth = maxPreferredLogicalWidth();
+ LayoutUnit maxWidth = hasStretchedLogicalWidth()
+ ? availableContentLogicalWidth
mstensho (USE GERRIT) 2016/11/28 12:54:31 Skipping maxPreferredLogicalWidth() here seems wro
jfernandez 2016/11/29 16:03:33 Done.
+ : maxPreferredLogicalWidth();
// scaledWidthFromPercentColumns depends on m_layoutStruct in
// TableLayoutAlgorithmAuto, which maxPreferredLogicalWidth fills in. So
// scaledWidthFromPercentColumns has to be called after
@@ -461,11 +463,16 @@ void LayoutTable::layoutSection(LayoutTableSection& section,
LayoutUnit LayoutTable::logicalHeightFromStyle() const {
LayoutUnit computedLogicalHeight;
- Length logicalHeightLength = style()->logicalHeight();
- if (logicalHeightLength.isIntrinsic() ||
- (logicalHeightLength.isSpecified() && logicalHeightLength.isPositive())) {
- computedLogicalHeight =
- convertStyleLogicalHeightToComputedHeight(logicalHeightLength);
+ if (hasOverrideLogicalContentHeight()) {
+ computedLogicalHeight = overrideLogicalContentHeight();
+ } else {
+ Length logicalHeightLength = style()->logicalHeight();
+ if (logicalHeightLength.isIntrinsic() ||
+ (logicalHeightLength.isSpecified() &&
+ logicalHeightLength.isPositive())) {
+ computedLogicalHeight =
+ convertStyleLogicalHeightToComputedHeight(logicalHeightLength);
+ }
}
Length logicalMaxHeightLength = style()->logicalMaxHeight();

Powered by Google App Engine
This is Rietveld 408576698