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 25 matching lines...) Expand all Loading... |
36 #include "core/editing/SpellCheckRequester.h" | 36 #include "core/editing/SpellCheckRequester.h" |
37 #include "core/editing/TextCheckingHelper.h" | 37 #include "core/editing/TextCheckingHelper.h" |
38 #include "core/editing/VisibleUnits.h" | 38 #include "core/editing/VisibleUnits.h" |
39 #include "core/editing/htmlediting.h" | 39 #include "core/editing/htmlediting.h" |
40 #include "core/editing/iterators/CharacterIterator.h" | 40 #include "core/editing/iterators/CharacterIterator.h" |
41 #include "core/frame/LocalFrame.h" | 41 #include "core/frame/LocalFrame.h" |
42 #include "core/html/HTMLInputElement.h" | 42 #include "core/html/HTMLInputElement.h" |
43 #include "core/loader/EmptyClients.h" | 43 #include "core/loader/EmptyClients.h" |
44 #include "core/page/Page.h" | 44 #include "core/page/Page.h" |
45 #include "core/frame/Settings.h" | 45 #include "core/frame/Settings.h" |
| 46 #include "core/layout/LayoutTextControl.h" |
46 #include "core/page/SpellCheckerClient.h" | 47 #include "core/page/SpellCheckerClient.h" |
47 #include "core/rendering/RenderTextControl.h" | |
48 #include "platform/text/TextCheckerClient.h" | 48 #include "platform/text/TextCheckerClient.h" |
49 | 49 |
50 namespace blink { | 50 namespace blink { |
51 | 51 |
52 using namespace HTMLNames; | 52 using namespace HTMLNames; |
53 | 53 |
54 namespace { | 54 namespace { |
55 | 55 |
56 bool isSelectionInTextField(const VisibleSelection& selection) | 56 bool isSelectionInTextField(const VisibleSelection& selection) |
57 { | 57 { |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 } | 874 } |
875 | 875 |
876 static Node* findFirstMarkable(Node* node) | 876 static Node* findFirstMarkable(Node* node) |
877 { | 877 { |
878 while (node) { | 878 while (node) { |
879 if (!node->renderer()) | 879 if (!node->renderer()) |
880 return 0; | 880 return 0; |
881 if (node->renderer()->isText()) | 881 if (node->renderer()->isText()) |
882 return node; | 882 return node; |
883 if (node->renderer()->isTextControl()) | 883 if (node->renderer()->isTextControl()) |
884 node = toRenderTextControl(node->renderer())->textFormControlElement
()->visiblePositionForIndex(1).deepEquivalent().deprecatedNode(); | 884 node = toLayoutTextControl(node->renderer())->textFormControlElement
()->visiblePositionForIndex(1).deepEquivalent().deprecatedNode(); |
885 else if (node->hasChildren()) | 885 else if (node->hasChildren()) |
886 node = node->firstChild(); | 886 node = node->firstChild(); |
887 else | 887 else |
888 node = node->nextSibling(); | 888 node = node->nextSibling(); |
889 } | 889 } |
890 | 890 |
891 return 0; | 891 return 0; |
892 } | 892 } |
893 | 893 |
894 bool SpellChecker::selectionStartHasMarkerFor(DocumentMarker::MarkerType markerT
ype, int from, int length) const | 894 bool SpellChecker::selectionStartHasMarkerFor(DocumentMarker::MarkerType markerT
ype, int from, int length) const |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 m_spellCheckRequester->requestCheckingFor(SpellCheckRequest::create(TextChec
kingTypeSpelling | TextCheckingTypeGrammar, TextCheckingProcessBatch, rangeToChe
ck, rangeToCheck)); | 944 m_spellCheckRequester->requestCheckingFor(SpellCheckRequest::create(TextChec
kingTypeSpelling | TextCheckingTypeGrammar, TextCheckingProcessBatch, rangeToChe
ck, rangeToCheck)); |
945 } | 945 } |
946 | 946 |
947 void SpellChecker::trace(Visitor* visitor) | 947 void SpellChecker::trace(Visitor* visitor) |
948 { | 948 { |
949 visitor->trace(m_frame); | 949 visitor->trace(m_frame); |
950 visitor->trace(m_spellCheckRequester); | 950 visitor->trace(m_spellCheckRequester); |
951 } | 951 } |
952 | 952 |
953 } // namespace blink | 953 } // namespace blink |
OLD | NEW |