OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple 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 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 #include "core/dom/shadow/FlatTreeTraversal.h" | 60 #include "core/dom/shadow/FlatTreeTraversal.h" |
61 #include "core/dom/shadow/SelectRuleFeatureSet.h" | 61 #include "core/dom/shadow/SelectRuleFeatureSet.h" |
62 #include "core/dom/shadow/ShadowRoot.h" | 62 #include "core/dom/shadow/ShadowRoot.h" |
63 #include "core/editing/Editor.h" | 63 #include "core/editing/Editor.h" |
64 #include "core/editing/PlainTextRange.h" | 64 #include "core/editing/PlainTextRange.h" |
65 #include "core/editing/SurroundingText.h" | 65 #include "core/editing/SurroundingText.h" |
66 #include "core/editing/iterators/TextIterator.h" | 66 #include "core/editing/iterators/TextIterator.h" |
67 #include "core/editing/markers/DocumentMarker.h" | 67 #include "core/editing/markers/DocumentMarker.h" |
68 #include "core/editing/markers/DocumentMarkerController.h" | 68 #include "core/editing/markers/DocumentMarkerController.h" |
69 #include "core/editing/serializers/Serialization.h" | 69 #include "core/editing/serializers/Serialization.h" |
| 70 #include "core/editing/spellcheck/IdleSpellCheckCallback.h" |
70 #include "core/editing/spellcheck/SpellCheckRequester.h" | 71 #include "core/editing/spellcheck/SpellCheckRequester.h" |
71 #include "core/editing/spellcheck/SpellChecker.h" | 72 #include "core/editing/spellcheck/SpellChecker.h" |
72 #include "core/fetch/MemoryCache.h" | 73 #include "core/fetch/MemoryCache.h" |
73 #include "core/fetch/ResourceFetcher.h" | 74 #include "core/fetch/ResourceFetcher.h" |
74 #include "core/frame/EventHandlerRegistry.h" | 75 #include "core/frame/EventHandlerRegistry.h" |
75 #include "core/frame/FrameConsole.h" | 76 #include "core/frame/FrameConsole.h" |
76 #include "core/frame/FrameView.h" | 77 #include "core/frame/FrameView.h" |
77 #include "core/frame/LocalDOMWindow.h" | 78 #include "core/frame/LocalDOMWindow.h" |
78 #include "core/frame/LocalFrame.h" | 79 #include "core/frame/LocalFrame.h" |
79 #include "core/frame/Settings.h" | 80 #include "core/frame/Settings.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 return DocumentMarker::AllMarkers(); | 191 return DocumentMarker::AllMarkers(); |
191 WTF::Optional<DocumentMarker::MarkerType> type = markerTypeFrom(markerType); | 192 WTF::Optional<DocumentMarker::MarkerType> type = markerTypeFrom(markerType); |
192 if (!type) | 193 if (!type) |
193 return WTF::nullopt; | 194 return WTF::nullopt; |
194 return DocumentMarker::MarkerTypes(type.value()); | 195 return DocumentMarker::MarkerTypes(type.value()); |
195 } | 196 } |
196 | 197 |
197 static SpellCheckRequester* spellCheckRequester(Document* document) { | 198 static SpellCheckRequester* spellCheckRequester(Document* document) { |
198 if (!document || !document->frame()) | 199 if (!document || !document->frame()) |
199 return 0; | 200 return 0; |
200 return &document->frame()->spellChecker().spellCheckRequester(); | 201 if (!RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled()) |
| 202 return &document->frame()->spellChecker().spellCheckRequester(); |
| 203 return &document->frame()->idleSpellCheckCallback().spellCheckRequester(); |
201 } | 204 } |
202 | 205 |
203 static ScrollableArea* scrollableAreaForNode(Node* node) { | 206 static ScrollableArea* scrollableAreaForNode(Node* node) { |
204 if (!node) | 207 if (!node) |
205 return nullptr; | 208 return nullptr; |
206 | 209 |
207 if (node->isDocumentNode()) { | 210 if (node->isDocumentNode()) { |
208 // This can be removed after root layer scrolling is enabled. | 211 // This can be removed after root layer scrolling is enabled. |
209 if (FrameView* frameView = toDocument(node)->view()) | 212 if (FrameView* frameView = toDocument(node)->view()) |
210 return frameView->layoutViewportScrollableArea(); | 213 return frameView->layoutViewportScrollableArea(); |
(...skipping 2840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3051 | 3054 |
3052 void Internals::crash() { | 3055 void Internals::crash() { |
3053 CHECK(false) << "Intentional crash"; | 3056 CHECK(false) << "Intentional crash"; |
3054 } | 3057 } |
3055 | 3058 |
3056 void Internals::setIsLowEndDevice(bool isLowEndDevice) { | 3059 void Internals::setIsLowEndDevice(bool isLowEndDevice) { |
3057 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); | 3060 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); |
3058 } | 3061 } |
3059 | 3062 |
3060 } // namespace blink | 3063 } // namespace blink |
OLD | NEW |