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

Side by Side Diff: Source/core/dom/Document.h

Issue 108483002: Have Document::parseQualifiedName() deal with AtomicStrings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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
« no previous file with comments | « Source/core/dom/DOMImplementation.cpp ('k') | Source/core/dom/Document.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 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 bool hasManifest() const; 283 bool hasManifest() const;
284 284
285 Location* location() const; 285 Location* location() const;
286 286
287 PassRefPtr<Element> createElement(const AtomicString& name, ExceptionState&) ; 287 PassRefPtr<Element> createElement(const AtomicString& name, ExceptionState&) ;
288 PassRefPtr<DocumentFragment> createDocumentFragment(); 288 PassRefPtr<DocumentFragment> createDocumentFragment();
289 PassRefPtr<Text> createTextNode(const String& data); 289 PassRefPtr<Text> createTextNode(const String& data);
290 PassRefPtr<Comment> createComment(const String& data); 290 PassRefPtr<Comment> createComment(const String& data);
291 PassRefPtr<CDATASection> createCDATASection(const String& data, ExceptionSta te&); 291 PassRefPtr<CDATASection> createCDATASection(const String& data, ExceptionSta te&);
292 PassRefPtr<ProcessingInstruction> createProcessingInstruction(const String& target, const String& data, ExceptionState&); 292 PassRefPtr<ProcessingInstruction> createProcessingInstruction(const String& target, const String& data, ExceptionState&);
293 PassRefPtr<Attr> createAttribute(const String& name, ExceptionState&); 293 PassRefPtr<Attr> createAttribute(const AtomicString& name, ExceptionState&);
294 PassRefPtr<Attr> createAttributeNS(const String& namespaceURI, const String& qualifiedName, ExceptionState&, bool shouldIgnoreNamespaceChecks = false); 294 PassRefPtr<Attr> createAttributeNS(const AtomicString& namespaceURI, const A tomicString& qualifiedName, ExceptionState&, bool shouldIgnoreNamespaceChecks = false);
295 PassRefPtr<Node> importNode(Node* importedNode, ExceptionState& ec) { return importNode(importedNode, true, ec); } 295 PassRefPtr<Node> importNode(Node* importedNode, ExceptionState& ec) { return importNode(importedNode, true, ec); }
296 PassRefPtr<Node> importNode(Node* importedNode, bool deep, ExceptionState&); 296 PassRefPtr<Node> importNode(Node* importedNode, bool deep, ExceptionState&);
297 PassRefPtr<Element> createElementNS(const String& namespaceURI, const String & qualifiedName, ExceptionState&); 297 PassRefPtr<Element> createElementNS(const AtomicString& namespaceURI, const AtomicString& qualifiedName, ExceptionState&);
298 PassRefPtr<Element> createElement(const QualifiedName&, bool createdByParser ); 298 PassRefPtr<Element> createElement(const QualifiedName&, bool createdByParser );
299 299
300 PassRefPtr<DOMNamedFlowCollection> webkitGetNamedFlows(); 300 PassRefPtr<DOMNamedFlowCollection> webkitGetNamedFlows();
301 301
302 NamedFlowCollection* namedFlows(); 302 NamedFlowCollection* namedFlows();
303 303
304 bool regionBasedColumnsEnabled() const; 304 bool regionBasedColumnsEnabled() const;
305 305
306 /** 306 /**
307 * Retrieve all nodes that intersect a rect in the window's document, until it is fully enclosed by 307 * Retrieve all nodes that intersect a rect in the window's document, until it is fully enclosed by
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 const KURL& firstPartyForCookies() const; 747 const KURL& firstPartyForCookies() const;
748 748
749 // The following implements the rule from HTML 4 for what valid names are. 749 // The following implements the rule from HTML 4 for what valid names are.
750 // To get this right for all the XML cases, we probably have to improve this or move it 750 // To get this right for all the XML cases, we probably have to improve this or move it
751 // and make it sensitive to the type of document. 751 // and make it sensitive to the type of document.
752 static bool isValidName(const String&); 752 static bool isValidName(const String&);
753 753
754 // The following breaks a qualified name into a prefix and a local name. 754 // The following breaks a qualified name into a prefix and a local name.
755 // It also does a validity check, and returns false if the qualified name 755 // It also does a validity check, and returns false if the qualified name
756 // is invalid. It also sets ExceptionCode when name is invalid. 756 // is invalid. It also sets ExceptionCode when name is invalid.
757 static bool parseQualifiedName(const String& qualifiedName, String& prefix, String& localName, ExceptionState&); 757 static bool parseQualifiedName(const AtomicString& qualifiedName, AtomicStri ng& prefix, AtomicString& localName, ExceptionState&);
758 758
759 // Checks to make sure prefix and namespace do not conflict (per DOM Core 3) 759 // Checks to make sure prefix and namespace do not conflict (per DOM Core 3)
760 static bool hasValidNamespaceForElements(const QualifiedName&); 760 static bool hasValidNamespaceForElements(const QualifiedName&);
761 static bool hasValidNamespaceForAttributes(const QualifiedName&); 761 static bool hasValidNamespaceForAttributes(const QualifiedName&);
762 762
763 HTMLElement* body() const; 763 HTMLElement* body() const;
764 void setBody(PassRefPtr<HTMLElement>, ExceptionState&); 764 void setBody(PassRefPtr<HTMLElement>, ExceptionState&);
765 765
766 HTMLHeadElement* head(); 766 HTMLHeadElement* head();
767 767
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 bool isInDocumentWrite() { return m_writeRecursionDepth > 0; } 937 bool isInDocumentWrite() { return m_writeRecursionDepth > 0; }
938 938
939 IntSize initialViewportSize() const; 939 IntSize initialViewportSize() const;
940 940
941 // There are currently two parallel autosizing implementations: TextAutosize r and FastTextAutosizer. 941 // There are currently two parallel autosizing implementations: TextAutosize r and FastTextAutosizer.
942 // See http://tinyurl.com/chromium-fast-autosizer for more details. 942 // See http://tinyurl.com/chromium-fast-autosizer for more details.
943 TextAutosizer* textAutosizer(); 943 TextAutosizer* textAutosizer();
944 FastTextAutosizer* fastTextAutosizer(); 944 FastTextAutosizer* fastTextAutosizer();
945 945
946 PassRefPtr<Element> createElement(const AtomicString& localName, const Atomi cString& typeExtension, ExceptionState&); 946 PassRefPtr<Element> createElement(const AtomicString& localName, const Atomi cString& typeExtension, ExceptionState&);
947 PassRefPtr<Element> createElementNS(const AtomicString& namespaceURI, const String& qualifiedName, const AtomicString& typeExtension, ExceptionState&); 947 PassRefPtr<Element> createElementNS(const AtomicString& namespaceURI, const AtomicString& qualifiedName, const AtomicString& typeExtension, ExceptionState&) ;
948 ScriptValue registerElement(WebCore::ScriptState*, const AtomicString& name, ExceptionState&); 948 ScriptValue registerElement(WebCore::ScriptState*, const AtomicString& name, ExceptionState&);
949 ScriptValue registerElement(WebCore::ScriptState*, const AtomicString& name, const Dictionary& options, ExceptionState&, CustomElement::NameSet validNames = CustomElement::StandardNames); 949 ScriptValue registerElement(WebCore::ScriptState*, const AtomicString& name, const Dictionary& options, ExceptionState&, CustomElement::NameSet validNames = CustomElement::StandardNames);
950 CustomElementRegistrationContext* registrationContext() { return m_registrat ionContext.get(); } 950 CustomElementRegistrationContext* registrationContext() { return m_registrat ionContext.get(); }
951 951
952 void setImport(HTMLImport*); 952 void setImport(HTMLImport*);
953 HTMLImport* import() const { return m_import; } 953 HTMLImport* import() const { return m_import; }
954 bool haveImportsLoaded() const; 954 bool haveImportsLoaded() const;
955 void didLoadAllImports(); 955 void didLoadAllImports();
956 956
957 void adjustFloatQuadsForScrollAndAbsoluteZoom(Vector<FloatQuad>&, RenderObje ct&); 957 void adjustFloatQuadsForScrollAndAbsoluteZoom(Vector<FloatQuad>&, RenderObje ct&);
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 inline bool Node::isDocumentNode() const 1359 inline bool Node::isDocumentNode() const
1360 { 1360 {
1361 return this == documentInternal(); 1361 return this == documentInternal();
1362 } 1362 }
1363 1363
1364 Node* eventTargetNodeForDocument(Document*); 1364 Node* eventTargetNodeForDocument(Document*);
1365 1365
1366 } // namespace WebCore 1366 } // namespace WebCore
1367 1367
1368 #endif // Document_h 1368 #endif // Document_h
OLDNEW
« no previous file with comments | « Source/core/dom/DOMImplementation.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698