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

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: Rebase 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 // generic container.
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 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after
2523 2524
2524 bool AXLayoutObject::ElementAttributeValue( 2525 bool AXLayoutObject::ElementAttributeValue(
2525 const QualifiedName& attribute_name) const { 2526 const QualifiedName& attribute_name) const {
2526 if (!layout_object_) 2527 if (!layout_object_)
2527 return false; 2528 return false;
2528 2529
2529 return EqualIgnoringASCIICase(GetAttribute(attribute_name), "true"); 2530 return EqualIgnoringASCIICase(GetAttribute(attribute_name), "true");
2530 } 2531 }
2531 2532
2532 } // namespace blink 2533 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698