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