~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/html/HTMLDocument.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3
3
 *           (C) 1999 Antti Koivisto (koivisto@kde.org)
4
 
 * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved.
 
4
 * Copyright (C) 2004, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
5
5
 *
6
6
 * This library is free software; you can redistribute it and/or
7
7
 * modify it under the terms of the GNU Library General Public
23
23
#ifndef HTMLDocument_h
24
24
#define HTMLDocument_h
25
25
 
 
26
#include "AtomicStringHash.h"
26
27
#include "CachedResourceClient.h"
27
28
#include "Document.h"
 
29
#include <wtf/HashCountedSet.h>
28
30
 
29
31
namespace WebCore {
30
32
 
35
37
public:
36
38
    static PassRefPtr<HTMLDocument> create(Frame* frame)
37
39
    {
38
 
        return new HTMLDocument(frame);
 
40
        return adoptRef(new HTMLDocument(frame));
39
41
    }
40
42
    virtual ~HTMLDocument();
41
43
 
69
71
    void captureEvents();
70
72
    void releaseEvents();
71
73
 
72
 
    virtual bool childAllowed(Node*);
73
 
 
74
 
    virtual PassRefPtr<Element> createElement(const AtomicString& tagName, ExceptionCode&);
75
 
 
76
74
    void addNamedItem(const AtomicString& name);
77
75
    void removeNamedItem(const AtomicString& name);
78
76
    bool hasNamedItem(AtomicStringImpl* name);
81
79
    void removeExtraNamedItem(const AtomicString& name);
82
80
    bool hasExtraNamedItem(AtomicStringImpl* name);
83
81
 
84
 
    typedef HashMap<AtomicStringImpl*, int> NameCountMap;
85
 
 
86
82
protected:
87
83
    HTMLDocument(Frame*);
88
84
 
89
85
private:
 
86
    virtual bool childAllowed(Node*);
 
87
 
 
88
    virtual PassRefPtr<Element> createElement(const AtomicString& tagName, ExceptionCode&);
 
89
 
90
90
    virtual bool isHTMLDocument() const { return true; }
 
91
    virtual bool isFrameSet() const;
91
92
    virtual Tokenizer* createTokenizer();
92
93
    virtual void determineParseMode();
93
94
 
94
 
    NameCountMap m_namedItemCounts;
95
 
    NameCountMap m_extraNamedItemCounts;
 
95
    HashCountedSet<AtomicStringImpl*> m_namedItemCounts;
 
96
    HashCountedSet<AtomicStringImpl*> m_extraNamedItemCounts;
96
97
};
97
98
 
98
99
inline bool HTMLDocument::hasNamedItem(AtomicStringImpl* name)
107
108
    return m_extraNamedItemCounts.contains(name);
108
109
}
109
110
 
110
 
} // namespace
 
111
} // namespace WebCore
111
112
 
112
 
#endif
 
113
#endif // HTMLDocument_h