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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableCell.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/LayoutTableCell.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
index c34f015f117fe93645f799bbbb2ac7194015bc9b..8f0e728c86ebf7fa904ab3d8f26ba55fe7d9e45d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
@@ -122,6 +122,8 @@ void LayoutTableCell::willBeRemovedFromTree() {
unsigned LayoutTableCell::parseColSpanFromDOM() const {
ASSERT(node());
+ // TODO(dgrogan): HTMLTableCellElement::colSpan() already clamps to something
+ // smaller than maxColumnIndex; can we just DCHECK here?
if (isHTMLTableCellElement(*node()))
return std::min<unsigned>(toHTMLTableCellElement(*node()).colSpan(),
maxColumnIndex);

Powered by Google App Engine
This is Rietveld 408576698