Chromium Code Reviews| 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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 578 while (node) { | 578 while (node) { |
| 579 if (AXObjectImpl* obj = Get(node)) { | 579 if (AXObjectImpl* obj = Get(node)) { |
| 580 obj->SelectionChanged(); | 580 obj->SelectionChanged(); |
| 581 return; | 581 return; |
| 582 } | 582 } |
| 583 node = node->parentNode(); | 583 node = node->parentNode(); |
| 584 } | 584 } |
| 585 } | 585 } |
| 586 | 586 |
| 587 void AXObjectCacheImpl::TextChanged(Node* node) { | 587 void AXObjectCacheImpl::TextChanged(Node* node) { |
| 588 TextChanged(GetOrCreate(node)); | 588 AXObjectImpl* axObject = Get(node); |
| 589 if (!axObject) | |
|
dmazzoni
2017/06/14 18:38:14
I think you could remove this null-check since Tex
aboxhall
2017/06/14 18:46:05
Great, done.
| |
| 590 return; | |
| 591 TextChanged(axObject); | |
| 589 } | 592 } |
| 590 | 593 |
| 591 void AXObjectCacheImpl::TextChanged(LayoutObject* layout_object) { | 594 void AXObjectCacheImpl::TextChanged(LayoutObject* layout_object) { |
| 592 TextChanged(GetOrCreate(layout_object)); | 595 AXObjectImpl* axObject = Get(layout_object); |
| 596 if (!axObject) | |
|
dmazzoni
2017/06/14 18:38:14
Same
aboxhall
2017/06/14 18:46:05
Done.
| |
| 597 return; | |
| 598 TextChanged(axObject); | |
| 593 } | 599 } |
| 594 | 600 |
| 595 void AXObjectCacheImpl::TextChanged(AXObjectImpl* obj) { | 601 void AXObjectCacheImpl::TextChanged(AXObjectImpl* obj) { |
| 596 if (!obj) | 602 if (!obj) |
| 597 return; | 603 return; |
| 598 | 604 |
| 599 obj->TextChanged(); | 605 obj->TextChanged(); |
| 600 PostNotification(obj, AXObjectCacheImpl::kAXTextChanged); | 606 PostNotification(obj, AXObjectCacheImpl::kAXTextChanged); |
| 601 } | 607 } |
| 602 | 608 |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1274 visitor->Trace(document_); | 1280 visitor->Trace(document_); |
| 1275 visitor->Trace(node_object_mapping_); | 1281 visitor->Trace(node_object_mapping_); |
| 1276 | 1282 |
| 1277 visitor->Trace(objects_); | 1283 visitor->Trace(objects_); |
| 1278 visitor->Trace(notifications_to_post_); | 1284 visitor->Trace(notifications_to_post_); |
| 1279 | 1285 |
| 1280 AXObjectCache::Trace(visitor); | 1286 AXObjectCache::Trace(visitor); |
| 1281 } | 1287 } |
| 1282 | 1288 |
| 1283 } // namespace blink | 1289 } // namespace blink |
| OLD | NEW |