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

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

Issue 2776103002: Make RenderedRectsForMarkers() to ignore disconnected nodes. (Closed)
Patch Set: except Range 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
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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 if (!PossiblyHasMarkers(marker_type)) 509 if (!PossiblyHasMarkers(marker_type))
510 return result; 510 return result;
511 DCHECK(!(markers_.IsEmpty())); 511 DCHECK(!(markers_.IsEmpty()));
512 512
513 // outer loop: process each node 513 // outer loop: process each node
514 MarkerMap::iterator end = markers_.end(); 514 MarkerMap::iterator end = markers_.end();
515 for (MarkerMap::iterator node_iterator = markers_.begin(); 515 for (MarkerMap::iterator node_iterator = markers_.begin();
516 node_iterator != end; ++node_iterator) { 516 node_iterator != end; ++node_iterator) {
517 // inner loop; process each marker in this node 517 // inner loop; process each marker in this node
518 const Node& node = *node_iterator->key; 518 const Node& node = *node_iterator->key;
519 if (!node.isConnected())
520 continue;
519 MarkerLists* markers = node_iterator->value.Get(); 521 MarkerLists* markers = node_iterator->value.Get();
520 for (size_t marker_list_index = 0; 522 for (size_t marker_list_index = 0;
521 marker_list_index < DocumentMarker::kMarkerTypeIndexesCount; 523 marker_list_index < DocumentMarker::kMarkerTypeIndexesCount;
522 ++marker_list_index) { 524 ++marker_list_index) {
523 Member<MarkerList>& list = (*markers)[marker_list_index]; 525 Member<MarkerList>& list = (*markers)[marker_list_index];
524 if (!list || list->IsEmpty() || 526 if (!list || list->IsEmpty() ||
525 (*list->begin())->GetType() != marker_type) 527 (*list->begin())->GetType() != marker_type)
526 continue; 528 continue;
527 for (unsigned marker_index = 0; marker_index < list->size(); 529 for (unsigned marker_index = 0; marker_index < list->size();
528 ++marker_index) { 530 ++marker_index) {
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 } 879 }
878 880
879 } // namespace blink 881 } // namespace blink
880 882
881 #ifndef NDEBUG 883 #ifndef NDEBUG
882 void showDocumentMarkers(const blink::DocumentMarkerController* controller) { 884 void showDocumentMarkers(const blink::DocumentMarkerController* controller) {
883 if (controller) 885 if (controller)
884 controller->ShowMarkers(); 886 controller->ShowMarkers();
885 } 887 }
886 #endif 888 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/text-match-document-change-expected.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698