| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 if (!m_imageLoader) | 158 if (!m_imageLoader) |
| 159 m_imageLoader = HTMLImageLoader::create(this); | 159 m_imageLoader = HTMLImageLoader::create(this); |
| 160 m_imageLoader->updateFromElement(ImageLoader::UpdateIgnorePreviousError); | 160 m_imageLoader->updateFromElement(ImageLoader::UpdateIgnorePreviousError); |
| 161 } else { | 161 } else { |
| 162 if (layoutObject()) | 162 if (layoutObject()) |
| 163 toLayoutImage(layoutObject())->imageResource()->setImageResource(0); | 163 toLayoutImage(layoutObject())->imageResource()->setImageResource(0); |
| 164 } | 164 } |
| 165 // Notify the player when the poster image URL changes. | 165 // Notify the player when the poster image URL changes. |
| 166 if (webMediaPlayer()) | 166 if (webMediaPlayer()) |
| 167 webMediaPlayer()->setPoster(posterImageURL()); | 167 webMediaPlayer()->setPoster(posterImageURL()); |
| 168 HTMLMediaElement::onPosterImageChanged(); |
| 168 } else { | 169 } else { |
| 169 HTMLMediaElement::parseAttribute(params); | 170 HTMLMediaElement::parseAttribute(params); |
| 170 } | 171 } |
| 171 } | 172 } |
| 172 | 173 |
| 173 unsigned HTMLVideoElement::videoWidth() const { | 174 unsigned HTMLVideoElement::videoWidth() const { |
| 174 if (!webMediaPlayer()) | 175 if (!webMediaPlayer()) |
| 175 return 0; | 176 return 0; |
| 176 return webMediaPlayer()->naturalSize().width; | 177 return webMediaPlayer()->naturalSize().width; |
| 177 } | 178 } |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 return ScriptPromise(); | 403 return ScriptPromise(); |
| 403 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) | 404 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) |
| 404 return ScriptPromise(); | 405 return ScriptPromise(); |
| 405 return ImageBitmapSource::fulfillImageBitmap( | 406 return ImageBitmapSource::fulfillImageBitmap( |
| 406 scriptState, | 407 scriptState, |
| 407 ImageBitmap::create(this, cropRect, | 408 ImageBitmap::create(this, cropRect, |
| 408 eventTarget.toLocalDOMWindow()->document(), options)); | 409 eventTarget.toLocalDOMWindow()->document(), options)); |
| 409 } | 410 } |
| 410 | 411 |
| 411 } // namespace blink | 412 } // namespace blink |
| OLD | NEW |