Chromium Code Reviews| Index: components/printing/renderer/print_web_view_helper.cc |
| diff --git a/components/printing/renderer/print_web_view_helper.cc b/components/printing/renderer/print_web_view_helper.cc |
| index fba82e03c92b2852485624fed2758c51c93de2d0..1e022dac8a952f564bbf891c1930346cd994270b 100644 |
| --- a/components/printing/renderer/print_web_view_helper.cc |
| +++ b/components/printing/renderer/print_web_view_helper.cc |
| @@ -760,7 +760,7 @@ void PrepareFrameAndViewForPrint::ResizeForPrinting() { |
| blink::WebView* web_view = frame_.view(); |
| if (blink::WebFrame* web_frame = web_view->MainFrame()) { |
| if (web_frame->IsWebLocalFrame()) |
|
dcheng
2017/06/16 23:52:20
I wonder about this code. Isn't it always the case
Łukasz Anforowicz
2017/06/19 23:58:08
Agreed that |frame_| is always a local frame. I t
|
| - prev_scroll_offset_ = web_frame->GetScrollOffset(); |
| + prev_scroll_offset_ = web_frame->ToWebLocalFrame()->GetScrollOffset(); |
| } |
| prev_view_size_ = web_view->Size(); |
| @@ -862,7 +862,7 @@ void PrepareFrameAndViewForPrint::RestoreSize() { |
| web_view->Resize(prev_view_size_); |
| if (blink::WebFrame* web_frame = web_view->MainFrame()) { |
| if (web_frame->IsWebLocalFrame()) |
| - web_frame->SetScrollOffset(prev_scroll_offset_); |
| + web_frame->ToWebLocalFrame()->SetScrollOffset(prev_scroll_offset_); |
|
dcheng
2017/06/16 23:52:20
Ditto: maybe I am misunderstanding this code?
|
| } |
| } |