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

Unified Diff: Source/core/html/HTMLTableElement.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/html/HTMLTableCellElement.cpp ('k') | Source/core/html/HTMLTablePartElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTableElement.cpp
diff --git a/Source/core/html/HTMLTableElement.cpp b/Source/core/html/HTMLTableElement.cpp
index 6950114fa3b382574cb7904f338e4cc02d68570f..3be27279f13f7a1343f21269b437a01a129fff2f 100644
--- a/Source/core/html/HTMLTableElement.cpp
+++ b/Source/core/html/HTMLTableElement.cpp
@@ -129,7 +129,7 @@ PassRefPtr<HTMLElement> HTMLTableElement::createTHead()
{
if (HTMLTableSectionElement* existingHead = tHead())
return existingHead;
- RefPtr<HTMLTableSectionElement> head = HTMLTableSectionElement::create(theadTag, document());
+ RefPtr<HTMLTableSectionElement> head = HTMLTableSectionElement::create(theadTag, &document());
setTHead(head, IGNORE_EXCEPTION);
return head.release();
}
@@ -143,7 +143,7 @@ PassRefPtr<HTMLElement> HTMLTableElement::createTFoot()
{
if (HTMLTableSectionElement* existingFoot = tFoot())
return existingFoot;
- RefPtr<HTMLTableSectionElement> foot = HTMLTableSectionElement::create(tfootTag, document());
+ RefPtr<HTMLTableSectionElement> foot = HTMLTableSectionElement::create(tfootTag, &document());
setTFoot(foot, IGNORE_EXCEPTION);
return foot.release();
}
@@ -155,7 +155,7 @@ void HTMLTableElement::deleteTFoot()
PassRefPtr<HTMLElement> HTMLTableElement::createTBody()
{
- RefPtr<HTMLTableSectionElement> body = HTMLTableSectionElement::create(tbodyTag, document());
+ RefPtr<HTMLTableSectionElement> body = HTMLTableSectionElement::create(tbodyTag, &document());
Node* referenceElement = lastBody() ? lastBody()->nextSibling() : 0;
insertBefore(body, referenceElement);
@@ -166,7 +166,7 @@ PassRefPtr<HTMLElement> HTMLTableElement::createCaption()
{
if (HTMLTableCaptionElement* existingCaption = caption())
return existingCaption;
- RefPtr<HTMLTableCaptionElement> caption = HTMLTableCaptionElement::create(captionTag, document());
+ RefPtr<HTMLTableCaptionElement> caption = HTMLTableCaptionElement::create(captionTag, &document());
setCaption(caption, IGNORE_EXCEPTION);
return caption.release();
}
@@ -218,15 +218,15 @@ PassRefPtr<HTMLElement> HTMLTableElement::insertRow(int index, ExceptionState& e
else {
parent = lastBody();
if (!parent) {
- RefPtr<HTMLTableSectionElement> newBody = HTMLTableSectionElement::create(tbodyTag, document());
- RefPtr<HTMLTableRowElement> newRow = HTMLTableRowElement::create(document());
+ RefPtr<HTMLTableSectionElement> newBody = HTMLTableSectionElement::create(tbodyTag, &document());
+ RefPtr<HTMLTableRowElement> newRow = HTMLTableRowElement::create(&document());
newBody->appendChild(newRow, es);
appendChild(newBody.release(), es);
return newRow.release();
}
}
- RefPtr<HTMLTableRowElement> newRow = HTMLTableRowElement::create(document());
+ RefPtr<HTMLTableRowElement> newRow = HTMLTableRowElement::create(&document());
parent->insertBefore(newRow, row.get(), es);
return newRow.release();
}
@@ -317,7 +317,7 @@ void HTMLTableElement::collectStyleForPresentationAttribute(const QualifiedName&
else if (name == backgroundAttr) {
String url = stripLeadingAndTrailingHTMLSpaces(value);
if (!url.isEmpty())
- style->setProperty(CSSProperty(CSSPropertyBackgroundImage, CSSImageValue::create(document()->completeURL(url).string())));
+ style->setProperty(CSSProperty(CSSPropertyBackgroundImage, CSSImageValue::create(document().completeURL(url).string())));
} else if (name == valignAttr) {
if (!value.isEmpty())
addPropertyToPresentationAttributeStyle(style, CSSPropertyVerticalAlign, value);
@@ -576,7 +576,7 @@ void HTMLTableElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) cons
{
HTMLElement::addSubresourceAttributeURLs(urls);
- addSubresourceURL(urls, document()->completeURL(getAttribute(backgroundAttr)));
+ addSubresourceURL(urls, document().completeURL(getAttribute(backgroundAttr)));
}
}
« no previous file with comments | « Source/core/html/HTMLTableCellElement.cpp ('k') | Source/core/html/HTMLTablePartElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698