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

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

Issue 952273006: Make the constructor of a LayoutRect from an IntRect explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/Document.cpp ('k') | Source/core/dom/Node.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 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 unsigned startOffset = markedText.startOffset(); 117 unsigned startOffset = markedText.startOffset();
118 unsigned endOffset = markedText.endOffset(); 118 unsigned endOffset = markedText.endOffset();
119 addMarker(markedText.startContainer(), DocumentMarker(startOffset, endOf fset, activeMatch)); 119 addMarker(markedText.startContainer(), DocumentMarker(startOffset, endOf fset, activeMatch));
120 if (endOffset > startOffset) { 120 if (endOffset > startOffset) {
121 // 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
122 // the markers are painted. However, we need it to happen sooner, be cause 122 // the markers are painted. However, we need it to happen sooner, be cause
123 // the whole purpose of tickmarks on the scrollbar is to show where 123 // the whole purpose of tickmarks on the scrollbar is to show where
124 // matches off-screen are (that haven't been painted yet). 124 // matches off-screen are (that haven't been painted yet).
125 Node* node = markedText.startContainer(); 125 Node* node = markedText.startContainer();
126 DocumentMarkerVector markers = markersFor(node); 126 DocumentMarkerVector markers = markersFor(node);
127 toRenderedDocumentMarker(markers[markers.size() - 1])->setRenderedRe ct(range->boundingBox()); 127 toRenderedDocumentMarker(markers[markers.size() - 1])->setRenderedRe ct(LayoutRect(range->boundingBox()));
128 } 128 }
129 } 129 }
130 } 130 }
131 131
132 void DocumentMarkerController::prepareForDestruction() 132 void DocumentMarkerController::prepareForDestruction()
133 { 133 {
134 clear(); 134 clear();
135 } 135 }
136 136
137 void DocumentMarkerController::removeMarkers(TextIterator& markedText, DocumentM arker::MarkerTypes markerTypes, RemovePartiallyOverlappingMarkerOrNot shouldRemo vePartiallyOverlappingMarker) 137 void DocumentMarkerController::removeMarkers(TextIterator& markedText, DocumentM arker::MarkerTypes markerTypes, RemovePartiallyOverlappingMarkerOrNot shouldRemo vePartiallyOverlappingMarker)
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 729
730 } // namespace blink 730 } // namespace blink
731 731
732 #ifndef NDEBUG 732 #ifndef NDEBUG
733 void showDocumentMarkers(const blink::DocumentMarkerController* controller) 733 void showDocumentMarkers(const blink::DocumentMarkerController* controller)
734 { 734 {
735 if (controller) 735 if (controller)
736 controller->showMarkers(); 736 controller->showMarkers();
737 } 737 }
738 #endif 738 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698