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 | 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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 marker->Invalidate(); | 455 marker->Invalidate(); |
456 | 456 |
457 if (markers_in_list.front()->GetType() == DocumentMarker::kTextMatch) | 457 if (markers_in_list.front()->GetType() == DocumentMarker::kTextMatch) |
458 InvalidatePaintForTickmarks(node); | 458 InvalidatePaintForTickmarks(node); |
459 } | 459 } |
460 } | 460 } |
461 | 461 |
462 void DocumentMarkerController::InvalidateRectsForAllMarkers() { | 462 void DocumentMarkerController::InvalidateRectsForAllMarkers() { |
463 for (auto& node_markers : markers_) { | 463 for (auto& node_markers : markers_) { |
464 const Node& node = *node_markers.key; | 464 const Node& node = *node_markers.key; |
465 for (auto& marker_list : *node_markers.value) { | 465 InvalidateRectsForMarkersInNode(node); |
466 if (!marker_list || marker_list->IsEmpty()) | |
467 continue; | |
468 | |
469 const HeapVector<Member<RenderedDocumentMarker>>& markers_in_list = | |
470 marker_list->GetMarkers(); | |
471 for (DocumentMarker* marker : markers_in_list) | |
472 ToRenderedDocumentMarker(marker)->Invalidate(); | |
473 | |
474 if (markers_in_list.front()->GetType() == DocumentMarker::kTextMatch) | |
475 InvalidatePaintForTickmarks(node); | |
476 } | |
477 } | 466 } |
478 } | 467 } |
479 | 468 |
480 DEFINE_TRACE(DocumentMarkerController) { | 469 DEFINE_TRACE(DocumentMarkerController) { |
481 visitor->Trace(markers_); | 470 visitor->Trace(markers_); |
482 visitor->Trace(document_); | 471 visitor->Trace(document_); |
483 SynchronousMutationObserver::Trace(visitor); | 472 SynchronousMutationObserver::Trace(visitor); |
484 } | 473 } |
485 | 474 |
486 void DocumentMarkerController::RemoveMarkersForNode( | 475 void DocumentMarkerController::RemoveMarkersForNode( |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 } | 730 } |
742 | 731 |
743 } // namespace blink | 732 } // namespace blink |
744 | 733 |
745 #ifndef NDEBUG | 734 #ifndef NDEBUG |
746 void showDocumentMarkers(const blink::DocumentMarkerController* controller) { | 735 void showDocumentMarkers(const blink::DocumentMarkerController* controller) { |
747 if (controller) | 736 if (controller) |
748 controller->ShowMarkers(); | 737 controller->ShowMarkers(); |
749 } | 738 } |
750 #endif | 739 #endif |
OLD | NEW |