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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 : m_type(marker.type()), | 164 : m_type(marker.type()), |
165 m_startOffset(marker.startOffset()), | 165 m_startOffset(marker.startOffset()), |
166 m_endOffset(marker.endOffset()), | 166 m_endOffset(marker.endOffset()), |
167 m_details(marker.details()) {} | 167 m_details(marker.details()) {} |
168 | 168 |
169 void DocumentMarker::shiftOffsets(int delta) { | 169 void DocumentMarker::shiftOffsets(int delta) { |
170 m_startOffset += delta; | 170 m_startOffset += delta; |
171 m_endOffset += delta; | 171 m_endOffset += delta; |
172 } | 172 } |
173 | 173 |
174 void DocumentMarker::setActiveMatch(bool active) { | 174 void DocumentMarker::setIsActiveMatch(bool active) { |
175 m_details = DocumentMarkerTextMatch::create(active); | 175 m_details = DocumentMarkerTextMatch::create(active); |
176 } | 176 } |
177 | 177 |
178 const String& DocumentMarker::description() const { | 178 const String& DocumentMarker::description() const { |
179 if (DocumentMarkerDescription* details = | 179 if (DocumentMarkerDescription* details = |
180 toDocumentMarkerDescription(m_details.get())) | 180 toDocumentMarkerDescription(m_details.get())) |
181 return details->description(); | 181 return details->description(); |
182 return emptyString; | 182 return emptyString; |
183 } | 183 } |
184 | 184 |
(...skipping 23 matching lines...) Expand all Loading... |
208 toTextCompositionMarkerDetails(m_details.get())) | 208 toTextCompositionMarkerDetails(m_details.get())) |
209 return details->backgroundColor(); | 209 return details->backgroundColor(); |
210 return Color::transparent; | 210 return Color::transparent; |
211 } | 211 } |
212 | 212 |
213 DEFINE_TRACE(DocumentMarker) { | 213 DEFINE_TRACE(DocumentMarker) { |
214 visitor->trace(m_details); | 214 visitor->trace(m_details); |
215 } | 215 } |
216 | 216 |
217 } // namespace blink | 217 } // namespace blink |
OLD | NEW |