Changeset 126925 in webkit
- Timestamp:
- Aug 28, 2012, 1:46:57 PM (14 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
WebKitSupport/InputHandler.cpp (modified) (3 diffs)
-
WebKitSupport/InputHandler.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/ChangeLog
r126914 r126925 1 2012-08-28 Nima Ghanavatian <nghanavatian@rim.com> 2 3 [BlackBerry] Spellcheck should be enabled if undefined in content. 4 https://bugs.webkit.org/show_bug.cgi?id=95139 5 6 Currently we only enable spellcheck if it is defined as such in 7 the web content explicitly. 8 Making this change to enable by default, and only turn off if it is 9 explicitly set, or if we expect the field to be a username, email or 10 url. 11 12 Internally reviewed by Mike Fenton. 13 14 Reviewed by Rob Buis. 15 16 * WebKitSupport/InputHandler.cpp: 17 (BlackBerry::WebKit::InputHandler::requestCheckingOfString): 18 (BlackBerry::WebKit::InputHandler::setElementFocused): 19 (BlackBerry::WebKit::InputHandler::unlockSequenceMap): 20 (WebKit): 21 (BlackBerry::WebKit::InputHandler::shouldSpellCheckElement): 22 * WebKitSupport/InputHandler.h: 23 (InputHandler): 24 1 25 2012-08-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> 2 26 -
trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
r126883 r126925 542 542 } 543 543 544 // Check if field explicitly asked for spellchecking.545 if ( DOMSupport::elementSupportsSpellCheck(m_currentFocusElement.get()) != DOMSupport::On) {544 // Check if the field should be spellchecked. 545 if (!shouldSpellCheckElement(m_currentFocusElement.get())) { 546 546 spellCheckingRequestCancelled(sequenceId, true /* isSequenceId */); 547 547 return; … … 843 843 #endif 844 844 845 // Check if the field explicitly asks for spellchecking.846 if ( DOMSupport::elementSupportsSpellCheck(element) != DOMSupport::On)845 // Check if the field should be spellchecked. 846 if (!shouldSpellCheckElement(element)) 847 847 return; 848 848 … … 854 854 SpellingLog(LogLevelInfo, "InputHandler::setElementFocused Spellchecking the field increased the total time to focus to %f seconds.", timer.elapsed()); 855 855 #endif 856 } 857 858 bool InputHandler::shouldSpellCheckElement(const Element* element) const 859 { 860 DOMSupport::AttributeState spellCheckAttr = DOMSupport::elementSupportsSpellCheck(element); 861 862 // Explicitly set to off. 863 if (spellCheckAttr == DOMSupport::Off) 864 return false; 865 866 // Undefined and part of a set of cases which we do not wish to check. This includes user names and email addresses, so we are piggybacking on NoAutocomplete cases. 867 if (spellCheckAttr == DOMSupport::Default && (m_currentFocusElementTextEditMask & NO_AUTO_TEXT)) 868 return false; 869 870 return true; 856 871 } 857 872 -
trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.h
r126883 r126925 200 200 void cancelAllSpellCheckingRequests(); 201 201 WebCore::SpellChecker* getSpellChecker(); 202 bool shouldSpellCheckElement(const WebCore::Element*) const; 202 203 203 204 WebPagePrivate* m_webPage;
Note:
See TracChangeset
for help on using the changeset viewer.