Chromium Code Reviews| Index: Source/core/html/HTMLElement.cpp |
| diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp |
| index 51b0a8cf0bf2415e0a3bd0a0dcc0aff9b9e2e3f6..f617e6a623d1c7f23ee87ddc66d8cab5f77593f9 100644 |
| --- a/Source/core/html/HTMLElement.cpp |
| +++ b/Source/core/html/HTMLElement.cpp |
| @@ -970,6 +970,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 rendererIsEditable(); |
|
rune
2014/01/27 12:36:44
rendererIsEditable() says that it should have an a
andersr
2014/01/30 12:27:59
Yes, you are right, of course.
Checking the paren
|
| +} |
| + |
| void HTMLElement::handleKeypressEvent(KeyboardEvent* event) |
| { |
| if (!document().settings() || !document().settings()->spatialNavigationEnabled() || !supportsFocus()) |