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

Unified Diff: Source/modules/accessibility/AXLayoutObject.cpp

Issue 991863003: Avoid unnecessary copies of AccessibilityChildrenVector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/accessibility/AXARIAGridRow.cpp ('k') | Source/modules/accessibility/AXNodeObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXLayoutObject.cpp
diff --git a/Source/modules/accessibility/AXLayoutObject.cpp b/Source/modules/accessibility/AXLayoutObject.cpp
index 8d812585c6e5ffe5afa4c09ed08353256009c6c1..1e710a07ca870eacacc2668257e26eea0d2f9d53 100644
--- a/Source/modules/accessibility/AXLayoutObject.cpp
+++ b/Source/modules/accessibility/AXLayoutObject.cpp
@@ -1940,7 +1940,7 @@ void AXLayoutObject::ariaListboxSelectedChildren(AccessibilityChildrenVector& re
{
bool isMulti = isMultiSelectable();
- AccessibilityChildrenVector childObjects = children();
+ const AccessibilityChildrenVector& childObjects = children();
unsigned childrenSize = childObjects.size();
for (unsigned k = 0; k < childrenSize; ++k) {
// Every child should have aria-role option, and if so, check for selected attribute/state.
@@ -2031,7 +2031,7 @@ AXObject* AXLayoutObject::accessibilityImageMapHitTest(HTMLAreaElement* area, co
if (!parent)
return 0;
- AXObject::AccessibilityChildrenVector children = parent->children();
+ const AccessibilityChildrenVector& children = parent->children();
unsigned count = children.size();
for (unsigned k = 0; k < count; ++k) {
if (children[k]->elementRect().contains(point))
@@ -2180,7 +2180,7 @@ void AXLayoutObject::addHiddenChildren()
// Find out where the last layout sibling is located within m_children.
AXObject* childObject = axObjectCache()->get(child->renderer());
if (childObject && childObject->accessibilityIsIgnored()) {
- AccessibilityChildrenVector children = childObject->children();
+ const AccessibilityChildrenVector& children = childObject->children();
if (children.size())
childObject = children.last().get();
else
@@ -2290,7 +2290,7 @@ void AXLayoutObject::addRemoteSVGChildren()
root->setParent(this);
if (root->accessibilityIsIgnored()) {
- AccessibilityChildrenVector children = root->children();
+ const AccessibilityChildrenVector& children = root->children();
unsigned length = children.size();
for (unsigned i = 0; i < length; ++i)
m_children.append(children[i]);
« no previous file with comments | « Source/modules/accessibility/AXARIAGridRow.cpp ('k') | Source/modules/accessibility/AXNodeObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698