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

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

Issue 23523012: Have CustomElement::didEnterDocument() / didLeaveDocument() take a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/CustomElement.h ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/CustomElement.cpp
diff --git a/Source/core/dom/CustomElement.cpp b/Source/core/dom/CustomElement.cpp
index 0529882b8d4e0f1fd3006eca00ee002fe7188b60..8c27b0fee45008643225dfef6b88196fe26f79b9 100644
--- a/Source/core/dom/CustomElement.cpp
+++ b/Source/core/dom/CustomElement.cpp
@@ -132,18 +132,18 @@ void CustomElement::attributeDidChange(Element* element, const AtomicString& nam
CustomElementCallbackScheduler::scheduleAttributeChangedCallback(definitionFor(element)->callbacks(), element, name, oldValue, newValue);
}
-void CustomElement::didEnterDocument(Element* element, Document* document)
+void CustomElement::didEnterDocument(Element* element, const Document& document)
{
ASSERT(element->customElementState() == Element::Upgraded);
- if (!document->defaultView())
+ if (!document.defaultView())
return;
CustomElementCallbackScheduler::scheduleEnteredDocumentCallback(definitionFor(element)->callbacks(), element);
}
-void CustomElement::didLeaveDocument(Element* element, Document* document)
+void CustomElement::didLeaveDocument(Element* element, const Document& document)
{
ASSERT(element->customElementState() == Element::Upgraded);
- if (!document->defaultView())
+ if (!document.defaultView())
return;
CustomElementCallbackScheduler::scheduleLeftDocumentCallback(definitionFor(element)->callbacks(), element);
}
« no previous file with comments | « Source/core/dom/CustomElement.h ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698