| Index: Source/web/WebElement.cpp
|
| diff --git a/Source/web/WebElement.cpp b/Source/web/WebElement.cpp
|
| index f58bf11ad9c323cfa16d4825abc4144d0983c190..0a9668ee9266eace187c508674462091c4cc31b9 100644
|
| --- a/Source/web/WebElement.cpp
|
| +++ b/Source/web/WebElement.cpp
|
| @@ -32,16 +32,21 @@
|
| #include "public/web/WebElement.h"
|
|
|
| #include "bindings/core/v8/ExceptionState.h"
|
| +#include "core/HTMLNames.h"
|
| #include "core/dom/Element.h"
|
| #include "core/dom/Fullscreen.h"
|
| -#include "core/dom/NamedNodeMap.h"
|
| #include "core/dom/custom/CustomElementProcessingStack.h"
|
| +#include "core/html/HTMLTextFormControlElement.h"
|
| #include "platform/graphics/Image.h"
|
| #include "public/platform/WebRect.h"
|
| #include "wtf/PassRefPtr.h"
|
| +#include "wtf/text/AtomicString.h"
|
| +#include "wtf/text/WTFString.h"
|
|
|
| namespace blink {
|
|
|
| +using namespace HTMLNames;
|
| +
|
| bool WebElement::isFormControlElement() const
|
| {
|
| return constUnwrap<Element>()->isFormControlElement();
|
| @@ -52,6 +57,22 @@ bool WebElement::isTextFormControlElement() const
|
| return constUnwrap<Element>()->isTextFormControl();
|
| }
|
|
|
| +bool WebElement::isEditable() const
|
| +{
|
| + const Element* element = constUnwrap<Element>();
|
| +
|
| + if (element->isContentEditable())
|
| + return true;
|
| +
|
| + if (element->isTextFormControl()) {
|
| + const HTMLTextFormControlElement* input = toHTMLTextFormControlElement(element);
|
| + if (!input->isDisabledOrReadOnly())
|
| + return true;
|
| + }
|
| +
|
| + return equalIgnoringCase(element->getAttribute(roleAttr), "textbox");
|
| +}
|
| +
|
| WebString WebElement::tagName() const
|
| {
|
| return constUnwrap<Element>()->tagName();
|
|
|