| Index: Source/core/html/HTMLElement.cpp
|
| diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
|
| index aa9e6e1813661964f63d12ad1b2131f442c2ca10..ddfcb454997bd60165418c4de77599e4edc55e6e 100644
|
| --- a/Source/core/html/HTMLElement.cpp
|
| +++ b/Source/core/html/HTMLElement.cpp
|
| @@ -947,6 +947,26 @@ void HTMLElement::defaultEventHandler(Event* event)
|
| Element::defaultEventHandler(event);
|
| }
|
|
|
| +bool HTMLElement::matchesReadOnlyPseudoClass() const
|
| +{
|
| + return !matchesReadWritePseudoClass();
|
| +}
|
| +
|
| +bool HTMLElement::matchesReadWritePseudoClass() const
|
| +{
|
| + if (fastHasAttribute(contenteditableAttr)) {
|
| + const AtomicString& value = fastGetAttribute(contenteditableAttr);
|
| +
|
| + if (value.isEmpty() || equalIgnoringCase(value, "true") || equalIgnoringCase(value, "plaintext-only"))
|
| + return true;
|
| + if (equalIgnoringCase(value, "false"))
|
| + return false;
|
| + // All other values should be treated as "inherit".
|
| + }
|
| +
|
| + return parentElement() && parentElement()->rendererIsEditable();
|
| +}
|
| +
|
| void HTMLElement::handleKeypressEvent(KeyboardEvent* event)
|
| {
|
| if (!document().settings() || !document().settings()->spatialNavigationEnabled() || !supportsFocus())
|
|
|