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

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

Issue 239703007: Rename Node::lastDescendant() / Node::highestAncestor() for clarity (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename highestAncestor() as well Created 6 years, 8 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/HTMLFormElement.cpp ('k') | Source/core/inspector/PageConsoleAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLImageElement.cpp
diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp
index 205e0bad15aaee7c3d0ede62c4664317799e9b9a..f7bd98a18f95fb54b6e865414260d07a5ac7c274 100644
--- a/Source/core/html/HTMLImageElement.cpp
+++ b/Source/core/html/HTMLImageElement.cpp
@@ -127,7 +127,7 @@ HTMLFormElement* HTMLImageElement::formOwner() const
void HTMLImageElement::formRemovedFromTree(const Node& formRoot)
{
ASSERT(m_form);
- if (highestAncestor() != formRoot)
+ if (highestAncestorOrSelf() != formRoot)
resetFormOwner();
}
@@ -228,7 +228,7 @@ void HTMLImageElement::attach(const AttachContext& context)
Node::InsertionNotificationRequest HTMLImageElement::insertedInto(ContainerNode* insertionPoint)
{
- if (!m_formWasSetByParser || insertionPoint->highestAncestor() != m_form->highestAncestor())
+ if (!m_formWasSetByParser || insertionPoint->highestAncestorOrSelf() != m_form->highestAncestorOrSelf())
resetFormOwner();
// If we have been inserted from a renderer-less document,
@@ -241,7 +241,7 @@ Node::InsertionNotificationRequest HTMLImageElement::insertedInto(ContainerNode*
void HTMLImageElement::removedFrom(ContainerNode* insertionPoint)
{
- if (!m_form || m_form->highestAncestor() != highestAncestor())
+ if (!m_form || m_form->highestAncestorOrSelf() != highestAncestorOrSelf())
resetFormOwner();
HTMLElement::removedFrom(insertionPoint);
}
« no previous file with comments | « Source/core/html/HTMLFormElement.cpp ('k') | Source/core/inspector/PageConsoleAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698