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

Unified Diff: Source/core/layout/LayoutTableSection.cpp

Issue 1023133002: Negative row height when cell has percentage height. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added Layout test Created 5 years, 9 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: Source/core/layout/LayoutTableSection.cpp
diff --git a/Source/core/layout/LayoutTableSection.cpp b/Source/core/layout/LayoutTableSection.cpp
index 29e2a0c609103400515219cc23d2224ab18a3e07..fd0ab895e18cc5d7560256a761aac38aeec0eac0 100644
--- a/Source/core/layout/LayoutTableSection.cpp
+++ b/Source/core/layout/LayoutTableSection.cpp
@@ -313,6 +313,7 @@ void LayoutTableSection::distributeExtraRowSpanHeightToPercentRows(LayoutTableCe
// FIXME: Note that this is wrong if we have a percentage above 100% and may make us grow
// above the available space.
+ toAdd = std::max(toAdd, 0);
esprehn 2015/03/26 08:23:11 How does toAdd become negative here?
a.suchit2 2015/03/26 09:38:35 If percent height is less than the rowHeight based
Julien - ping for review 2015/03/26 15:22:10 It's not the only place where we do something simi
toAdd = std::min(toAdd, extraRowSpanningHeight);
accumulatedPositionIncrease += toAdd;
extraRowSpanningHeight -= toAdd;

Powered by Google App Engine
This is Rietveld 408576698