OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 , m_startOffset(startOffset) | 110 , m_startOffset(startOffset) |
111 , m_endOffset(endOffset) | 111 , m_endOffset(endOffset) |
112 , m_hash(0) | 112 , m_hash(0) |
113 { | 113 { |
114 } | 114 } |
115 | 115 |
116 DocumentMarker::DocumentMarker(MarkerType type, unsigned startOffset, unsigned e
ndOffset, const String& description) | 116 DocumentMarker::DocumentMarker(MarkerType type, unsigned startOffset, unsigned e
ndOffset, const String& description) |
117 : m_type(type) | 117 : m_type(type) |
118 , m_startOffset(startOffset) | 118 , m_startOffset(startOffset) |
119 , m_endOffset(endOffset) | 119 , m_endOffset(endOffset) |
120 , m_details(description.isEmpty() ? 0 : DocumentMarkerDescription::create(de
scription)) | 120 , m_details(description.isEmpty() ? nullptr : DocumentMarkerDescription::cre
ate(description)) |
121 , m_hash(0) | 121 , m_hash(0) |
122 { | 122 { |
123 } | 123 } |
124 | 124 |
125 DocumentMarker::DocumentMarker(MarkerType type, unsigned startOffset, unsigned e
ndOffset, const String& description, uint32_t hash) | 125 DocumentMarker::DocumentMarker(MarkerType type, unsigned startOffset, unsigned e
ndOffset, const String& description, uint32_t hash) |
126 : m_type(type) | 126 : m_type(type) |
127 , m_startOffset(startOffset) | 127 , m_startOffset(startOffset) |
128 , m_endOffset(endOffset) | 128 , m_endOffset(endOffset) |
129 , m_details(description.isEmpty() ? 0 : DocumentMarkerDescription::create(de
scription)) | 129 , m_details(description.isEmpty() ? nullptr : DocumentMarkerDescription::cre
ate(description)) |
130 , m_hash(hash) | 130 , m_hash(hash) |
131 { | 131 { |
132 } | 132 } |
133 | 133 |
134 DocumentMarker::DocumentMarker(unsigned startOffset, unsigned endOffset, bool ac
tiveMatch) | 134 DocumentMarker::DocumentMarker(unsigned startOffset, unsigned endOffset, bool ac
tiveMatch) |
135 : m_type(DocumentMarker::TextMatch) | 135 : m_type(DocumentMarker::TextMatch) |
136 , m_startOffset(startOffset) | 136 , m_startOffset(startOffset) |
137 , m_endOffset(endOffset) | 137 , m_endOffset(endOffset) |
138 , m_details(DocumentMarkerTextMatch::instanceFor(activeMatch)) | 138 , m_details(DocumentMarkerTextMatch::instanceFor(activeMatch)) |
139 , m_hash(0) | 139 , m_hash(0) |
(...skipping 28 matching lines...) Expand all Loading... |
168 } | 168 } |
169 | 169 |
170 bool DocumentMarker::activeMatch() const | 170 bool DocumentMarker::activeMatch() const |
171 { | 171 { |
172 if (DocumentMarkerTextMatch* details = toDocumentMarkerTextMatch(m_details.g
et())) | 172 if (DocumentMarkerTextMatch* details = toDocumentMarkerTextMatch(m_details.g
et())) |
173 return details->activeMatch(); | 173 return details->activeMatch(); |
174 return false; | 174 return false; |
175 } | 175 } |
176 | 176 |
177 } // namespace WebCore | 177 } // namespace WebCore |
OLD | NEW |