OLD | NEW |
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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 removeMarkersFromList(iterator, markerTypes); | 504 removeMarkersFromList(iterator, markerTypes); |
505 } | 505 } |
506 | 506 |
507 void DocumentMarkerController::removeMarkers(const MarkerRemoverPredicate& shoul
dRemoveMarker) | 507 void DocumentMarkerController::removeMarkers(const MarkerRemoverPredicate& shoul
dRemoveMarker) |
508 { | 508 { |
509 for (MarkerMap::iterator i = m_markers.begin(); i != m_markers.end(); ++i) { | 509 for (MarkerMap::iterator i = m_markers.begin(); i != m_markers.end(); ++i) { |
510 MarkerLists* markers = i->value.get(); | 510 MarkerLists* markers = i->value.get(); |
511 for (size_t markerListIndex = 0; markerListIndex < DocumentMarker::Marke
rTypeIndexesCount; ++markerListIndex) { | 511 for (size_t markerListIndex = 0; markerListIndex < DocumentMarker::Marke
rTypeIndexesCount; ++markerListIndex) { |
512 OwnPtrWillBeMember<MarkerList>& list = (*markers)[markerListIndex]; | 512 OwnPtrWillBeMember<MarkerList>& list = (*markers)[markerListIndex]; |
513 | 513 |
514 WillBeHeapVector<RawPtrWillBeMember<RenderedDocumentMarker> > marker
sToBeRemoved; | 514 WillBeHeapVector<RawPtrWillBeMember<RenderedDocumentMarker>> markers
ToBeRemoved; |
515 for (size_t j = 0; list.get() && j < list->size(); ++j) { | 515 for (size_t j = 0; list.get() && j < list->size(); ++j) { |
516 if (i->key->isTextNode() && shouldRemoveMarker(*list->at(j).get(
), static_cast<const Text&>(*i->key))) | 516 if (i->key->isTextNode() && shouldRemoveMarker(*list->at(j).get(
), static_cast<const Text&>(*i->key))) |
517 markersToBeRemoved.append(list->at(j).get()); | 517 markersToBeRemoved.append(list->at(j).get()); |
518 } | 518 } |
519 | 519 |
520 for (size_t j = 0; j < markersToBeRemoved.size(); ++j) | 520 for (size_t j = 0; j < markersToBeRemoved.size(); ++j) |
521 list->remove(list->find(markersToBeRemoved[j].get())); | 521 list->remove(list->find(markersToBeRemoved[j].get())); |
522 } | 522 } |
523 } | 523 } |
524 } | 524 } |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |