Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp |
| diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp |
| index abb61be1737dbf90b0fbd6bf02ba85b5ec31cd1f..7813eb475fa77920f00460d2def285daac157188 100644 |
| --- a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp |
| +++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp |
| @@ -706,9 +706,11 @@ void MediaControls::computeWhichControlsFit() |
| // should be available the first time we're called after layout. This will |
| // also be the first time we have m_panelWidth!=0, so it won't matter if |
| // we get this wrong before that. |
| - int minimumWidth = (m_playButton->layoutObject() && m_playButton->layoutObject()->style()) |
| - ? m_playButton->layoutObject()->style()->width().pixels() |
| - : 48; |
| + int minimumWidth = 48; |
| + if (m_playButton->layoutObject()) { |
| + if (const ComputedStyle* style = m_playButton->layoutObject()->style()) |
|
mlamouri (slow - plz ping)
2016/08/08 09:53:16
nit: it's not super obvious that `style` is actual
liberato (no reviews please)
2016/08/08 16:02:51
good point. i don't think that it's against the s
|
| + minimumWidth = ceil(style->width().pixels() / style->effectiveZoom()); |
| + } |
| // Special-case the play button; it always fits. |
| if (m_playButton->isWanted()) { |