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

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

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/Text.h ('k') | Source/core/editing/CreateLinkCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Text.cpp
diff --git a/Source/core/dom/Text.cpp b/Source/core/dom/Text.cpp
index 7a39eda580c161b4ca53126f8d575f2e416eb46d..a62bb252c0e7aa9d63dab48badc5983c28a43475 100644
--- a/Source/core/dom/Text.cpp
+++ b/Source/core/dom/Text.cpp
@@ -41,12 +41,12 @@ using namespace std;
namespace WebCore {
-PassRefPtr<Text> Text::create(Document* document, const String& data)
+PassRefPtr<Text> Text::create(Document& document, const String& data)
{
return adoptRef(new Text(document, data, CreateText));
}
-PassRefPtr<Text> Text::createEditingText(Document* document, const String& data)
+PassRefPtr<Text> Text::createEditingText(Document& document, const String& data)
{
return adoptRef(new Text(document, data, CreateEditingText));
}
@@ -314,10 +314,10 @@ bool Text::childTypeAllowed(NodeType) const
PassRefPtr<Text> Text::cloneWithData(const String& data)
{
- return create(&document(), data);
+ return create(document(), data);
}
-PassRefPtr<Text> Text::createWithLengthLimit(Document* document, const String& data, unsigned start, unsigned lengthLimit)
+PassRefPtr<Text> Text::createWithLengthLimit(Document& document, const String& data, unsigned start, unsigned lengthLimit)
{
unsigned dataLength = data.length();
« no previous file with comments | « Source/core/dom/Text.h ('k') | Source/core/editing/CreateLinkCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698