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

Side by Side Diff: Source/core/dom/DocumentMarkerController.cpp

Issue 237583016: Remove some dead code in dom/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/DocumentMarkerController.h ('k') | Source/core/dom/Position.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 * 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
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 void DocumentMarkerController::addMarker(Range* range, DocumentMarker::MarkerTyp e type) 102 void DocumentMarkerController::addMarker(Range* range, DocumentMarker::MarkerTyp e type)
103 { 103 {
104 // Use a TextIterator to visit the potentially multiple nodes the range cove rs. 104 // Use a TextIterator to visit the potentially multiple nodes the range cove rs.
105 for (TextIterator markedText(range); !markedText.atEnd(); markedText.advance ()) { 105 for (TextIterator markedText(range); !markedText.atEnd(); markedText.advance ()) {
106 RefPtrWillBeRawPtr<Range> textPiece = markedText.range(); 106 RefPtrWillBeRawPtr<Range> textPiece = markedText.range();
107 addMarker(textPiece->startContainer(), DocumentMarker(type, textPiece->s tartOffset(), textPiece->endOffset())); 107 addMarker(textPiece->startContainer(), DocumentMarker(type, textPiece->s tartOffset(), textPiece->endOffset()));
108 } 108 }
109 109
110 } 110 }
111 111
112 void DocumentMarkerController::addMarkerToNode(Node* node, unsigned startOffset, unsigned length, DocumentMarker::MarkerType type)
113 {
114 addMarker(node, DocumentMarker(type, startOffset, startOffset + length));
115 }
116
117 void DocumentMarkerController::addMarkerToNode(Node* node, unsigned startOffset, unsigned length, DocumentMarker::MarkerType type, PassRefPtr<DocumentMarkerDeta ils> details)
118 {
119 addMarker(node, DocumentMarker(type, startOffset, startOffset + length, deta ils));
120 }
121
122
123 void DocumentMarkerController::addTextMatchMarker(const Range* range, bool activ eMatch) 112 void DocumentMarkerController::addTextMatchMarker(const Range* range, bool activ eMatch)
124 { 113 {
125 // Use a TextIterator to visit the potentially multiple nodes the range cove rs. 114 // Use a TextIterator to visit the potentially multiple nodes the range cove rs.
126 for (TextIterator markedText(range); !markedText.atEnd(); markedText.advance ()) { 115 for (TextIterator markedText(range); !markedText.atEnd(); markedText.advance ()) {
127 RefPtrWillBeRawPtr<Range> textPiece = markedText.range(); 116 RefPtrWillBeRawPtr<Range> textPiece = markedText.range();
128 unsigned startOffset = textPiece->startOffset(); 117 unsigned startOffset = textPiece->startOffset();
129 unsigned endOffset = textPiece->endOffset(); 118 unsigned endOffset = textPiece->endOffset();
130 addMarker(textPiece->startContainer(), DocumentMarker(startOffset, endOf fset, activeMatch)); 119 addMarker(textPiece->startContainer(), DocumentMarker(startOffset, endOf fset, activeMatch));
131 if (endOffset > startOffset) { 120 if (endOffset > startOffset) {
132 // Rendered rects for markers in WebKit are not populated until each time 121 // Rendered rects for markers in WebKit are not populated until each time
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 724
736 } // namespace WebCore 725 } // namespace WebCore
737 726
738 #ifndef NDEBUG 727 #ifndef NDEBUG
739 void showDocumentMarkers(const WebCore::DocumentMarkerController* controller) 728 void showDocumentMarkers(const WebCore::DocumentMarkerController* controller)
740 { 729 {
741 if (controller) 730 if (controller)
742 controller->showMarkers(); 731 controller->showMarkers();
743 } 732 }
744 #endif 733 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/DocumentMarkerController.h ('k') | Source/core/dom/Position.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698