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

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

Issue 716733002: Merge 184652 "Disallow non-flexbox child renderers for RenderMedia" (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2171/
Patch Set: Created 6 years, 1 month 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/RenderMedia.h ('k') | 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 LayoutState state(*this, locationOffset()); 71 LayoutState state(*this, locationOffset());
72 72
73 controlsRenderer->setLocation(LayoutPoint(borderLeft(), borderTop()) + Layou tSize(paddingLeft(), paddingTop())); 73 controlsRenderer->setLocation(LayoutPoint(borderLeft(), borderTop()) + Layou tSize(paddingLeft(), paddingTop()));
74 controlsRenderer->style()->setHeight(Length(newSize.height(), Fixed)); 74 controlsRenderer->style()->setHeight(Length(newSize.height(), Fixed));
75 controlsRenderer->style()->setWidth(Length(newSize.width(), Fixed)); 75 controlsRenderer->style()->setWidth(Length(newSize.width(), Fixed));
76 controlsRenderer->forceLayout(); 76 controlsRenderer->forceLayout();
77 clearNeedsLayout(); 77 clearNeedsLayout();
78 } 78 }
79 79
80 bool RenderMedia::isChildAllowed(RenderObject* child, RenderStyle*) const
81 {
82 // The only allowed child is the media controls. The user agent stylesheet
83 // (mediaControls.css) has ::-webkit-media-controls { display: flex; }. If
84 // author style sets display: inline we would get an inline renderer as a
85 // child of replaced content, which is not supposed to be possible. This
86 // check can be removed if ::-webkit-media-controls is made internal.
87 return child->isFlexibleBox();
88 }
89
80 void RenderMedia::paintReplaced(PaintInfo&, const LayoutPoint&) 90 void RenderMedia::paintReplaced(PaintInfo&, const LayoutPoint&)
81 { 91 {
82 } 92 }
83 93
84 } // namespace blink 94 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderMedia.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698