| Index: Source/core/paint/MediaControlsPainter.cpp
|
| diff --git a/Source/core/paint/MediaControlsPainter.cpp b/Source/core/paint/MediaControlsPainter.cpp
|
| index 21e8baebcf494a531e84babbaff431589830e6f5..673c6ec2fbc801a95238eea12be7b61271b1728c 100644
|
| --- a/Source/core/paint/MediaControlsPainter.cpp
|
| +++ b/Source/core/paint/MediaControlsPainter.cpp
|
| @@ -173,7 +173,10 @@ bool MediaControlsPainter::paintMediaOverlayPlayButton(LayoutObject* object, con
|
| if (RuntimeEnabledFeatures::newMediaPlaybackUiEnabled()) {
|
| // Overlay play button covers the entire player, so center and draw a
|
| // smaller button. Center in the entire element.
|
| - int mediaHeight = mediaElement->clientHeight();
|
| + const LayoutBox* box = mediaElement->layoutObject()->enclosingBox();
|
| + if (!box)
|
| + return false;
|
| + int mediaHeight = box->pixelSnappedHeight();
|
| buttonRect.setX(rect.center().x() - mediaOverlayPlayButtonWidthNew / 2);
|
| buttonRect.setY(rect.center().y() - mediaOverlayPlayButtonHeightNew / 2
|
| + (mediaHeight - rect.height()) / 2);
|
|
|