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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 { | 449 { |
450 RefPtr<MediaControlTimelineElement> timeline = adoptRef(new MediaControlTime
lineElement(mediaControls)); | 450 RefPtr<MediaControlTimelineElement> timeline = adoptRef(new MediaControlTime
lineElement(mediaControls)); |
451 timeline->ensureUserAgentShadowRoot(); | 451 timeline->ensureUserAgentShadowRoot(); |
452 timeline->setType("range"); | 452 timeline->setType("range"); |
453 timeline->setAttribute(stepAttr, "any"); | 453 timeline->setAttribute(stepAttr, "any"); |
454 return timeline.release(); | 454 return timeline.release(); |
455 } | 455 } |
456 | 456 |
457 void MediaControlTimelineElement::defaultEventHandler(Event* event) | 457 void MediaControlTimelineElement::defaultEventHandler(Event* event) |
458 { | 458 { |
459 // Left button is 0. Rejects mouse events not from left button. | 459 if (event->isMouseEvent() && toMouseEvent(event)->button() != LeftButton) |
460 if (event->isMouseEvent() && toMouseEvent(event)->button()) | |
461 return; | 460 return; |
462 | 461 |
463 if (!inDocument() || !document().isActive()) | 462 if (!inDocument() || !document().isActive()) |
464 return; | 463 return; |
465 | 464 |
466 if (event->type() == EventTypeNames::mousedown) | 465 if (event->type() == EventTypeNames::mousedown) |
467 mediaControllerInterface().beginScrubbing(); | 466 mediaControls().beginScrubbing(); |
468 | 467 |
469 if (event->type() == EventTypeNames::mouseup) | 468 if (event->type() == EventTypeNames::mouseup) |
470 mediaControllerInterface().endScrubbing(); | 469 mediaControls().endScrubbing(); |
471 | 470 |
472 MediaControlInputElement::defaultEventHandler(event); | 471 MediaControlInputElement::defaultEventHandler(event); |
473 | 472 |
474 if (event->type() == EventTypeNames::mouseover || event->type() == EventType
Names::mouseout || event->type() == EventTypeNames::mousemove) | 473 if (event->type() == EventTypeNames::mouseover || event->type() == EventType
Names::mouseout || event->type() == EventTypeNames::mousemove) |
475 return; | 474 return; |
476 | 475 |
477 double time = value().toDouble(); | 476 double time = value().toDouble(); |
478 if (event->type() == EventTypeNames::input && time != mediaControllerInterfa
ce().currentTime()) | 477 if (event->type() == EventTypeNames::input && time != mediaControllerInterfa
ce().currentTime()) |
479 mediaControllerInterface().setCurrentTime(time, IGNORE_EXCEPTION); | 478 mediaControllerInterface().setCurrentTime(time, IGNORE_EXCEPTION); |
480 | 479 |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 float fontSize = smallestDimension * 0.05f; | 771 float fontSize = smallestDimension * 0.05f; |
773 if (fontSize != m_fontSize) { | 772 if (fontSize != m_fontSize) { |
774 m_fontSize = fontSize; | 773 m_fontSize = fontSize; |
775 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); | 774 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); |
776 } | 775 } |
777 } | 776 } |
778 | 777 |
779 // ---------------------------- | 778 // ---------------------------- |
780 | 779 |
781 } // namespace WebCore | 780 } // namespace WebCore |
OLD | NEW |