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

Unified Diff: third_party/WebKit/Source/core/frame/FullscreenController.cpp

Issue 2936423003: Move Get/SetScrollOffset methods from WebFrame to WebLocalFrame. (Closed)
Patch Set: Use WebViewHelper::LocalMainFrame() where possible. 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/core/frame/FullscreenController.cpp
diff --git a/third_party/WebKit/Source/core/frame/FullscreenController.cpp b/third_party/WebKit/Source/core/frame/FullscreenController.cpp
index bac937c32b0fd398e9873bd8c6f64d27b2a32be2..ce21bdb161d574109a03a120b6d4709a446d626c 100644
--- a/third_party/WebKit/Source/core/frame/FullscreenController.cpp
+++ b/third_party/WebKit/Source/core/frame/FullscreenController.cpp
@@ -74,7 +74,7 @@ void FullscreenController::DidEnterFullscreen() {
UpdatePageScaleConstraints(false);
web_view_base_->SetPageScaleFactor(1.0f);
if (web_view_base_->MainFrame()->IsWebLocalFrame())
- web_view_base_->MainFrame()->SetScrollOffset(WebSize());
+ web_view_base_->MainFrame()->ToWebLocalFrame()->SetScrollOffset(WebSize());
web_view_base_->SetVisualViewportOffset(FloatPoint());
state_ = State::kFullscreen;
@@ -153,7 +153,7 @@ void FullscreenController::EnterFullscreen(LocalFrame& frame) {
initial_page_scale_factor_ = web_view_base_->PageScaleFactor();
initial_scroll_offset_ =
web_view_base_->MainFrame()->IsWebLocalFrame()
- ? web_view_base_->MainFrame()->GetScrollOffset()
+ ? web_view_base_->MainFrame()->ToWebLocalFrame()->GetScrollOffset()
: WebSize();
initial_visual_viewport_offset_ = web_view_base_->VisualViewportOffset();
initial_background_color_override_enabled_ =
@@ -261,7 +261,7 @@ void FullscreenController::DidUpdateLayout() {
web_view_base_->SetPageScaleFactor(initial_page_scale_factor_);
if (web_view_base_->MainFrame()->IsWebLocalFrame()) {
- web_view_base_->MainFrame()->SetScrollOffset(
+ web_view_base_->MainFrame()->ToWebLocalFrame()->SetScrollOffset(
WebSize(initial_scroll_offset_));
}
web_view_base_->SetVisualViewportOffset(initial_visual_viewport_offset_);

Powered by Google App Engine
This is Rietveld 408576698