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

Unified Diff: Source/core/html/HTMLTableColElement.cpp

Issue 194593005: ASSERTION FAILED: span >= 1 in WebCore::RenderTable::slowColElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « LayoutTests/fast/table/incorrect-colgroup-span-values-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTableColElement.cpp
diff --git a/Source/core/html/HTMLTableColElement.cpp b/Source/core/html/HTMLTableColElement.cpp
index 19e301d95c045add824696d4600acab78d74193a..0447fa7fc23c334ead34c6e707a629b0df7664f5 100644
--- a/Source/core/html/HTMLTableColElement.cpp
+++ b/Source/core/html/HTMLTableColElement.cpp
@@ -64,7 +64,10 @@ void HTMLTableColElement::collectStyleForPresentationAttribute(const QualifiedNa
void HTMLTableColElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name == spanAttr) {
- m_span = !value.isNull() ? value.toInt() : 1;
+ int newSpan = value.toInt();
+ // If the value of span is not a valid non-negative integer greater than zero,
+ // set it to 1.
+ m_span = newSpan ? newSpan : 1;
if (renderer() && renderer()->isRenderTableCol())
renderer()->updateFromElement();
} else if (name == widthAttr) {
« no previous file with comments | « LayoutTests/fast/table/incorrect-colgroup-span-values-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698