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

Side by Side Diff: Source/modules/accessibility/AXObject.cpp

Issue 1039023002: AX nodes that aren't contenteditable should be readonly. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@listboxes_too
Patch Set: Add test Created 5 years, 8 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
« no previous file with comments | « Source/modules/accessibility/AXObject.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 case TabRole: 343 case TabRole:
344 case TextAreaRole: 344 case TextAreaRole:
345 case TextFieldRole: 345 case TextFieldRole:
346 case ToggleButtonRole: 346 case ToggleButtonRole:
347 return true; 347 return true;
348 default: 348 default:
349 return false; 349 return false;
350 } 350 }
351 } 351 }
352 352
353 bool AXObject::isReadOnly() const
354 {
355 if (node())
356 return !node()->hasEditableStyle();
357
358 return true;
359 }
360
353 bool AXObject::accessibilityIsIgnored() const 361 bool AXObject::accessibilityIsIgnored() const
354 { 362 {
355 updateCachedAttributeValuesIfNeeded(); 363 updateCachedAttributeValuesIfNeeded();
356 return m_cachedIsIgnored; 364 return m_cachedIsIgnored;
357 } 365 }
358 366
359 void AXObject::updateCachedAttributeValuesIfNeeded() const 367 void AXObject::updateCachedAttributeValuesIfNeeded() const
360 { 368 {
361 AXObjectCacheImpl* cache = axObjectCache(); 369 AXObjectCacheImpl* cache = axObjectCache();
362 if (!cache) 370 if (!cache)
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 } 1125 }
1118 1126
1119 const AtomicString& AXObject::roleName(AccessibilityRole role) 1127 const AtomicString& AXObject::roleName(AccessibilityRole role)
1120 { 1128 {
1121 static const Vector<AtomicString>* roleNameVector = createRoleNameVector(); 1129 static const Vector<AtomicString>* roleNameVector = createRoleNameVector();
1122 1130
1123 return roleNameVector->at(role); 1131 return roleNameVector->at(role);
1124 } 1132 }
1125 1133
1126 } // namespace blink 1134 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698