| Index: third_party/WebKit/Source/core/html/HTMLElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLElement.cpp b/third_party/WebKit/Source/core/html/HTMLElement.cpp
|
| index 30bc4d81d68450103a6e24390c9557188f344936..d48fe0f5d50283720ec93018fdbabbc626cded88 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLElement.cpp
|
| @@ -426,6 +426,26 @@ const AtomicString& HTMLElement::eventNameForAttributeName(
|
| return attributeNameToEventNameMap.get(attrName.localName());
|
| }
|
|
|
| +void HTMLElement::attributeChanged(const QualifiedName& name,
|
| + const AtomicString& oldValue,
|
| + const AtomicString& newValue,
|
| + AttributeModificationReason reason) {
|
| + Element::attributeChanged(name, oldValue, newValue, reason);
|
| + if (reason != AttributeModificationReason::kDirectly)
|
| + return;
|
| + if (adjustedFocusedElementInTreeScope() != this)
|
| + return;
|
| + if (name == hiddenAttr && !newValue.isNull()) {
|
| + blur();
|
| + } else if (name == contenteditableAttr) {
|
| + // supportsFocus() behavior depends on element classes. It's hard to avoid
|
| + // to call it, and it needs up-to-date style.
|
| + document().updateStyleAndLayoutTreeForNode(this);
|
| + if (!supportsFocus())
|
| + blur();
|
| + }
|
| +}
|
| +
|
| void HTMLElement::parseAttribute(const QualifiedName& name,
|
| const AtomicString& oldValue,
|
| const AtomicString& value) {
|
|
|