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

Unified Diff: Source/core/editing/htmlediting.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/editing/WrapContentsInDummySpanCommand.cpp ('k') | Source/core/editing/markup.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/htmlediting.cpp
diff --git a/Source/core/editing/htmlediting.cpp b/Source/core/editing/htmlediting.cpp
index a8bbe1d6bddabd054ae139f7d04b08ba0f05de6e..60e97ee0eacb05d7466a889ce3ae5cc1731c1419 100644
--- a/Source/core/editing/htmlediting.cpp
+++ b/Source/core/editing/htmlediting.cpp
@@ -159,7 +159,7 @@ bool isEditablePosition(const Position& p, EditableType editableType, EUpdateSty
if (!node)
return false;
if (updateStyle == UpdateStyle)
- node->document()->updateLayoutIgnorePendingStylesheets();
+ node->document().updateLayoutIgnorePendingStylesheets();
else
ASSERT(updateStyle == DoNotUpdateStyle);
@@ -1058,15 +1058,15 @@ int indexForVisiblePosition(const VisiblePosition& visiblePosition, RefPtr<Conta
return 0;
Position p(visiblePosition.deepEquivalent());
- Document* document = p.anchorNode()->document();
+ Document& document = p.anchorNode()->document();
ShadowRoot* shadowRoot = p.anchorNode()->containingShadowRoot();
if (shadowRoot)
scope = shadowRoot;
else
- scope = document->documentElement();
+ scope = document.documentElement();
- RefPtr<Range> range = Range::create(document, firstPositionInNode(scope.get()), p.parentAnchoredEquivalent());
+ RefPtr<Range> range = Range::create(&document, firstPositionInNode(scope.get()), p.parentAnchoredEquivalent());
return TextIterator::rangeLength(range.get(), true);
}
« no previous file with comments | « Source/core/editing/WrapContentsInDummySpanCommand.cpp ('k') | Source/core/editing/markup.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698