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

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

Issue 2973973002: Implement AccessibleNode.hasPopUp for Accessibility Object Model phase 1 (Closed)
Patch Set: Fix handling of aria-haspopup=false Created 3 years, 5 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 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 AccessibilityChildrenFromAOMProperty(AOMRelationListProperty::kDescribedBy, 1272 AccessibilityChildrenFromAOMProperty(AOMRelationListProperty::kDescribedBy,
1273 describedby); 1273 describedby);
1274 } 1274 }
1275 1275
1276 void AXLayoutObject::AriaLabelledbyElements(AXObjectVector& labelledby) const { 1276 void AXLayoutObject::AriaLabelledbyElements(AXObjectVector& labelledby) const {
1277 AccessibilityChildrenFromAOMProperty(AOMRelationListProperty::kLabeledBy, 1277 AccessibilityChildrenFromAOMProperty(AOMRelationListProperty::kLabeledBy,
1278 labelledby); 1278 labelledby);
1279 } 1279 }
1280 1280
1281 bool AXLayoutObject::AriaHasPopup() const { 1281 bool AXLayoutObject::AriaHasPopup() const {
1282 return ElementAttributeValue(aria_haspopupAttr); 1282 const AtomicString& has_popup =
1283 GetAOMPropertyOrARIAAttribute(AOMStringProperty::kHasPopUp);
1284
1285 return !has_popup.IsNull() && !has_popup.IsEmpty() &&
1286 !EqualIgnoringASCIICase(has_popup, "false");
1283 } 1287 }
1284 1288
1285 bool AXLayoutObject::AriaRoleHasPresentationalChildren() const { 1289 bool AXLayoutObject::AriaRoleHasPresentationalChildren() const {
1286 switch (aria_role_) { 1290 switch (aria_role_) {
1287 case kButtonRole: 1291 case kButtonRole:
1288 case kSliderRole: 1292 case kSliderRole:
1289 case kImageRole: 1293 case kImageRole:
1290 case kProgressIndicatorRole: 1294 case kProgressIndicatorRole:
1291 case kSpinButtonRole: 1295 case kSpinButtonRole:
1292 // case SeparatorRole: 1296 // case SeparatorRole:
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after
2525 2529
2526 bool AXLayoutObject::ElementAttributeValue( 2530 bool AXLayoutObject::ElementAttributeValue(
2527 const QualifiedName& attribute_name) const { 2531 const QualifiedName& attribute_name) const {
2528 if (!layout_object_) 2532 if (!layout_object_)
2529 return false; 2533 return false;
2530 2534
2531 return EqualIgnoringASCIICase(GetAttribute(attribute_name), "true"); 2535 return EqualIgnoringASCIICase(GetAttribute(attribute_name), "true");
2532 } 2536 }
2533 2537
2534 } // namespace blink 2538 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698