OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012, Google Inc. All rights reserved. | 2 * Copyright (C) 2012, Google 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 idList.replace('\n', ' '); | 513 idList.replace('\n', ' '); |
514 Vector<String> idVector; | 514 Vector<String> idVector; |
515 idList.split(' ', idVector); | 515 idList.split(' ', idVector); |
516 | 516 |
517 for (const auto& idName : idVector) { | 517 for (const auto& idName : idVector) { |
518 if (Element* idElement = scope.getElementById(AtomicString(idName))) | 518 if (Element* idElement = scope.getElementById(AtomicString(idName))) |
519 elements.append(idElement); | 519 elements.append(idElement); |
520 } | 520 } |
521 } | 521 } |
522 | 522 |
523 // If you call node->hasEditableStyle() since that will return true if an ancest
or is editable. | |
524 // This only returns true if this is the element that actually has the contentEd
itable attribute set. | |
525 bool AXNodeObject::hasContentEditableAttributeSet() const | |
526 { | |
527 if (!hasAttribute(contenteditableAttr)) | |
528 return false; | |
529 const AtomicString& contentEditableValue = getAttribute(contenteditableAttr)
; | |
530 // Both "true" (case-insensitive) and the empty string count as true. | |
531 return contentEditableValue.isEmpty() || equalIgnoringCase(contentEditableVa
lue, "true"); | |
532 } | |
533 | |
534 bool AXNodeObject::isGenericFocusableElement() const | 523 bool AXNodeObject::isGenericFocusableElement() const |
535 { | 524 { |
536 if (!canSetFocusAttribute()) | 525 if (!canSetFocusAttribute()) |
537 return false; | 526 return false; |
538 | 527 |
539 // If it's a control, it's not generic. | 528 // If it's a control, it's not generic. |
540 if (isControl()) | 529 if (isControl()) |
541 return false; | 530 return false; |
542 | 531 |
543 // If it has an aria role, it's not generic. | 532 // If it has an aria role, it's not generic. |
(...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2172 float range = maxValueForRange() - minValueForRange(); | 2161 float range = maxValueForRange() - minValueForRange(); |
2173 float value = valueForRange(); | 2162 float value = valueForRange(); |
2174 | 2163 |
2175 value += range * (percentChange / 100); | 2164 value += range * (percentChange / 100); |
2176 setValue(String::number(value)); | 2165 setValue(String::number(value)); |
2177 | 2166 |
2178 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged)
; | 2167 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged)
; |
2179 } | 2168 } |
2180 | 2169 |
2181 } // namespace blink | 2170 } // namespace blink |
OLD | NEW |