| OLD | NEW |
| 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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 AXID axID = m_inlineTextBoxObjectMapping.get(inlineTextBox); | 562 AXID axID = m_inlineTextBoxObjectMapping.get(inlineTextBox); |
| 563 remove(axID); | 563 remove(axID); |
| 564 m_inlineTextBoxObjectMapping.remove(inlineTextBox); | 564 m_inlineTextBoxObjectMapping.remove(inlineTextBox); |
| 565 } | 565 } |
| 566 | 566 |
| 567 // FIXME: Oilpan: Use a weak hashmap for this instead. | 567 // FIXME: Oilpan: Use a weak hashmap for this instead. |
| 568 void AXObjectCacheImpl::clearWeakMembers(Visitor* visitor) | 568 void AXObjectCacheImpl::clearWeakMembers(Visitor* visitor) |
| 569 { | 569 { |
| 570 Vector<Node*> deadNodes; | 570 Vector<Node*> deadNodes; |
| 571 for (HashMap<Node*, AXID>::iterator it = m_nodeObjectMapping.begin(); it !=
m_nodeObjectMapping.end(); ++it) { | 571 for (HashMap<Node*, AXID>::iterator it = m_nodeObjectMapping.begin(); it !=
m_nodeObjectMapping.end(); ++it) { |
| 572 if (!visitor->isHeapObjectAlive(it->key)) | 572 if (!Heap::isHeapObjectAlive(it->key)) |
| 573 deadNodes.append(it->key); | 573 deadNodes.append(it->key); |
| 574 } | 574 } |
| 575 for (unsigned i = 0; i < deadNodes.size(); ++i) | 575 for (unsigned i = 0; i < deadNodes.size(); ++i) |
| 576 remove(deadNodes[i]); | 576 remove(deadNodes[i]); |
| 577 | 577 |
| 578 Vector<Widget*> deadWidgets; | 578 Vector<Widget*> deadWidgets; |
| 579 for (HashMap<Widget*, AXID>::iterator it = m_widgetObjectMapping.begin(); | 579 for (HashMap<Widget*, AXID>::iterator it = m_widgetObjectMapping.begin(); |
| 580 it != m_widgetObjectMapping.end(); ++it) { | 580 it != m_widgetObjectMapping.end(); ++it) { |
| 581 if (!visitor->isHeapObjectAlive(it->key)) | 581 if (!Heap::isHeapObjectAlive(it->key)) |
| 582 deadWidgets.append(it->key); | 582 deadWidgets.append(it->key); |
| 583 } | 583 } |
| 584 for (unsigned i = 0; i < deadWidgets.size(); ++i) | 584 for (unsigned i = 0; i < deadWidgets.size(); ++i) |
| 585 remove(deadWidgets[i]); | 585 remove(deadWidgets[i]); |
| 586 } | 586 } |
| 587 | 587 |
| 588 AXID AXObjectCacheImpl::platformGenerateAXID() const | 588 AXID AXObjectCacheImpl::platformGenerateAXID() const |
| 589 { | 589 { |
| 590 static AXID lastUsedID = 0; | 590 static AXID lastUsedID = 0; |
| 591 | 591 |
| (...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1341 void AXObjectCacheImpl::setCanvasObjectBounds(Element* element, const LayoutRect
& rect) | 1341 void AXObjectCacheImpl::setCanvasObjectBounds(Element* element, const LayoutRect
& rect) |
| 1342 { | 1342 { |
| 1343 AXObject* obj = getOrCreate(element); | 1343 AXObject* obj = getOrCreate(element); |
| 1344 if (!obj) | 1344 if (!obj) |
| 1345 return; | 1345 return; |
| 1346 | 1346 |
| 1347 obj->setElementRect(rect); | 1347 obj->setElementRect(rect); |
| 1348 } | 1348 } |
| 1349 | 1349 |
| 1350 } // namespace blink | 1350 } // namespace blink |
| OLD | NEW |