Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1766)

Unified Diff: third_party/WebKit/Source/core/html/TextControlElement.cpp

Issue 2669213002: Remove spelling markers in disabled and readonly form elements
Patch Set: Fix test fast/css/invalidation/read-only-write-pseudo.html Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/TextControlElement.cpp
diff --git a/third_party/WebKit/Source/core/html/TextControlElement.cpp b/third_party/WebKit/Source/core/html/TextControlElement.cpp
index 1286574aecb2df48cb31c388a30bacdcc8aeb0c0..62ddb505936946724f6f7e1ded044270fa259e52 100644
--- a/third_party/WebKit/Source/core/html/TextControlElement.cpp
+++ b/third_party/WebKit/Source/core/html/TextControlElement.cpp
@@ -37,6 +37,7 @@
#include "core/editing/iterators/CharacterIterator.h"
#include "core/editing/iterators/TextIterator.h"
#include "core/editing/serializers/Serialization.h"
+#include "core/editing/spellcheck/SpellChecker.h"
#include "core/events/Event.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/UseCounter.h"
@@ -907,4 +908,13 @@ void TextControlElement::copyNonAttributePropertiesFromElement(
HTMLFormControlElement::copyNonAttributePropertiesFromElement(source);
}
+void TextControlElement::attributeChanged(
+ const AttributeModificationParams& params) {
+ HTMLFormControlElement::attributeChanged(params);
+ if ((params.name == disabledAttr || params.name == readonlyAttr) &&
+ (params.oldValue.isNull() != params.newValue.isNull()) &&
+ isTextControl() && isDisabledOrReadOnly() && document().frame())
+ document().frame()->spellChecker().didEndEditingOnTextField(this);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698