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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 { | 351 { |
352 RefPtr<MediaControlTimelineElement> timeline = adoptRef(new MediaControlTime
lineElement(mediaControls)); | 352 RefPtr<MediaControlTimelineElement> timeline = adoptRef(new MediaControlTime
lineElement(mediaControls)); |
353 timeline->ensureUserAgentShadowRoot(); | 353 timeline->ensureUserAgentShadowRoot(); |
354 timeline->setType("range"); | 354 timeline->setType("range"); |
355 timeline->setAttribute(stepAttr, "any"); | 355 timeline->setAttribute(stepAttr, "any"); |
356 return timeline.release(); | 356 return timeline.release(); |
357 } | 357 } |
358 | 358 |
359 void MediaControlTimelineElement::defaultEventHandler(Event* event) | 359 void MediaControlTimelineElement::defaultEventHandler(Event* event) |
360 { | 360 { |
361 // Left button is 0. Rejects mouse events not from left button. | 361 if (event->isMouseEvent() && toMouseEvent(event)->button() != LeftButton) |
362 if (event->isMouseEvent() && toMouseEvent(event)->button()) | |
363 return; | 362 return; |
364 | 363 |
365 if (!inDocument() || !document().isActive()) | 364 if (!inDocument() || !document().isActive()) |
366 return; | 365 return; |
367 | 366 |
368 if (event->type() == EventTypeNames::mousedown) | 367 if (event->type() == EventTypeNames::mousedown) |
369 mediaControllerInterface().beginScrubbing(); | 368 mediaControls().beginScrubbing(); |
370 | 369 |
371 if (event->type() == EventTypeNames::mouseup) | 370 if (event->type() == EventTypeNames::mouseup) |
372 mediaControllerInterface().endScrubbing(); | 371 mediaControls().endScrubbing(); |
373 | 372 |
374 MediaControlInputElement::defaultEventHandler(event); | 373 MediaControlInputElement::defaultEventHandler(event); |
375 | 374 |
376 if (event->type() == EventTypeNames::mouseover || event->type() == EventType
Names::mouseout || event->type() == EventTypeNames::mousemove) | 375 if (event->type() == EventTypeNames::mouseover || event->type() == EventType
Names::mouseout || event->type() == EventTypeNames::mousemove) |
377 return; | 376 return; |
378 | 377 |
379 double time = value().toDouble(); | 378 double time = value().toDouble(); |
380 if (event->type() == EventTypeNames::input && time != mediaControllerInterfa
ce().currentTime()) | 379 if (event->type() == EventTypeNames::input && time != mediaControllerInterfa
ce().currentTime()) |
381 mediaControllerInterface().setCurrentTime(time, IGNORE_EXCEPTION); | 380 mediaControllerInterface().setCurrentTime(time, IGNORE_EXCEPTION); |
382 | 381 |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 float fontSize = smallestDimension * 0.05f; | 673 float fontSize = smallestDimension * 0.05f; |
675 if (fontSize != m_fontSize) { | 674 if (fontSize != m_fontSize) { |
676 m_fontSize = fontSize; | 675 m_fontSize = fontSize; |
677 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); | 676 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); |
678 } | 677 } |
679 } | 678 } |
680 | 679 |
681 // ---------------------------- | 680 // ---------------------------- |
682 | 681 |
683 } // namespace WebCore | 682 } // namespace WebCore |
OLD | NEW |