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

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

Issue 1072273006: Oilpan: Prepare moving AXObject to heap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 using namespace HTMLNames; 84 using namespace HTMLNames;
85 85
86 // static 86 // static
87 PassOwnPtrWillBeRawPtr<AXObjectCache> AXObjectCacheImpl::create(Document& docume nt) 87 PassOwnPtrWillBeRawPtr<AXObjectCache> AXObjectCacheImpl::create(Document& docume nt)
88 { 88 {
89 return adoptPtrWillBeNoop(new AXObjectCacheImpl(document)); 89 return adoptPtrWillBeNoop(new AXObjectCacheImpl(document));
90 } 90 }
91 91
92 AXObjectCacheImpl::AXObjectCacheImpl(Document& document) 92 AXObjectCacheImpl::AXObjectCacheImpl(Document& document)
93 : m_document(document) 93 : m_document(&document)
94 , m_modificationCount(0) 94 , m_modificationCount(0)
95 #if ENABLE(ASSERT) 95 #if ENABLE(ASSERT)
96 , m_hasBeenDisposed(false) 96 , m_hasBeenDisposed(false)
97 #endif 97 #endif
98 , m_notificationPostTimer(this, &AXObjectCacheImpl::notificationPostTimerFir ed) 98 , m_notificationPostTimer(this, &AXObjectCacheImpl::notificationPostTimerFir ed)
99 { 99 {
100 } 100 }
101 101
102 AXObjectCacheImpl::~AXObjectCacheImpl() 102 AXObjectCacheImpl::~AXObjectCacheImpl()
103 { 103 {
104 ASSERT(m_hasBeenDisposed); 104 ASSERT(m_hasBeenDisposed);
105 } 105 }
106 106
107 void AXObjectCacheImpl::dispose() 107 void AXObjectCacheImpl::dispose()
108 { 108 {
109 m_notificationPostTimer.stop(); 109 m_notificationPostTimer.stop();
110 110
111 HashMap<AXID, RefPtr<AXObject>>::iterator end = m_objects.end(); 111 for (auto& entry : m_objects) {
112 for (HashMap<AXID, RefPtr<AXObject>>::iterator it = m_objects.begin(); it != end; ++it) { 112 AXObject* obj = entry.value.get();
113 AXObject* obj = (*it).value.get();
114 obj->detach(); 113 obj->detach();
115 removeAXID(obj); 114 removeAXID(obj);
116 } 115 }
117 116
118 #if ENABLE(ASSERT) 117 #if ENABLE(ASSERT)
119 m_hasBeenDisposed = true; 118 m_hasBeenDisposed = true;
120 #endif 119 #endif
121 } 120 }
122 121
123 AXObject* AXObjectCacheImpl::root() 122 AXObject* AXObjectCacheImpl::root()
124 { 123 {
125 return getOrCreate(&m_document); 124 return getOrCreate(m_document);
126 } 125 }
127 126
128 AXObject* AXObjectCacheImpl::focusedImageMapUIElement(HTMLAreaElement* areaEleme nt) 127 AXObject* AXObjectCacheImpl::focusedImageMapUIElement(HTMLAreaElement* areaEleme nt)
129 { 128 {
130 // Find the corresponding accessibility object for the HTMLAreaElement. This should be 129 // Find the corresponding accessibility object for the HTMLAreaElement. This should be
131 // in the list of children for its corresponding image. 130 // in the list of children for its corresponding image.
132 if (!areaElement) 131 if (!areaElement)
133 return 0; 132 return 0;
134 133
135 HTMLImageElement* imageElement = areaElement->imageElement(); 134 HTMLImageElement* imageElement = areaElement->imageElement();
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 // FIXME: This probably belongs on Node. 270 // FIXME: This probably belongs on Node.
272 // FIXME: This should take a const char*, but one caller passes nullAtom. 271 // FIXME: This should take a const char*, but one caller passes nullAtom.
273 bool nodeHasRole(Node* node, const String& role) 272 bool nodeHasRole(Node* node, const String& role)
274 { 273 {
275 if (!node || !node->isElementNode()) 274 if (!node || !node->isElementNode())
276 return false; 275 return false;
277 276
278 return equalIgnoringCase(toElement(node)->getAttribute(roleAttr), role); 277 return equalIgnoringCase(toElement(node)->getAttribute(roleAttr), role);
279 } 278 }
280 279
281 PassRefPtr<AXObject> AXObjectCacheImpl::createFromRenderer(LayoutObject* layoutO bject) 280 PassRefPtrWillBeRawPtr<AXObject> AXObjectCacheImpl::createFromRenderer(LayoutObj ect* layoutObject)
282 { 281 {
283 // FIXME: How could layoutObject->node() ever not be an Element? 282 // FIXME: How could layoutObject->node() ever not be an Element?
284 Node* node = layoutObject->node(); 283 Node* node = layoutObject->node();
285 284
286 // If the node is aria role="list" or the aria role is empty and its a 285 // If the node is aria role="list" or the aria role is empty and its a
287 // ul/ol/dl type (it shouldn't be a list if aria says otherwise). 286 // ul/ol/dl type (it shouldn't be a list if aria says otherwise).
288 if (nodeHasRole(node, "list") || nodeHasRole(node, "directory") 287 if (nodeHasRole(node, "list") || nodeHasRole(node, "directory")
289 || (nodeHasRole(node, nullAtom) && (isHTMLUListElement(node) || isHTMLOL istElement(node) || isHTMLDListElement(node)))) 288 || (nodeHasRole(node, nullAtom) && (isHTMLUListElement(node) || isHTMLOL istElement(node) || isHTMLDListElement(node))))
290 return AXList::create(layoutObject, *this); 289 return AXList::create(layoutObject, *this);
291 290
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 return AXProgressIndicator::create(toLayoutProgress(cssBox), *this); 326 return AXProgressIndicator::create(toLayoutProgress(cssBox), *this);
328 327
329 // input type=range 328 // input type=range
330 if (cssBox->isSlider()) 329 if (cssBox->isSlider())
331 return AXSlider::create(toLayoutSlider(cssBox), *this); 330 return AXSlider::create(toLayoutSlider(cssBox), *this);
332 } 331 }
333 332
334 return AXLayoutObject::create(layoutObject, *this); 333 return AXLayoutObject::create(layoutObject, *this);
335 } 334 }
336 335
337 PassRefPtr<AXObject> AXObjectCacheImpl::createFromNode(Node* node) 336 PassRefPtrWillBeRawPtr<AXObject> AXObjectCacheImpl::createFromNode(Node* node)
338 { 337 {
339 if (isMenuListOption(node)) 338 if (isMenuListOption(node))
340 return AXMenuListOption::create(toHTMLOptionElement(node), *this); 339 return AXMenuListOption::create(toHTMLOptionElement(node), *this);
341 340
342 return AXNodeObject::create(node, *this); 341 return AXNodeObject::create(node, *this);
343 } 342 }
344 343
345 PassRefPtr<AXObject> AXObjectCacheImpl::createFromInlineTextBox(AbstractInlineTe xtBox* inlineTextBox) 344 PassRefPtrWillBeRawPtr<AXObject> AXObjectCacheImpl::createFromInlineTextBox(Abst ractInlineTextBox* inlineTextBox)
346 { 345 {
347 return AXInlineTextBox::create(inlineTextBox, *this); 346 return AXInlineTextBox::create(inlineTextBox, *this);
348 } 347 }
349 348
350 AXObject* AXObjectCacheImpl::getOrCreate(Widget* widget) 349 AXObject* AXObjectCacheImpl::getOrCreate(Widget* widget)
351 { 350 {
352 if (!widget) 351 if (!widget)
353 return 0; 352 return 0;
354 353
355 if (AXObject* obj = get(widget)) 354 if (AXObject* obj = get(widget))
356 return obj; 355 return obj;
357 356
358 RefPtr<AXObject> newObj = nullptr; 357 RefPtrWillBeRawPtr<AXObject> newObj = nullptr;
359 if (widget->isFrameView()) { 358 if (widget->isFrameView()) {
360 FrameView* frameView = toFrameView(widget); 359 FrameView* frameView = toFrameView(widget);
361 360
362 // Don't create an AXScrollView for a FrameView that isn't attached to a frame, 361 // Don't create an AXScrollView for a FrameView that isn't attached to a frame,
363 // for example if it's in the process of being disposed. 362 // for example if it's in the process of being disposed.
364 if (frameView->frame().view() != frameView || !frameView->layoutView()) 363 if (frameView->frame().view() != frameView || !frameView->layoutView())
365 return 0; 364 return 0;
366 365
367 newObj = AXScrollView::create(toFrameView(widget), *this); 366 newObj = AXScrollView::create(toFrameView(widget), *this);
368 } else if (widget->isScrollbar()) { 367 } else if (widget->isScrollbar()) {
(...skipping 26 matching lines...) Expand all
395 394
396 if (node->layoutObject()) 395 if (node->layoutObject())
397 return getOrCreate(node->layoutObject()); 396 return getOrCreate(node->layoutObject());
398 397
399 if (!node->parentElement()) 398 if (!node->parentElement())
400 return 0; 399 return 0;
401 400
402 if (isHTMLHeadElement(node)) 401 if (isHTMLHeadElement(node))
403 return 0; 402 return 0;
404 403
405 RefPtr<AXObject> newObj = createFromNode(node); 404 RefPtrWillBeRawPtr<AXObject> newObj = createFromNode(node);
406 405
407 // Will crash later if we have two objects for the same node. 406 // Will crash later if we have two objects for the same node.
408 ASSERT(!get(node)); 407 ASSERT(!get(node));
409 408
410 getAXID(newObj.get()); 409 getAXID(newObj.get());
411 410
412 m_nodeObjectMapping.set(node, newObj->axObjectID()); 411 m_nodeObjectMapping.set(node, newObj->axObjectID());
413 m_objects.set(newObj->axObjectID(), newObj); 412 m_objects.set(newObj->axObjectID(), newObj);
414 newObj->init(); 413 newObj->init();
415 newObj->setLastKnownIsIgnoredValue(newObj->accessibilityIsIgnored()); 414 newObj->setLastKnownIsIgnoredValue(newObj->accessibilityIsIgnored());
416 415
417 if (node->isElementNode()) 416 if (node->isElementNode())
418 updateTreeIfElementIdIsAriaOwned(toElement(node)); 417 updateTreeIfElementIdIsAriaOwned(toElement(node));
419 418
420 return newObj.get(); 419 return newObj.get();
421 } 420 }
422 421
423 AXObject* AXObjectCacheImpl::getOrCreate(LayoutObject* layoutObject) 422 AXObject* AXObjectCacheImpl::getOrCreate(LayoutObject* layoutObject)
424 { 423 {
425 if (!layoutObject) 424 if (!layoutObject)
426 return 0; 425 return 0;
427 426
428 if (AXObject* obj = get(layoutObject)) 427 if (AXObject* obj = get(layoutObject))
429 return obj; 428 return obj;
430 429
431 RefPtr<AXObject> newObj = createFromRenderer(layoutObject); 430 RefPtrWillBeRawPtr<AXObject> newObj = createFromRenderer(layoutObject);
432 431
433 // Will crash later if we have two objects for the same layoutObject. 432 // Will crash later if we have two objects for the same layoutObject.
434 ASSERT(!get(layoutObject)); 433 ASSERT(!get(layoutObject));
435 434
436 getAXID(newObj.get()); 435 getAXID(newObj.get());
437 436
438 m_layoutObjectMapping.set(layoutObject, newObj->axObjectID()); 437 m_layoutObjectMapping.set(layoutObject, newObj->axObjectID());
439 m_objects.set(newObj->axObjectID(), newObj); 438 m_objects.set(newObj->axObjectID(), newObj);
440 newObj->init(); 439 newObj->init();
441 newObj->setLastKnownIsIgnoredValue(newObj->accessibilityIsIgnored()); 440 newObj->setLastKnownIsIgnoredValue(newObj->accessibilityIsIgnored());
442 441
443 return newObj.get(); 442 return newObj.get();
444 } 443 }
445 444
446 AXObject* AXObjectCacheImpl::getOrCreate(AbstractInlineTextBox* inlineTextBox) 445 AXObject* AXObjectCacheImpl::getOrCreate(AbstractInlineTextBox* inlineTextBox)
447 { 446 {
448 if (!inlineTextBox) 447 if (!inlineTextBox)
449 return 0; 448 return 0;
450 449
451 if (AXObject* obj = get(inlineTextBox)) 450 if (AXObject* obj = get(inlineTextBox))
452 return obj; 451 return obj;
453 452
454 RefPtr<AXObject> newObj = createFromInlineTextBox(inlineTextBox); 453 RefPtrWillBeRawPtr<AXObject> newObj = createFromInlineTextBox(inlineTextBox) ;
455 454
456 // Will crash later if we have two objects for the same inlineTextBox. 455 // Will crash later if we have two objects for the same inlineTextBox.
457 ASSERT(!get(inlineTextBox)); 456 ASSERT(!get(inlineTextBox));
458 457
459 getAXID(newObj.get()); 458 getAXID(newObj.get());
460 459
461 m_inlineTextBoxObjectMapping.set(inlineTextBox, newObj->axObjectID()); 460 m_inlineTextBoxObjectMapping.set(inlineTextBox, newObj->axObjectID());
462 m_objects.set(newObj->axObjectID(), newObj); 461 m_objects.set(newObj->axObjectID(), newObj);
463 newObj->init(); 462 newObj->init();
464 newObj->setLastKnownIsIgnoredValue(newObj->accessibilityIsIgnored()); 463 newObj->setLastKnownIsIgnoredValue(newObj->accessibilityIsIgnored());
465 464
466 return newObj.get(); 465 return newObj.get();
467 } 466 }
468 467
469 AXObject* AXObjectCacheImpl::rootObject() 468 AXObject* AXObjectCacheImpl::rootObject()
470 { 469 {
471 if (!accessibilityEnabled()) 470 if (!accessibilityEnabled())
472 return 0; 471 return 0;
473 472
474 return getOrCreate(m_document.view()); 473 return getOrCreate(m_document->view());
475 } 474 }
476 475
477 AXObject* AXObjectCacheImpl::getOrCreate(AccessibilityRole role) 476 AXObject* AXObjectCacheImpl::getOrCreate(AccessibilityRole role)
478 { 477 {
479 RefPtr<AXObject> obj = nullptr; 478 RefPtrWillBeRawPtr<AXObject> obj = nullptr;
480 479
481 // will be filled in... 480 // will be filled in...
482 switch (role) { 481 switch (role) {
483 case ImageMapLinkRole: 482 case ImageMapLinkRole:
484 obj = AXImageMapLink::create(*this); 483 obj = AXImageMapLink::create(*this);
485 break; 484 break;
486 case ColumnRole: 485 case ColumnRole:
487 obj = AXTableColumn::create(*this); 486 obj = AXTableColumn::create(*this);
488 break; 487 break;
489 case TableHeaderContainerRole: 488 case TableHeaderContainerRole:
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 void AXObjectCacheImpl::remove(LayoutObject* layoutObject) 537 void AXObjectCacheImpl::remove(LayoutObject* layoutObject)
539 { 538 {
540 if (!layoutObject) 539 if (!layoutObject)
541 return; 540 return;
542 541
543 AXID axID = m_layoutObjectMapping.get(layoutObject); 542 AXID axID = m_layoutObjectMapping.get(layoutObject);
544 remove(axID); 543 remove(axID);
545 m_layoutObjectMapping.remove(layoutObject); 544 m_layoutObjectMapping.remove(layoutObject);
546 } 545 }
547 546
548 void AXObjectCacheImpl::remove(Node* node) 547 void AXObjectCacheImpl::remove(Node* node)
haraken 2015/06/24 13:27:20 Can we add an ASSERT to all remove methods to veri
keishi 2015/06/24 15:05:26 I don't think we can. We might be calling remove()
549 { 548 {
550 if (!node) 549 if (!node)
551 return; 550 return;
552 551
553 removeNodeForUse(node); 552 removeNodeForUse(node);
554 553
555 // This is all safe even if we didn't have a mapping. 554 // This is all safe even if we didn't have a mapping.
556 AXID axID = m_nodeObjectMapping.get(node); 555 AXID axID = m_nodeObjectMapping.get(node);
557 remove(axID); 556 remove(axID);
558 m_nodeObjectMapping.remove(node); 557 m_nodeObjectMapping.remove(node);
(...skipping 17 matching lines...) Expand all
576 void AXObjectCacheImpl::remove(AbstractInlineTextBox* inlineTextBox) 575 void AXObjectCacheImpl::remove(AbstractInlineTextBox* inlineTextBox)
577 { 576 {
578 if (!inlineTextBox) 577 if (!inlineTextBox)
579 return; 578 return;
580 579
581 AXID axID = m_inlineTextBoxObjectMapping.get(inlineTextBox); 580 AXID axID = m_inlineTextBoxObjectMapping.get(inlineTextBox);
582 remove(axID); 581 remove(axID);
583 m_inlineTextBoxObjectMapping.remove(inlineTextBox); 582 m_inlineTextBoxObjectMapping.remove(inlineTextBox);
584 } 583 }
585 584
586 // FIXME: Oilpan: Use a weak hashmap for this instead.
587 void AXObjectCacheImpl::clearWeakMembers(Visitor* visitor)
588 {
589 Vector<Node*> deadNodes;
590 for (HashMap<Node*, AXID>::iterator it = m_nodeObjectMapping.begin(); it != m_nodeObjectMapping.end(); ++it) {
591 if (!Heap::isHeapObjectAlive(it->key))
592 deadNodes.append(it->key);
593 }
594 for (unsigned i = 0; i < deadNodes.size(); ++i)
595 remove(deadNodes[i]);
596
597 Vector<Widget*> deadWidgets;
598 for (HashMap<Widget*, AXID>::iterator it = m_widgetObjectMapping.begin();
599 it != m_widgetObjectMapping.end(); ++it) {
600 if (!Heap::isHeapObjectAlive(it->key))
601 deadWidgets.append(it->key);
602 }
603 for (unsigned i = 0; i < deadWidgets.size(); ++i)
604 remove(deadWidgets[i]);
605 }
606
607 AXID AXObjectCacheImpl::platformGenerateAXID() const 585 AXID AXObjectCacheImpl::platformGenerateAXID() const
608 { 586 {
609 static AXID lastUsedID = 0; 587 static AXID lastUsedID = 0;
610 588
611 // Generate a new ID. 589 // Generate a new ID.
612 AXID objID = lastUsedID; 590 AXID objID = lastUsedID;
613 do { 591 do {
614 ++objID; 592 ++objID;
615 } while (!objID || HashTraits<AXID>::isDeletedValue(objID) || m_idsInUse.con tains(objID)); 593 } while (!objID || HashTraits<AXID>::isDeletedValue(objID) || m_idsInUse.con tains(objID));
616 594
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 void AXObjectCacheImpl::childrenChanged(AXObject* obj) 685 void AXObjectCacheImpl::childrenChanged(AXObject* obj)
708 { 686 {
709 if (!obj) 687 if (!obj)
710 return; 688 return;
711 689
712 obj->childrenChanged(); 690 obj->childrenChanged();
713 } 691 }
714 692
715 void AXObjectCacheImpl::notificationPostTimerFired(Timer<AXObjectCacheImpl>*) 693 void AXObjectCacheImpl::notificationPostTimerFired(Timer<AXObjectCacheImpl>*)
716 { 694 {
717 RefPtrWillBeRawPtr<Document> protectorForCacheOwner(m_document); 695 RefPtrWillBeRawPtr<Document> protectorForCacheOwner(m_document.get());
718 696
719 m_notificationPostTimer.stop(); 697 m_notificationPostTimer.stop();
720 698
721 unsigned i = 0, count = m_notificationsToPost.size(); 699 unsigned i = 0, count = m_notificationsToPost.size();
722 for (i = 0; i < count; ++i) { 700 for (i = 0; i < count; ++i) {
723 AXObject* obj = m_notificationsToPost[i].first.get(); 701 AXObject* obj = m_notificationsToPost[i].first.get();
724 702
725 if (!obj->axObjectID()) 703 if (!obj->axObjectID())
726 continue; 704 continue;
727 705
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 if (AXObject* obj = get(layoutObject)) { 1085 if (AXObject* obj = get(layoutObject)) {
1108 if (!obj->needsToUpdateChildren()) { 1086 if (!obj->needsToUpdateChildren()) {
1109 obj->setNeedsToUpdateChildren(); 1087 obj->setNeedsToUpdateChildren();
1110 postNotification(layoutObject, AXChildrenChanged); 1088 postNotification(layoutObject, AXChildrenChanged);
1111 } 1089 }
1112 } 1090 }
1113 } 1091 }
1114 1092
1115 Settings* AXObjectCacheImpl::settings() 1093 Settings* AXObjectCacheImpl::settings()
1116 { 1094 {
1117 return m_document.settings(); 1095 return m_document->settings();
1118 } 1096 }
1119 1097
1120 bool AXObjectCacheImpl::accessibilityEnabled() 1098 bool AXObjectCacheImpl::accessibilityEnabled()
1121 { 1099 {
1122 Settings* settings = this->settings(); 1100 Settings* settings = this->settings();
1123 if (!settings) 1101 if (!settings)
1124 return false; 1102 return false;
1125 return settings->accessibilityEnabled(); 1103 return settings->accessibilityEnabled();
1126 } 1104 }
1127 1105
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 1205
1228 AXObject* focusedObject = focusedUIElementForPage(page); 1206 AXObject* focusedObject = focusedUIElementForPage(page);
1229 if (!focusedObject) 1207 if (!focusedObject)
1230 return; 1208 return;
1231 1209
1232 postPlatformNotification(focusedObject, AXFocusedUIElementChanged); 1210 postPlatformNotification(focusedObject, AXFocusedUIElementChanged);
1233 } 1211 }
1234 1212
1235 void AXObjectCacheImpl::handleInitialFocus() 1213 void AXObjectCacheImpl::handleInitialFocus()
1236 { 1214 {
1237 postNotification(&m_document, AXObjectCache::AXFocusedUIElementChanged); 1215 postNotification(m_document, AXObjectCache::AXFocusedUIElementChanged);
1238 } 1216 }
1239 1217
1240 void AXObjectCacheImpl::handleEditableTextContentChanged(Node* node) 1218 void AXObjectCacheImpl::handleEditableTextContentChanged(Node* node)
1241 { 1219 {
1242 AXObject* obj = get(node); 1220 AXObject* obj = get(node);
1243 while (obj && !obj->isNativeTextControl() && !obj->isNonNativeTextControl()) 1221 while (obj && !obj->isNativeTextControl() && !obj->isNonNativeTextControl())
1244 obj = obj->parentObject(); 1222 obj = obj->parentObject();
1245 postNotification(obj, AXObjectCache::AXValueChanged); 1223 postNotification(obj, AXObjectCache::AXValueChanged);
1246 } 1224 }
1247 1225
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 { 1339 {
1362 AXObject* obj = getOrCreate(element); 1340 AXObject* obj = getOrCreate(element);
1363 if (!obj) 1341 if (!obj)
1364 return; 1342 return;
1365 1343
1366 obj->setElementRect(rect); 1344 obj->setElementRect(rect);
1367 } 1345 }
1368 1346
1369 DEFINE_TRACE(AXObjectCacheImpl) 1347 DEFINE_TRACE(AXObjectCacheImpl)
1370 { 1348 {
1371 visitor->template registerWeakMembers<AXObjectCacheImpl, &AXObjectCacheImpl: :clearWeakMembers>(this); 1349 #if ENABLE(OILPAN)
1350 visitor->trace(m_document);
1351 visitor->trace(m_objects);
1352 visitor->trace(m_widgetObjectMapping);
1353 visitor->trace(m_nodeObjectMapping);
1354 visitor->trace(m_notificationsToPost);
1355 visitor->trace(m_textMarkerNodes);
1356 #endif
1372 AXObjectCache::trace(visitor); 1357 AXObjectCache::trace(visitor);
1373 } 1358 }
1374 1359
1375 } // namespace blink 1360 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698