Disable XBL. The loadBindings call was taking 0.1-0.25%. While I know how to get...
[WebKit-https.git] / WebCore / khtml / xbl / xbl_protoimplementation.cpp
1 #ifndef KHTML_NO_XBL
2
3 #include "xbl_protoimplementation.h"
4 #include "xbl_protobinding.h"
5
6 using DOM::DOMString;
7
8 namespace XBL
9 {
10
11 XBLPrototypeImplementation::XBLPrototypeImplementation(const DOM::DOMString& name, XBLPrototypeBinding* binding)
12 :m_name(name), m_binding(binding), m_member(0), m_compiled(false)
13 {
14
15 }
16
17
18 XBLPrototypeMember::XBLPrototypeMember(const DOMString& name)
19 :m_name(name), m_next(0)
20 {
21 }
22
23 void XBLPrototypeMember::appendData(const DOM::DOMString& data)
24 {
25     m_data += data;
26 }
27
28 XBLPrototypeMethod::XBLPrototypeMethod(const DOM::DOMString& name)
29 :XBLPrototypeMember(name)
30 {
31 }
32
33 bool XBLPrototypeMethod::isConstructor() const
34 {
35     return false;
36 }
37
38 bool XBLPrototypeMethod::isDestructor() const
39 {
40     return false;
41 }
42
43 void XBLPrototypeMethod::addParameter(const DOM::DOMString& name)
44 {
45     XBLPrototypeParameter* last = 0;
46     for (XBLPrototypeParameter* curr = m_parameter; curr; curr = curr->next())
47         last = curr;
48     if (last)
49         m_parameter = new XBLPrototypeParameter(name);
50     else
51         last->setNext(new XBLPrototypeParameter(name));
52 }
53
54 XBLPrototypeConstructor::XBLPrototypeConstructor()
55 :XBLPrototypeMethod("_constructor")
56 {}
57
58 bool XBLPrototypeConstructor::isConstructor() const
59 {
60     return true;
61 }
62
63 XBLPrototypeDestructor::XBLPrototypeDestructor()
64 :XBLPrototypeMethod("_destructor")
65 {}
66
67 bool XBLPrototypeDestructor::isDestructor() const
68 {
69     return true;
70 }
71
72 XBLPrototypeField::XBLPrototypeField(const DOM::DOMString& name, bool readonly)
73 :XBLPrototypeMember(name), m_readonly(readonly)
74 {
75 }
76
77 XBLPrototypeProperty::XBLPrototypeProperty(const DOM::DOMString& name, bool readonly, 
78                                            const DOM::DOMString& onget,
79                                            const DOM::DOMString& onset)
80 :XBLPrototypeMember(name), m_setter(onset), m_readonly(readonly)
81 {
82     m_data = onget;
83 }
84
85 void XBLPrototypeProperty::appendGetterText(const DOM::DOMString& text)
86 {
87     return appendData(text);
88 }
89
90 void XBLPrototypeProperty::appendSetterText(const DOM::DOMString& text)
91 {
92     m_setter += text;
93 }
94
95 }
96
97 #endif // KHTML_NO_XBL