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

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

Issue 2561323002: 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 e85413688c4df85a8552f5c983d458e03b198e69..9cd13a60e23474c816df8c7bf9342d24f0d312fb 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
@@ -164,6 +164,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