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

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

Issue 2856503003: Nodes with IDs should not be excluded as they might be the target of in-page links and attributes s… (Closed)
Patch Set: Fixed Blink test. 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 if (layout_object_->IsLayoutBlockFlow()) 298 if (layout_object_->IsLayoutBlockFlow())
299 return kGroupRole; 299 return kGroupRole;
300 300
301 // If the element does not have role, but it has ARIA attributes, 301 // If the element does not have role, but it has ARIA attributes or is an
302 // accessibility should fallback to exposing it as a group. 302 // in-page link target, accessibility should fallback to exposing it as a
303 if (SupportsARIAAttributes()) 303 // group.
304 if (IsInPageLinkTarget() || SupportsARIAAttributes())
304 return kGroupRole; 305 return kGroupRole;
305 306
306 return kUnknownRole; 307 return kUnknownRole;
307 } 308 }
308 309
309 void AXLayoutObject::Init() { 310 void AXLayoutObject::Init() {
310 AXNodeObject::Init(); 311 AXNodeObject::Init();
311 } 312 }
312 313
313 void AXLayoutObject::Detach() { 314 void AXLayoutObject::Detach() {
(...skipping 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 2512
2512 bool AXLayoutObject::ElementAttributeValue( 2513 bool AXLayoutObject::ElementAttributeValue(
2513 const QualifiedName& attribute_name) const { 2514 const QualifiedName& attribute_name) const {
2514 if (!layout_object_) 2515 if (!layout_object_)
2515 return false; 2516 return false;
2516 2517
2517 return EqualIgnoringASCIICase(GetAttribute(attribute_name), "true"); 2518 return EqualIgnoringASCIICase(GetAttribute(attribute_name), "true");
2518 } 2519 }
2519 2520
2520 } // namespace blink 2521 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698