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

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

Issue 23437003: Implement cloneNode for Document (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use SecurityContext::isolatedCopy instead and domain change test Created 7 years, 2 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 | « LayoutTests/svg/custom/clone-node-expected.txt ('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 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 998
999 void adjustFloatQuadsForScrollAndAbsoluteZoom(Vector<FloatQuad>&, RenderObje ct*); 999 void adjustFloatQuadsForScrollAndAbsoluteZoom(Vector<FloatQuad>&, RenderObje ct*);
1000 void adjustFloatRectForScrollAndAbsoluteZoom(FloatRect&, RenderObject*); 1000 void adjustFloatRectForScrollAndAbsoluteZoom(FloatRect&, RenderObject*);
1001 1001
1002 bool hasActiveParser(); 1002 bool hasActiveParser();
1003 unsigned activeParserCount() { return m_activeParserCount; } 1003 unsigned activeParserCount() { return m_activeParserCount; }
1004 void incrementActiveParserCount() { ++m_activeParserCount; } 1004 void incrementActiveParserCount() { ++m_activeParserCount; }
1005 void decrementActiveParserCount(); 1005 void decrementActiveParserCount();
1006 1006
1007 void setContextFeatures(PassRefPtr<ContextFeatures>); 1007 void setContextFeatures(PassRefPtr<ContextFeatures>);
1008 ContextFeatures* contextFeatures() { return m_contextFeatures.get(); } 1008 ContextFeatures* contextFeatures() const { return m_contextFeatures.get(); }
1009 1009
1010 DocumentSharedObjectPool* sharedObjectPool() { return m_sharedObjectPool.get (); } 1010 DocumentSharedObjectPool* sharedObjectPool() { return m_sharedObjectPool.get (); }
1011 1011
1012 void didRemoveAllPendingStylesheet(); 1012 void didRemoveAllPendingStylesheet();
1013 void setNeedsNotifyRemoveAllPendingStylesheet() { m_needsNotifyRemoveAllPend ingStylesheet = true; } 1013 void setNeedsNotifyRemoveAllPendingStylesheet() { m_needsNotifyRemoveAllPend ingStylesheet = true; }
1014 void clearStyleResolver(); 1014 void clearStyleResolver();
1015 void notifySeamlessChildDocumentsOfStylesheetUpdate() const; 1015 void notifySeamlessChildDocumentsOfStylesheetUpdate() const;
1016 1016
1017 bool inStyleRecalc() { return m_inStyleRecalc; } 1017 bool inStyleRecalc() { return m_inStyleRecalc; }
1018 1018
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 1051
1052 protected: 1052 protected:
1053 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); 1053 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass);
1054 1054
1055 virtual void didUpdateSecurityOrigin() OVERRIDE; 1055 virtual void didUpdateSecurityOrigin() OVERRIDE;
1056 1056
1057 void clearXMLVersion() { m_xmlVersion = String(); } 1057 void clearXMLVersion() { m_xmlVersion = String(); }
1058 1058
1059 virtual void dispose() OVERRIDE; 1059 virtual void dispose() OVERRIDE;
1060 1060
1061 virtual PassRefPtr<Document> cloneDocumentWithoutChildren();
1062
1061 private: 1063 private:
1062 friend class Node; 1064 friend class Node;
1063 friend class IgnoreDestructiveWriteCountIncrementer; 1065 friend class IgnoreDestructiveWriteCountIncrementer;
1064 1066
1065 ScriptedAnimationController& ensureScriptedAnimationController(); 1067 ScriptedAnimationController& ensureScriptedAnimationController();
1066 virtual EventQueue* eventQueue() const FINAL; 1068 virtual EventQueue* eventQueue() const FINAL;
1067 1069
1068 void updateDistributionIfNeeded(); 1070 void updateDistributionIfNeeded();
1069 1071
1070 void detachParser(); 1072 void detachParser();
1071 1073
1072 virtual bool isDocument() const OVERRIDE { return true; } 1074 virtual bool isDocument() const OVERRIDE { return true; }
1073 1075
1074 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0); 1076 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0);
1075 1077
1076 virtual String nodeName() const; 1078 virtual String nodeName() const;
1077 virtual NodeType nodeType() const; 1079 virtual NodeType nodeType() const;
1078 virtual bool childTypeAllowed(NodeType) const; 1080 virtual bool childTypeAllowed(NodeType) const;
1079 virtual PassRefPtr<Node> cloneNode(bool deep = true); 1081 virtual PassRefPtr<Node> cloneNode(bool deep = true);
1082 void cloneDataFromDocument(const Document&);
1080 1083
1081 virtual void refExecutionContext() { ref(); } 1084 virtual void refExecutionContext() { ref(); }
1082 virtual void derefExecutionContext() { deref(); } 1085 virtual void derefExecutionContext() { deref(); }
1083 virtual PassOwnPtr<LifecycleNotifier> createLifecycleNotifier() OVERRIDE; 1086 virtual PassOwnPtr<LifecycleNotifier> createLifecycleNotifier() OVERRIDE;
1084 1087
1085 virtual const KURL& virtualURL() const; // Same as url(), but needed for Exe cutionContext to implement it without a performance loss for direct calls. 1088 virtual const KURL& virtualURL() const; // Same as url(), but needed for Exe cutionContext to implement it without a performance loss for direct calls.
1086 virtual KURL virtualCompleteURL(const String&) const; // Same as completeURL () for the same reason as above. 1089 virtual KURL virtualCompleteURL(const String&) const; // Same as completeURL () for the same reason as above.
1087 1090
1088 virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, ScriptState*); 1091 virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, ScriptState*);
1089 void internalAddMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>, Scrip tState*); 1092 void internalAddMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>, Scrip tState*);
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 inline bool Node::isDocumentNode() const 1418 inline bool Node::isDocumentNode() const
1416 { 1419 {
1417 return this == documentInternal(); 1420 return this == documentInternal();
1418 } 1421 }
1419 1422
1420 Node* eventTargetNodeForDocument(Document*); 1423 Node* eventTargetNodeForDocument(Document*);
1421 1424
1422 } // namespace WebCore 1425 } // namespace WebCore
1423 1426
1424 #endif // Document_h 1427 #endif // Document_h
OLDNEW
« no previous file with comments | « LayoutTests/svg/custom/clone-node-expected.txt ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698