OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 // A MediaController is a restrained media controller if the MediaController
is a playing media | 496 // A MediaController is a restrained media controller if the MediaController
is a playing media |
497 // controller, | 497 // controller, |
498 if (m_paused) | 498 if (m_paused) |
499 return false; | 499 return false; |
500 | 500 |
501 bool anyAutoplayingAndPaused = false; | 501 bool anyAutoplayingAndPaused = false; |
502 bool allPaused = true; | 502 bool allPaused = true; |
503 for (MediaElementSequence::const_iterator it = m_mediaElements.begin(); it !
= m_mediaElements.end(); ++it) { | 503 for (MediaElementSequence::const_iterator it = m_mediaElements.begin(); it !
= m_mediaElements.end(); ++it) { |
504 HTMLMediaElement* element = *it; | 504 HTMLMediaElement* element = *it; |
505 | 505 |
506 // and none of its slaved media elements are blocked media elements, | |
507 if (element->isBlocked()) | |
508 return false; | |
509 | |
510 if (element->isAutoplaying() && element->paused()) | 506 if (element->isAutoplaying() && element->paused()) |
511 anyAutoplayingAndPaused = true; | 507 anyAutoplayingAndPaused = true; |
512 | 508 |
513 if (!element->paused()) | 509 if (!element->paused()) |
514 allPaused = false; | 510 allPaused = false; |
515 } | 511 } |
516 | 512 |
517 // but either at least one of its slaved media elements whose autoplaying fl
ag is true still has | 513 // but either at least one of its slaved media elements whose autoplaying fl
ag is true still has |
518 // its paused attribute set to true, or, all of its slaved media elements ha
ve their paused | 514 // its paused attribute set to true, or, all of its slaved media elements ha
ve their paused |
519 // attribute set to true. | 515 // attribute set to true. |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 { | 613 { |
618 #if ENABLE(OILPAN) | 614 #if ENABLE(OILPAN) |
619 visitor->trace(m_mediaElements); | 615 visitor->trace(m_mediaElements); |
620 visitor->trace(m_pendingEventsQueue); | 616 visitor->trace(m_pendingEventsQueue); |
621 visitor->trace(m_executionContext); | 617 visitor->trace(m_executionContext); |
622 #endif | 618 #endif |
623 EventTargetWithInlineData::trace(visitor); | 619 EventTargetWithInlineData::trace(visitor); |
624 } | 620 } |
625 | 621 |
626 } | 622 } |
OLD | NEW |