Disable XBL. The loadBindings call was taking 0.1-0.25%. While I know how to get...
[WebKit-https.git] / WebCore / khtml / xbl / xbl_docimpl.cpp
1 #ifndef KHTML_NO_XBL
2
3 #include "xbl_docimpl.h"
4 #include "xbl_tokenizer.h"
5 #include "xbl_protobinding.h"
6
7 using DOM::DocumentImpl;
8
9 namespace XBL {
10
11 XBLDocumentImpl::XBLDocumentImpl()
12 :DocumentImpl(0,0)
13 {
14     m_prototypeBindingTable.setAutoDelete(true); // The prototype bindings will be deleted when the XBL document dies.
15 }
16
17 XBLDocumentImpl::~XBLDocumentImpl()
18 {
19 }
20
21 XMLHandler* XBLDocumentImpl::createTokenHandler()
22 {
23     return new XBLTokenHandler(docPtr());
24 }
25
26 void XBLDocumentImpl::setPrototypeBinding(const DOM::DOMString& id, XBLPrototypeBinding* binding)
27 {
28     m_prototypeBindingTable.replace(id.string(), binding);
29 }
30
31 XBLPrototypeBinding* XBLDocumentImpl::prototypeBinding(const DOM::DOMString& id)
32 {
33     if (id.length() == 0)
34         return 0;
35     
36     return m_prototypeBindingTable.find(id.string());
37 }
38
39 }
40
41 #endif