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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2953193002: Move ContentsSize and HasVisibleContent methods from WebFrame to WebLocalFrame. (Closed)
Patch Set: . Created 3 years, 6 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
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 6cde5a4680945779ea86da6e77b4405b1cd34343..0453053e03ab738c7b8e13f38c366b76fe59e150 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -1292,14 +1292,13 @@ WebRect WebViewImpl::WidenRectWithinPageBounds(const WebRect& source,
int target_margin,
int minimum_margin) {
WebSize max_size;
- if (MainFrame())
- max_size = MainFrame()->ContentsSize();
IntSize scroll_offset;
if (MainFrame()) {
// TODO(lukasza): https://crbug.com/734209: The DCHECK below holds now, but
// only because all of the callers don't support OOPIFs and exit early if
// the main frame is not local.
DCHECK(MainFrame()->IsWebLocalFrame());
+ max_size = MainFrame()->ToWebLocalFrame()->ContentsSize();
scroll_offset = MainFrame()->ToWebLocalFrame()->GetScrollOffset();
}
int left_margin = target_margin;

Powered by Google App Engine
This is Rietveld 408576698