| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 video->suspendIfNeeded(); | 72 video->suspendIfNeeded(); |
| 73 return video; | 73 return video; |
| 74 } | 74 } |
| 75 | 75 |
| 76 DEFINE_TRACE(HTMLVideoElement) { | 76 DEFINE_TRACE(HTMLVideoElement) { |
| 77 visitor->trace(m_imageLoader); | 77 visitor->trace(m_imageLoader); |
| 78 visitor->trace(m_customControlsFullscreenDetector); | 78 visitor->trace(m_customControlsFullscreenDetector); |
| 79 HTMLMediaElement::trace(visitor); | 79 HTMLMediaElement::trace(visitor); |
| 80 } | 80 } |
| 81 | 81 |
| 82 Node::InsertionNotificationRequest HTMLVideoElement::insertedInto( |
| 83 ContainerNode* insertionPoint) { |
| 84 if (insertionPoint->isConnected() && m_customControlsFullscreenDetector) |
| 85 m_customControlsFullscreenDetector->attach(); |
| 86 |
| 87 return HTMLMediaElement::insertedInto(insertionPoint); |
| 88 } |
| 89 |
| 90 void HTMLVideoElement::removedFrom(ContainerNode* insertionPoint) { |
| 91 HTMLMediaElement::removedFrom(insertionPoint); |
| 92 |
| 93 if (m_customControlsFullscreenDetector) |
| 94 m_customControlsFullscreenDetector->detach(); |
| 95 } |
| 96 |
| 82 void HTMLVideoElement::contextDestroyed(ExecutionContext* context) { | 97 void HTMLVideoElement::contextDestroyed(ExecutionContext* context) { |
| 83 if (m_customControlsFullscreenDetector) | 98 if (m_customControlsFullscreenDetector) |
| 84 m_customControlsFullscreenDetector->contextDestroyed(); | 99 m_customControlsFullscreenDetector->contextDestroyed(); |
| 85 | 100 |
| 86 HTMLMediaElement::contextDestroyed(context); | 101 HTMLMediaElement::contextDestroyed(context); |
| 87 } | 102 } |
| 88 | 103 |
| 89 bool HTMLVideoElement::layoutObjectIsNeeded(const ComputedStyle& style) { | 104 bool HTMLVideoElement::layoutObjectIsNeeded(const ComputedStyle& style) { |
| 90 return HTMLElement::layoutObjectIsNeeded(style); | 105 return HTMLElement::layoutObjectIsNeeded(style); |
| 91 } | 106 } |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 return ScriptPromise(); | 402 return ScriptPromise(); |
| 388 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) | 403 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) |
| 389 return ScriptPromise(); | 404 return ScriptPromise(); |
| 390 return ImageBitmapSource::fulfillImageBitmap( | 405 return ImageBitmapSource::fulfillImageBitmap( |
| 391 scriptState, | 406 scriptState, |
| 392 ImageBitmap::create(this, cropRect, | 407 ImageBitmap::create(this, cropRect, |
| 393 eventTarget.toLocalDOMWindow()->document(), options)); | 408 eventTarget.toLocalDOMWindow()->document(), options)); |
| 394 } | 409 } |
| 395 | 410 |
| 396 } // namespace blink | 411 } // namespace blink |
| OLD | NEW |