Chromium Code Reviews

Unified Diff: Source/core/html/HTMLDetailsElement.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.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « Source/core/html/HTMLCanvasElement.cpp ('k') | Source/core/html/HTMLDialogElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLDetailsElement.cpp
diff --git a/Source/core/html/HTMLDetailsElement.cpp b/Source/core/html/HTMLDetailsElement.cpp
index 0db492d3b80eb5576bec726581e6f3d4bac689cc..46ffdebe149d52f4d91770c3ee473a33f3cf7cf2 100644
--- a/Source/core/html/HTMLDetailsElement.cpp
+++ b/Source/core/html/HTMLDetailsElement.cpp
@@ -59,15 +59,15 @@ void HTMLDetailsElement::didAddUserAgentShadowRoot(ShadowRoot* root)
{
DEFINE_STATIC_LOCAL(AtomicString, summarySelector, ("summary:first-of-type", AtomicString::ConstructFromLiteral));
- RefPtr<HTMLSummaryElement> defaultSummary = HTMLSummaryElement::create(summaryTag, document());
- defaultSummary->appendChild(Text::create(document(), defaultDetailsSummaryText()));
+ RefPtr<HTMLSummaryElement> defaultSummary = HTMLSummaryElement::create(summaryTag, &document());
+ defaultSummary->appendChild(Text::create(&document(), defaultDetailsSummaryText()));
- RefPtr<HTMLContentElement> content = HTMLContentElement::create(document());
+ RefPtr<HTMLContentElement> content = HTMLContentElement::create(&document());
content->setAttribute(selectAttr, summarySelector);
content->appendChild(defaultSummary);
root->appendChild(content);
- root->appendChild(HTMLContentElement::create(document()));
+ root->appendChild(HTMLContentElement::create(&document()));
}
Element* HTMLDetailsElement::findMainSummary() const
« no previous file with comments | « Source/core/html/HTMLCanvasElement.cpp ('k') | Source/core/html/HTMLDialogElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine