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

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: update wpt -expected.txt and span-attribute.html but not -expected.txt Created 4 years 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 dd75dc792506a9ad42cbe95ba07b312ff959ab06..95d8c81a468ff70ccecf2de483c16f43658b7123 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