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

Issue 2936423003: Move Get/SetScrollOffset methods from WebFrame to WebLocalFrame. (Closed)

Created:
3 years, 6 months ago by Łukasz Anforowicz
Modified:
3 years, 6 months ago
Reviewers:
Lei Zhang, alexmos, dcheng
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, blink-reviews-api_chromium.org, pfeldman+blink_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, blink-reviews-frames_chromium.org, platform-architecture-syd+reviews-web_chromium.org, kinuko+watch, kozyatinskiy+blink_chromium.org, Wei Li
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Move Get/SetScrollOffset methods from WebFrame to WebLocalFrame. Most callers already call through WebLocalFrame. In the 3 cases where the caller cannot guarantee that the main frame is local, this CL drops the NOTREACHED part of WebRemoteFrameImpl implementations, but otherwise preserves the old behavior of returning zero WebSize in case of GetScrollOffset and having no-op behavior in case of SetScrollOffset: - DevToolsEmulator::ApplyViewportOverride - DevToolsEmulator::HandleInputEvent - WebViewImpl::WidenRectWithinPageBounds BUG=416660 Review-Url: https://codereview.chromium.org/2936423003 Cr-Commit-Position: refs/heads/master@{#481196} Committed: https://chromium.googlesource.com/chromium/src/+/29d4ee41e5b378d6ecac6e4fe7ec2ef84f5ed2b6

Patch Set 1 #

Total comments: 4

Patch Set 2 : Added TODOs as suggested by dcheng@ (this patchset also accidentally includes a rebase...). #

Total comments: 5

Patch Set 3 : Added comments and TODOs for OOPIF support in PrepareFrameAndViewForPrint. #

Patch Set 4 : Use WebViewHelper::LocalMainFrame() where possible. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -84 lines) Patch
M components/printing/renderer/print_web_view_helper.cc View 1 2 2 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.cpp View 1 2 3 1 chunk +0 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FullscreenController.cpp View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/DevToolsEmulator.cpp View 1 3 chunks +11 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 3 4 chunks +10 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/BrowserControlsTest.cpp View 1 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/tests/ProgrammaticScrollTest.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/VisualViewportTest.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 2 3 10 chunks +16 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 1 2 3 16 chunks +32 lines, -32 lines 0 comments Download
M third_party/WebKit/public/web/WebFrame.h View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/public/web/WebLocalFrame.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (25 generated)
Łukasz Anforowicz
dcheng@, could you PTAL?
3 years, 6 months ago (2017-06-15 23:21:32 UTC) #8
dcheng
https://codereview.chromium.org/2936423003/diff/1/third_party/WebKit/Source/core/inspector/DevToolsEmulator.cpp File third_party/WebKit/Source/core/inspector/DevToolsEmulator.cpp (right): https://codereview.chromium.org/2936423003/diff/1/third_party/WebKit/Source/core/inspector/DevToolsEmulator.cpp#newcode439 third_party/WebKit/Source/core/inspector/DevToolsEmulator.cpp:439: : WebSize(); Do we need TODOs here for OOPIFs? ...
3 years, 6 months ago (2017-06-16 00:03:41 UTC) #9
Łukasz Anforowicz
I've opened bugs and added the suggested TODOs in the latest patchset (which accidentally also ...
3 years, 6 months ago (2017-06-16 21:28:13 UTC) #12
dcheng
https://codereview.chromium.org/2936423003/diff/20001/components/printing/renderer/print_web_view_helper.cc File components/printing/renderer/print_web_view_helper.cc (right): https://codereview.chromium.org/2936423003/diff/20001/components/printing/renderer/print_web_view_helper.cc#newcode762 components/printing/renderer/print_web_view_helper.cc:762: if (web_frame->IsWebLocalFrame()) I wonder about this code. Isn't it ...
3 years, 6 months ago (2017-06-16 23:52:20 UTC) #14
alexmos
https://codereview.chromium.org/2936423003/diff/20001/third_party/WebKit/Source/core/frame/FullscreenController.cpp File third_party/WebKit/Source/core/frame/FullscreenController.cpp (right): https://codereview.chromium.org/2936423003/diff/20001/third_party/WebKit/Source/core/frame/FullscreenController.cpp#newcode77 third_party/WebKit/Source/core/frame/FullscreenController.cpp:77: web_view_base_->MainFrame()->ToWebLocalFrame()->SetScrollOffset(WebSize()); On 2017/06/16 23:52:20, dcheng wrote: > +alexmos, is ...
3 years, 6 months ago (2017-06-17 00:04:02 UTC) #17
Łukasz Anforowicz
Thanks for the review Daniel and making sure we track all the remaining OOPIF support ...
3 years, 6 months ago (2017-06-19 23:58:08 UTC) #20
dcheng
LGTM, thanks for adding the TODOs.
3 years, 6 months ago (2017-06-20 21:16:16 UTC) #23
Łukasz Anforowicz
thestig@, could you PTAL @ the changes in components/printing/renderer/print_web_view_helper.cc? (I am also adding weili@ to ...
3 years, 6 months ago (2017-06-20 21:35:37 UTC) #27
Lei Zhang
lgtm
3 years, 6 months ago (2017-06-21 07:42:43 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2936423003/60001
3 years, 6 months ago (2017-06-21 14:06:54 UTC) #33
commit-bot: I haz the power
3 years, 6 months ago (2017-06-21 14:10:32 UTC) #36
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/29d4ee41e5b378d6ecac6e4fe7ec...

Powered by Google App Engine
This is Rietveld 408576698