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

Unified Diff: Source/core/dom/Text.h

Issue 23513013: Have Text constructor take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/Text.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Text.h
diff --git a/Source/core/dom/Text.h b/Source/core/dom/Text.h
index 3cf2b52f239d4dd011365c4db33acd1bd59f20ef..5388fc846b0c93bd4eb5187d47db1818da17e919 100644
--- a/Source/core/dom/Text.h
+++ b/Source/core/dom/Text.h
@@ -35,14 +35,9 @@ class Text : public CharacterData {
public:
static const unsigned defaultLengthLimit = 1 << 16;
- static PassRefPtr<Text> create(Document& document, const String& data)
- {
- return create(&document, data);
- }
-
- static PassRefPtr<Text> create(Document*, const String&);
- static PassRefPtr<Text> createWithLengthLimit(Document*, const String&, unsigned positionInString, unsigned lengthLimit = defaultLengthLimit);
- static PassRefPtr<Text> createEditingText(Document*, const String&);
+ static PassRefPtr<Text> create(Document&, const String&);
+ static PassRefPtr<Text> createWithLengthLimit(Document&, const String&, unsigned positionInString, unsigned lengthLimit = defaultLengthLimit);
+ static PassRefPtr<Text> createEditingText(Document&, const String&);
PassRefPtr<Text> splitText(unsigned offset, ExceptionState&);
@@ -62,8 +57,8 @@ public:
virtual NodeType nodeType() const OVERRIDE;
protected:
- Text(TreeScope* treeScope, const String& data, ConstructionType type)
- : CharacterData(treeScope, data, type)
+ Text(TreeScope& treeScope, const String& data, ConstructionType type)
+ : CharacterData(&treeScope, data, type)
{
ScriptWrappable::init(this);
}
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/Text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698