summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src/WebInputElement.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-27 21:51:42 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-27 21:51:42 +0200
commitbe01689f43cf6882cf670d33df49ead1f570c53a (patch)
tree4bb2161d8983b38e3e7ed37b4a50303bfd5e2e85 /Source/WebKit/chromium/src/WebInputElement.cpp
parenta89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd (diff)
downloadqtwebkit-be01689f43cf6882cf670d33df49ead1f570c53a.tar.gz
Imported WebKit commit 8d6c5efc74f0222dfc7bcce8d845d4a2707ed9e6 (http://svn.webkit.org/repository/webkit/trunk@118629)
Diffstat (limited to 'Source/WebKit/chromium/src/WebInputElement.cpp')
-rw-r--r--Source/WebKit/chromium/src/WebInputElement.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/WebKit/chromium/src/WebInputElement.cpp b/Source/WebKit/chromium/src/WebInputElement.cpp
index adae9dac8..c58e90704 100644
--- a/Source/WebKit/chromium/src/WebInputElement.cpp
+++ b/Source/WebKit/chromium/src/WebInputElement.cpp
@@ -31,11 +31,16 @@
#include "config.h"
#include "WebInputElement.h"
+#include "ElementShadow.h"
#include "HTMLDataListElement.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
+#include "ShadowRoot.h"
#include "TextControlInnerElements.h"
+#include "TextFieldDecorationElement.h"
+#include "TextFieldDecoratorImpl.h"
#include "WebNodeCollection.h"
+#include "WebTextFieldDecoratorClient.h"
#include "platform/WebString.h"
#include <wtf/PassRefPtr.h>
@@ -221,6 +226,18 @@ int WebInputElement::defaultMaxLength()
return HTMLInputElement::maximumLength;
}
+WebElement WebInputElement::decorationElementFor(WebTextFieldDecoratorClient* decoratorClient)
+{
+ ShadowRoot* shadowRoot = unwrap<HTMLInputElement>()->youngestShadowRoot();
+ while (shadowRoot) {
+ TextFieldDecorationElement* decoration = TextFieldDecorationElement::fromShadowRoot(shadowRoot);
+ if (decoration && decoratorClient->isClientFor(decoration->textFieldDecorator()))
+ return WebElement(decoration);
+ shadowRoot = shadowRoot->olderShadowRoot();
+ }
+ return WebElement();
+}
+
WebInputElement::WebInputElement(const PassRefPtr<HTMLInputElement>& elem)
: WebFormControlElement(elem)
{