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

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

Issue 1321033003: Fix formAction return value for empty formaction content attribute. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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/HTMLFormControlElement.h ('k') | Source/core/html/HTMLInputElement.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFormControlElement.cpp
diff --git a/Source/core/html/HTMLFormControlElement.cpp b/Source/core/html/HTMLFormControlElement.cpp
index 66aea16e5c23dcb11d1f472c81b9f400bb76604b..54d22d6795a6220ec8c75e90eb70ab7ad54e55d4 100644
--- a/Source/core/html/HTMLFormControlElement.cpp
+++ b/Source/core/html/HTMLFormControlElement.cpp
@@ -34,6 +34,7 @@
#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLLegendElement.h"
#include "core/html/ValidityState.h"
+#include "core/html/parser/HTMLParserIdioms.h"
#include "core/inspector/ConsoleMessage.h"
#include "core/layout/LayoutBox.h"
#include "core/layout/LayoutTheme.h"
@@ -85,6 +86,19 @@ DEFINE_TRACE(HTMLFormControlElement)
LabelableElement::trace(visitor);
}
+String HTMLFormControlElement::formAction() const
+{
+ const AtomicString& action = fastGetAttribute(formactionAttr);
+ if (action.isEmpty())
+ return document().url();
+ return document().completeURL(stripLeadingAndTrailingHTMLSpaces(action));
+}
+
+void HTMLFormControlElement::setFormAction(const AtomicString& value)
+{
+ setAttribute(formactionAttr, value);
+}
+
String HTMLFormControlElement::formEnctype() const
{
const AtomicString& formEnctypeAttr = fastGetAttribute(formenctypeAttr);
« no previous file with comments | « Source/core/html/HTMLFormControlElement.h ('k') | Source/core/html/HTMLInputElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698