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

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

Issue 2518163002: [css-tables] Fix divide-by-zero resulting from 32-bit overflow (Closed)
Patch Set: with layout test 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/TableLayoutAlgorithmFixed.cpp
diff --git a/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmFixed.cpp b/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmFixed.cpp
index 1399d70e12b0c7ac9f3148814a95ac16edf7c697..064ddc8644d82b649f6809ef418cd180185cd265 100644
--- a/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmFixed.cpp
+++ b/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmFixed.cpp
@@ -296,7 +296,7 @@ void TableLayoutAlgorithmFixed::layout() {
}
} else {
// Divide the remaining width among the auto columns.
- ASSERT(autoSpan >= numAuto);
+ DCHECK_GE(autoSpan, numAuto);
dgrogan 2016/11/22 00:35:31 The reproduction triggered this because autoSpan w
int remainingWidth = tableLogicalWidth - totalFixedWidth -
totalPercentWidth - hspacing * (autoSpan - numAuto);
int lastAuto = 0;
@@ -310,7 +310,7 @@ void TableLayoutAlgorithmFixed::layout() {
break;
lastAuto = i;
numAuto--;
- ASSERT(autoSpan >= span);
+ DCHECK_GE(autoSpan, span);
autoSpan -= span;
}
}

Powered by Google App Engine
This is Rietveld 408576698