| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 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 | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 timeline->setAttribute(precisionAttr, "float"); | 478 timeline->setAttribute(precisionAttr, "float"); |
| 479 return timeline.release(); | 479 return timeline.release(); |
| 480 } | 480 } |
| 481 | 481 |
| 482 void MediaControlTimelineElement::defaultEventHandler(Event* event) | 482 void MediaControlTimelineElement::defaultEventHandler(Event* event) |
| 483 { | 483 { |
| 484 // Left button is 0. Rejects mouse events not from left button. | 484 // Left button is 0. Rejects mouse events not from left button. |
| 485 if (event->isMouseEvent() && toMouseEvent(event)->button()) | 485 if (event->isMouseEvent() && toMouseEvent(event)->button()) |
| 486 return; | 486 return; |
| 487 | 487 |
| 488 if (!attached()) | 488 if (!confusingAndOftenMisusedAttached()) |
| 489 return; | 489 return; |
| 490 | 490 |
| 491 if (event->type() == eventNames().mousedownEvent) | 491 if (event->type() == eventNames().mousedownEvent) |
| 492 mediaController()->beginScrubbing(); | 492 mediaController()->beginScrubbing(); |
| 493 | 493 |
| 494 if (event->type() == eventNames().mouseupEvent) | 494 if (event->type() == eventNames().mouseupEvent) |
| 495 mediaController()->endScrubbing(); | 495 mediaController()->endScrubbing(); |
| 496 | 496 |
| 497 MediaControlInputElement::defaultEventHandler(event); | 497 MediaControlInputElement::defaultEventHandler(event); |
| 498 | 498 |
| 499 if (event->type() == eventNames().mouseoverEvent || event->type() == eventNa
mes().mouseoutEvent || event->type() == eventNames().mousemoveEvent) | 499 if (event->type() == eventNames().mouseoverEvent || event->type() == eventNa
mes().mouseoutEvent || event->type() == eventNames().mousemoveEvent) |
| 500 return; | 500 return; |
| 501 | 501 |
| 502 double time = value().toDouble(); | 502 double time = value().toDouble(); |
| 503 if (event->type() == eventNames().inputEvent && time != mediaController()->c
urrentTime()) | 503 if (event->type() == eventNames().inputEvent && time != mediaController()->c
urrentTime()) |
| 504 mediaController()->setCurrentTime(time, IGNORE_EXCEPTION); | 504 mediaController()->setCurrentTime(time, IGNORE_EXCEPTION); |
| 505 | 505 |
| 506 RenderSlider* slider = toRenderSlider(renderer()); | 506 RenderSlider* slider = toRenderSlider(renderer()); |
| 507 if (slider && slider->inDragMode()) | 507 if (slider && slider->inDragMode()) |
| 508 m_controls->updateCurrentTimeDisplay(); | 508 m_controls->updateCurrentTimeDisplay(); |
| 509 } | 509 } |
| 510 | 510 |
| 511 bool MediaControlTimelineElement::willRespondToMouseClickEvents() | 511 bool MediaControlTimelineElement::willRespondToMouseClickEvents() |
| 512 { | 512 { |
| 513 if (!attached()) | 513 if (!confusingAndOftenMisusedAttached()) |
| 514 return false; | 514 return false; |
| 515 | 515 |
| 516 return true; | 516 return true; |
| 517 } | 517 } |
| 518 | 518 |
| 519 void MediaControlTimelineElement::setPosition(double currentTime) | 519 void MediaControlTimelineElement::setPosition(double currentTime) |
| 520 { | 520 { |
| 521 setValue(String::number(currentTime)); | 521 setValue(String::number(currentTime)); |
| 522 } | 522 } |
| 523 | 523 |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 CueList activeCues = mediaElement->currentlyActiveCues(); | 805 CueList activeCues = mediaElement->currentlyActiveCues(); |
| 806 for (size_t i = 0; i < activeCues.size(); ++i) { | 806 for (size_t i = 0; i < activeCues.size(); ++i) { |
| 807 TextTrackCue* cue = activeCues[i].data(); | 807 TextTrackCue* cue = activeCues[i].data(); |
| 808 cue->videoSizeDidChange(m_videoDisplaySize.size()); | 808 cue->videoSizeDidChange(m_videoDisplaySize.size()); |
| 809 } | 809 } |
| 810 } | 810 } |
| 811 | 811 |
| 812 // ---------------------------- | 812 // ---------------------------- |
| 813 | 813 |
| 814 } // namespace WebCore | 814 } // namespace WebCore |
| OLD | NEW |