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 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 | 854 |
855 static Node* findFirstMarkable(Node* node) | 855 static Node* findFirstMarkable(Node* node) |
856 { | 856 { |
857 while (node) { | 857 while (node) { |
858 if (!node->renderer()) | 858 if (!node->renderer()) |
859 return 0; | 859 return 0; |
860 if (node->renderer()->isText()) | 860 if (node->renderer()->isText()) |
861 return node; | 861 return node; |
862 if (node->renderer()->isTextControl()) | 862 if (node->renderer()->isTextControl()) |
863 node = toRenderTextControl(node->renderer())->textFormControlElement
()->visiblePositionForIndex(1).deepEquivalent().deprecatedNode(); | 863 node = toRenderTextControl(node->renderer())->textFormControlElement
()->visiblePositionForIndex(1).deepEquivalent().deprecatedNode(); |
864 else if (node->firstChild()) | 864 else if (node->hasChildren()) |
865 node = node->firstChild(); | 865 node = node->firstChild(); |
866 else | 866 else |
867 node = node->nextSibling(); | 867 node = node->nextSibling(); |
868 } | 868 } |
869 | 869 |
870 return 0; | 870 return 0; |
871 } | 871 } |
872 | 872 |
873 bool SpellChecker::selectionStartHasMarkerFor(DocumentMarker::MarkerType markerT
ype, int from, int length) const | 873 bool SpellChecker::selectionStartHasMarkerFor(DocumentMarker::MarkerType markerT
ype, int from, int length) const |
874 { | 874 { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 } | 918 } |
919 | 919 |
920 void SpellChecker::requestTextChecking(const Element& element) | 920 void SpellChecker::requestTextChecking(const Element& element) |
921 { | 921 { |
922 RefPtrWillBeRawPtr<Range> rangeToCheck = rangeOfContents(const_cast<Element*
>(&element)); | 922 RefPtrWillBeRawPtr<Range> rangeToCheck = rangeOfContents(const_cast<Element*
>(&element)); |
923 m_spellCheckRequester->requestCheckingFor(SpellCheckRequest::create(TextChec
kingTypeSpelling | TextCheckingTypeGrammar, TextCheckingProcessBatch, rangeToChe
ck, rangeToCheck)); | 923 m_spellCheckRequester->requestCheckingFor(SpellCheckRequest::create(TextChec
kingTypeSpelling | TextCheckingTypeGrammar, TextCheckingProcessBatch, rangeToChe
ck, rangeToCheck)); |
924 } | 924 } |
925 | 925 |
926 | 926 |
927 } // namespace blink | 927 } // namespace blink |
OLD | NEW |