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

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp

Issue 2237553002: [M53] Adjust MediaControls for effective zoom when dropping controls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/media/media-controls-fit-properly-while-zoomed.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c2931fc698a748d0ca5d495dd9e2909e20ca029a..834e7302a13aed465ff9d9755af05d8c9cff5dd1 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() && m_playButton->layoutObject()->style()) {
+ const ComputedStyle* style = m_playButton->layoutObject()->style();
+ minimumWidth = ceil(style->width().pixels() / style->effectiveZoom());
+ }
// Special-case the play button; it always fits.
if (m_playButton->isWanted()) {
« no previous file with comments | « third_party/WebKit/LayoutTests/media/media-controls-fit-properly-while-zoomed.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698