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 24 matching lines...) Expand all Loading... |
35 #include <limits> | 35 #include <limits> |
36 #include "HTMLNames.h" | 36 #include "HTMLNames.h" |
37 #include "core/accessibility/AXObjectCache.h" | 37 #include "core/accessibility/AXObjectCache.h" |
38 #include "core/dom/ExceptionCodePlaceholder.h" | 38 #include "core/dom/ExceptionCodePlaceholder.h" |
39 #include "core/dom/KeyboardEvent.h" | 39 #include "core/dom/KeyboardEvent.h" |
40 #include "core/dom/MouseEvent.h" | 40 #include "core/dom/MouseEvent.h" |
41 #include "core/dom/ScopedEventQueue.h" | 41 #include "core/dom/ScopedEventQueue.h" |
42 #include "core/dom/Touch.h" | 42 #include "core/dom/Touch.h" |
43 #include "core/dom/TouchEvent.h" | 43 #include "core/dom/TouchEvent.h" |
44 #include "core/dom/TouchList.h" | 44 #include "core/dom/TouchList.h" |
45 #include "core/dom/shadow/ElementShadow.h" | |
46 #include "core/dom/shadow/ShadowRoot.h" | 45 #include "core/dom/shadow/ShadowRoot.h" |
47 #include "core/html/HTMLDataListElement.h" | 46 #include "core/html/HTMLDataListElement.h" |
48 #include "core/html/HTMLDivElement.h" | 47 #include "core/html/HTMLDivElement.h" |
49 #include "core/html/HTMLInputElement.h" | 48 #include "core/html/HTMLInputElement.h" |
50 #include "core/html/HTMLOptionElement.h" | 49 #include "core/html/HTMLOptionElement.h" |
51 #include "core/html/InputTypeNames.h" | 50 #include "core/html/InputTypeNames.h" |
52 #include "core/html/StepRange.h" | 51 #include "core/html/StepRange.h" |
53 #include "core/html/parser/HTMLParserIdioms.h" | 52 #include "core/html/parser/HTMLParserIdioms.h" |
54 #include "core/html/shadow/SliderThumbElement.h" | 53 #include "core/html/shadow/SliderThumbElement.h" |
55 #include "core/platform/PlatformMouseEvent.h" | 54 #include "core/platform/PlatformMouseEvent.h" |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 right = middle; | 389 right = middle; |
391 } | 390 } |
392 const Decimal closestLeft = middle ? m_tickMarkValues[middle - 1] : Decimal:
:infinity(Decimal::Negative); | 391 const Decimal closestLeft = middle ? m_tickMarkValues[middle - 1] : Decimal:
:infinity(Decimal::Negative); |
393 const Decimal closestRight = middle != m_tickMarkValues.size() ? m_tickMarkV
alues[middle] : Decimal::infinity(Decimal::Positive); | 392 const Decimal closestRight = middle != m_tickMarkValues.size() ? m_tickMarkV
alues[middle] : Decimal::infinity(Decimal::Positive); |
394 if (closestRight - value < value - closestLeft) | 393 if (closestRight - value < value - closestLeft) |
395 return closestRight; | 394 return closestRight; |
396 return closestLeft; | 395 return closestLeft; |
397 } | 396 } |
398 | 397 |
399 } // namespace WebCore | 398 } // namespace WebCore |
OLD | NEW |