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

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

Issue 2820983002: [DMC #1.2] Add DocumentMarkerListEditor::MoveMarkers() (Closed)
Patch Set: Fix nit Created 3 years, 8 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.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 * 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 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
7 * reserved. 7 * reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 private: 52 private:
53 Vector<String> words_; 53 Vector<String> words_;
54 }; 54 };
55 55
56 class DocumentMarkerListEditor { 56 class DocumentMarkerListEditor {
57 public: 57 public:
58 using MarkerList = HeapVector<Member<RenderedDocumentMarker>>; 58 using MarkerList = HeapVector<Member<RenderedDocumentMarker>>;
59 59
60 static void AddMarker(MarkerList*, const DocumentMarker*); 60 static void AddMarker(MarkerList*, const DocumentMarker*);
61 61
62 // Returns true if a marker was moved, false otherwise.
63 static bool MoveMarkers(MarkerList* src_list,
64 int length,
65 MarkerList* dst_list);
66
62 // Returns true if a marker was removed, false otherwise. 67 // Returns true if a marker was removed, false otherwise.
63 static bool RemoveMarkers(MarkerList*, unsigned start_offset, int length); 68 static bool RemoveMarkers(MarkerList*, unsigned start_offset, int length);
64 69
65 // Returns true if a marker was shifted or removed, false otherwise. 70 // Returns true if a marker was shifted or removed, false otherwise.
66 static bool ShiftMarkers(MarkerList*, 71 static bool ShiftMarkers(MarkerList*,
67 unsigned offset, 72 unsigned offset,
68 unsigned old_length, 73 unsigned old_length,
69 unsigned new_length); 74 unsigned new_length);
70 75
71 private: 76 private:
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 const Member<const Document> document_; 170 const Member<const Document> document_;
166 }; 171 };
167 172
168 } // namespace blink 173 } // namespace blink
169 174
170 #ifndef NDEBUG 175 #ifndef NDEBUG
171 void showDocumentMarkers(const blink::DocumentMarkerController*); 176 void showDocumentMarkers(const blink::DocumentMarkerController*);
172 #endif 177 #endif
173 178
174 #endif // DocumentMarkerController_h 179 #endif // DocumentMarkerController_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698