| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 #endif | 51 #endif |
| 52 | 52 |
| 53 inline HTMLTrackElement::HTMLTrackElement(Document& document) | 53 inline HTMLTrackElement::HTMLTrackElement(Document& document) |
| 54 : HTMLElement(trackTag, document) | 54 : HTMLElement(trackTag, document) |
| 55 , m_loadTimer(this, &HTMLTrackElement::loadTimerFired) | 55 , m_loadTimer(this, &HTMLTrackElement::loadTimerFired) |
| 56 { | 56 { |
| 57 WTF_LOG(Media, "HTMLTrackElement::HTMLTrackElement - %p", this); | 57 WTF_LOG(Media, "HTMLTrackElement::HTMLTrackElement - %p", this); |
| 58 ScriptWrappable::init(this); | 58 ScriptWrappable::init(this); |
| 59 } | 59 } |
| 60 | 60 |
| 61 DEFINE_NODE_FACTORY(HTMLTrackElement) |
| 62 |
| 61 HTMLTrackElement::~HTMLTrackElement() | 63 HTMLTrackElement::~HTMLTrackElement() |
| 62 { | 64 { |
| 63 #if !ENABLE(OILPAN) | 65 #if !ENABLE(OILPAN) |
| 64 if (m_track) | 66 if (m_track) |
| 65 m_track->clearTrackElement(); | 67 m_track->clearTrackElement(); |
| 66 #endif | 68 #endif |
| 67 } | 69 } |
| 68 | 70 |
| 69 PassRefPtrWillBeRawPtr<HTMLTrackElement> HTMLTrackElement::create(Document& docu
ment) | |
| 70 { | |
| 71 return adoptRefWillBeRefCountedGarbageCollected(new HTMLTrackElement(documen
t)); | |
| 72 } | |
| 73 | |
| 74 Node::InsertionNotificationRequest HTMLTrackElement::insertedInto(ContainerNode*
insertionPoint) | 71 Node::InsertionNotificationRequest HTMLTrackElement::insertedInto(ContainerNode*
insertionPoint) |
| 75 { | 72 { |
| 76 WTF_LOG(Media, "HTMLTrackElement::insertedInto"); | 73 WTF_LOG(Media, "HTMLTrackElement::insertedInto"); |
| 77 | 74 |
| 78 // Since we've moved to a new parent, we may now be able to load. | 75 // Since we've moved to a new parent, we may now be able to load. |
| 79 scheduleLoad(); | 76 scheduleLoad(); |
| 80 | 77 |
| 81 HTMLElement::insertedInto(insertionPoint); | 78 HTMLElement::insertedInto(insertionPoint); |
| 82 HTMLMediaElement* parent = mediaElement(); | 79 HTMLMediaElement* parent = mediaElement(); |
| 83 if (insertionPoint == parent) | 80 if (insertionPoint == parent) |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 return 0; | 271 return 0; |
| 275 } | 272 } |
| 276 | 273 |
| 277 void HTMLTrackElement::trace(Visitor* visitor) | 274 void HTMLTrackElement::trace(Visitor* visitor) |
| 278 { | 275 { |
| 279 visitor->trace(m_track); | 276 visitor->trace(m_track); |
| 280 HTMLElement::trace(visitor); | 277 HTMLElement::trace(visitor); |
| 281 } | 278 } |
| 282 | 279 |
| 283 } | 280 } |
| OLD | NEW |