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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 } else { | 113 } else { |
114 if (renderer()) | 114 if (renderer()) |
115 toRenderImage(renderer())->imageResource()->setImageResource(0); | 115 toRenderImage(renderer())->imageResource()->setImageResource(0); |
116 } | 116 } |
117 } else | 117 } else |
118 HTMLMediaElement::parseAttribute(name, value); | 118 HTMLMediaElement::parseAttribute(name, value); |
119 } | 119 } |
120 | 120 |
121 bool HTMLVideoElement::supportsFullscreen() const | 121 bool HTMLVideoElement::supportsFullscreen() const |
122 { | 122 { |
123 Page* page = &document() ? document().page() : 0; | 123 if (!document().page()) |
124 if (!page) | |
125 return false; | 124 return false; |
126 | 125 |
127 if (!player() || !player()->supportsFullscreen()) | 126 if (!player() || !player()->supportsFullscreen()) |
128 return false; | 127 return false; |
129 | 128 |
130 return true; | 129 return true; |
131 } | 130 } |
132 | 131 |
133 unsigned HTMLVideoElement::videoWidth() const | 132 unsigned HTMLVideoElement::videoWidth() const |
134 { | 133 { |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 | 275 |
277 KURL HTMLVideoElement::posterImageURL() const | 276 KURL HTMLVideoElement::posterImageURL() const |
278 { | 277 { |
279 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); | 278 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); |
280 if (url.isEmpty()) | 279 if (url.isEmpty()) |
281 return KURL(); | 280 return KURL(); |
282 return document().completeURL(url); | 281 return document().completeURL(url); |
283 } | 282 } |
284 | 283 |
285 } | 284 } |
OLD | NEW |