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

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

Issue 106423005: 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
Index: Source/core/html/HTMLElement.cpp
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
index 5ca263f1684cdfb0a3dd08ce0c5a7660f097d34c..3c4a002180286d693c1ce30bead60f0da793a58e 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
tkent 2013/12/10 23:19:28 This function always calls a virtual function isFo
sof 2013/12/11 07:55:03 Agreed, too much indirection here. As suggested,
+{
+ if (!isFormAssociatedElement())
+ return 0;
+
+ return virtualForm();
+}
+
HTMLFormElement* HTMLElement::findFormAncestor() const
{
for (ContainerNode* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNode()) {

Powered by Google App Engine
This is Rietveld 408576698