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

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

Issue 2974823003: [M60 Merge] No AX objects for comments and other irrelevant node types (Closed)
Patch Set: Created 3 years, 5 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 | « no previous file | third_party/WebKit/Source/modules/accessibility/AXObjectImpl.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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 AXObjectImpl* AXObjectCacheImpl::CreateFromInlineTextBox( 344 AXObjectImpl* AXObjectCacheImpl::CreateFromInlineTextBox(
345 AbstractInlineTextBox* inline_text_box) { 345 AbstractInlineTextBox* inline_text_box) {
346 return AXInlineTextBox::Create(inline_text_box, *this); 346 return AXInlineTextBox::Create(inline_text_box, *this);
347 } 347 }
348 348
349 AXObjectImpl* AXObjectCacheImpl::GetOrCreate(Node* node) { 349 AXObjectImpl* AXObjectCacheImpl::GetOrCreate(Node* node) {
350 if (!node) 350 if (!node)
351 return 0; 351 return 0;
352 352
353 if (!node->IsElementNode() && !node->IsTextNode() && !node->IsDocumentNode())
354 return 0; // Only documents, elements and text nodes get a11y objects
355
353 if (AXObjectImpl* obj = Get(node)) 356 if (AXObjectImpl* obj = Get(node))
354 return obj; 357 return obj;
355 358
356 // If the node has a layout object, prefer using that as the primary key for 359 // If the node has a layout object, prefer using that as the primary key for
357 // the AXObjectImpl, with the exception of an HTMLAreaElement, which is 360 // the AXObjectImpl, with the exception of an HTMLAreaElement, which is
358 // created based on its node. 361 // created based on its node.
359 if (node->GetLayoutObject() && !isHTMLAreaElement(node)) 362 if (node->GetLayoutObject() && !isHTMLAreaElement(node))
360 return GetOrCreate(node->GetLayoutObject()); 363 return GetOrCreate(node->GetLayoutObject());
361 364
362 if (!node->parentElement()) 365 if (!node->parentElement())
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 visitor->Trace(document_); 1263 visitor->Trace(document_);
1261 visitor->Trace(node_object_mapping_); 1264 visitor->Trace(node_object_mapping_);
1262 1265
1263 visitor->Trace(objects_); 1266 visitor->Trace(objects_);
1264 visitor->Trace(notifications_to_post_); 1267 visitor->Trace(notifications_to_post_);
1265 1268
1266 AXObjectCache::Trace(visitor); 1269 AXObjectCache::Trace(visitor);
1267 } 1270 }
1268 1271
1269 } // namespace blink 1272 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/accessibility/AXObjectImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698