| Index: Source/core/html/HTMLElement.cpp
|
| diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
|
| index dd72f425d0123508baddd0134eefa2653f95bc2a..1c451cff4c3b76e7a0880e86a8f605642aaca74b 100644
|
| --- a/Source/core/html/HTMLElement.cpp
|
| +++ b/Source/core/html/HTMLElement.cpp
|
| @@ -923,6 +923,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())
|
|
|