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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 #include "core/dom/shadow/ElementShadowV0.h" | 58 #include "core/dom/shadow/ElementShadowV0.h" |
59 #include "core/dom/shadow/FlatTreeTraversal.h" | 59 #include "core/dom/shadow/FlatTreeTraversal.h" |
60 #include "core/dom/shadow/SelectRuleFeatureSet.h" | 60 #include "core/dom/shadow/SelectRuleFeatureSet.h" |
61 #include "core/dom/shadow/ShadowRoot.h" | 61 #include "core/dom/shadow/ShadowRoot.h" |
62 #include "core/editing/Editor.h" | 62 #include "core/editing/Editor.h" |
63 #include "core/editing/PlainTextRange.h" | 63 #include "core/editing/PlainTextRange.h" |
64 #include "core/editing/SurroundingText.h" | 64 #include "core/editing/SurroundingText.h" |
65 #include "core/editing/iterators/TextIterator.h" | 65 #include "core/editing/iterators/TextIterator.h" |
66 #include "core/editing/markers/DocumentMarker.h" | 66 #include "core/editing/markers/DocumentMarker.h" |
67 #include "core/editing/markers/DocumentMarkerController.h" | 67 #include "core/editing/markers/DocumentMarkerController.h" |
| 68 #include "core/editing/markers/TextMatchMarker.h" |
68 #include "core/editing/serializers/Serialization.h" | 69 #include "core/editing/serializers/Serialization.h" |
69 #include "core/editing/spellcheck/IdleSpellCheckCallback.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/frame/EventHandlerRegistry.h" | 73 #include "core/frame/EventHandlerRegistry.h" |
73 #include "core/frame/FrameConsole.h" | 74 #include "core/frame/FrameConsole.h" |
74 #include "core/frame/LocalDOMWindow.h" | 75 #include "core/frame/LocalDOMWindow.h" |
75 #include "core/frame/LocalFrame.h" | 76 #include "core/frame/LocalFrame.h" |
76 #include "core/frame/LocalFrameView.h" | 77 #include "core/frame/LocalFrameView.h" |
77 #include "core/frame/Settings.h" | 78 #include "core/frame/Settings.h" |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
957 unsigned Internals::activeMarkerCountForNode(Node* node) { | 958 unsigned Internals::activeMarkerCountForNode(Node* node) { |
958 DCHECK(node); | 959 DCHECK(node); |
959 | 960 |
960 // Only TextMatch markers can be active. | 961 // Only TextMatch markers can be active. |
961 DocumentMarker::MarkerType marker_type = DocumentMarker::kTextMatch; | 962 DocumentMarker::MarkerType marker_type = DocumentMarker::kTextMatch; |
962 DocumentMarkerVector markers = | 963 DocumentMarkerVector markers = |
963 node->GetDocument().Markers().MarkersFor(node, marker_type); | 964 node->GetDocument().Markers().MarkersFor(node, marker_type); |
964 | 965 |
965 unsigned active_marker_count = 0; | 966 unsigned active_marker_count = 0; |
966 for (const auto& marker : markers) { | 967 for (const auto& marker : markers) { |
967 if (marker->IsActiveMatch()) | 968 if (ToTextMatchMarker(marker)->IsActiveMatch()) |
968 active_marker_count++; | 969 active_marker_count++; |
969 } | 970 } |
970 | 971 |
971 return active_marker_count; | 972 return active_marker_count; |
972 } | 973 } |
973 | 974 |
974 DocumentMarker* Internals::MarkerAt(Node* node, | 975 DocumentMarker* Internals::MarkerAt(Node* node, |
975 const String& marker_type, | 976 const String& marker_type, |
976 unsigned index, | 977 unsigned index, |
977 ExceptionState& exception_state) { | 978 ExceptionState& exception_state) { |
(...skipping 2311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3289 | 3290 |
3290 void Internals::crash() { | 3291 void Internals::crash() { |
3291 CHECK(false) << "Intentional crash"; | 3292 CHECK(false) << "Intentional crash"; |
3292 } | 3293 } |
3293 | 3294 |
3294 void Internals::setIsLowEndDevice(bool is_low_end_device) { | 3295 void Internals::setIsLowEndDevice(bool is_low_end_device) { |
3295 MemoryCoordinator::SetIsLowEndDeviceForTesting(is_low_end_device); | 3296 MemoryCoordinator::SetIsLowEndDeviceForTesting(is_low_end_device); |
3296 } | 3297 } |
3297 | 3298 |
3298 } // namespace blink | 3299 } // namespace blink |
OLD | NEW |