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

Side by Side Diff: Source/core/layout/LayoutMedia.cpp

Issue 1296333002: Removed clientHeight() from MediaControlsPainter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed TODO. Created 5 years, 4 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
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // TODO(philipj): Remove the mutableStyleRef() and depend on CSS 83 // TODO(philipj): Remove the mutableStyleRef() and depend on CSS
84 // width/height: inherit to match the media element size. 84 // width/height: inherit to match the media element size.
85 layoutBox->mutableStyleRef().setHeight(Length(newSize.height(), Fixed)); 85 layoutBox->mutableStyleRef().setHeight(Length(newSize.height(), Fixed));
86 layoutBox->mutableStyleRef().setWidth(Length(newSize.width(), Fixed)); 86 layoutBox->mutableStyleRef().setWidth(Length(newSize.width(), Fixed));
87 layoutBox->forceLayout(); 87 layoutBox->forceLayout();
88 } 88 }
89 89
90 clearNeedsLayout(); 90 clearNeedsLayout();
91 91
92 // Notify our MediaControls that a layout has happened. 92 // Notify our MediaControls that a layout has happened.
93 if (mediaElement() && mediaElement()->mediaControls() && newSize.width() != oldSize.width()) 93 if (mediaElement() && newSize != oldSize)
94 mediaElement()->mediaControls()->notifyPanelWidthChanged(newSize.width() ); 94 mediaElement()->notifySizeChanged(newSize);
95 } 95 }
96 96
97 bool LayoutMedia::isChildAllowed(LayoutObject* child, const ComputedStyle&) cons t 97 bool LayoutMedia::isChildAllowed(LayoutObject* child, const ComputedStyle&) cons t
98 { 98 {
99 // Two types of child layout objects are allowed: media controls 99 // Two types of child layout objects are allowed: media controls
100 // and the text track container. Filter children by node type. 100 // and the text track container. Filter children by node type.
101 ASSERT(child->node()); 101 ASSERT(child->node());
102 102
103 // The user agent stylesheet (mediaControls.css) has 103 // The user agent stylesheet (mediaControls.css) has
104 // ::-webkit-media-controls { display: flex; }. If author style 104 // ::-webkit-media-controls { display: flex; }. If author style
105 // sets display: inline we would get an inline layoutObject as a child 105 // sets display: inline we would get an inline layoutObject as a child
106 // of replaced content, which is not supposed to be possible. This 106 // of replaced content, which is not supposed to be possible. This
107 // check can be removed if ::-webkit-media-controls is made 107 // check can be removed if ::-webkit-media-controls is made
108 // internal. 108 // internal.
109 if (child->node()->isMediaControls()) 109 if (child->node()->isMediaControls())
110 return child->isFlexibleBox(); 110 return child->isFlexibleBox();
111 111
112 if (child->node()->isTextTrackContainer()) 112 if (child->node()->isTextTrackContainer())
113 return true; 113 return true;
114 114
115 return false; 115 return false;
116 } 116 }
117 117
118 void LayoutMedia::paintReplaced(const PaintInfo&, const LayoutPoint&) 118 void LayoutMedia::paintReplaced(const PaintInfo&, const LayoutPoint&)
119 { 119 {
120 } 120 }
121 121
122 } // namespace blink 122 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698