OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 else | 239 else |
240 return; // Did not match any key binding. | 240 return; // Did not match any key binding. |
241 | 241 |
242 newValue = stepRange.clampValue(newValue); | 242 newValue = stepRange.clampValue(newValue); |
243 | 243 |
244 if (newValue != current) { | 244 if (newValue != current) { |
245 EventQueueScope scope; | 245 EventQueueScope scope; |
246 TextFieldEventBehavior eventBehavior = DispatchChangeEvent; | 246 TextFieldEventBehavior eventBehavior = DispatchChangeEvent; |
247 setValueAsDecimal(newValue, eventBehavior, IGNORE_EXCEPTION); | 247 setValueAsDecimal(newValue, eventBehavior, IGNORE_EXCEPTION); |
248 | 248 |
249 if (AXObjectCache* cache = element()->document()->existingAXObjectCache(
)) | 249 if (AXObjectCache::accessibilityEnabled()) |
250 cache->postNotification(element(), AXObjectCache::AXValueChanged, tr
ue); | 250 element()->document()->axObjectCache()->postNotification(element(),
AXObjectCache::AXValueChanged, true); |
251 element()->dispatchFormControlChangeEvent(); | 251 element()->dispatchFormControlChangeEvent(); |
252 } | 252 } |
253 | 253 |
254 event->setDefaultHandled(); | 254 event->setDefaultHandled(); |
255 } | 255 } |
256 | 256 |
257 void RangeInputType::createShadowSubtree() | 257 void RangeInputType::createShadowSubtree() |
258 { | 258 { |
259 ASSERT(element()->shadow()); | 259 ASSERT(element()->shadow()); |
260 | 260 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 } | 404 } |
405 const Decimal closestLeft = middle ? m_tickMarkValues[middle - 1] : Decimal:
:infinity(Decimal::Negative); | 405 const Decimal closestLeft = middle ? m_tickMarkValues[middle - 1] : Decimal:
:infinity(Decimal::Negative); |
406 const Decimal closestRight = middle != m_tickMarkValues.size() ? m_tickMarkV
alues[middle] : Decimal::infinity(Decimal::Positive); | 406 const Decimal closestRight = middle != m_tickMarkValues.size() ? m_tickMarkV
alues[middle] : Decimal::infinity(Decimal::Positive); |
407 if (closestRight - value < value - closestLeft) | 407 if (closestRight - value < value - closestLeft) |
408 return closestRight; | 408 return closestRight; |
409 return closestLeft; | 409 return closestLeft; |
410 } | 410 } |
411 #endif | 411 #endif |
412 | 412 |
413 } // namespace WebCore | 413 } // namespace WebCore |
OLD | NEW |