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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutMedia.cpp

Issue 2550423003: Media Controls: don't try to cut the controls when the element is fullscreen. (Closed)
Patch Set: Created 4 years 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 | « no previous file | 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/layout/LayoutMedia.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutMedia.cpp b/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
index 7cba355293374fce0d2d1efc0eec62fb296e379a..c9744c5af5e4a1ff042bfd3feb47b03160144c99 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
@@ -136,6 +136,12 @@ LayoutUnit LayoutMedia::computePanelWidth(const LayoutRect& mediaRect) const {
if (document().page()->mainFrame()->isRemoteFrame())
return mediaRect.width();
+ // TODO(foolip): when going fullscreen, the animation sometimes does not clear
+ // up properly and the last `absoluteXOffset` received is incorrect. This is
+ // a shortcut that we could ideally avoid. See https://crbug.com/663680
+ if (mediaElement() && mediaElement()->isFullscreen())
+ return mediaRect.width();
+
FrameHost* frameHost = document().frameHost();
LocalFrame* mainFrame = document().page()->deprecatedLocalMainFrame();
FrameView* pageView = mainFrame ? mainFrame->view() : nullptr;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698