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

Side by Side Diff: Source/core/rendering/RenderMedia.cpp

Issue 923953002: Move rendering/RenderImage* to layout/LayoutImage* (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/core/rendering/RenderMedia.h ('k') | Source/core/rendering/RenderReplaced.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 15 matching lines...) Expand all
26 #include "config.h" 26 #include "config.h"
27 27
28 #include "core/rendering/RenderMedia.h" 28 #include "core/rendering/RenderMedia.h"
29 29
30 #include "core/html/HTMLMediaElement.h" 30 #include "core/html/HTMLMediaElement.h"
31 #include "core/rendering/RenderView.h" 31 #include "core/rendering/RenderView.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 RenderMedia::RenderMedia(HTMLMediaElement* video) 35 RenderMedia::RenderMedia(HTMLMediaElement* video)
36 : RenderImage(video) 36 : LayoutImage(video)
37 { 37 {
38 setImageResource(RenderImageResource::create()); 38 setImageResource(LayoutImageResource::create());
39 } 39 }
40 40
41 RenderMedia::~RenderMedia() 41 RenderMedia::~RenderMedia()
42 { 42 {
43 } 43 }
44 44
45 HTMLMediaElement* RenderMedia::mediaElement() const 45 HTMLMediaElement* RenderMedia::mediaElement() const
46 { 46 {
47 return toHTMLMediaElement(node()); 47 return toHTMLMediaElement(node());
48 } 48 }
49 49
50 void RenderMedia::layout() 50 void RenderMedia::layout()
51 { 51 {
52 LayoutSize oldSize = contentBoxRect().size(); 52 LayoutSize oldSize = contentBoxRect().size();
53 53
54 RenderImage::layout(); 54 LayoutImage::layout();
55 55
56 RenderBox* controlsRenderer = toRenderBox(m_children.firstChild()); 56 RenderBox* controlsRenderer = toRenderBox(m_children.firstChild());
57 if (!controlsRenderer) 57 if (!controlsRenderer)
58 return; 58 return;
59 59
60 bool controlsNeedLayout = controlsRenderer->needsLayout(); 60 bool controlsNeedLayout = controlsRenderer->needsLayout();
61 LayoutSize newSize = contentBoxRect().size(); 61 LayoutSize newSize = contentBoxRect().size();
62 if (newSize == oldSize && !controlsNeedLayout) 62 if (newSize == oldSize && !controlsNeedLayout)
63 return; 63 return;
64 64
(...skipping 14 matching lines...) Expand all
79 // child of replaced content, which is not supposed to be possible. This 79 // child of replaced content, which is not supposed to be possible. This
80 // check can be removed if ::-webkit-media-controls is made internal. 80 // check can be removed if ::-webkit-media-controls is made internal.
81 return child->isFlexibleBox(); 81 return child->isFlexibleBox();
82 } 82 }
83 83
84 void RenderMedia::paintReplaced(const PaintInfo&, const LayoutPoint&) 84 void RenderMedia::paintReplaced(const PaintInfo&, const LayoutPoint&)
85 { 85 {
86 } 86 }
87 87
88 } // namespace blink 88 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderMedia.h ('k') | Source/core/rendering/RenderReplaced.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698