| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 if (children_.size()) { | 105 if (children_.size()) { |
| 106 DCHECK(children_.size() == 1); | 106 DCHECK(children_.size() == 1); |
| 107 if (children_[0]->GetBoundsInFrameCoordinates().Contains(point)) | 107 if (children_[0]->GetBoundsInFrameCoordinates().Contains(point)) |
| 108 return children_[0].Get(); | 108 return children_[0].Get(); |
| 109 } | 109 } |
| 110 | 110 |
| 111 return AxObjectCache().GetOrCreate(layout_object_); | 111 return AxObjectCache().GetOrCreate(layout_object_); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void AXSlider::SetValue(const String& value) { | 114 void AXSlider::SetValue(const String& value) { |
| 115 HTMLInputElement* input = GetElement(); | 115 HTMLInputElement* input = GetInputElement(); |
| 116 | 116 |
| 117 if (input->value() == value) | 117 if (input->value() == value) |
| 118 return; | 118 return; |
| 119 | 119 |
| 120 input->setValue(value, kDispatchInputAndChangeEvent); | 120 input->setValue(value, kDispatchInputAndChangeEvent); |
| 121 | 121 |
| 122 // Fire change event manually, as LayoutSlider::setValueForPosition does. | 122 // Fire change event manually, as LayoutSlider::setValueForPosition does. |
| 123 input->DispatchFormControlChangeEvent(); | 123 input->DispatchFormControlChangeEvent(); |
| 124 } | 124 } |
| 125 | 125 |
| 126 HTMLInputElement* AXSlider::GetElement() const { | 126 HTMLInputElement* AXSlider::GetInputElement() const { |
| 127 return toHTMLInputElement(layout_object_->GetNode()); | 127 return toHTMLInputElement(layout_object_->GetNode()); |
| 128 } | 128 } |
| 129 | 129 |
| 130 AXSliderThumb::AXSliderThumb(AXObjectCacheImpl& ax_object_cache) | 130 AXSliderThumb::AXSliderThumb(AXObjectCacheImpl& ax_object_cache) |
| 131 : AXMockObject(ax_object_cache) {} | 131 : AXMockObject(ax_object_cache) {} |
| 132 | 132 |
| 133 AXSliderThumb* AXSliderThumb::Create(AXObjectCacheImpl& ax_object_cache) { | 133 AXSliderThumb* AXSliderThumb::Create(AXObjectCacheImpl& ax_object_cache) { |
| 134 return new AXSliderThumb(ax_object_cache); | 134 return new AXSliderThumb(ax_object_cache); |
| 135 } | 135 } |
| 136 | 136 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 148 DCHECK(thumb_element); | 148 DCHECK(thumb_element); |
| 149 return thumb_element->GetLayoutObject(); | 149 return thumb_element->GetLayoutObject(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 bool AXSliderThumb::ComputeAccessibilityIsIgnored( | 152 bool AXSliderThumb::ComputeAccessibilityIsIgnored( |
| 153 IgnoredReasons* ignored_reasons) const { | 153 IgnoredReasons* ignored_reasons) const { |
| 154 return AccessibilityIsIgnoredByDefault(ignored_reasons); | 154 return AccessibilityIsIgnoredByDefault(ignored_reasons); |
| 155 } | 155 } |
| 156 | 156 |
| 157 } // namespace blink | 157 } // namespace blink |
| OLD | NEW |