Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Side by Side Diff: Source/core/html/HTMLDocument.h

Issue 18808004: Refactoring: Extract DocumentInit for capture Document construction parameter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed webkit_unit_tests build failure. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/markup.cpp ('k') | Source/core/html/HTMLDocument.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2004, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 17 matching lines...) Expand all
28 #include "wtf/HashCountedSet.h" 28 #include "wtf/HashCountedSet.h"
29 29
30 namespace WebCore { 30 namespace WebCore {
31 31
32 class FrameView; 32 class FrameView;
33 class HTMLBodyElement; 33 class HTMLBodyElement;
34 class HTMLElement; 34 class HTMLElement;
35 35
36 class HTMLDocument : public Document, public CachedResourceClient { 36 class HTMLDocument : public Document, public CachedResourceClient {
37 public: 37 public:
38 static PassRefPtr<HTMLDocument> create(Frame* frame, const KURL& url) 38 static PassRefPtr<HTMLDocument> create(const DocumentInit& initializer = Doc umentInit())
39 { 39 {
40 return adoptRef(new HTMLDocument(frame, url)); 40 return adoptRef(new HTMLDocument(initializer));
41 } 41 }
42 virtual ~HTMLDocument(); 42 virtual ~HTMLDocument();
43 43
44 String dir(); 44 String dir();
45 void setDir(const String&); 45 void setDir(const String&);
46 46
47 String designMode() const; 47 String designMode() const;
48 void setDesignMode(const String&); 48 void setDesignMode(const String&);
49 49
50 Element* activeElement(); 50 Element* activeElement();
(...skipping 16 matching lines...) Expand all
67 void removeNamedItem(const AtomicString& name); 67 void removeNamedItem(const AtomicString& name);
68 bool hasNamedItem(AtomicStringImpl* name); 68 bool hasNamedItem(AtomicStringImpl* name);
69 69
70 void addExtraNamedItem(const AtomicString& name); 70 void addExtraNamedItem(const AtomicString& name);
71 void removeExtraNamedItem(const AtomicString& name); 71 void removeExtraNamedItem(const AtomicString& name);
72 bool hasExtraNamedItem(AtomicStringImpl* name); 72 bool hasExtraNamedItem(AtomicStringImpl* name);
73 73
74 static bool isCaseSensitiveAttribute(const QualifiedName&); 74 static bool isCaseSensitiveAttribute(const QualifiedName&);
75 75
76 protected: 76 protected:
77 HTMLDocument(Frame*, const KURL&, DocumentClassFlags extendedDocumentClasses = DefaultDocumentClass); 77 HTMLDocument(const DocumentInit&, DocumentClassFlags extendedDocumentClasses = DefaultDocumentClass);
78 78
79 private: 79 private:
80 HTMLBodyElement* bodyAsHTMLBodyElement() const; 80 HTMLBodyElement* bodyAsHTMLBodyElement() const;
81 void addItemToMap(HashCountedSet<AtomicStringImpl*>&, const AtomicString&); 81 void addItemToMap(HashCountedSet<AtomicStringImpl*>&, const AtomicString&);
82 void removeItemFromMap(HashCountedSet<AtomicStringImpl*>&, const AtomicStrin g&); 82 void removeItemFromMap(HashCountedSet<AtomicStringImpl*>&, const AtomicStrin g&);
83 83
84 HashCountedSet<AtomicStringImpl*> m_namedItemCounts; 84 HashCountedSet<AtomicStringImpl*> m_namedItemCounts;
85 HashCountedSet<AtomicStringImpl*> m_extraNamedItemCounts; 85 HashCountedSet<AtomicStringImpl*> m_extraNamedItemCounts;
86 }; 86 };
87 87
(...skipping 20 matching lines...) Expand all
108 ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument()); 108 ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument());
109 return static_cast<const HTMLDocument*>(document); 109 return static_cast<const HTMLDocument*>(document);
110 } 110 }
111 111
112 // This will catch anyone doing an unnecessary cast. 112 // This will catch anyone doing an unnecessary cast.
113 void toHTMLDocument(const HTMLDocument*); 113 void toHTMLDocument(const HTMLDocument*);
114 114
115 } // namespace WebCore 115 } // namespace WebCore
116 116
117 #endif // HTMLDocument_h 117 #endif // HTMLDocument_h
OLDNEW
« no previous file with comments | « Source/core/editing/markup.cpp ('k') | Source/core/html/HTMLDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698