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

Side by Side Diff: Source/core/css/StyleSheetContents.h

Issue 1322543004: CSSStyleSheet::insertRule should respect the default namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 static PassRefPtrWillBeRawPtr<StyleSheetContents> create(StyleRuleImport* ow nerRule, const String& originalURL, const CSSParserContext& context) 58 static PassRefPtrWillBeRawPtr<StyleSheetContents> create(StyleRuleImport* ow nerRule, const String& originalURL, const CSSParserContext& context)
59 { 59 {
60 return adoptRefWillBeNoop(new StyleSheetContents(ownerRule, originalURL, context)); 60 return adoptRefWillBeNoop(new StyleSheetContents(ownerRule, originalURL, context));
61 } 61 }
62 62
63 ~StyleSheetContents(); 63 ~StyleSheetContents();
64 64
65 const CSSParserContext& parserContext() const { return m_parserContext; } 65 const CSSParserContext& parserContext() const { return m_parserContext; }
66 66
67 const AtomicString& defaultNamespace() { return m_defaultNamespace; }
67 const AtomicString& determineNamespace(const AtomicString& prefix); 68 const AtomicString& determineNamespace(const AtomicString& prefix);
68 69
69 void parseAuthorStyleSheet(const CSSStyleSheetResource*, const SecurityOrigi n*); 70 void parseAuthorStyleSheet(const CSSStyleSheetResource*, const SecurityOrigi n*);
70 void parseString(const String&); 71 void parseString(const String&);
71 void parseStringAtPosition(const String&, const TextPosition&); 72 void parseStringAtPosition(const String&, const TextPosition&);
72 73
73 bool isCacheable() const; 74 bool isCacheable() const;
74 75
75 bool isLoading() const; 76 bool isLoading() const;
76 77
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 Document* clientSingleOwnerDocument() const; 168 Document* clientSingleOwnerDocument() const;
168 169
169 RawPtrWillBeMember<StyleRuleImport> m_ownerRule; 170 RawPtrWillBeMember<StyleRuleImport> m_ownerRule;
170 171
171 String m_originalURL; 172 String m_originalURL;
172 173
173 WillBeHeapVector<RefPtrWillBeMember<StyleRuleImport>> m_importRules; 174 WillBeHeapVector<RefPtrWillBeMember<StyleRuleImport>> m_importRules;
174 WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>> m_childRules; 175 WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>> m_childRules;
175 typedef HashMap<AtomicString, AtomicString> PrefixNamespaceURIMap; 176 typedef HashMap<AtomicString, AtomicString> PrefixNamespaceURIMap;
176 PrefixNamespaceURIMap m_namespaces; 177 PrefixNamespaceURIMap m_namespaces;
178 AtomicString m_defaultNamespace;
177 179
178 bool m_hasSyntacticallyValidCSSHeader : 1; 180 bool m_hasSyntacticallyValidCSSHeader : 1;
179 bool m_didLoadErrorOccur : 1; 181 bool m_didLoadErrorOccur : 1;
180 bool m_isMutable : 1; 182 bool m_isMutable : 1;
181 bool m_isInMemoryCache : 1; 183 bool m_isInMemoryCache : 1;
182 bool m_hasFontFaceRule : 1; 184 bool m_hasFontFaceRule : 1;
183 bool m_hasMediaQueries : 1; 185 bool m_hasMediaQueries : 1;
184 bool m_hasSingleOwnerDocument : 1; 186 bool m_hasSingleOwnerDocument : 1;
185 187
186 CSSParserContext m_parserContext; 188 CSSParserContext m_parserContext;
187 189
188 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet>> m_loadingClients; 190 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet>> m_loadingClients;
189 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet>> m_completedClients; 191 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet>> m_completedClients;
190 192
191 OwnPtrWillBeMember<RuleSet> m_ruleSet; 193 OwnPtrWillBeMember<RuleSet> m_ruleSet;
192 String m_sourceMapURL; 194 String m_sourceMapURL;
193 }; 195 };
194 196
195 } // namespace 197 } // namespace
196 198
197 #endif 199 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/namespaces/default-namespace-insert-rule.html ('k') | Source/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698