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

Unified Diff: Source/core/dom/shadow/ElementShadow.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/TreeScope.cpp ('k') | Source/core/dom/shadow/InsertionPoint.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/shadow/ElementShadow.cpp
diff --git a/Source/core/dom/shadow/ElementShadow.cpp b/Source/core/dom/shadow/ElementShadow.cpp
index 1224962e4b06c4cba455aeb886742d57df4ee9e4..d6995115dac4642a4504c63d62f8c648468edc92 100644
--- a/Source/core/dom/shadow/ElementShadow.cpp
+++ b/Source/core/dom/shadow/ElementShadow.cpp
@@ -57,7 +57,7 @@ ElementShadow::~ElementShadow()
ShadowRoot* ElementShadow::addShadowRoot(Element* shadowHost, ShadowRoot::ShadowRootType type)
{
- RefPtr<ShadowRoot> shadowRoot = ShadowRoot::create(shadowHost->document(), type);
+ RefPtr<ShadowRoot> shadowRoot = ShadowRoot::create(&shadowHost->document(), type);
shadowRoot->setParentOrShadowHostNode(shadowHost);
shadowRoot->setParentTreeScope(shadowHost->treeScope());
@@ -82,14 +82,14 @@ void ElementShadow::removeAllShadowRoots()
while (RefPtr<ShadowRoot> oldRoot = m_shadowRoots.head()) {
InspectorInstrumentation::willPopShadowRoot(shadowHost, oldRoot.get());
- shadowHost->document()->removeFocusedElementOfSubtree(oldRoot.get());
+ shadowHost->document().removeFocusedElementOfSubtree(oldRoot.get());
if (oldRoot->attached())
oldRoot->detach();
m_shadowRoots.removeHead();
oldRoot->setParentOrShadowHostNode(0);
- oldRoot->setParentTreeScope(shadowHost->document());
+ oldRoot->setParentTreeScope(&shadowHost->document());
oldRoot->setPrev(0);
oldRoot->setNext(0);
ChildNodeRemovalNotifier(shadowHost).notify(oldRoot.get());
« no previous file with comments | « Source/core/dom/TreeScope.cpp ('k') | Source/core/dom/shadow/InsertionPoint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698