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