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

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

Issue 2072583002: Avoid calling AXObjectCacheImpl::isAriaOwned with null parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2052783002
Patch Set: Created 4 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 | « no previous file | 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) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, 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 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after
1871 1871
1872 // The only time we add children from the DOM tree to a node with a layoutOb ject is when it's a canvas. 1872 // The only time we add children from the DOM tree to a node with a layoutOb ject is when it's a canvas.
1873 if (getLayoutObject() && !isHTMLCanvasElement(*m_node)) 1873 if (getLayoutObject() && !isHTMLCanvasElement(*m_node))
1874 return; 1874 return;
1875 1875
1876 HeapVector<Member<AXObject>> ownedChildren; 1876 HeapVector<Member<AXObject>> ownedChildren;
1877 computeAriaOwnsChildren(ownedChildren); 1877 computeAriaOwnsChildren(ownedChildren);
1878 1878
1879 for (Node& child : NodeTraversal::childrenOf(*m_node)) { 1879 for (Node& child : NodeTraversal::childrenOf(*m_node)) {
1880 AXObject* childObj = axObjectCache().getOrCreate(&child); 1880 AXObject* childObj = axObjectCache().getOrCreate(&child);
1881 if (!axObjectCache().isAriaOwned(childObj)) 1881 if (childObj && !axObjectCache().isAriaOwned(childObj))
1882 addChild(childObj); 1882 addChild(childObj);
1883 } 1883 }
1884 1884
1885 for (const auto& ownedChild : ownedChildren) 1885 for (const auto& ownedChild : ownedChildren)
1886 addChild(ownedChild); 1886 addChild(ownedChild);
1887 1887
1888 for (const auto& child : m_children) 1888 for (const auto& child : m_children)
1889 child->setParent(this); 1889 child->setParent(this);
1890 } 1890 }
1891 1891
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
2832 return placeholder; 2832 return placeholder;
2833 } 2833 }
2834 2834
2835 DEFINE_TRACE(AXNodeObject) 2835 DEFINE_TRACE(AXNodeObject)
2836 { 2836 {
2837 visitor->trace(m_node); 2837 visitor->trace(m_node);
2838 AXObject::trace(visitor); 2838 AXObject::trace(visitor);
2839 } 2839 }
2840 2840
2841 } // namespace blink 2841 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698