| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010, 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 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 } | 729 } |
| 730 | 730 |
| 731 - (BOOL)_isAnyMoviePlaying | 731 - (BOOL)_isAnyMoviePlaying |
| 732 { | 732 { |
| 733 if (!_element) | 733 if (!_element) |
| 734 return NO; | 734 return NO; |
| 735 | 735 |
| 736 Node* nextNode = _element.get(); | 736 Node* nextNode = _element.get(); |
| 737 while (nextNode) | 737 while (nextNode) |
| 738 { | 738 { |
| 739 if (nextNode->hasTagName(HTMLNames::videoTag)) { | 739 if (nextNode->hasTagName(HTMLNames::videoTag) && static_cast<Element*>(n
extNode)->isMediaElement()) { |
| 740 HTMLMediaElement* element = static_cast<HTMLMediaElement*>(nextNode)
; | 740 HTMLMediaElement* element = static_cast<HTMLMediaElement*>(nextNode)
; |
| 741 if (!element->paused() && !element->ended()) | 741 if (!element->paused() && !element->ended()) |
| 742 return YES; | 742 return YES; |
| 743 } | 743 } |
| 744 | 744 |
| 745 nextNode = nextNode->traverseNextNode(_element.get()); | 745 nextNode = nextNode->traverseNextNode(_element.get()); |
| 746 } | 746 } |
| 747 | 747 |
| 748 return NO; | 748 return NO; |
| 749 } | 749 } |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 { | 901 { |
| 902 return this == &listener; | 902 return this == &listener; |
| 903 } | 903 } |
| 904 | 904 |
| 905 void MediaEventListener::handleEvent(ScriptExecutionContext* context, Event* eve
nt) | 905 void MediaEventListener::handleEvent(ScriptExecutionContext* context, Event* eve
nt) |
| 906 { | 906 { |
| 907 [delegate _updatePowerAssertions]; | 907 [delegate _updatePowerAssertions]; |
| 908 } | 908 } |
| 909 | 909 |
| 910 #endif /* ENABLE(FULLSCREEN_API) */ | 910 #endif /* ENABLE(FULLSCREEN_API) */ |
| OLD | NEW |