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

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

Issue 2920913003: Rename TextMatchMarker::rendered_rect_ to layout_rect_ (Closed)
Patch Set: Rename DMC::RenderedRectsForTextMatchMarkers() Created 3 years, 6 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
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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 } 397 }
398 } 398 }
399 std::sort(result.begin(), result.end(), 399 std::sort(result.begin(), result.end(),
400 [](const Member<DocumentMarker>& marker1, 400 [](const Member<DocumentMarker>& marker1,
401 const Member<DocumentMarker>& marker2) { 401 const Member<DocumentMarker>& marker2) {
402 return marker1->StartOffset() < marker2->StartOffset(); 402 return marker1->StartOffset() < marker2->StartOffset();
403 }); 403 });
404 return result; 404 return result;
405 } 405 }
406 406
407 Vector<IntRect> DocumentMarkerController::RenderedRectsForTextMatchMarkers() { 407 Vector<IntRect> DocumentMarkerController::LayoutRectsForTextMatchMarkers() {
408 DCHECK(!document_->View()->NeedsLayout()); 408 DCHECK(!document_->View()->NeedsLayout());
409 DCHECK(!document_->NeedsLayoutTreeUpdate()); 409 DCHECK(!document_->NeedsLayoutTreeUpdate());
410 410
411 Vector<IntRect> result; 411 Vector<IntRect> result;
412 412
413 if (!PossiblyHasMarkers(DocumentMarker::kTextMatch)) 413 if (!PossiblyHasMarkers(DocumentMarker::kTextMatch))
414 return result; 414 return result;
415 DCHECK(!(markers_.IsEmpty())); 415 DCHECK(!(markers_.IsEmpty()));
416 416
417 // outer loop: process each node 417 // outer loop: process each node
418 MarkerMap::iterator end = markers_.end(); 418 MarkerMap::iterator end = markers_.end();
419 for (MarkerMap::iterator node_iterator = markers_.begin(); 419 for (MarkerMap::iterator node_iterator = markers_.begin();
420 node_iterator != end; ++node_iterator) { 420 node_iterator != end; ++node_iterator) {
421 // inner loop; process each marker in this node 421 // inner loop; process each marker in this node
422 const Node& node = *node_iterator->key; 422 const Node& node = *node_iterator->key;
423 if (!node.isConnected()) 423 if (!node.isConnected())
424 continue; 424 continue;
425 MarkerLists* markers = node_iterator->value.Get(); 425 MarkerLists* markers = node_iterator->value.Get();
426 DocumentMarkerList* const list = 426 DocumentMarkerList* const list =
427 ListForType(markers, DocumentMarker::kTextMatch); 427 ListForType(markers, DocumentMarker::kTextMatch);
428 if (!list) 428 if (!list)
429 continue; 429 continue;
430 result.AppendVector(ToTextMatchMarkerListImpl(list)->RenderedRects(node)); 430 result.AppendVector(ToTextMatchMarkerListImpl(list)->LayoutRects(node));
431 } 431 }
432 432
433 return result; 433 return result;
434 } 434 }
435 435
436 static void InvalidatePaintForTickmarks(const Node& node) { 436 static void InvalidatePaintForTickmarks(const Node& node) {
437 if (LocalFrameView* frame_view = node.GetDocument().View()) 437 if (LocalFrameView* frame_view = node.GetDocument().View())
438 frame_view->InvalidatePaintForTickmarks(); 438 frame_view->InvalidatePaintForTickmarks();
439 } 439 }
440 440
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 } 714 }
715 715
716 } // namespace blink 716 } // namespace blink
717 717
718 #ifndef NDEBUG 718 #ifndef NDEBUG
719 void showDocumentMarkers(const blink::DocumentMarkerController* controller) { 719 void showDocumentMarkers(const blink::DocumentMarkerController* controller) {
720 if (controller) 720 if (controller)
721 controller->ShowMarkers(); 721 controller->ShowMarkers();
722 } 722 }
723 #endif 723 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698