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

Side by Side Diff: Source/core/accessibility/AccessibilityNodeObject.cpp

Issue 16361013: Get rid of extraneous accessibility tree traversal code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase for reland Created 7 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 | Annotate | Revision Log
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 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 return 0; 1272 return 0;
1273 1273
1274 Node* firstChild = node()->firstChild(); 1274 Node* firstChild = node()->firstChild();
1275 1275
1276 if (!firstChild) 1276 if (!firstChild)
1277 return 0; 1277 return 0;
1278 1278
1279 return axObjectCache()->getOrCreate(firstChild); 1279 return axObjectCache()->getOrCreate(firstChild);
1280 } 1280 }
1281 1281
1282 AccessibilityObject* AccessibilityNodeObject::lastChild() const
1283 {
1284 if (!node())
1285 return 0;
1286
1287 Node* lastChild = node()->lastChild();
1288 if (!lastChild)
1289 return 0;
1290
1291 return axObjectCache()->getOrCreate(lastChild);
1292 }
1293
1294 AccessibilityObject* AccessibilityNodeObject::previousSibling() const
1295 {
1296 if (!node())
1297 return 0;
1298
1299 Node* previousSibling = node()->previousSibling();
1300 if (!previousSibling)
1301 return 0;
1302
1303 return axObjectCache()->getOrCreate(previousSibling);
1304 }
1305
1306 AccessibilityObject* AccessibilityNodeObject::nextSibling() const 1282 AccessibilityObject* AccessibilityNodeObject::nextSibling() const
1307 { 1283 {
1308 if (!node()) 1284 if (!node())
1309 return 0; 1285 return 0;
1310 1286
1311 Node* nextSibling = node()->nextSibling(); 1287 Node* nextSibling = node()->nextSibling();
1312 if (!nextSibling) 1288 if (!nextSibling)
1313 return 0; 1289 return 0;
1314 1290
1315 return axObjectCache()->getOrCreate(nextSibling); 1291 return axObjectCache()->getOrCreate(nextSibling);
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 useTextUnderElement = true; 1681 useTextUnderElement = true;
1706 1682
1707 if (useTextUnderElement) { 1683 if (useTextUnderElement) {
1708 String text = textUnderElement(); 1684 String text = textUnderElement();
1709 if (!text.isEmpty()) 1685 if (!text.isEmpty())
1710 textOrder.append(AccessibilityText(text, ChildrenText)); 1686 textOrder.append(AccessibilityText(text, ChildrenText));
1711 } 1687 }
1712 } 1688 }
1713 1689
1714 } // namespace WebCore 1690 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/accessibility/AccessibilityNodeObject.h ('k') | Source/core/accessibility/AccessibilityObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698