| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 m_inDragMode = true; | 311 m_inDragMode = true; |
| 312 } | 312 } |
| 313 } | 313 } |
| 314 | 314 |
| 315 void SliderThumbElement::stopDragging() | 315 void SliderThumbElement::stopDragging() |
| 316 { | 316 { |
| 317 if (!m_inDragMode) | 317 if (!m_inDragMode) |
| 318 return; | 318 return; |
| 319 | 319 |
| 320 if (Frame* frame = document().frame()) | 320 if (Frame* frame = document().frame()) |
| 321 frame->eventHandler().setCapturingMouseEventsNode(0); | 321 frame->eventHandler().setCapturingMouseEventsNode(nullptr); |
| 322 m_inDragMode = false; | 322 m_inDragMode = false; |
| 323 if (renderer()) | 323 if (renderer()) |
| 324 renderer()->setNeedsLayout(); | 324 renderer()->setNeedsLayout(); |
| 325 hostInput()->dispatchFormControlChangeEvent(); | 325 hostInput()->dispatchFormControlChangeEvent(); |
| 326 } | 326 } |
| 327 | 327 |
| 328 void SliderThumbElement::defaultEventHandler(Event* event) | 328 void SliderThumbElement::defaultEventHandler(Event* event) |
| 329 { | 329 { |
| 330 if (!event->isMouseEvent()) { | 330 if (!event->isMouseEvent()) { |
| 331 HTMLDivElement::defaultEventHandler(event); | 331 HTMLDivElement::defaultEventHandler(event); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 if (input && !input->isDisabledOrReadOnly()) | 378 if (input && !input->isDisabledOrReadOnly()) |
| 379 return true; | 379 return true; |
| 380 | 380 |
| 381 return HTMLDivElement::willRespondToMouseClickEvents(); | 381 return HTMLDivElement::willRespondToMouseClickEvents(); |
| 382 } | 382 } |
| 383 | 383 |
| 384 void SliderThumbElement::detach(const AttachContext& context) | 384 void SliderThumbElement::detach(const AttachContext& context) |
| 385 { | 385 { |
| 386 if (m_inDragMode) { | 386 if (m_inDragMode) { |
| 387 if (Frame* frame = document().frame()) | 387 if (Frame* frame = document().frame()) |
| 388 frame->eventHandler().setCapturingMouseEventsNode(0); | 388 frame->eventHandler().setCapturingMouseEventsNode(nullptr); |
| 389 } | 389 } |
| 390 HTMLDivElement::detach(context); | 390 HTMLDivElement::detach(context); |
| 391 } | 391 } |
| 392 | 392 |
| 393 HTMLInputElement* SliderThumbElement::hostInput() const | 393 HTMLInputElement* SliderThumbElement::hostInput() const |
| 394 { | 394 { |
| 395 // Only HTMLInputElement creates SliderThumbElement instances as its shadow
nodes. | 395 // Only HTMLInputElement creates SliderThumbElement instances as its shadow
nodes. |
| 396 // So, shadowHost() must be an HTMLInputElement. | 396 // So, shadowHost() must be an HTMLInputElement. |
| 397 return toHTMLInputElement(shadowHost()); | 397 return toHTMLInputElement(shadowHost()); |
| 398 } | 398 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 case MediaVolumeSliderThumbPart: | 462 case MediaVolumeSliderThumbPart: |
| 463 case MediaFullScreenVolumeSliderPart: | 463 case MediaFullScreenVolumeSliderPart: |
| 464 case MediaFullScreenVolumeSliderThumbPart: | 464 case MediaFullScreenVolumeSliderThumbPart: |
| 465 return mediaSliderContainer; | 465 return mediaSliderContainer; |
| 466 default: | 466 default: |
| 467 return sliderContainer; | 467 return sliderContainer; |
| 468 } | 468 } |
| 469 } | 469 } |
| 470 | 470 |
| 471 } | 471 } |
| OLD | NEW |