| OLD | NEW |
| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // (FIXME: We should consider increasing this limit (crbug.com/78577). | 43 // (FIXME: We should consider increasing this limit (crbug.com/78577). |
| 44 // Firefox uses a limit of 1,000 for colspan and resets the value to 1 | 44 // Firefox uses a limit of 1,000 for colspan and resets the value to 1 |
| 45 // but we don't discriminate between rowspan / colspan as it is artificial. | 45 // but we don't discriminate between rowspan / colspan as it is artificial. |
| 46 static const int maxColRowSpan = 8190; | 46 static const int maxColRowSpan = 8190; |
| 47 | 47 |
| 48 using namespace HTMLNames; | 48 using namespace HTMLNames; |
| 49 | 49 |
| 50 inline HTMLTableCellElement::HTMLTableCellElement(const QualifiedName& tagName,
Document& document) | 50 inline HTMLTableCellElement::HTMLTableCellElement(const QualifiedName& tagName,
Document& document) |
| 51 : HTMLTablePartElement(tagName, document) | 51 : HTMLTablePartElement(tagName, document) |
| 52 { | 52 { |
| 53 ScriptWrappable::init(this); | |
| 54 } | 53 } |
| 55 | 54 |
| 56 DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLTableCellElement) | 55 DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLTableCellElement) |
| 57 | 56 |
| 58 int HTMLTableCellElement::colSpan() const | 57 int HTMLTableCellElement::colSpan() const |
| 59 { | 58 { |
| 60 const AtomicString& colSpanValue = fastGetAttribute(colspanAttr); | 59 const AtomicString& colSpanValue = fastGetAttribute(colspanAttr); |
| 61 return max(1, min(colSpanValue.toInt(), maxColRowSpan)); | 60 return max(1, min(colSpanValue.toInt(), maxColRowSpan)); |
| 62 } | 61 } |
| 63 | 62 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 179 |
| 181 RenderTableCell* tableCellRenderer = toRenderTableCell(cellRenderer); | 180 RenderTableCell* tableCellRenderer = toRenderTableCell(cellRenderer); |
| 182 RenderTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(t
ableCellRenderer); | 181 RenderTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(t
ableCellRenderer); |
| 183 if (!cellAboveRenderer) | 182 if (!cellAboveRenderer) |
| 184 return 0; | 183 return 0; |
| 185 | 184 |
| 186 return toHTMLTableCellElement(cellAboveRenderer->node()); | 185 return toHTMLTableCellElement(cellAboveRenderer->node()); |
| 187 } | 186 } |
| 188 | 187 |
| 189 } // namespace blink | 188 } // namespace blink |
| OLD | NEW |