Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: Source/core/html/HTMLVideoElement.cpp

Issue 23872002: Remove useless document NULL check in HTMLVideoElement::supportsFullscreen() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698