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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 // FIXME: Should handle this readonly/disabled check in more general way. | 199 // FIXME: Should handle this readonly/disabled check in more general way. |
200 // Missing this kind of check is likely to occur elsewhere if adding it in e
ach shadow element. | 200 // Missing this kind of check is likely to occur elsewhere if adding it in e
ach shadow element. |
201 HTMLInputElement* input = hostInput(); | 201 HTMLInputElement* input = hostInput(); |
202 if (!input || input->isDisabledOrReadOnly()) { | 202 if (!input || input->isDisabledOrReadOnly()) { |
203 stopDragging(); | 203 stopDragging(); |
204 HTMLDivElement::defaultEventHandler(event); | 204 HTMLDivElement::defaultEventHandler(event); |
205 return; | 205 return; |
206 } | 206 } |
207 | 207 |
208 MouseEvent* mouseEvent = toMouseEvent(event); | 208 MouseEvent* mouseEvent = toMouseEvent(event); |
209 bool isLeftButton = mouseEvent->button() == LeftButton; | 209 bool isLeftButton = mouseEvent->button() == static_cast<short>(WebPointerPro
perties::Button::Left); |
210 const AtomicString& eventType = event->type(); | 210 const AtomicString& eventType = event->type(); |
211 | 211 |
212 // We intentionally do not call event->setDefaultHandled() here because | 212 // We intentionally do not call event->setDefaultHandled() here because |
213 // MediaControlTimelineElement::defaultEventHandler() wants to handle these | 213 // MediaControlTimelineElement::defaultEventHandler() wants to handle these |
214 // mouse events. | 214 // mouse events. |
215 if (eventType == EventTypeNames::mousedown && isLeftButton) { | 215 if (eventType == EventTypeNames::mousedown && isLeftButton) { |
216 startDragging(); | 216 startDragging(); |
217 return; | 217 return; |
218 } else if (eventType == EventTypeNames::mouseup && isLeftButton) { | 218 } else if (eventType == EventTypeNames::mouseup && isLeftButton) { |
219 stopDragging(); | 219 stopDragging(); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 case MediaVolumeSliderThumbPart: | 323 case MediaVolumeSliderThumbPart: |
324 case MediaFullScreenVolumeSliderPart: | 324 case MediaFullScreenVolumeSliderPart: |
325 case MediaFullScreenVolumeSliderThumbPart: | 325 case MediaFullScreenVolumeSliderThumbPart: |
326 return mediaSliderContainer; | 326 return mediaSliderContainer; |
327 default: | 327 default: |
328 return sliderContainer; | 328 return sliderContainer; |
329 } | 329 } |
330 } | 330 } |
331 | 331 |
332 } // namespace blink | 332 } // namespace blink |
OLD | NEW |