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

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

Issue 2867073003: Name calculation should not include nameFrom:author descendants. (Closed)
Patch Set: Single quote Created 3 years, 7 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 if (!layout_object_) 288 if (!layout_object_)
289 return kUnknownRole; 289 return kUnknownRole;
290 290
291 if ((aria_role_ = DetermineAriaRoleAttribute()) != kUnknownRole) 291 if ((aria_role_ = DetermineAriaRoleAttribute()) != kUnknownRole)
292 return aria_role_; 292 return aria_role_;
293 293
294 AccessibilityRole role = NativeAccessibilityRoleIgnoringAria(); 294 AccessibilityRole role = NativeAccessibilityRoleIgnoringAria();
295 if (role != kUnknownRole) 295 if (role != kUnknownRole)
296 return role; 296 return role;
297 297
298 // These are layout containers added by blink
298 if (layout_object_->IsLayoutBlockFlow()) 299 if (layout_object_->IsLayoutBlockFlow())
299 return kGroupRole; 300 return kGenericContainerRole;
300 301
301 // If the element does not have role, but it has ARIA attributes or is an 302 // If the element does not have role, but it has ARIA attributes or is an
302 // in-page link target, accessibility should fallback to exposing it as a 303 // in-page link target, accessibility should fallback to exposing it as a
303 // group. 304 // group.
dmazzoni 2017/05/16 16:25:38 update this comment
304 if (IsInPageLinkTarget() || SupportsARIAAttributes()) 305 if (IsInPageLinkTarget() || SupportsARIAAttributes())
305 return kGroupRole; 306 return kGenericContainerRole;
306 307
307 return kUnknownRole; 308 return kUnknownRole;
308 } 309 }
309 310
310 void AXLayoutObject::Init() { 311 void AXLayoutObject::Init() {
311 AXNodeObject::Init(); 312 AXNodeObject::Init();
312 } 313 }
313 314
314 void AXLayoutObject::Detach() { 315 void AXLayoutObject::Detach() {
315 AXNodeObject::Detach(); 316 AXNodeObject::Detach();
(...skipping 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after
2524 2525
2525 bool AXLayoutObject::ElementAttributeValue( 2526 bool AXLayoutObject::ElementAttributeValue(
2526 const QualifiedName& attribute_name) const { 2527 const QualifiedName& attribute_name) const {
2527 if (!layout_object_) 2528 if (!layout_object_)
2528 return false; 2529 return false;
2529 2530
2530 return EqualIgnoringASCIICase(GetAttribute(attribute_name), "true"); 2531 return EqualIgnoringASCIICase(GetAttribute(attribute_name), "true");
2531 } 2532 }
2532 2533
2533 } // namespace blink 2534 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698