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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 idList.replace('\n', ' '); | 338 idList.replace('\n', ' '); |
339 Vector<String> idVector; | 339 Vector<String> idVector; |
340 idList.split(' ', idVector); | 340 idList.split(' ', idVector); |
341 | 341 |
342 for (const auto& idName : idVector) { | 342 for (const auto& idName : idVector) { |
343 if (Element* idElement = scope.getElementById(AtomicString(idName))) | 343 if (Element* idElement = scope.getElementById(AtomicString(idName))) |
344 elements.append(idElement); | 344 elements.append(idElement); |
345 } | 345 } |
346 } | 346 } |
347 | 347 |
348 // If you call node->hasEditableStyle() since that will return true if an ancest
or is editable. | |
349 // This only returns true if this is the element that actually has the contentEd
itable attribute set. | |
350 bool AXNodeObject::hasContentEditableAttributeSet() const | |
351 { | |
352 if (!hasAttribute(contenteditableAttr)) | |
353 return false; | |
354 const AtomicString& contentEditableValue = getAttribute(contenteditableAttr)
; | |
355 // Both "true" (case-insensitive) and the empty string count as true. | |
356 return contentEditableValue.isEmpty() || equalIgnoringCase(contentEditableVa
lue, "true"); | |
357 } | |
358 | |
359 bool AXNodeObject::isGenericFocusableElement() const | 348 bool AXNodeObject::isGenericFocusableElement() const |
360 { | 349 { |
361 if (!canSetFocusAttribute()) | 350 if (!canSetFocusAttribute()) |
362 return false; | 351 return false; |
363 | 352 |
364 // If it's a control, it's not generic. | 353 // If it's a control, it's not generic. |
365 if (isControl()) | 354 if (isControl()) |
366 return false; | 355 return false; |
367 | 356 |
368 // If it has an aria role, it's not generic. | 357 // If it has an aria role, it's not generic. |
(...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1997 float range = maxValueForRange() - minValueForRange(); | 1986 float range = maxValueForRange() - minValueForRange(); |
1998 float value = valueForRange(); | 1987 float value = valueForRange(); |
1999 | 1988 |
2000 value += range * (percentChange / 100); | 1989 value += range * (percentChange / 100); |
2001 setValue(String::number(value)); | 1990 setValue(String::number(value)); |
2002 | 1991 |
2003 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged)
; | 1992 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged)
; |
2004 } | 1993 } |
2005 | 1994 |
2006 } // namespace blink | 1995 } // namespace blink |
OLD | NEW |