Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Side by Side Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2909553002: [DMC #20] Remove DocumentMarker::IsActiveMatch() and SetIsActiveMatch() methods (Closed)
Patch Set: Update comment Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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/FrameView.h" 75 #include "core/frame/FrameView.h"
75 #include "core/frame/LocalDOMWindow.h" 76 #include "core/frame/LocalDOMWindow.h"
76 #include "core/frame/LocalFrame.h" 77 #include "core/frame/LocalFrame.h"
77 #include "core/frame/Settings.h" 78 #include "core/frame/Settings.h"
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 unsigned Internals::activeMarkerCountForNode(Node* node) { 962 unsigned Internals::activeMarkerCountForNode(Node* node) {
962 DCHECK(node); 963 DCHECK(node);
963 964
964 // Only TextMatch markers can be active. 965 // Only TextMatch markers can be active.
965 DocumentMarker::MarkerType marker_type = DocumentMarker::kTextMatch; 966 DocumentMarker::MarkerType marker_type = DocumentMarker::kTextMatch;
966 DocumentMarkerVector markers = 967 DocumentMarkerVector markers =
967 node->GetDocument().Markers().MarkersFor(node, marker_type); 968 node->GetDocument().Markers().MarkersFor(node, marker_type);
968 969
969 unsigned active_marker_count = 0; 970 unsigned active_marker_count = 0;
970 for (const auto& marker : markers) { 971 for (const auto& marker : markers) {
971 if (marker->IsActiveMatch()) 972 if (ToTextMatchMarker(marker)->IsActiveMatch())
972 active_marker_count++; 973 active_marker_count++;
973 } 974 }
974 975
975 return active_marker_count; 976 return active_marker_count;
976 } 977 }
977 978
978 DocumentMarker* Internals::MarkerAt(Node* node, 979 DocumentMarker* Internals::MarkerAt(Node* node,
979 const String& marker_type, 980 const String& marker_type,
980 unsigned index, 981 unsigned index,
981 ExceptionState& exception_state) { 982 ExceptionState& exception_state) {
(...skipping 2311 matching lines...) Expand 10 before | Expand all | Expand 10 after
3293 3294
3294 void Internals::crash() { 3295 void Internals::crash() {
3295 CHECK(false) << "Intentional crash"; 3296 CHECK(false) << "Intentional crash";
3296 } 3297 }
3297 3298
3298 void Internals::setIsLowEndDevice(bool is_low_end_device) { 3299 void Internals::setIsLowEndDevice(bool is_low_end_device) {
3299 MemoryCoordinator::SetIsLowEndDeviceForTesting(is_low_end_device); 3300 MemoryCoordinator::SetIsLowEndDeviceForTesting(is_low_end_device);
3300 } 3301 }
3301 3302
3302 } // namespace blink 3303 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698