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 30 matching lines...) Expand all Loading... |
41 static const int maxRowspan = 8190; | 41 static const int maxRowspan = 8190; |
42 | 42 |
43 using namespace HTMLNames; | 43 using namespace HTMLNames; |
44 | 44 |
45 inline HTMLTableCellElement::HTMLTableCellElement(const QualifiedName& tagName,
Document& document) | 45 inline HTMLTableCellElement::HTMLTableCellElement(const QualifiedName& tagName,
Document& document) |
46 : HTMLTablePartElement(tagName, document) | 46 : HTMLTablePartElement(tagName, document) |
47 { | 47 { |
48 ScriptWrappable::init(this); | 48 ScriptWrappable::init(this); |
49 } | 49 } |
50 | 50 |
51 PassRefPtrWillBeRawPtr<HTMLTableCellElement> HTMLTableCellElement::create(const
QualifiedName& tagName, Document& document) | 51 DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLTableCellElement) |
52 { | |
53 return adoptRefWillBeRefCountedGarbageCollected(new HTMLTableCellElement(tag
Name, document)); | |
54 } | |
55 | 52 |
56 int HTMLTableCellElement::colSpan() const | 53 int HTMLTableCellElement::colSpan() const |
57 { | 54 { |
58 const AtomicString& colSpanValue = fastGetAttribute(colspanAttr); | 55 const AtomicString& colSpanValue = fastGetAttribute(colspanAttr); |
59 return max(1, colSpanValue.toInt()); | 56 return max(1, colSpanValue.toInt()); |
60 } | 57 } |
61 | 58 |
62 int HTMLTableCellElement::rowSpan() const | 59 int HTMLTableCellElement::rowSpan() const |
63 { | 60 { |
64 const AtomicString& rowSpanValue = fastGetAttribute(rowspanAttr); | 61 const AtomicString& rowSpanValue = fastGetAttribute(rowspanAttr); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 175 |
179 RenderTableCell* tableCellRenderer = toRenderTableCell(cellRenderer); | 176 RenderTableCell* tableCellRenderer = toRenderTableCell(cellRenderer); |
180 RenderTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(t
ableCellRenderer); | 177 RenderTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(t
ableCellRenderer); |
181 if (!cellAboveRenderer) | 178 if (!cellAboveRenderer) |
182 return 0; | 179 return 0; |
183 | 180 |
184 return toHTMLTableCellElement(cellAboveRenderer->node()); | 181 return toHTMLTableCellElement(cellAboveRenderer->node()); |
185 } | 182 } |
186 | 183 |
187 } // namespace WebCore | 184 } // namespace WebCore |
OLD | NEW |