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

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

Issue 2479653003: Fix crash when computing media controls width for out of process iframe (Closed)
Patch Set: add todo/bug Created 4 years, 1 month 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 ec6bad08ae71453cc5c87243ecbb1eb4c266616d..1ba695f653116c3c001ae59c7f833f3de8aaba60 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
@@ -159,6 +159,11 @@ void LayoutMedia::setRequestPositionUpdates(bool want) {
}
LayoutUnit LayoutMedia::computePanelWidth(const LayoutRect& mediaRect) const {
+ // TODO(mlamouri): we don't know if the main frame has an horizontal scrollbar
+ // if it is out of process. See https://crbug.com/662480
+ if (document().page()->mainFrame()->isRemoteFrame())
+ 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