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

Unified Diff: Source/core/html/HTMLDetailsElement.cpp

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 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/html/HTMLDetailsElement.h ('k') | Source/core/html/HTMLDialogElement.h » ('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 46ffdebe149d52f4d91770c3ee473a33f3cf7cf2..454a8fffb0e48f62cf3945706e0803d37bc0e1b1 100644
--- a/Source/core/html/HTMLDetailsElement.cpp
+++ b/Source/core/html/HTMLDetailsElement.cpp
@@ -35,14 +35,14 @@ namespace WebCore {
using namespace HTMLNames;
-PassRefPtr<HTMLDetailsElement> HTMLDetailsElement::create(const QualifiedName& tagName, Document* document)
+PassRefPtr<HTMLDetailsElement> HTMLDetailsElement::create(const QualifiedName& tagName, Document& document)
{
RefPtr<HTMLDetailsElement> details = adoptRef(new HTMLDetailsElement(tagName, document));
details->ensureUserAgentShadowRoot();
return details.release();
}
-HTMLDetailsElement::HTMLDetailsElement(const QualifiedName& tagName, Document* document)
+HTMLDetailsElement::HTMLDetailsElement(const QualifiedName& tagName, Document& document)
: HTMLElement(tagName, document)
, m_isOpen(false)
{
@@ -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());
+ 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/HTMLDetailsElement.h ('k') | Source/core/html/HTMLDialogElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698