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

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: 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..75a8f98710baf0c81cad9c56a7176c253d3b4f54 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 {
+ // We don't know if the main frame has an horizontal scrollbar if it is out of
+ // process.
+ if (document().page()->mainFrame()->isRemoteFrame())
dcheng 2016/11/04 16:48:36 What breaks if we don't go through the rest of thi
mlamouri (slow - plz ping) 2016/11/04 17:00:56 The feature is meant to make the default controls
mlamouri (slow - plz ping) 2016/11/04 18:17:55 Do you want me to file a bug and add a TODO?
+ 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