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

Side by Side Diff: Source/core/rendering/RenderVideo.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/rendering/RenderTreeAsText.cpp ('k') | Source/core/rendering/RenderView.h » ('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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 contentRect.moveBy(paintOffset); 182 contentRect.moveBy(paintOffset);
183 GraphicsContext* context = paintInfo.context; 183 GraphicsContext* context = paintInfo.context;
184 bool clip = !contentRect.contains(rect); 184 bool clip = !contentRect.contains(rect);
185 if (clip) { 185 if (clip) {
186 context->save(); 186 context->save();
187 context->clip(contentRect); 187 context->clip(contentRect);
188 } 188 }
189 189
190 if (displayingPoster) 190 if (displayingPoster)
191 paintIntoRect(context, rect); 191 paintIntoRect(context, rect);
192 else if (document()->view() && document()->view()->paintBehavior() & PaintBe haviorFlattenCompositingLayers) 192 else if (document().view() && document().view()->paintBehavior() & PaintBeha viorFlattenCompositingLayers)
193 mediaPlayer->paintCurrentFrameInContext(context, pixelSnappedIntRect(rec t)); 193 mediaPlayer->paintCurrentFrameInContext(context, pixelSnappedIntRect(rec t));
194 else 194 else
195 mediaPlayer->paint(context, pixelSnappedIntRect(rect)); 195 mediaPlayer->paint(context, pixelSnappedIntRect(rect));
196 196
197 if (clip) 197 if (clip)
198 context->restore(); 198 context->restore();
199 } 199 }
200 200
201 void RenderVideo::layout() 201 void RenderVideo::layout()
202 { 202 {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 } 289 }
290 290
291 LayoutUnit RenderVideo::offsetHeight() const 291 LayoutUnit RenderVideo::offsetHeight() const
292 { 292 {
293 if (const RenderBlock* block = rendererPlaceholder(this)) 293 if (const RenderBlock* block = rendererPlaceholder(this))
294 return block->offsetHeight(); 294 return block->offsetHeight();
295 return RenderMedia::offsetHeight(); 295 return RenderMedia::offsetHeight();
296 } 296 }
297 297
298 } // namespace WebCore 298 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTreeAsText.cpp ('k') | Source/core/rendering/RenderView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698