OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved. |
3 * Copyright (C) 2012 Google, Inc. All rights reserved. | 3 * Copyright (C) 2012 Google, Inc. All rights reserved. |
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 return false; | 67 return false; |
68 const Element* element = document->focusedElement(); | 68 const Element* element = document->focusedElement(); |
69 // If |element| is null, we default to allowing spellchecking. This is done | 69 // If |element| is null, we default to allowing spellchecking. This is done |
70 // in order to mitigate the issue when the user clicks outside the textbox, | 70 // in order to mitigate the issue when the user clicks outside the textbox, |
71 // as a result of which |element| becomes null, resulting in all the spell | 71 // as a result of which |element| becomes null, resulting in all the spell |
72 // check markers being deleted. Also, the LocalFrame will decide not to do | 72 // check markers being deleted. Also, the LocalFrame will decide not to do |
73 // spellchecking if the user can't edit - so returning true here will not | 73 // spellchecking if the user can't edit - so returning true here will not |
74 // cause any problems to the LocalFrame's behavior. | 74 // cause any problems to the LocalFrame's behavior. |
75 if (!element) | 75 if (!element) |
76 return true; | 76 return true; |
77 const LayoutObject* renderer = element->renderer(); | 77 const LayoutObject* renderer = element->layoutObject(); |
78 if (!renderer) | 78 if (!renderer) |
79 return false; | 79 return false; |
80 | 80 |
81 return true; | 81 return true; |
82 } | 82 } |
83 | 83 |
84 bool SpellCheckerClientImpl::isContinuousSpellCheckingEnabled() | 84 bool SpellCheckerClientImpl::isContinuousSpellCheckingEnabled() |
85 { | 85 { |
86 if (m_spellCheckThisFieldStatus == SpellCheckForcedOff) | 86 if (m_spellCheckThisFieldStatus == SpellCheckForcedOff) |
87 return false; | 87 return false; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 } | 225 } |
226 | 226 |
227 bool SpellCheckerClientImpl::spellingUIIsShowing() | 227 bool SpellCheckerClientImpl::spellingUIIsShowing() |
228 { | 228 { |
229 if (m_webView->spellCheckClient()) | 229 if (m_webView->spellCheckClient()) |
230 return m_webView->spellCheckClient()->isShowingSpellingUI(); | 230 return m_webView->spellCheckClient()->isShowingSpellingUI(); |
231 return false; | 231 return false; |
232 } | 232 } |
233 | 233 |
234 } // namespace blink | 234 } // namespace blink |
OLD | NEW |