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

Unified Diff: Source/WebCore/rendering/AutoTableLayout.cpp

Issue 10583010: Merge 120257 - Padding and borders can cause integer overflow in block layouts (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 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/WebCore/rendering/AutoTableLayout.cpp
===================================================================
--- Source/WebCore/rendering/AutoTableLayout.cpp (revision 120655)
+++ Source/WebCore/rendering/AutoTableLayout.cpp (working copy)
@@ -251,8 +251,8 @@
if (scaleColumns) {
maxNonPercent = maxNonPercent * 100 / max(remainingPercent, epsilon);
- maxWidth = max<int>(maxWidth, static_cast<int>(min(maxNonPercent, MAX_LAYOUT_UNIT / 2.0f)));
- maxWidth = max<int>(maxWidth, static_cast<int>(min(maxPercent, MAX_LAYOUT_UNIT / 2.0f)));
+ maxWidth = max<int>(maxWidth, static_cast<int>(min(maxNonPercent, static_cast<float>(tableMaxWidth))));
+ maxWidth = max<int>(maxWidth, static_cast<int>(min(maxPercent, static_cast<float>(tableMaxWidth))));
}
maxWidth = max<int>(maxWidth, spanMaxLogicalWidth);
@@ -267,7 +267,7 @@
maxWidth = minWidth;
} else if (!remainingPercent && maxNonPercent) {
// if there was no remaining percent, maxWidth is invalid
- maxWidth = MAX_LAYOUT_UNIT;
+ maxWidth = tableMaxWidth;
}
Length tableLogicalMinWidth = m_table->style()->logicalMinWidth();
« no previous file with comments | « LayoutTests/fast/table/table-size-integer-overflow-expected.txt ('k') | Source/WebCore/rendering/FixedTableLayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698