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 unsigned rowSpan() const; | 43 unsigned rowSpan() const; |
44 | 44 |
45 void setCellIndex(int); | 45 void setCellIndex(int); |
46 | 46 |
47 const AtomicString& abbr() const; | 47 const AtomicString& abbr() const; |
48 const AtomicString& axis() const; | 48 const AtomicString& axis() const; |
49 void setColSpan(unsigned); | 49 void setColSpan(unsigned); |
50 const AtomicString& headers() const; | 50 const AtomicString& headers() const; |
51 void setRowSpan(unsigned); | 51 void setRowSpan(unsigned); |
52 | 52 |
| 53 // Rowspan: match Firefox's limit of 65,534. Edge has a higher limit, at |
| 54 // least 2^17. |
| 55 // Colspan: Firefox uses a limit of 1,000 for colspan and resets the value to |
| 56 // 1. |
| 57 // TODO(dgrogan): Change these to HTML's new specified behavior when |
| 58 // https://github.com/whatwg/html/issues/1198 is resolved. |
| 59 // Public so that HTMLColElement can use maxColSpan. maxRowSpan is only used |
| 60 // by this class but keeping them together seems desirable. |
| 61 static unsigned maxColSpan() { return 8190u; } |
| 62 static unsigned maxRowSpan() { return 65534u; } |
| 63 |
53 private: | 64 private: |
54 HTMLTableCellElement(const QualifiedName&, Document&); | 65 HTMLTableCellElement(const QualifiedName&, Document&); |
55 | 66 |
56 void parseAttribute(const QualifiedName&, | 67 void parseAttribute(const QualifiedName&, |
57 const AtomicString&, | 68 const AtomicString&, |
58 const AtomicString&) override; | 69 const AtomicString&) override; |
59 bool isPresentationAttribute(const QualifiedName&) const override; | 70 bool isPresentationAttribute(const QualifiedName&) const override; |
60 void collectStyleForPresentationAttribute(const QualifiedName&, | 71 void collectStyleForPresentationAttribute(const QualifiedName&, |
61 const AtomicString&, | 72 const AtomicString&, |
62 MutableStylePropertySet*) override; | 73 MutableStylePropertySet*) override; |
63 const StylePropertySet* additionalPresentationAttributeStyle() override; | 74 const StylePropertySet* additionalPresentationAttributeStyle() override; |
64 | 75 |
65 bool isURLAttribute(const Attribute&) const override; | 76 bool isURLAttribute(const Attribute&) const override; |
66 bool hasLegalLinkAttribute(const QualifiedName&) const override; | 77 bool hasLegalLinkAttribute(const QualifiedName&) const override; |
67 const QualifiedName& subResourceAttributeName() const override; | 78 const QualifiedName& subResourceAttributeName() const override; |
68 }; | 79 }; |
69 | 80 |
70 inline bool isHTMLTableCellElement(const HTMLElement& element) { | 81 inline bool isHTMLTableCellElement(const HTMLElement& element) { |
71 return element.hasTagName(HTMLNames::tdTag) || | 82 return element.hasTagName(HTMLNames::tdTag) || |
72 element.hasTagName(HTMLNames::thTag); | 83 element.hasTagName(HTMLNames::thTag); |
73 } | 84 } |
74 | 85 |
75 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLTableCellElement); | 86 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLTableCellElement); |
76 | 87 |
77 } // namespace blink | 88 } // namespace blink |
78 | 89 |
79 #endif // HTMLTableCellElement_h | 90 #endif // HTMLTableCellElement_h |
OLD | NEW |