Chromium Code Reviews| 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..b85f8e8a06f9744768c1866439e2ae105c4ad529 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" |
| @@ -713,6 +714,13 @@ void TextControlElement::parseAttribute( |
| } else { |
| HTMLFormControlElementWithState::parseAttribute(params); |
| } |
| + |
| + if ((params.name == disabledAttr || params.name == readonlyAttr) && |
| + (params.oldValue.isNull() != params.newValue.isNull()) && |
| + isTextControl() && isDisabledOrReadOnly() && document().frame()) { |
| + setNeedsWillValidateCheck(); |
|
tkent
2017/02/07 14:17:06
Why do we need setNeedsWillValidateCheck()?
Manuel Rego
2017/02/07 15:06:03
Now that we use parseAttribute() I need to call se
yosin_UTC9
2017/02/08 02:07:44
It seems we should refactor removeSpellingAndGramm
tkent
2017/02/08 02:12:14
Thanks. I understand. We handle |disabled| attri
Manuel Rego
2017/02/08 09:00:34
We still need to use hasEditableStyle() in removeS
|
| + document().frame()->spellChecker().didEndEditingOnTextField(this); |
| + } |
| } |
| bool TextControlElement::lastChangeWasUserEdit() const { |