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

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

Issue 2939933002: Only call TextChanged on existing AXObjects (Closed)
Patch Set: Created 3 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Text.cpp ('k') | no next file » | 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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Text.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698