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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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/StyleElement.cpp ('k') | Source/core/dom/TreeScope.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 425aabd7d20b2ecfa1744e117ec930b07e2d1a19..7a39eda580c161b4ca53126f8d575f2e416eb46d 100644
--- a/Source/core/dom/Text.cpp
+++ b/Source/core/dom/Text.cpp
@@ -73,7 +73,7 @@ PassRefPtr<Text> Text::splitText(unsigned offset, ExceptionState& es)
return 0;
if (parentNode())
- document()->textNodeSplit(this);
+ document().textNodeSplit(this);
if (renderer())
toRenderText(renderer())->setTextWithOffset(dataImpl(), 0, oldStr.length());
@@ -271,7 +271,7 @@ bool Text::recalcTextStyle(StyleChange change)
{
if (RenderText* renderer = toRenderText(this->renderer())) {
if (change != NoChange || needsStyleRecalc())
- renderer->setStyle(document()->styleResolver()->styleForText(this));
+ renderer->setStyle(document().styleResolver()->styleForText(this));
if (needsStyleRecalc())
renderer->setText(dataImpl());
clearNeedsStyleRecalc();
@@ -314,7 +314,7 @@ 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)
« no previous file with comments | « Source/core/dom/StyleElement.cpp ('k') | Source/core/dom/TreeScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698