| Index: content/renderer/render_frame_impl.cc
|
| diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
| index 7b5b70b4f2c14352e66aa7114a3fdb14be329f2f..7bb0c21d4186d1e4b58156d41431a14348a2dcd4 100644
|
| --- a/content/renderer/render_frame_impl.cc
|
| +++ b/content/renderer/render_frame_impl.cc
|
| @@ -100,6 +100,7 @@
|
| #include "content/renderer/effective_connection_type_helper.h"
|
| #include "content/renderer/external_popup_menu.h"
|
| #include "content/renderer/gpu/gpu_benchmarking_extension.h"
|
| +#include "content/renderer/gpu/render_widget_compositor.h"
|
| #include "content/renderer/history_controller.h"
|
| #include "content/renderer/history_serialization.h"
|
| #include "content/renderer/image_downloader/image_downloader_impl.h"
|
| @@ -1575,6 +1576,8 @@ bool RenderFrameImpl::OnMessageReceived(const IPC::Message& msg) {
|
| OnSuppressFurtherDialogs)
|
| IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse)
|
| IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedElement, OnClearFocusedElement)
|
| + IPC_MESSAGE_HANDLER(FrameMsg_SetPageScaleFactor,
|
| + OnSetPageScaleFactorForSubframe);
|
| #if defined(OS_ANDROID)
|
| IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult,
|
| OnActivateNearestFindResult)
|
| @@ -4515,6 +4518,11 @@ void RenderFrameImpl::didChangeScrollOffset(blink::WebLocalFrame* frame) {
|
| observer.DidChangeScrollOffset();
|
| }
|
|
|
| +void RenderFrameImpl::didRestorePageScaleFactorOnLoad(float page_scale) {
|
| + // Notify the web contents so it can update cross-process frames.
|
| + Send(new FrameHostMsg_RestorePageScaleFactorOnLoad(routing_id_, page_scale));
|
| +}
|
| +
|
| void RenderFrameImpl::willInsertBody(blink::WebLocalFrame* frame) {
|
| DCHECK(!frame_ || frame_ == frame);
|
| if (!frame->parent()) {
|
| @@ -6885,4 +6893,16 @@ void RenderFrameImpl::RenderWidgetWillHandleMouseEvent() {
|
| #endif
|
| }
|
|
|
| +void RenderFrameImpl::OnSetPageScaleFactorForSubframe(
|
| + double page_scale_factor) {
|
| + if (is_main_frame_) {
|
| + NOTREACHED();
|
| + return;
|
| + }
|
| +
|
| + RenderWidgetCompositor* widget_compositor = GetRenderWidget()->compositor();
|
| + if (widget_compositor)
|
| + widget_compositor->SetPageScaleFactorForSubframe(page_scale_factor);
|
| +}
|
| +
|
| } // namespace content
|
|
|