| 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" | |
| 71 #include "core/editing/spellcheck/SpellCheckRequester.h" | 70 #include "core/editing/spellcheck/SpellCheckRequester.h" |
| 72 #include "core/editing/spellcheck/SpellChecker.h" | 71 #include "core/editing/spellcheck/SpellChecker.h" |
| 73 #include "core/frame/EventHandlerRegistry.h" | 72 #include "core/frame/EventHandlerRegistry.h" |
| 74 #include "core/frame/FrameConsole.h" | 73 #include "core/frame/FrameConsole.h" |
| 75 #include "core/frame/FrameView.h" | 74 #include "core/frame/FrameView.h" |
| 76 #include "core/frame/LocalDOMWindow.h" | 75 #include "core/frame/LocalDOMWindow.h" |
| 77 #include "core/frame/LocalFrame.h" | 76 #include "core/frame/LocalFrame.h" |
| 78 #include "core/frame/Settings.h" | 77 #include "core/frame/Settings.h" |
| 79 #include "core/frame/VisualViewport.h" | 78 #include "core/frame/VisualViewport.h" |
| 80 #include "core/html/HTMLContentElement.h" | 79 #include "core/html/HTMLContentElement.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 return DocumentMarker::AllMarkers(); | 202 return DocumentMarker::AllMarkers(); |
| 204 WTF::Optional<DocumentMarker::MarkerType> type = markerTypeFrom(markerType); | 203 WTF::Optional<DocumentMarker::MarkerType> type = markerTypeFrom(markerType); |
| 205 if (!type) | 204 if (!type) |
| 206 return WTF::nullopt; | 205 return WTF::nullopt; |
| 207 return DocumentMarker::MarkerTypes(type.value()); | 206 return DocumentMarker::MarkerTypes(type.value()); |
| 208 } | 207 } |
| 209 | 208 |
| 210 static SpellCheckRequester* spellCheckRequester(Document* document) { | 209 static SpellCheckRequester* spellCheckRequester(Document* document) { |
| 211 if (!document || !document->frame()) | 210 if (!document || !document->frame()) |
| 212 return 0; | 211 return 0; |
| 213 if (!RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled()) | 212 return &document->frame()->spellChecker().spellCheckRequester(); |
| 214 return &document->frame()->spellChecker().spellCheckRequester(); | |
| 215 return &document->frame()->idleSpellCheckCallback().spellCheckRequester(); | |
| 216 } | 213 } |
| 217 | 214 |
| 218 static ScrollableArea* scrollableAreaForNode(Node* node) { | 215 static ScrollableArea* scrollableAreaForNode(Node* node) { |
| 219 if (!node) | 216 if (!node) |
| 220 return nullptr; | 217 return nullptr; |
| 221 | 218 |
| 222 if (node->isDocumentNode()) { | 219 if (node->isDocumentNode()) { |
| 223 // This can be removed after root layer scrolling is enabled. | 220 // This can be removed after root layer scrolling is enabled. |
| 224 if (FrameView* frameView = toDocument(node)->view()) | 221 if (FrameView* frameView = toDocument(node)->view()) |
| 225 return frameView->layoutViewportScrollableArea(); | 222 return frameView->layoutViewportScrollableArea(); |
| (...skipping 2952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3178 | 3175 |
| 3179 void Internals::crash() { | 3176 void Internals::crash() { |
| 3180 CHECK(false) << "Intentional crash"; | 3177 CHECK(false) << "Intentional crash"; |
| 3181 } | 3178 } |
| 3182 | 3179 |
| 3183 void Internals::setIsLowEndDevice(bool isLowEndDevice) { | 3180 void Internals::setIsLowEndDevice(bool isLowEndDevice) { |
| 3184 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); | 3181 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); |
| 3185 } | 3182 } |
| 3186 | 3183 |
| 3187 } // namespace blink | 3184 } // namespace blink |
| OLD | NEW |