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

Side by Side Diff: third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp

Issue 2109543002: Make SpellChecker::didBeginEdit() not to crash with IFRAME parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-06-28T17:34:15 Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/text-iterator/backward-textiterator-first-letter-crash.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/text-iterator/backward-textiterator-first-letter-crash.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698