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 deaffb100f9afb20f25292e1f32f9b3112c24a82..db0475ac66ca4161a4c181a8a4b0a9d7804cbf9c 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLElement.cpp |
@@ -46,6 +46,7 @@ |
#include "core/dom/shadow/ShadowRoot.h" |
#include "core/editing/EditingUtilities.h" |
#include "core/editing/serializers/Serialization.h" |
+#include "core/editing/spellcheck/SpellChecker.h" |
#include "core/events/EventListener.h" |
#include "core/events/KeyboardEvent.h" |
#include "core/frame/Settings.h" |
@@ -436,6 +437,8 @@ void HTMLElement::attributeChanged(const AttributeModificationParams& params) { |
if (adjustedFocusedElementInTreeScope() == this) |
blur(); |
} else if (params.name == contenteditableAttr) { |
+ if (!isEditable(*this)) |
Xiaocheng
2017/01/26 05:12:33
Please do not use |isEditable| inside Blink. Inste
|
+ document().frame()->spellChecker().removeSpellingAndGrammarMarkers(*this); |
if (adjustedFocusedElementInTreeScope() != this) |
return; |
// The attribute change may cause supportsFocus() to return false |