| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "core/rendering/RenderObject.h" | 46 #include "core/rendering/RenderObject.h" |
| 47 #include "modules/accessibility/AXObjectCacheImpl.h" | 47 #include "modules/accessibility/AXObjectCacheImpl.h" |
| 48 #include "platform/UserGestureIndicator.h" | 48 #include "platform/UserGestureIndicator.h" |
| 49 #include "wtf/text/StringBuilder.h" | 49 #include "wtf/text/StringBuilder.h" |
| 50 | 50 |
| 51 | 51 |
| 52 namespace blink { | 52 namespace blink { |
| 53 | 53 |
| 54 using namespace HTMLNames; | 54 using namespace HTMLNames; |
| 55 | 55 |
| 56 AXNodeObject::AXNodeObject(Node* node) | 56 AXNodeObject::AXNodeObject(Node* node, AXObjectCache* axObjectCache) |
| 57 : AXObject() | 57 : AXObject(axObjectCache) |
| 58 , m_ariaRole(UnknownRole) | 58 , m_ariaRole(UnknownRole) |
| 59 , m_childrenDirty(false) | 59 , m_childrenDirty(false) |
| 60 #if ENABLE(ASSERT) | 60 #if ENABLE(ASSERT) |
| 61 , m_initialized(false) | 61 , m_initialized(false) |
| 62 #endif | 62 #endif |
| 63 , m_node(node) | 63 , m_node(node) |
| 64 { | 64 { |
| 65 } | 65 } |
| 66 | 66 |
| 67 PassRefPtr<AXNodeObject> AXNodeObject::create(Node* node) | 67 PassRefPtr<AXNodeObject> AXNodeObject::create(Node* node, AXObjectCache* axObjec
tCache) |
| 68 { | 68 { |
| 69 return adoptRef(new AXNodeObject(node)); | 69 return adoptRef(new AXNodeObject(node, axObjectCache)); |
| 70 } | 70 } |
| 71 | 71 |
| 72 AXNodeObject::~AXNodeObject() | 72 AXNodeObject::~AXNodeObject() |
| 73 { | 73 { |
| 74 ASSERT(isDetached()); | 74 ASSERT(isDetached()); |
| 75 } | 75 } |
| 76 | 76 |
| 77 // This function implements the ARIA accessible name as described by the Mozilla | 77 // This function implements the ARIA accessible name as described by the Mozilla |
| 78 // ARIA Implementer's Guide. | 78 // ARIA Implementer's Guide. |
| 79 static String accessibleNameForNode(Node* node) | 79 static String accessibleNameForNode(Node* node) |
| (...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1833 float range = maxValueForRange() - minValueForRange(); | 1833 float range = maxValueForRange() - minValueForRange(); |
| 1834 float value = valueForRange(); | 1834 float value = valueForRange(); |
| 1835 | 1835 |
| 1836 value += range * (percentChange / 100); | 1836 value += range * (percentChange / 100); |
| 1837 setValue(String::number(value)); | 1837 setValue(String::number(value)); |
| 1838 | 1838 |
| 1839 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged,
true); | 1839 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged,
true); |
| 1840 } | 1840 } |
| 1841 | 1841 |
| 1842 } // namespace blink | 1842 } // namespace blink |
| OLD | NEW |