• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3  *           (C) 1999 Antti Koivisto (koivisto@kde.org)
4  *           (C) 2000 Simon Hausmann <hausmann@kde.org>
5  * Copyright (C) 2004, 2006, 2009 Apple Inc. All rights reserved.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public License
18  * along with this library; see the file COPYING.LIB.  If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  *
22  */
23 
24 #ifndef HTMLFrameSetElement_h
25 #define HTMLFrameSetElement_h
26 
27 #include "HTMLElement.h"
28 #include "Color.h"
29 
30 namespace WebCore {
31 
32 class HTMLFrameSetElement : public HTMLElement {
33 public:
34     HTMLFrameSetElement(const QualifiedName&, Document*);
35     ~HTMLFrameSetElement();
36 
endTagRequirement()37     virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
tagPriority()38     virtual int tagPriority() const { return 10; }
39     virtual bool checkDTD(const Node* newChild);
40 
41     virtual bool mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const;
42     virtual void parseMappedAttribute(MappedAttribute*);
43 
44     virtual void attach();
45     virtual bool rendererIsNeeded(RenderStyle*);
46     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
47 
48     virtual void defaultEventHandler(Event*);
49 
hasFrameBorder()50     bool hasFrameBorder() const { return frameborder; }
noResize()51     bool noResize() const { return noresize; }
52 
totalRows()53     int totalRows() const { return m_totalRows; }
totalCols()54     int totalCols() const { return m_totalCols; }
border()55     int border() const { return m_border; }
56 
hasBorderColor()57     bool hasBorderColor() const { return m_borderColorSet; }
58 
59     virtual void recalcStyle(StyleChange);
60 
61     String cols() const;
62     void setCols(const String&);
63 
64     String rows() const;
65     void setRows(const String&);
66 
rowLengths()67     const Length* rowLengths() const { return m_rows; }
colLengths()68     const Length* colLengths() const { return m_cols; }
69 
70     // Event handler attributes
71     virtual EventListener* onblur() const;
72     virtual void setOnblur(PassRefPtr<EventListener>);
73     virtual EventListener* onerror() const;
74     virtual void setOnerror(PassRefPtr<EventListener>);
75     virtual EventListener* onfocus() const;
76     virtual void setOnfocus(PassRefPtr<EventListener>);
77     virtual EventListener* onload() const;
78     virtual void setOnload(PassRefPtr<EventListener>);
79 
80     EventListener* onbeforeunload() const;
81     void setOnbeforeunload(PassRefPtr<EventListener>);
82     EventListener* onmessage() const;
83     void setOnmessage(PassRefPtr<EventListener>);
84     EventListener* onoffline() const;
85     void setOnoffline(PassRefPtr<EventListener>);
86     EventListener* ononline() const;
87     void setOnonline(PassRefPtr<EventListener>);
88     EventListener* onresize() const;
89     void setOnresize(PassRefPtr<EventListener>);
90     EventListener* onstorage() const;
91     void setOnstorage(PassRefPtr<EventListener>);
92     EventListener* onunload() const;
93     void setOnunload(PassRefPtr<EventListener>);
94 
95 private:
96     Length* m_rows;
97     Length* m_cols;
98 
99     int m_totalRows;
100     int m_totalCols;
101 
102     int m_border;
103     bool m_borderSet;
104 
105     bool m_borderColorSet;
106 
107     bool frameborder;
108     bool frameBorderSet;
109     bool noresize;
110 };
111 
112 } // namespace WebCore
113 
114 #endif // HTMLFrameSetElement_h
115