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

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

Issue 126713004: Remove Node.prefix so it's no longer visible to script. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove spurious OVERRIDE. Created 6 years, 11 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/dom/Element.cpp ('k') | Source/core/dom/Node.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 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 void insertBefore(PassRefPtr<Node> newChild, Node* refChild, ExceptionState& = ASSERT_NO_EXCEPTION); 199 void insertBefore(PassRefPtr<Node> newChild, Node* refChild, ExceptionState& = ASSERT_NO_EXCEPTION);
200 void replaceChild(PassRefPtr<Node> newChild, Node* oldChild, ExceptionState& = ASSERT_NO_EXCEPTION); 200 void replaceChild(PassRefPtr<Node> newChild, Node* oldChild, ExceptionState& = ASSERT_NO_EXCEPTION);
201 void removeChild(Node* child, ExceptionState&); 201 void removeChild(Node* child, ExceptionState&);
202 void appendChild(PassRefPtr<Node> newChild, ExceptionState& = ASSERT_NO_EXCE PTION); 202 void appendChild(PassRefPtr<Node> newChild, ExceptionState& = ASSERT_NO_EXCE PTION);
203 203
204 bool hasChildNodes() const { return firstChild(); } 204 bool hasChildNodes() const { return firstChild(); }
205 virtual PassRefPtr<Node> cloneNode(bool deep = false) = 0; 205 virtual PassRefPtr<Node> cloneNode(bool deep = false) = 0;
206 virtual const AtomicString& localName() const; 206 virtual const AtomicString& localName() const;
207 virtual const AtomicString& namespaceURI() const; 207 virtual const AtomicString& namespaceURI() const;
208 virtual const AtomicString& prefix() const; 208 virtual const AtomicString& prefix() const;
209 virtual void setPrefix(const AtomicString&, ExceptionState&);
210 void normalize(); 209 void normalize();
211 210
212 bool isSameNode(Node* other) const { return this == other; } 211 bool isSameNode(Node* other) const { return this == other; }
213 bool isEqualNode(Node*) const; 212 bool isEqualNode(Node*) const;
214 bool isDefaultNamespace(const AtomicString& namespaceURI) const; 213 bool isDefaultNamespace(const AtomicString& namespaceURI) const;
215 const AtomicString& lookupPrefix(const AtomicString& namespaceURI) const; 214 const AtomicString& lookupPrefix(const AtomicString& namespaceURI) const;
216 const AtomicString& lookupNamespaceURI(const String& prefix) const; 215 const AtomicString& lookupNamespaceURI(const String& prefix) const;
217 const AtomicString& lookupNamespacePrefix(const AtomicString& namespaceURI, const Element* originalElement) const; 216 const AtomicString& lookupNamespacePrefix(const AtomicString& namespaceURI, const Element* originalElement) const;
218 217
219 String textContent(bool convertBRsToNewlines = false) const; 218 String textContent(bool convertBRsToNewlines = false) const;
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 return getFlag(InDocumentFlag); 477 return getFlag(InDocumentFlag);
479 } 478 }
480 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); } 479 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); }
481 bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumen tFlag | IsInShadowTreeFlag)); } 480 bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumen tFlag | IsInShadowTreeFlag)); }
482 481
483 bool isDocumentTypeNode() const { return nodeType() == DOCUMENT_TYPE_NODE; } 482 bool isDocumentTypeNode() const { return nodeType() == DOCUMENT_TYPE_NODE; }
484 virtual bool childTypeAllowed(NodeType) const { return false; } 483 virtual bool childTypeAllowed(NodeType) const { return false; }
485 unsigned childNodeCount() const; 484 unsigned childNodeCount() const;
486 Node* childNode(unsigned index) const; 485 Node* childNode(unsigned index) const;
487 486
488 void checkSetPrefix(const AtomicString& prefix, ExceptionState&);
489 bool isDescendantOf(const Node*) const; 487 bool isDescendantOf(const Node*) const;
490 bool contains(const Node*) const; 488 bool contains(const Node*) const;
491 bool containsIncludingShadowDOM(const Node*) const; 489 bool containsIncludingShadowDOM(const Node*) const;
492 bool containsIncludingHostElements(const Node&) const; 490 bool containsIncludingHostElements(const Node&) const;
493 Node* commonAncestor(const Node&, Node* (*parent)(const Node&)); 491 Node* commonAncestor(const Node&, Node* (*parent)(const Node&));
494 492
495 // FIXME: Remove this when crbug.com/265716 cleans up contains semantics. 493 // FIXME: Remove this when crbug.com/265716 cleans up contains semantics.
496 bool bindingsContains(const Node* node) const { return containsIncludingShad owDOM(node); } 494 bool bindingsContains(const Node* node) const { return containsIncludingShad owDOM(node); }
497 495
498 // Used to determine whether range offsets use characters or node indices. 496 // Used to determine whether range offsets use characters or node indices.
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 // isTreeScopeInitialized() can be false 794 // isTreeScopeInitialized() can be false
797 // - in the destruction of Document or ShadowRoot where m_treeScope is set t o null or 795 // - in the destruction of Document or ShadowRoot where m_treeScope is set t o null or
798 // - in the Node constructor called by these two classes where m_treeScope i s set by TreeScope ctor. 796 // - in the Node constructor called by these two classes where m_treeScope i s set by TreeScope ctor.
799 bool isTreeScopeInitialized() const { return m_treeScope; } 797 bool isTreeScopeInitialized() const { return m_treeScope; }
800 798
801 void markAncestorsWithChildNeedsStyleRecalc(); 799 void markAncestorsWithChildNeedsStyleRecalc();
802 800
803 bool isParsingChildrenFinished() const { return getFlag(IsParsingChildrenFin ishedFlag); } 801 bool isParsingChildrenFinished() const { return getFlag(IsParsingChildrenFin ishedFlag); }
804 void setIsParsingChildrenFinished(bool value) { setFlag(value, IsParsingChil drenFinishedFlag); } 802 void setIsParsingChildrenFinished(bool value) { setFlag(value, IsParsingChil drenFinishedFlag); }
805 803
804 void checkSetPrefix(const AtomicString& prefix, ExceptionState&);
805
806 private: 806 private:
807 friend class TreeShared<Node>; 807 friend class TreeShared<Node>;
808 808
809 virtual PseudoId customPseudoId() const 809 virtual PseudoId customPseudoId() const
810 { 810 {
811 ASSERT(hasCustomStyleCallbacks()); 811 ASSERT(hasCustomStyleCallbacks());
812 return NOPSEUDO; 812 return NOPSEUDO;
813 } 813 }
814 814
815 void removedLastRef(); 815 void removedLastRef();
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 922
923 } // namespace WebCore 923 } // namespace WebCore
924 924
925 #ifndef NDEBUG 925 #ifndef NDEBUG
926 // Outside the WebCore namespace for ease of invocation from gdb. 926 // Outside the WebCore namespace for ease of invocation from gdb.
927 void showTree(const WebCore::Node*); 927 void showTree(const WebCore::Node*);
928 void showNodePath(const WebCore::Node*); 928 void showNodePath(const WebCore::Node*);
929 #endif 929 #endif
930 930
931 #endif 931 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698