| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 } | 249 } |
| 250 | 250 |
| 251 void SliderThumbElement::setPositionFromPoint(const LayoutPoint& point) | 251 void SliderThumbElement::setPositionFromPoint(const LayoutPoint& point) |
| 252 { | 252 { |
| 253 RefPtr<HTMLInputElement> input(hostInput()); | 253 RefPtr<HTMLInputElement> input(hostInput()); |
| 254 Element* trackElement = input->userAgentShadowRoot()->getElementById(ShadowE
lementNames::sliderTrack()); | 254 Element* trackElement = input->userAgentShadowRoot()->getElementById(ShadowE
lementNames::sliderTrack()); |
| 255 | 255 |
| 256 if (!input->renderer() || !renderBox() || !trackElement->renderBox()) | 256 if (!input->renderer() || !renderBox() || !trackElement->renderBox()) |
| 257 return; | 257 return; |
| 258 | 258 |
| 259 input->setTextAsOfLastFormControlChangeEvent(input->value()); | |
| 260 LayoutPoint offset = roundedLayoutPoint(input->renderer()->absoluteToLocal(p
oint, UseTransforms)); | 259 LayoutPoint offset = roundedLayoutPoint(input->renderer()->absoluteToLocal(p
oint, UseTransforms)); |
| 261 bool isVertical = hasVerticalAppearance(input.get()); | 260 bool isVertical = hasVerticalAppearance(input.get()); |
| 262 bool isLeftToRightDirection = renderBox()->style()->isLeftToRightDirection()
; | 261 bool isLeftToRightDirection = renderBox()->style()->isLeftToRightDirection()
; |
| 263 LayoutUnit trackSize; | 262 LayoutUnit trackSize; |
| 264 LayoutUnit position; | 263 LayoutUnit position; |
| 265 LayoutUnit currentPosition; | 264 LayoutUnit currentPosition; |
| 266 // We need to calculate currentPosition from absolute points becaue the | 265 // We need to calculate currentPosition from absolute points becaue the |
| 267 // renderer for this node is usually on a layer and renderBox()->x() and | 266 // renderer for this node is usually on a layer and renderBox()->x() and |
| 268 // y() are unusable. | 267 // y() are unusable. |
| 269 // FIXME: This should probably respect transforms. | 268 // FIXME: This should probably respect transforms. |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 case MediaVolumeSliderThumbPart: | 466 case MediaVolumeSliderThumbPart: |
| 468 case MediaFullScreenVolumeSliderPart: | 467 case MediaFullScreenVolumeSliderPart: |
| 469 case MediaFullScreenVolumeSliderThumbPart: | 468 case MediaFullScreenVolumeSliderThumbPart: |
| 470 return mediaSliderContainer; | 469 return mediaSliderContainer; |
| 471 default: | 470 default: |
| 472 return sliderContainer; | 471 return sliderContainer; |
| 473 } | 472 } |
| 474 } | 473 } |
| 475 | 474 |
| 476 } | 475 } |
| OLD | NEW |