summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/html/HTMLFormControlElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/html/HTMLFormControlElement.cpp')
-rw-r--r--Source/WebCore/html/HTMLFormControlElement.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/Source/WebCore/html/HTMLFormControlElement.cpp b/Source/WebCore/html/HTMLFormControlElement.cpp
index bb42dfd..2f3db08 100644
--- a/Source/WebCore/html/HTMLFormControlElement.cpp
+++ b/Source/WebCore/html/HTMLFormControlElement.cpp
@@ -26,7 +26,6 @@
#include "HTMLFormControlElement.h"
#include "Attribute.h"
-#include "CharacterNames.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
@@ -49,6 +48,7 @@
#include "ValidityState.h"
#include <limits>
#include <wtf/Vector.h>
+#include <wtf/unicode/CharacterNames.h>
namespace WebCore {
@@ -165,6 +165,18 @@ void HTMLFormControlElement::removedFromTree(bool deep)
HTMLElement::removedFromTree(deep);
}
+void HTMLFormControlElement::insertedIntoDocument()
+{
+ HTMLElement::insertedIntoDocument();
+ FormAssociatedElement::insertedIntoDocument();
+}
+
+void HTMLFormControlElement::removedFromDocument()
+{
+ HTMLElement::removedFromDocument();
+ FormAssociatedElement::removedFromDocument();
+}
+
const AtomicString& HTMLFormControlElement::formControlName() const
{
const AtomicString& name = fastGetAttribute(nameAttr);
@@ -570,8 +582,8 @@ bool HTMLTextFormControlElement::placeholderShouldBeVisible() const
{
return supportsPlaceholder()
&& isEmptyValue()
- && document()->focusedNode() != this
- && !isPlaceholderEmpty();
+ && !isPlaceholderEmpty()
+ && (document()->focusedNode() != this || (renderer() && renderer()->theme()->shouldShowPlaceholderWhenFocused()));
}
void HTMLTextFormControlElement::updatePlaceholderVisibility(bool placeholderValueChanged)