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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 { 57 {
58 if (name == widthAttr) 58 if (name == widthAttr)
59 addHTMLLengthToStyle(style, CSSPropertyWidth, value); 59 addHTMLLengthToStyle(style, CSSPropertyWidth, value);
60 else 60 else
61 HTMLTablePartElement::collectStyleForPresentationAttribute(name, value, style); 61 HTMLTablePartElement::collectStyleForPresentationAttribute(name, value, style);
62 } 62 }
63 63
64 void HTMLTableColElement::parseAttribute(const QualifiedName& name, const Atomic String& value) 64 void HTMLTableColElement::parseAttribute(const QualifiedName& name, const Atomic String& value)
65 { 65 {
66 if (name == spanAttr) { 66 if (name == spanAttr) {
67 m_span = !value.isNull() ? value.toInt() : 1; 67 int newSpan = value.toInt();
68 // Use 1 if number is too big or zero.
Julien - ping for review 2014/03/13 18:29:24 This comment is ambiguous IMO: if |value| is not a
69 m_span = newSpan ? newSpan : 1;
68 if (renderer() && renderer()->isRenderTableCol()) 70 if (renderer() && renderer()->isRenderTableCol())
69 renderer()->updateFromElement(); 71 renderer()->updateFromElement();
70 } else if (name == widthAttr) { 72 } else if (name == widthAttr) {
71 if (!value.isEmpty()) { 73 if (!value.isEmpty()) {
72 if (renderer() && renderer()->isRenderTableCol()) { 74 if (renderer() && renderer()->isRenderTableCol()) {
73 RenderTableCol* col = toRenderTableCol(renderer()); 75 RenderTableCol* col = toRenderTableCol(renderer());
74 int newWidth = width().toInt(); 76 int newWidth = width().toInt();
75 if (newWidth != col->width()) 77 if (newWidth != col->width())
76 col->setNeedsLayoutAndPrefWidthsRecalc(); 78 col->setNeedsLayoutAndPrefWidthsRecalc();
77 } 79 }
(...skipping 15 matching lines...) Expand all
93 { 95 {
94 setIntegralAttribute(spanAttr, n); 96 setIntegralAttribute(spanAttr, n);
95 } 97 }
96 98
97 const AtomicString& HTMLTableColElement::width() const 99 const AtomicString& HTMLTableColElement::width() const
98 { 100 {
99 return getAttribute(widthAttr); 101 return getAttribute(widthAttr);
100 } 102 }
101 103
102 } 104 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698