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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master 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 | « Source/core/html/HTMLTrackElement.cpp ('k') | Source/core/html/ImageDocument.cpp » ('j') | 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 Page* page = &document() ? document().page() : 0;
124 if (!page) 124 if (!page)
125 return false; 125 return false;
126 126
127 if (!player() || !player()->supportsFullscreen()) 127 if (!player() || !player()->supportsFullscreen())
128 return false; 128 return false;
129 129
130 return true; 130 return true;
131 } 131 }
132 132
133 unsigned HTMLVideoElement::videoWidth() const 133 unsigned HTMLVideoElement::videoWidth() const
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 return 0; 272 return 0;
273 273
274 return player()->droppedFrameCount(); 274 return player()->droppedFrameCount();
275 } 275 }
276 276
277 KURL HTMLVideoElement::posterImageURL() const 277 KURL HTMLVideoElement::posterImageURL() const
278 { 278 {
279 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); 279 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL());
280 if (url.isEmpty()) 280 if (url.isEmpty())
281 return KURL(); 281 return KURL();
282 return document()->completeURL(url); 282 return document().completeURL(url);
283 } 283 }
284 284
285 } 285 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTrackElement.cpp ('k') | Source/core/html/ImageDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698