| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 8 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| 11 * modify it under the terms of the GNU Library General Public | 11 * modify it under the terms of the GNU Library General Public |
| 12 * License as published by the Free Software Foundation; either | 12 * License as published by the Free Software Foundation; either |
| 13 * version 2 of the License, or (at your option) any later version. | 13 * version 2 of the License, or (at your option) any later version. |
| 14 * | 14 * |
| 15 * This library is distributed in the hope that it will be useful, | 15 * This library is distributed in the hope that it will be useful, |
| 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 * Library General Public License for more details. | 18 * Library General Public License for more details. |
| 19 * | 19 * |
| 20 * You should have received a copy of the GNU Library General Public License | 20 * You should have received a copy of the GNU Library General Public License |
| 21 * along with this library; see the file COPYING.LIB. If not, write to | 21 * along with this library; see the file COPYING.LIB. If not, write to |
| 22 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 22 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 23 * Boston, MA 02110-1301, USA. | 23 * Boston, MA 02110-1301, USA. |
| 24 * | 24 * |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #ifndef DocumentMarkerController_h | 27 #ifndef DocumentMarkerController_h |
| 28 #define DocumentMarkerController_h | 28 #define DocumentMarkerController_h |
| 29 | 29 |
| 30 #include "core/CoreExport.h" |
| 30 #include "core/dom/DocumentMarker.h" | 31 #include "core/dom/DocumentMarker.h" |
| 31 #include "core/editing/iterators/TextIterator.h" | 32 #include "core/editing/iterators/TextIterator.h" |
| 32 #include "platform/geometry/IntRect.h" | 33 #include "platform/geometry/IntRect.h" |
| 33 #include "platform/heap/Handle.h" | 34 #include "platform/heap/Handle.h" |
| 34 #include "wtf/HashMap.h" | 35 #include "wtf/HashMap.h" |
| 35 #include "wtf/Vector.h" | 36 #include "wtf/Vector.h" |
| 36 | 37 |
| 37 namespace blink { | 38 namespace blink { |
| 38 | 39 |
| 39 class LayoutPoint; | 40 class LayoutPoint; |
| 40 class LayoutRect; | 41 class LayoutRect; |
| 41 class Node; | 42 class Node; |
| 42 class Position; | 43 class Position; |
| 43 class Range; | 44 class Range; |
| 44 class RenderedDocumentMarker; | 45 class RenderedDocumentMarker; |
| 45 class Text; | 46 class Text; |
| 46 | 47 |
| 47 class MarkerRemoverPredicate final { | 48 class MarkerRemoverPredicate final { |
| 48 public: | 49 public: |
| 49 explicit MarkerRemoverPredicate(const Vector<String>& words); | 50 explicit MarkerRemoverPredicate(const Vector<String>& words); |
| 50 bool operator()(const DocumentMarker&, const Text&) const; | 51 bool operator()(const DocumentMarker&, const Text&) const; |
| 51 | 52 |
| 52 private: | 53 private: |
| 53 Vector<String> m_words; | 54 Vector<String> m_words; |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 class DocumentMarkerController final : public NoBaseWillBeGarbageCollected<Docum
entMarkerController> { | 57 class CORE_EXPORT DocumentMarkerController final : public NoBaseWillBeGarbageCol
lected<DocumentMarkerController> { |
| 57 WTF_MAKE_NONCOPYABLE(DocumentMarkerController); WTF_MAKE_FAST_ALLOCATED_WILL
_BE_REMOVED(DocumentMarkerController); | 58 WTF_MAKE_NONCOPYABLE(DocumentMarkerController); WTF_MAKE_FAST_ALLOCATED_WILL
_BE_REMOVED(DocumentMarkerController); |
| 58 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DocumentMarkerController); | 59 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DocumentMarkerController); |
| 59 public: | 60 public: |
| 60 | 61 |
| 61 DocumentMarkerController(); | 62 DocumentMarkerController(); |
| 62 | 63 |
| 63 void clear(); | 64 void clear(); |
| 64 void addMarker(Range*, DocumentMarker::MarkerType, const String& description
= emptyString(), uint32_t hash = 0); | 65 void addMarker(Range*, DocumentMarker::MarkerType, const String& description
= emptyString(), uint32_t hash = 0); |
| 65 void addMarker(const Position& start, const Position& end, DocumentMarker::M
arkerType, const String& description = emptyString(), uint32_t hash = 0); | 66 void addMarker(const Position& start, const Position& end, DocumentMarker::M
arkerType, const String& description = emptyString(), uint32_t hash = 0); |
| 66 void addTextMatchMarker(const Range*, bool activeMatch); | 67 void addTextMatchMarker(const Range*, bool activeMatch); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 DocumentMarker::MarkerTypes m_possiblyExistingMarkerTypes; | 114 DocumentMarker::MarkerTypes m_possiblyExistingMarkerTypes; |
| 114 }; | 115 }; |
| 115 | 116 |
| 116 } // namespace blink | 117 } // namespace blink |
| 117 | 118 |
| 118 #ifndef NDEBUG | 119 #ifndef NDEBUG |
| 119 void showDocumentMarkers(const blink::DocumentMarkerController*); | 120 void showDocumentMarkers(const blink::DocumentMarkerController*); |
| 120 #endif | 121 #endif |
| 121 | 122 |
| 122 #endif // DocumentMarkerController_h | 123 #endif // DocumentMarkerController_h |
| OLD | NEW |