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

Side by Side Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarker.h

Issue 2909553002: [DMC #20] Remove DocumentMarker::IsActiveMatch() and SetIsActiveMatch() methods (Closed)
Patch Set: Rebase Created 3 years, 6 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of the DOM implementation for WebCore. 2 * This file is part of the DOM implementation for WebCore.
3 * 3 *
4 * Copyright (C) 2006 Apple Computer, Inc. 4 * Copyright (C) 2006 Apple Computer, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 18 matching lines...) Expand all
29 #include "platform/wtf/Optional.h" 29 #include "platform/wtf/Optional.h"
30 #include "platform/wtf/VectorTraits.h" 30 #include "platform/wtf/VectorTraits.h"
31 #include "platform/wtf/text/WTFString.h" 31 #include "platform/wtf/text/WTFString.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 class DocumentMarkerDetails; 35 class DocumentMarkerDetails;
36 36
37 // A range of a node within a document that is "marked", such as the range of a 37 // A range of a node within a document that is "marked", such as the range of a
38 // misspelled word. It optionally includes a description that could be displayed 38 // misspelled word. It optionally includes a description that could be displayed
39 // in the user interface. It also optionally includes a flag specifying whether 39 // in the user interface.
40 // the match is active, which is ignored for all types other than type
41 // TextMatch.
42 class CORE_EXPORT DocumentMarker : public GarbageCollected<DocumentMarker> { 40 class CORE_EXPORT DocumentMarker : public GarbageCollected<DocumentMarker> {
43 public: 41 public:
44 enum MarkerTypeIndex { 42 enum MarkerTypeIndex {
45 kSpellingMarkerIndex = 0, 43 kSpellingMarkerIndex = 0,
46 kGrammarMarkerIndex, 44 kGrammarMarkerIndex,
47 kTextMatchMarkerIndex, 45 kTextMatchMarkerIndex,
48 kCompositionMarkerIndex, 46 kCompositionMarkerIndex,
49 kMarkerTypeIndexesCount 47 kMarkerTypeIndexesCount
50 }; 48 };
51 49
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 unsigned end_offset, 138 unsigned end_offset,
141 Color underline_color, 139 Color underline_color,
142 bool thick, 140 bool thick,
143 Color background_color); 141 Color background_color);
144 142
145 MarkerType GetType() const { return type_; } 143 MarkerType GetType() const { return type_; }
146 unsigned StartOffset() const { return start_offset_; } 144 unsigned StartOffset() const { return start_offset_; }
147 unsigned EndOffset() const { return end_offset_; } 145 unsigned EndOffset() const { return end_offset_; }
148 146
149 const String& Description() const; 147 const String& Description() const;
150 bool IsActiveMatch() const;
151 Color UnderlineColor() const; 148 Color UnderlineColor() const;
152 bool Thick() const; 149 bool Thick() const;
153 Color BackgroundColor() const; 150 Color BackgroundColor() const;
154 DocumentMarkerDetails* Details() const; 151 DocumentMarkerDetails* Details() const;
155 152
156 void SetIsActiveMatch(bool);
157 void ClearDetails() { details_.Clear(); } 153 void ClearDetails() { details_.Clear(); }
158 154
159 struct MarkerOffsets { 155 struct MarkerOffsets {
160 unsigned start_offset; 156 unsigned start_offset;
161 unsigned end_offset; 157 unsigned end_offset;
162 }; 158 };
163 159
164 Optional<MarkerOffsets> ComputeOffsetsAfterShift(unsigned offset, 160 Optional<MarkerOffsets> ComputeOffsetsAfterShift(unsigned offset,
165 unsigned old_length, 161 unsigned old_length,
166 unsigned new_length) const; 162 unsigned new_length) const;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 virtual ~DocumentMarkerDetails(); 194 virtual ~DocumentMarkerDetails();
199 virtual bool IsDescription() const { return false; } 195 virtual bool IsDescription() const { return false; }
200 virtual bool IsComposition() const { return false; } 196 virtual bool IsComposition() const { return false; }
201 197
202 DEFINE_INLINE_VIRTUAL_TRACE() {} 198 DEFINE_INLINE_VIRTUAL_TRACE() {}
203 }; 199 };
204 200
205 } // namespace blink 201 } // namespace blink
206 202
207 #endif // DocumentMarker_h 203 #endif // DocumentMarker_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698