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

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

Issue 107183004: Only 'form associated' elements have a potential form owner. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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/HTMLElement.h ('k') | Source/core/html/HTMLFieldSetElement.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLElement.cpp
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
index c6115081340bd23f6d8d2fba5c9d51ffbf559a04..761e62f11ad6d8221fdebe33e6563490645f9f4f 100644
--- a/Source/core/html/HTMLElement.cpp
+++ b/Source/core/html/HTMLElement.cpp
@@ -742,6 +742,14 @@ RenderObject* HTMLElement::createRenderer(RenderStyle* style)
return RenderObject::createObject(this, style);
}
+HTMLFormElement* HTMLElement::formOwner() const
+{
+ if (!isFormAssociatedElement())
+ return 0;
+
+ return virtualForm();
+}
+
HTMLFormElement* HTMLElement::findFormAncestor() const
{
for (ContainerNode* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNode()) {
« no previous file with comments | « Source/core/html/HTMLElement.h ('k') | Source/core/html/HTMLFieldSetElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698