| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 HTMLMediaElement::setDisplayMode(Unknown); | 106 HTMLMediaElement::setDisplayMode(Unknown); |
| 107 updateDisplayState(); | 107 updateDisplayState(); |
| 108 if (shouldDisplayPosterImage()) { | 108 if (shouldDisplayPosterImage()) { |
| 109 if (!m_imageLoader) | 109 if (!m_imageLoader) |
| 110 m_imageLoader = adoptPtr(new HTMLImageLoader(this)); | 110 m_imageLoader = adoptPtr(new HTMLImageLoader(this)); |
| 111 m_imageLoader->updateFromElementIgnoringPreviousError(); | 111 m_imageLoader->updateFromElementIgnoringPreviousError(); |
| 112 } else { | 112 } else { |
| 113 if (renderer()) | 113 if (renderer()) |
| 114 toRenderImage(renderer())->imageResource()->setImageResource(0); | 114 toRenderImage(renderer())->imageResource()->setImageResource(0); |
| 115 } | 115 } |
| 116 // Notify the player when the poster image URL changes. |
| 117 if (player()) |
| 118 player()->setPoster(posterImageURL()); |
| 116 } else | 119 } else |
| 117 HTMLMediaElement::parseAttribute(name, value); | 120 HTMLMediaElement::parseAttribute(name, value); |
| 118 } | 121 } |
| 119 | 122 |
| 120 bool HTMLVideoElement::supportsFullscreen() const | 123 bool HTMLVideoElement::supportsFullscreen() const |
| 121 { | 124 { |
| 122 if (!document().page()) | 125 if (!document().page()) |
| 123 return false; | 126 return false; |
| 124 | 127 |
| 125 if (!player()) | 128 if (!player()) |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 | 267 |
| 265 KURL HTMLVideoElement::posterImageURL() const | 268 KURL HTMLVideoElement::posterImageURL() const |
| 266 { | 269 { |
| 267 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); | 270 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); |
| 268 if (url.isEmpty()) | 271 if (url.isEmpty()) |
| 269 return KURL(); | 272 return KURL(); |
| 270 return document().completeURL(url); | 273 return document().completeURL(url); |
| 271 } | 274 } |
| 272 | 275 |
| 273 } | 276 } |
| OLD | NEW |