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

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
« no previous file with comments | « LayoutTests/fast/table/incorrect-colgroup-span-values-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // If the value of span is not a valid non-negative integer greater than zero,
69 // set it to 1.
70 m_span = newSpan ? newSpan : 1;
68 if (renderer() && renderer()->isRenderTableCol()) 71 if (renderer() && renderer()->isRenderTableCol())
69 renderer()->updateFromElement(); 72 renderer()->updateFromElement();
70 } else if (name == widthAttr) { 73 } else if (name == widthAttr) {
71 if (!value.isEmpty()) { 74 if (!value.isEmpty()) {
72 if (renderer() && renderer()->isRenderTableCol()) { 75 if (renderer() && renderer()->isRenderTableCol()) {
73 RenderTableCol* col = toRenderTableCol(renderer()); 76 RenderTableCol* col = toRenderTableCol(renderer());
74 int newWidth = width().toInt(); 77 int newWidth = width().toInt();
75 if (newWidth != col->width()) 78 if (newWidth != col->width())
76 col->setNeedsLayoutAndPrefWidthsRecalc(); 79 col->setNeedsLayoutAndPrefWidthsRecalc();
77 } 80 }
(...skipping 15 matching lines...) Expand all
93 { 96 {
94 setIntegralAttribute(spanAttr, n); 97 setIntegralAttribute(spanAttr, n);
95 } 98 }
96 99
97 const AtomicString& HTMLTableColElement::width() const 100 const AtomicString& HTMLTableColElement::width() const
98 { 101 {
99 return getAttribute(widthAttr); 102 return getAttribute(widthAttr);
100 } 103 }
101 104
102 } 105 }
OLDNEW
« 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