| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 // "missing value default", so use it for everything except "none" a
nd "metadata" | 436 // "missing value default", so use it for everything except "none" a
nd "metadata" |
| 437 m_preload = MediaPlayer::Auto; | 437 m_preload = MediaPlayer::Auto; |
| 438 } | 438 } |
| 439 | 439 |
| 440 // The attribute must be ignored if the autoplay attribute is present | 440 // The attribute must be ignored if the autoplay attribute is present |
| 441 if (!autoplay() && m_player) | 441 if (!autoplay() && m_player) |
| 442 m_player->setPreload(m_preload); | 442 m_player->setPreload(m_preload); |
| 443 | 443 |
| 444 } else if (name == mediagroupAttr) | 444 } else if (name == mediagroupAttr) |
| 445 setMediaGroup(value); | 445 setMediaGroup(value); |
| 446 else if (name == onabortAttr) | |
| 447 setAttributeEventListener(EventTypeNames::abort, createAttributeEventLis
tener(this, name, value)); | |
| 448 else if (name == onbeforeloadAttr) | 446 else if (name == onbeforeloadAttr) |
| 449 setAttributeEventListener(EventTypeNames::beforeload, createAttributeEve
ntListener(this, name, value)); | 447 setAttributeEventListener(EventTypeNames::beforeload, createAttributeEve
ntListener(this, name, value)); |
| 450 else if (name == oncanplayAttr) | |
| 451 setAttributeEventListener(EventTypeNames::canplay, createAttributeEventL
istener(this, name, value)); | |
| 452 else if (name == oncanplaythroughAttr) | |
| 453 setAttributeEventListener(EventTypeNames::canplaythrough, createAttribut
eEventListener(this, name, value)); | |
| 454 else if (name == ondurationchangeAttr) | |
| 455 setAttributeEventListener(EventTypeNames::durationchange, createAttribut
eEventListener(this, name, value)); | |
| 456 else if (name == onemptiedAttr) | |
| 457 setAttributeEventListener(EventTypeNames::emptied, createAttributeEventL
istener(this, name, value)); | |
| 458 else if (name == onendedAttr) | |
| 459 setAttributeEventListener(EventTypeNames::ended, createAttributeEventLis
tener(this, name, value)); | |
| 460 else if (name == onerrorAttr) | |
| 461 setAttributeEventListener(EventTypeNames::error, createAttributeEventLis
tener(this, name, value)); | |
| 462 else if (name == onloadeddataAttr) | |
| 463 setAttributeEventListener(EventTypeNames::loadeddata, createAttributeEve
ntListener(this, name, value)); | |
| 464 else if (name == onloadedmetadataAttr) | |
| 465 setAttributeEventListener(EventTypeNames::loadedmetadata, createAttribut
eEventListener(this, name, value)); | |
| 466 else if (name == onloadstartAttr) | |
| 467 setAttributeEventListener(EventTypeNames::loadstart, createAttributeEven
tListener(this, name, value)); | |
| 468 else if (name == onpauseAttr) | |
| 469 setAttributeEventListener(EventTypeNames::pause, createAttributeEventLis
tener(this, name, value)); | |
| 470 else if (name == onplayAttr) | |
| 471 setAttributeEventListener(EventTypeNames::play, createAttributeEventList
ener(this, name, value)); | |
| 472 else if (name == onplayingAttr) | |
| 473 setAttributeEventListener(EventTypeNames::playing, createAttributeEventL
istener(this, name, value)); | |
| 474 else if (name == onprogressAttr) | |
| 475 setAttributeEventListener(EventTypeNames::progress, createAttributeEvent
Listener(this, name, value)); | |
| 476 else if (name == onratechangeAttr) | |
| 477 setAttributeEventListener(EventTypeNames::ratechange, createAttributeEve
ntListener(this, name, value)); | |
| 478 else if (name == onseekedAttr) | |
| 479 setAttributeEventListener(EventTypeNames::seeked, createAttributeEventLi
stener(this, name, value)); | |
| 480 else if (name == onseekingAttr) | |
| 481 setAttributeEventListener(EventTypeNames::seeking, createAttributeEventL
istener(this, name, value)); | |
| 482 else if (name == onstalledAttr) | |
| 483 setAttributeEventListener(EventTypeNames::stalled, createAttributeEventL
istener(this, name, value)); | |
| 484 else if (name == onsuspendAttr) | |
| 485 setAttributeEventListener(EventTypeNames::suspend, createAttributeEventL
istener(this, name, value)); | |
| 486 else if (name == ontimeupdateAttr) | |
| 487 setAttributeEventListener(EventTypeNames::timeupdate, createAttributeEve
ntListener(this, name, value)); | |
| 488 else if (name == onvolumechangeAttr) | |
| 489 setAttributeEventListener(EventTypeNames::volumechange, createAttributeE
ventListener(this, name, value)); | |
| 490 else if (name == onwaitingAttr) | |
| 491 setAttributeEventListener(EventTypeNames::waiting, createAttributeEventL
istener(this, name, value)); | |
| 492 else | 448 else |
| 493 HTMLElement::parseAttribute(name, value); | 449 HTMLElement::parseAttribute(name, value); |
| 494 } | 450 } |
| 495 | 451 |
| 496 void HTMLMediaElement::finishParsingChildren() | 452 void HTMLMediaElement::finishParsingChildren() |
| 497 { | 453 { |
| 498 HTMLElement::finishParsingChildren(); | 454 HTMLElement::finishParsingChildren(); |
| 499 m_parsingInProgress = false; | 455 m_parsingInProgress = false; |
| 500 | 456 |
| 501 if (!RuntimeEnabledFeatures::videoTrackEnabled()) | 457 if (!RuntimeEnabledFeatures::videoTrackEnabled()) |
| (...skipping 3417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3919 { | 3875 { |
| 3920 m_restrictions = NoRestrictions; | 3876 m_restrictions = NoRestrictions; |
| 3921 } | 3877 } |
| 3922 | 3878 |
| 3923 void HTMLMediaElement::mediaPlayerScheduleLayerUpdate() | 3879 void HTMLMediaElement::mediaPlayerScheduleLayerUpdate() |
| 3924 { | 3880 { |
| 3925 scheduleLayerUpdate(); | 3881 scheduleLayerUpdate(); |
| 3926 } | 3882 } |
| 3927 | 3883 |
| 3928 } | 3884 } |
| OLD | NEW |