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

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

Issue 2390783006: [DevTools] Accessibility: Show siblings and children of selected node (Closed)
Patch Set: Ready for a first look Created 4 years, 2 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
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 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 1410
1411 // menuButton and its corresponding menu are DOM siblings, but Accessibility 1411 // menuButton and its corresponding menu are DOM siblings, but Accessibility
1412 // needs them to be parent/child. 1412 // needs them to be parent/child.
1413 if (ariaRoleAttribute() == MenuRole) { 1413 if (ariaRoleAttribute() == MenuRole) {
1414 AXObject* parent = menuButtonForMenu(); 1414 AXObject* parent = menuButtonForMenu();
1415 if (parent) 1415 if (parent)
1416 return parent; 1416 return parent;
1417 } 1417 }
1418 1418
1419 LayoutObject* parentObj = layoutParentObject(); 1419 LayoutObject* parentObj = layoutParentObject();
1420 if (parentObj) 1420 if (parentObj) {
1421 return axObjectCache().getOrCreate(parentObj); 1421 return axObjectCache().getOrCreate(parentObj);
1422 }
1422 1423
1423 // A WebArea's parent should be the page popup owner, if any, otherwise null. 1424 // A WebArea's parent should be the page popup owner, if any, otherwise null.
1424 if (isWebArea()) { 1425 if (isWebArea()) {
1425 LocalFrame* frame = m_layoutObject->frame(); 1426 LocalFrame* frame = m_layoutObject->frame();
1426 return axObjectCache().getOrCreate(frame->pagePopupOwner()); 1427 return axObjectCache().getOrCreate(frame->pagePopupOwner());
1427 } 1428 }
1428 1429
1429 return 0; 1430 return 0;
1430 } 1431 }
1431 1432
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
2445 2446
2446 bool AXLayoutObject::elementAttributeValue( 2447 bool AXLayoutObject::elementAttributeValue(
2447 const QualifiedName& attributeName) const { 2448 const QualifiedName& attributeName) const {
2448 if (!m_layoutObject) 2449 if (!m_layoutObject)
2449 return false; 2450 return false;
2450 2451
2451 return equalIgnoringCase(getAttribute(attributeName), "true"); 2452 return equalIgnoringCase(getAttribute(attributeName), "true");
2452 } 2453 }
2453 2454
2454 } // namespace blink 2455 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698