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

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

Issue 2399723002: Reflow comments in //third_party/WebKit/Sourcecore/editing/markers (Closed)
Patch Set: Created 4 years, 2 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/DocumentMarkerController.h » ('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 15 matching lines...) Expand all
26 #include "core/CoreExport.h" 26 #include "core/CoreExport.h"
27 #include "platform/graphics/Color.h" 27 #include "platform/graphics/Color.h"
28 #include "platform/heap/Handle.h" 28 #include "platform/heap/Handle.h"
29 #include "wtf/VectorTraits.h" 29 #include "wtf/VectorTraits.h"
30 #include "wtf/text/WTFString.h" 30 #include "wtf/text/WTFString.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 class DocumentMarkerDetails; 34 class DocumentMarkerDetails;
35 35
36 // A range of a node within a document that is "marked", such as the range of a misspelled word. 36 // A range of a node within a document that is "marked", such as the range of a
37 // It optionally includes a description that could be displayed in the user inte rface. 37 // misspelled word. It optionally includes a description that could be displayed
38 // It also optionally includes a flag specifying whether the match is active, wh ich is ignored 38 // in the user interface. It also optionally includes a flag specifying whether
39 // for all types other than type TextMatch. 39 // the match is active, which is ignored for all types other than type
40 // TextMatch.
40 class CORE_EXPORT DocumentMarker : public GarbageCollected<DocumentMarker> { 41 class CORE_EXPORT DocumentMarker : public GarbageCollected<DocumentMarker> {
41 public: 42 public:
42 enum MarkerTypeIndex { 43 enum MarkerTypeIndex {
43 SpellingMarkerIndex = 0, 44 SpellingMarkerIndex = 0,
44 GrammarMarkerIndex, 45 GrammarMarkerIndex,
45 TextMatchMarkerIndex, 46 TextMatchMarkerIndex,
46 InvisibleSpellcheckMarkerIndex, 47 InvisibleSpellcheckMarkerIndex,
47 CompositionMarkerIndex, 48 CompositionMarkerIndex,
48 MarkerTypeIndexesCount 49 MarkerTypeIndexesCount
49 }; 50 };
50 51
51 enum MarkerType { 52 enum MarkerType {
52 Spelling = 1 << SpellingMarkerIndex, 53 Spelling = 1 << SpellingMarkerIndex,
53 Grammar = 1 << GrammarMarkerIndex, 54 Grammar = 1 << GrammarMarkerIndex,
54 TextMatch = 1 << TextMatchMarkerIndex, 55 TextMatch = 1 << TextMatchMarkerIndex,
55 InvisibleSpellcheck = 1 << InvisibleSpellcheckMarkerIndex, 56 InvisibleSpellcheck = 1 << InvisibleSpellcheckMarkerIndex,
56 Composition = 1 << CompositionMarkerIndex, 57 Composition = 1 << CompositionMarkerIndex,
57 }; 58 };
58 59
59 class MarkerTypes { 60 class MarkerTypes {
60 public: 61 public:
61 // The constructor is intentionally implicit to allow conversion from the bi t-wise sum of above types 62 // The constructor is intentionally implicit to allow conversion from the
63 // bit-wise sum of above types
62 MarkerTypes(unsigned mask) : m_mask(mask) {} 64 MarkerTypes(unsigned mask) : m_mask(mask) {}
63 65
64 bool contains(MarkerType type) const { return m_mask & type; } 66 bool contains(MarkerType type) const { return m_mask & type; }
65 bool intersects(const MarkerTypes& types) const { 67 bool intersects(const MarkerTypes& types) const {
66 return (m_mask & types.m_mask); 68 return (m_mask & types.m_mask);
67 } 69 }
68 bool operator==(const MarkerTypes& other) const { 70 bool operator==(const MarkerTypes& other) const {
69 return m_mask == other.m_mask; 71 return m_mask == other.m_mask;
70 } 72 }
71 73
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 virtual bool isDescription() const { return false; } 162 virtual bool isDescription() const { return false; }
161 virtual bool isTextMatch() const { return false; } 163 virtual bool isTextMatch() const { return false; }
162 virtual bool isComposition() const { return false; } 164 virtual bool isComposition() const { return false; }
163 165
164 DEFINE_INLINE_VIRTUAL_TRACE() {} 166 DEFINE_INLINE_VIRTUAL_TRACE() {}
165 }; 167 };
166 168
167 } // namespace blink 169 } // namespace blink
168 170
169 #endif // DocumentMarker_h 171 #endif // DocumentMarker_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698