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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 void SliderThumbElement::dragFrom(const LayoutPoint& point) | 109 void SliderThumbElement::dragFrom(const LayoutPoint& point) |
110 { | 110 { |
111 RefPtrWillBeRawPtr<SliderThumbElement> protector(this); | 111 RefPtrWillBeRawPtr<SliderThumbElement> protector(this); |
112 startDragging(); | 112 startDragging(); |
113 setPositionFromPoint(point); | 113 setPositionFromPoint(point); |
114 } | 114 } |
115 | 115 |
116 void SliderThumbElement::setPositionFromPoint(const LayoutPoint& point) | 116 void SliderThumbElement::setPositionFromPoint(const LayoutPoint& point) |
117 { | 117 { |
118 RefPtrWillBeRawPtr<HTMLInputElement> input(hostInput()); | 118 RefPtrWillBeRawPtr<HTMLInputElement> input(hostInput()); |
119 Element* trackElement = input->userAgentShadowRoot()->getElementById(ShadowE
lementNames::sliderTrack()); | 119 Element* trackElement = input->closedShadowRoot()->getElementById(ShadowElem
entNames::sliderTrack()); |
120 | 120 |
121 if (!input->renderer() || !renderBox() || !trackElement->renderBox()) | 121 if (!input->renderer() || !renderBox() || !trackElement->renderBox()) |
122 return; | 122 return; |
123 | 123 |
124 LayoutPoint offset = roundedLayoutPoint(input->renderer()->absoluteToLocal(F
loatPoint(point), UseTransforms)); | 124 LayoutPoint offset = roundedLayoutPoint(input->renderer()->absoluteToLocal(F
loatPoint(point), UseTransforms)); |
125 bool isVertical = hasVerticalAppearance(input.get()); | 125 bool isVertical = hasVerticalAppearance(input.get()); |
126 bool isLeftToRightDirection = renderBox()->style()->isLeftToRightDirection()
; | 126 bool isLeftToRightDirection = renderBox()->style()->isLeftToRightDirection()
; |
127 LayoutUnit trackSize; | 127 LayoutUnit trackSize; |
128 LayoutUnit position; | 128 LayoutUnit position; |
129 LayoutUnit currentPosition; | 129 LayoutUnit currentPosition; |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 case MediaVolumeSliderThumbPart: | 327 case MediaVolumeSliderThumbPart: |
328 case MediaFullScreenVolumeSliderPart: | 328 case MediaFullScreenVolumeSliderPart: |
329 case MediaFullScreenVolumeSliderThumbPart: | 329 case MediaFullScreenVolumeSliderThumbPart: |
330 return mediaSliderContainer; | 330 return mediaSliderContainer; |
331 default: | 331 default: |
332 return sliderContainer; | 332 return sliderContainer; |
333 } | 333 } |
334 } | 334 } |
335 | 335 |
336 } | 336 } |
OLD | NEW |