• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3  *           (C) 1997 Torben Weis (weis@kde.org)
4  *           (C) 1998 Waldo Bastian (bastian@kde.org)
5  *           (C) 1999 Lars Knoll (knoll@kde.org)
6  *           (C) 1999 Antti Koivisto (koivisto@kde.org)
7  * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Library General Public
11  * License as published by the Free Software Foundation; either
12  * version 2 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Library General Public License for more details.
18  *
19  * You should have received a copy of the GNU Library General Public License
20  * along with this library; see the file COPYING.LIB.  If not, write to
21  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22  * Boston, MA 02110-1301, USA.
23  *
24  */
25 
26 #ifndef HTMLTableCellElement_h
27 #define HTMLTableCellElement_h
28 
29 #include "HTMLTablePartElement.h"
30 
31 namespace WebCore {
32 
33 class HTMLTableCellElement : public HTMLTablePartElement {
34 public:
35     HTMLTableCellElement(const QualifiedName&, Document*);
36     ~HTMLTableCellElement();
37 
endTagRequirement()38     virtual HTMLTagStatus endTagRequirement() const { return TagStatusOptional; }
tagPriority()39     virtual int tagPriority() const { return 6; }
40 
41     int cellIndex() const;
42 
col()43     int col() const { return _col; }
setCol(int col)44     void setCol(int col) { _col = col; }
row()45     int row() const { return _row; }
setRow(int r)46     void setRow(int r) { _row = r; }
47 
colSpan()48     int colSpan() const { return cSpan; }
rowSpan()49     int rowSpan() const { return rSpan; }
50 
51     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
52     virtual void parseMappedAttribute(MappedAttribute*);
53 
54     // used by table cells to share style decls created by the enclosing table.
canHaveAdditionalAttributeStyleDecls()55     virtual bool canHaveAdditionalAttributeStyleDecls() const { return true; }
56     virtual void additionalAttributeStyleDecls(Vector<CSSMutableStyleDeclaration*>&);
57 
58     virtual bool isURLAttribute(Attribute*) const;
59 
60     void setCellIndex(int);
61 
62     String abbr() const;
63     void setAbbr(const String&);
64 
65     String align() const;
66     void setAlign(const String&);
67 
68     String axis() const;
69     void setAxis(const String&);
70 
71     String bgColor() const;
72     void setBgColor(const String&);
73 
74     String ch() const;
75     void setCh(const String&);
76 
77     String chOff() const;
78     void setChOff(const String&);
79 
80     void setColSpan(int);
81 
82     String headers() const;
83     void setHeaders(const String&);
84 
85     String height() const;
86     void setHeight(const String&);
87 
88     bool noWrap() const;
89     void setNoWrap(bool);
90 
91     void setRowSpan(int);
92 
93     String scope() const;
94     void setScope(const String&);
95 
96     String vAlign() const;
97     void setVAlign(const String&);
98 
99     String width() const;
100     void setWidth(const String&);
101 
102     virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
103 
104 protected:
105     int _row;
106     int _col;
107     int rSpan;
108     int cSpan;
109     int rowHeight;
110     bool m_solid;
111 };
112 
113 } //namespace
114 
115 #endif
116