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

Side by Side Diff: Source/modules/accessibility/AXObjectCacheImpl.cpp

Issue 1166623002: Oilpan: Remove a visitor parameter from isHeapObjectAlive (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGElementRareData.cpp ('k') | Source/modules/mediasource/MediaSource.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014, Google Inc. All rights reserved. 2 * Copyright (C) 2014, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 AXID axID = m_inlineTextBoxObjectMapping.get(inlineTextBox); 561 AXID axID = m_inlineTextBoxObjectMapping.get(inlineTextBox);
562 remove(axID); 562 remove(axID);
563 m_inlineTextBoxObjectMapping.remove(inlineTextBox); 563 m_inlineTextBoxObjectMapping.remove(inlineTextBox);
564 } 564 }
565 565
566 // FIXME: Oilpan: Use a weak hashmap for this instead. 566 // FIXME: Oilpan: Use a weak hashmap for this instead.
567 void AXObjectCacheImpl::clearWeakMembers(Visitor* visitor) 567 void AXObjectCacheImpl::clearWeakMembers(Visitor* visitor)
568 { 568 {
569 Vector<Node*> deadNodes; 569 Vector<Node*> deadNodes;
570 for (HashMap<Node*, AXID>::iterator it = m_nodeObjectMapping.begin(); it != m_nodeObjectMapping.end(); ++it) { 570 for (HashMap<Node*, AXID>::iterator it = m_nodeObjectMapping.begin(); it != m_nodeObjectMapping.end(); ++it) {
571 if (!visitor->isHeapObjectAlive(it->key)) 571 if (!Heap::isHeapObjectAlive(it->key))
572 deadNodes.append(it->key); 572 deadNodes.append(it->key);
573 } 573 }
574 for (unsigned i = 0; i < deadNodes.size(); ++i) 574 for (unsigned i = 0; i < deadNodes.size(); ++i)
575 remove(deadNodes[i]); 575 remove(deadNodes[i]);
576 576
577 Vector<Widget*> deadWidgets; 577 Vector<Widget*> deadWidgets;
578 for (HashMap<Widget*, AXID>::iterator it = m_widgetObjectMapping.begin(); 578 for (HashMap<Widget*, AXID>::iterator it = m_widgetObjectMapping.begin();
579 it != m_widgetObjectMapping.end(); ++it) { 579 it != m_widgetObjectMapping.end(); ++it) {
580 if (!visitor->isHeapObjectAlive(it->key)) 580 if (!Heap::isHeapObjectAlive(it->key))
581 deadWidgets.append(it->key); 581 deadWidgets.append(it->key);
582 } 582 }
583 for (unsigned i = 0; i < deadWidgets.size(); ++i) 583 for (unsigned i = 0; i < deadWidgets.size(); ++i)
584 remove(deadWidgets[i]); 584 remove(deadWidgets[i]);
585 } 585 }
586 586
587 AXID AXObjectCacheImpl::platformGenerateAXID() const 587 AXID AXObjectCacheImpl::platformGenerateAXID() const
588 { 588 {
589 static AXID lastUsedID = 0; 589 static AXID lastUsedID = 0;
590 590
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 void AXObjectCacheImpl::setCanvasObjectBounds(Element* element, const LayoutRect & rect) 1340 void AXObjectCacheImpl::setCanvasObjectBounds(Element* element, const LayoutRect & rect)
1341 { 1341 {
1342 AXObject* obj = getOrCreate(element); 1342 AXObject* obj = getOrCreate(element);
1343 if (!obj) 1343 if (!obj)
1344 return; 1344 return;
1345 1345
1346 obj->setElementRect(rect); 1346 obj->setElementRect(rect);
1347 } 1347 }
1348 1348
1349 } // namespace blink 1349 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGElementRareData.cpp ('k') | Source/modules/mediasource/MediaSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698