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

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

Issue 2502413004: WTF/std normalization: replace WTF::Vector::last with ::back (Closed)
Patch Set: rebase Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple 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 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 foundTextAlternative = true; 1128 foundTextAlternative = true;
1129 } else if (m_layoutObject->isListMarker() && !recursive) { 1129 } else if (m_layoutObject->isListMarker() && !recursive) {
1130 textAlternative = toLayoutListMarker(m_layoutObject)->text(); 1130 textAlternative = toLayoutListMarker(m_layoutObject)->text();
1131 foundTextAlternative = true; 1131 foundTextAlternative = true;
1132 } 1132 }
1133 1133
1134 if (foundTextAlternative) { 1134 if (foundTextAlternative) {
1135 nameFrom = AXNameFromContents; 1135 nameFrom = AXNameFromContents;
1136 if (nameSources) { 1136 if (nameSources) {
1137 nameSources->append(NameSource(false)); 1137 nameSources->append(NameSource(false));
1138 nameSources->last().type = nameFrom; 1138 nameSources->back().type = nameFrom;
1139 nameSources->last().text = textAlternative; 1139 nameSources->back().text = textAlternative;
1140 } 1140 }
1141 return textAlternative; 1141 return textAlternative;
1142 } 1142 }
1143 } 1143 }
1144 1144
1145 return AXNodeObject::textAlternative(recursive, inAriaLabelledByTraversal, 1145 return AXNodeObject::textAlternative(recursive, inAriaLabelledByTraversal,
1146 visited, nameFrom, relatedObjects, 1146 visited, nameFrom, relatedObjects,
1147 nameSources); 1147 nameSources);
1148 } 1148 }
1149 1149
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2296 // Iterate through all of the children, including those that may have already 2296 // Iterate through all of the children, including those that may have already
2297 // been added, and try to insert hidden nodes in the correct place in the DOM 2297 // been added, and try to insert hidden nodes in the correct place in the DOM
2298 // order. 2298 // order.
2299 unsigned insertionIndex = 0; 2299 unsigned insertionIndex = 0;
2300 for (Node& child : NodeTraversal::childrenOf(*node)) { 2300 for (Node& child : NodeTraversal::childrenOf(*node)) {
2301 if (child.layoutObject()) { 2301 if (child.layoutObject()) {
2302 // Find out where the last layout sibling is located within m_children. 2302 // Find out where the last layout sibling is located within m_children.
2303 if (AXObject* childObject = axObjectCache().get(child.layoutObject())) { 2303 if (AXObject* childObject = axObjectCache().get(child.layoutObject())) {
2304 if (childObject->accessibilityIsIgnored()) { 2304 if (childObject->accessibilityIsIgnored()) {
2305 const auto& children = childObject->children(); 2305 const auto& children = childObject->children();
2306 childObject = children.size() ? children.last().get() : 0; 2306 childObject = children.size() ? children.back().get() : 0;
2307 } 2307 }
2308 if (childObject) 2308 if (childObject)
2309 insertionIndex = m_children.find(childObject) + 1; 2309 insertionIndex = m_children.find(childObject) + 1;
2310 continue; 2310 continue;
2311 } 2311 }
2312 } 2312 }
2313 2313
2314 if (!isNodeAriaVisible(&child)) 2314 if (!isNodeAriaVisible(&child))
2315 continue; 2315 continue;
2316 2316
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
2402 2402
2403 bool AXLayoutObject::elementAttributeValue( 2403 bool AXLayoutObject::elementAttributeValue(
2404 const QualifiedName& attributeName) const { 2404 const QualifiedName& attributeName) const {
2405 if (!m_layoutObject) 2405 if (!m_layoutObject)
2406 return false; 2406 return false;
2407 2407
2408 return equalIgnoringCase(getAttribute(attributeName), "true"); 2408 return equalIgnoringCase(getAttribute(attributeName), "true");
2409 } 2409 }
2410 2410
2411 } // namespace blink 2411 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698