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

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

Issue 235113002: Oilpan: Remove guardRef and guardDeref from TreeScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase again. Created 6 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 | Annotate | Revision Log
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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 m_markers.remove(node); 353 m_markers.remove(node);
354 if (m_markers.isEmpty()) 354 if (m_markers.isEmpty())
355 m_possiblyExistingMarkerTypes = 0; 355 m_possiblyExistingMarkerTypes = 0;
356 } 356 }
357 357
358 // repaint the affected node 358 // repaint the affected node
359 if (docDirty && node->renderer()) 359 if (docDirty && node->renderer())
360 node->renderer()->repaint(); 360 node->renderer()->repaint();
361 } 361 }
362 362
363 void DocumentMarkerController::clearWeakMembers(Visitor* visitor)
haraken 2014/04/24 04:18:43 Shall we add a FIXME that MarkerMap should use a h
Mads Ager (chromium) 2014/04/24 10:57:36 Yes, done.
364 {
365 Vector<const Node*> deadNodes;
366 for (MarkerMap::iterator it = m_markers.begin(); it != m_markers.end(); ++it ) {
367 if (!visitor->isAlive(it->key))
368 deadNodes.append(it->key);
369 }
370 for (unsigned i = 0; i < deadNodes.size(); ++i)
371 removeMarkers(const_cast<Node*>(deadNodes[i]));
372 }
373
363 DocumentMarker* DocumentMarkerController::markerContainingPoint(const LayoutPoin t& point, DocumentMarker::MarkerType markerType) 374 DocumentMarker* DocumentMarkerController::markerContainingPoint(const LayoutPoin t& point, DocumentMarker::MarkerType markerType)
364 { 375 {
365 if (!possiblyHasMarkers(markerType)) 376 if (!possiblyHasMarkers(markerType))
366 return 0; 377 return 0;
367 ASSERT(!(m_markers.isEmpty())); 378 ASSERT(!(m_markers.isEmpty()));
368 379
369 // outer loop: process each node that contains any markers 380 // outer loop: process each node that contains any markers
370 MarkerMap::iterator end = m_markers.end(); 381 MarkerMap::iterator end = m_markers.end();
371 for (MarkerMap::iterator nodeIterator = m_markers.begin(); nodeIterator != e nd; ++nodeIterator) { 382 for (MarkerMap::iterator nodeIterator = m_markers.begin(); nodeIterator != e nd; ++nodeIterator) {
372 // inner loop; process each marker in this node 383 // inner loop; process each marker in this node
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 735
725 } // namespace WebCore 736 } // namespace WebCore
726 737
727 #ifndef NDEBUG 738 #ifndef NDEBUG
728 void showDocumentMarkers(const WebCore::DocumentMarkerController* controller) 739 void showDocumentMarkers(const WebCore::DocumentMarkerController* controller)
729 { 740 {
730 if (controller) 741 if (controller)
731 controller->showMarkers(); 742 controller->showMarkers();
732 } 743 }
733 #endif 744 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698