Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 133 if (isHTMLTextFormControlElement(*element)) { | 133 if (isHTMLTextFormControlElement(*element)) { |
| 134 HTMLTextFormControlElement* textControl = toHTMLTextFormControlEleme nt(element); | 134 HTMLTextFormControlElement* textControl = toHTMLTextFormControlEleme nt(element); |
| 135 parent = textControl; | 135 parent = textControl; |
| 136 element = textControl->innerEditorElement(); | 136 element = textControl->innerEditorElement(); |
| 137 if (!element) | 137 if (!element) |
| 138 return; | 138 return; |
| 139 isTextField = isHTMLInputElement(*textControl) && toHTMLInputElement (*textControl).isTextField(); | 139 isTextField = isHTMLInputElement(*textControl) && toHTMLInputElement (*textControl).isTextField(); |
| 140 } | 140 } |
| 141 | 141 |
| 142 if (isTextField || !parent->isAlreadySpellChecked()) { | 142 if (isTextField || !parent->isAlreadySpellChecked()) { |
| 143 if (EditingStrategy::editingIgnoresContent(element)) | |
|
yoichio
2016/06/29 01:35:57
Please add description why crash happens and this
yosin_UTC9
2016/06/29 02:03:04
Done.
| |
| 144 return; | |
| 143 // We always recheck textfields because markers are removed from the m on blur. | 145 // We always recheck textfields because markers are removed from the m on blur. |
| 144 VisibleSelection selection = VisibleSelection::selectionFromContents OfNode(element); | 146 VisibleSelection selection = VisibleSelection::selectionFromContents OfNode(element); |
| 145 markMisspellingsAndBadGrammar(selection); | 147 markMisspellingsAndBadGrammar(selection); |
| 146 if (!isTextField) | 148 if (!isTextField) |
| 147 parent->setAlreadySpellChecked(true); | 149 parent->setAlreadySpellChecked(true); |
| 148 } | 150 } |
| 149 } | 151 } |
| 150 } | 152 } |
| 151 | 153 |
| 152 void SpellChecker::ignoreSpelling() | 154 void SpellChecker::ignoreSpelling() |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 955 visitor->trace(m_frame); | 957 visitor->trace(m_frame); |
| 956 visitor->trace(m_spellCheckRequester); | 958 visitor->trace(m_spellCheckRequester); |
| 957 } | 959 } |
| 958 | 960 |
| 959 void SpellChecker::prepareForLeakDetection() | 961 void SpellChecker::prepareForLeakDetection() |
| 960 { | 962 { |
| 961 m_spellCheckRequester->prepareForLeakDetection(); | 963 m_spellCheckRequester->prepareForLeakDetection(); |
| 962 } | 964 } |
| 963 | 965 |
| 964 } // namespace blink | 966 } // namespace blink |
| OLD | NEW |