| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * Copyright (C) 2011 Google Inc. All rights reserved. |    2  * Copyright (C) 2011 Google 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  155  |  155  | 
|  156     // 2. If the text track's text track mode is not set to one of hidden or sho
     wing, abort these steps. |  156     // 2. If the text track's text track mode is not set to one of hidden or sho
     wing, abort these steps. | 
|  157     if (ensureTrack()->mode() != TextTrack::hiddenKeyword() && ensureTrack()->mo
     de() != TextTrack::showingKeyword()) |  157     if (ensureTrack()->mode() != TextTrack::hiddenKeyword() && ensureTrack()->mo
     de() != TextTrack::showingKeyword()) | 
|  158         return; |  158         return; | 
|  159  |  159  | 
|  160     // 3. If the text track's track element does not have a media element as a p
     arent, abort these steps. |  160     // 3. If the text track's track element does not have a media element as a p
     arent, abort these steps. | 
|  161     if (!mediaElement()) |  161     if (!mediaElement()) | 
|  162         return; |  162         return; | 
|  163  |  163  | 
|  164     // 4. Run the remainder of these steps asynchronously, allowing whatever cau
     sed these steps to run to continue. |  164     // 4. Run the remainder of these steps asynchronously, allowing whatever cau
     sed these steps to run to continue. | 
|  165     m_loadTimer.startOneShot(0); |  165     m_loadTimer.startOneShot(0, FROM_HERE); | 
|  166 } |  166 } | 
|  167  |  167  | 
|  168 void HTMLTrackElement::loadTimerFired(Timer<HTMLTrackElement>*) |  168 void HTMLTrackElement::loadTimerFired(Timer<HTMLTrackElement>*) | 
|  169 { |  169 { | 
|  170     if (!fastHasAttribute(srcAttr)) |  170     if (!fastHasAttribute(srcAttr)) | 
|  171         return; |  171         return; | 
|  172  |  172  | 
|  173     WTF_LOG(Media, "HTMLTrackElement::loadTimerFired"); |  173     WTF_LOG(Media, "HTMLTrackElement::loadTimerFired"); | 
|  174  |  174  | 
|  175     // 6. Set the text track readiness state to loading. |  175     // 6. Set the text track readiness state to loading. | 
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  266  |  266  | 
|  267 HTMLMediaElement* HTMLTrackElement::mediaElement() const |  267 HTMLMediaElement* HTMLTrackElement::mediaElement() const | 
|  268 { |  268 { | 
|  269     Element* parent = parentElement(); |  269     Element* parent = parentElement(); | 
|  270     if (parent && parent->isMediaElement()) |  270     if (parent && parent->isMediaElement()) | 
|  271         return toHTMLMediaElement(parentNode()); |  271         return toHTMLMediaElement(parentNode()); | 
|  272     return 0; |  272     return 0; | 
|  273 } |  273 } | 
|  274  |  274  | 
|  275 } |  275 } | 
| OLD | NEW |