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

Unified Diff: Source/core/html/HTMLBaseElement.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/HTMLAreaElement.cpp ('k') | Source/core/html/HTMLBodyElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLBaseElement.cpp
diff --git a/Source/core/html/HTMLBaseElement.cpp b/Source/core/html/HTMLBaseElement.cpp
index b9868cd6c9f9005582fd85e15d695827e01587f1..05c4ad66455e020fbebaa9ec2a5709b7e808fa78 100644
--- a/Source/core/html/HTMLBaseElement.cpp
+++ b/Source/core/html/HTMLBaseElement.cpp
@@ -48,7 +48,7 @@ PassRefPtr<HTMLBaseElement> HTMLBaseElement::create(const QualifiedName& tagName
void HTMLBaseElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name == hrefAttr || name == targetAttr)
- document()->processBaseElement();
+ document().processBaseElement();
else
HTMLElement::parseAttribute(name, value);
}
@@ -57,7 +57,7 @@ Node::InsertionNotificationRequest HTMLBaseElement::insertedInto(ContainerNode*
{
HTMLElement::insertedInto(insertionPoint);
if (insertionPoint->inDocument())
- document()->processBaseElement();
+ document().processBaseElement();
return InsertionDone;
}
@@ -65,7 +65,7 @@ void HTMLBaseElement::removedFrom(ContainerNode* insertionPoint)
{
HTMLElement::removedFrom(insertionPoint);
if (insertionPoint->inDocument())
- document()->processBaseElement();
+ document().processBaseElement();
}
bool HTMLBaseElement::isURLAttribute(const Attribute& attribute) const
@@ -86,11 +86,11 @@ KURL HTMLBaseElement::href() const
const AtomicString& attributeValue = fastGetAttribute(hrefAttr);
if (attributeValue.isNull())
- return document()->url();
+ return document().url();
- KURL url = document()->encoding().isValid() ?
- KURL(document()->url(), stripLeadingAndTrailingHTMLSpaces(attributeValue)) :
- KURL(document()->url(), stripLeadingAndTrailingHTMLSpaces(attributeValue), document()->encoding());
+ KURL url = document().encoding().isValid() ?
+ KURL(document().url(), stripLeadingAndTrailingHTMLSpaces(attributeValue)) :
+ KURL(document().url(), stripLeadingAndTrailingHTMLSpaces(attributeValue), document().encoding());
if (!url.isValid())
return KURL();
« no previous file with comments | « Source/core/html/HTMLAreaElement.cpp ('k') | Source/core/html/HTMLBodyElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698