Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: Source/core/accessibility/AccessibilitySlider.cpp

Issue 19510005: [oilpan] Completely move HTMLFormControlElement's hierarchy to the managed heap Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/accessibility/AccessibilitySlider.h ('k') | Source/core/css/SelectorChecker.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 return static_cast<float>(element()->maximum()); 120 return static_cast<float>(element()->maximum());
121 } 121 }
122 122
123 float AccessibilitySlider::minValueForRange() const 123 float AccessibilitySlider::minValueForRange() const
124 { 124 {
125 return static_cast<float>(element()->minimum()); 125 return static_cast<float>(element()->minimum());
126 } 126 }
127 127
128 void AccessibilitySlider::setValue(const String& value) 128 void AccessibilitySlider::setValue(const String& value)
129 { 129 {
130 HTMLInputElement* input = element(); 130 Handle<HTMLInputElement> input = element();
131 131
132 if (input->value() == value) 132 if (input->value() == value)
133 return; 133 return;
134 134
135 input->setValue(value); 135 input->setValue(value);
136 136
137 // Fire change event manually, as RenderSlider::setValueForPosition does. 137 // Fire change event manually, as RenderSlider::setValueForPosition does.
138 input->dispatchFormControlChangeEvent(); 138 input->dispatchFormControlChangeEvent();
139 } 139 }
140 140
141 HTMLInputElement* AccessibilitySlider::element() const 141 Result<HTMLInputElement> AccessibilitySlider::element() const
142 { 142 {
143 return static_cast<HTMLInputElement*>(m_renderer->node()); 143 return Handle<HTMLInputElement>(static_cast<HTMLInputElement*>(m_renderer->n ode()));
144 } 144 }
145 145
146 146
147 AccessibilitySliderThumb::AccessibilitySliderThumb() 147 AccessibilitySliderThumb::AccessibilitySliderThumb()
148 { 148 {
149 } 149 }
150 150
151 PassRefPtr<AccessibilitySliderThumb> AccessibilitySliderThumb::create() 151 PassRefPtr<AccessibilitySliderThumb> AccessibilitySliderThumb::create()
152 { 152 {
153 return adoptRef(new AccessibilitySliderThumb()); 153 return adoptRef(new AccessibilitySliderThumb());
154 } 154 }
155 155
156 LayoutRect AccessibilitySliderThumb::elementRect() const 156 LayoutRect AccessibilitySliderThumb::elementRect() const
157 { 157 {
158 if (!m_parent) 158 if (!m_parent)
159 return LayoutRect(); 159 return LayoutRect();
160 160
161 RenderObject* sliderRenderer = m_parent->renderer(); 161 RenderObject* sliderRenderer = m_parent->renderer();
162 if (!sliderRenderer || !sliderRenderer->isSlider()) 162 if (!sliderRenderer || !sliderRenderer->isSlider())
163 return LayoutRect(); 163 return LayoutRect();
164 return sliderThumbElementOf(sliderRenderer->node())->boundingBox(); 164 return sliderThumbElementOf(sliderRenderer->node())->boundingBox();
165 } 165 }
166 166
167 bool AccessibilitySliderThumb::computeAccessibilityIsIgnored() const 167 bool AccessibilitySliderThumb::computeAccessibilityIsIgnored() const
168 { 168 {
169 return accessibilityIsIgnoredByDefault(); 169 return accessibilityIsIgnoredByDefault();
170 } 170 }
171 171
172 } // namespace WebCore 172 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/accessibility/AccessibilitySlider.h ('k') | Source/core/css/SelectorChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698