New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 912193 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 689777

Blocking:
issue 419087



Sign in to add a comment

Split WebView and WebWidget implementations

Project Member Reported by danakj@chromium.org, Dec 5

Issue description

WebViewImpl is both today, but we should give them separate objects and lifetimes. WebWidget should only exist when using compositing. It should be tied to lifetime of the main frame, almost certainly (and one per frame). At this point WebViewFrameWidget could go away, I beleive, replaced with the split-out WebWidget impl.

Subframes can continue to use WebFrameWidgetImpl, but not clear if that could also be used for the main frame as the impl of WebWidget. Right now, no, but these two things (view and main widget) are tangled up. Maybe if we moved all the view specific things to WebView appropriately it could.

re WebViewTest.SetBaseBackgroundColorBeforeMainFrame:
- BackgroundColor() getter should be a view thing
- WidgetMsg_SetBackgroundOpaque should be a ViewMsg
- RenderWidget::OnSetBackgroundOpaque but it only acts for main frames and seems like it wants to persist across main frames like its more like a page prop

re focus vs active
- WidgetMsg_SetActive should be a ViewMsg
- We have SetFocus going to input handler posting to main thread RenderWidget
- We also have page level SetActive
- WebView::SetIsActive vs WebWidget::SetFocused
- WebWidget::SetFocused only sets active on the page, not inactive ??? But always sets SetFocused().
- Can we make a single signal/state instead of 2 ? Is one per-widget and one per-page ??
- Tests do `web_view_->GetPage()->GetFocusController().SetActive(true);` instead of going through the WebView or WebWidget. Does other code do this too ?? oh god. WebPagePopupImpl does. WebFrameWidgetImpl does.
- WebView also has SetInitialFocus() which acts on the main frame. Should possibly be part of WebWidget, though also interacts with Page.
- child local roots don't know about focus correctly, which probably means main frame widgets won't either if we separate them from the view enough. we likely fix both at once. https://bugs.chromium.org/p/chromium/issues/detail?id=689777

re Close
- Close() is on WebWidget, but also closes the WebView
- They should probably each have their own Close once they split.

re Resizing
- Resize() is a WebWidget method, but
- ResizeWithBrowserControls is a WebView method
- Should these both be on the same API? The first is implemented by calling the second.
- WebFrameWidgetImpl Resize code has some "MainFrame" stuff in its names that seems to be incorrect, as it actually just acts on its frame which can be (always is atm) a subframe.

* re popups
* - GetPagePopup() is part of WebWidget but is only ever called for the main frame, and as per its name, is related to the Page not the Widget.
* - Should move GetPagePopup() to WebView.
* - As an extra treat WebViewImpl overrides this but changes the return type of GetPagePopup to WebPagePopupImpl - an internal blink type.

re visual viewport
- ResizeVisualViewport() is part of WebWidget but only modifies values on Page, should be WebView?

re cursor visibility
- WebViewImpl::SetCursorVisibilityState() changes page state only but is a WebWidget method.
- It is called from a RenderWidget IPC

* = done
 
Blocking: 419087
re WebViewTest.SetBaseBackgroundColorBeforeMainFrame:
- BackgroundColor() getter should be a view thing
- WidgetMsg_SetBackgroundOpaque should be a ViewMsg
- RenderWidget::OnSetBackgroundOpaque but it only acts for main frames and seems like it wants to persist across main frames like its more like a page prop

re focus vs active
- WidgetMsg_SetActive should be a ViewMsg
- We have SetFocus going to input handler posting to main thread RenderWidget
- We also have page level SetActive
- WebView::SetIsActive vs WebWidget::SetFocused
- WebWidget::SetFocused only sets active on the page, not inactive ??? But always sets SetFocused().
- Can we make a single signal/state instead of 2 ? Is one per-widget and one per-page ??
- Tests do `web_view_->GetPage()->GetFocusController().SetActive(true);` instead of going through the WebView or WebWidget. Does other code do this too ?? oh god. WebPagePopupImpl does. WebFrameWidgetImpl does.

Cc: a...@chromium.org enne@chromium.org piman@chromium.org
re focus con't
- WebView also has SetInitialFocus() which acts on the main frame. Should possibly be part of WebWidget, though also interacts with Page.

re Close
- Close() is on WebWidget, but also closes the WebView
- They should probably each have their own Close once they split.

re Resizing
- Resize() is a WebWidget method, but
- ResizeWithBrowserControls is a WebView method
- Should these both be on the same API? The first is implemented by calling the second.
- WebFrameWidgetImpl Resize code has some "MainFrame" stuff in its names that seems to be incorrect, as it actually just acts on its frame which can be (always is atm) a subframe.
re popups
- GetPagePopup() is part of WebWidget but is only ever called for the main frame, and as per its name, is related to the Page not the Widget.
- Should move GetPagePopup() to WebView.
- As an extra treat WebViewImpl overrides this but changes the return type of GetPagePopup to WebPagePopupImpl - an internal blink type.

re visual viewport
- ResizeVisualViewport() is part of WebWidget but only modifies values on Page, should be WebView?


Project Member

Comment 6 by bugdroid1@chromium.org, Dec 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/497a616eccb04d08841535091b1ab4c9c3599a72

commit 497a616eccb04d08841535091b1ab4c9c3599a72
Author: danakj <danakj@chromium.org>
Date: Thu Dec 06 20:35:48 2018

Make WebWidget methods on WebView private.

Callers should go through WebView's MainFrameWidget() to get to them.
While WebViewImpl inherits privately from WebWidget, the overrides of
its methods were all public. This moves them to the private section
with the single exception of GetPagePopup(). This method probably
belongs on WebView, but WebViewImpl changes its return type, so it's
harder to simply move mechanically. A TODO is left for that one.

This change is mechanical and not opinionated. All callers that failed
to compile are simply switched to call MainFrameWidget()-> in order to
get to the methods.

R=dcheng@chromium.org

Change-Id: I44cb270a97f3a4034f00c00631dad8631678ef53
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1363855
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614479}
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/public/web/web_view.h
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/animation/compositor_animations_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/editing/finder/text_finder_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/editing/link_selection_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/events/web_input_event_conversion_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/exported/web_frame_serializer_sanitization_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/exported/web_frame_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/exported/web_layer_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/exported/web_node_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/exported/web_plugin_container_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/exported/web_view_impl.h
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/exported/web_view_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/frame/browser_controls_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/frame/document_loading_rendering_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/frame/frame_overlay_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/frame/frame_test_helpers.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/frame/fullscreen_controller.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/frame/rotation_viewport_anchor_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/frame/visual_viewport_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/html/anchor_element_metrics_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/html/forms/external_popup_menu_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/html/image_document_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/html/imports/html_import_sheets_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/html/lazy_load_frame_observer_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/html/media_element_filling_viewport_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/input/event_handler_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/input/ime_on_focus_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/input/overscroll_behavior_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/input/pointer_event_manager_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/input/scroll_snap_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/input/touch_action_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/input/touch_event_manager_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/intersection_observer/intersection_observer_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/layout/scrollbars_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/loader/programmatic_scroll_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/page/autoscroll_controller_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/page/chrome_client_impl.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/page/drag_controller_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/page/scrolling/root_scroller_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/page/scrolling/scroll_into_view_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/page/scrolling/scroll_metrics_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/page/viewport_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/paint/link_highlight_impl_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/scheduler/frame_throttling_test.cc
[modify] https://crrev.com/497a616eccb04d08841535091b1ab4c9c3599a72/third_party/blink/renderer/core/testing/sim/sim_compositor.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Dec 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/53f46b89a44013ec4ffece80fe3f1f044e4a4f49

commit 53f46b89a44013ec4ffece80fe3f1f044e4a4f49
Author: danakj <danakj@chromium.org>
Date: Tue Dec 11 20:55:55 2018

Remove ScheduleAnimation plumbing in WebFrameWidget/WebView/LayerTreeView.

Have ChromeClient go directly to WebWidgetClient instead of through the
WebFrameWidget. The WebFrameWidgetImpl would go either to the compositor
(which always exists) or to WebWidgetClient. The latter path was dead.
Similar in WebViewImpl.

Then when ChromeClient (via plumbing..) would ping the compositor, it
would callback to RenderWidget to say RequestScheduleAnimation() for
single-thread-no-scheduler tests. This would redirect to
WebWidgetClient (empty for RenderWidget) in order to pick up test
overrides.

Instead, ChromeClient goes to WebWidetClient which is RenderWidget (or
test overrides). RenderWidget goes to the compositor.

Then we don't need the callback from the compositor anymore, so remove
it and change tests to watch ScheduleAnimation() as needed directly
instead.

WebLayerTreeView also has an equivalent of ScheduleAnimation() which
would get to the test harness by round-tripping through cc. Instead of
re-routing it, remove that API and have callers go through the
WebWidgetClient to ScheduleAnimation().

R=dcheng@chromium.org
TBR=dcheng for components/

Change-Id: I3c1a5a4c2c6dfc8008067891531b35e5d845b4ba
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1369032
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615656}
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/cc/test/stub_layer_tree_host_single_thread_client.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/cc/trees/layer_tree_host.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/cc/trees/layer_tree_host.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/cc/trees/layer_tree_host_single_thread_client.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/cc/trees/layer_tree_host_unittest.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/cc/trees/single_thread_proxy.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/components/plugins/renderer/webview_plugin.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/content/renderer/compositor/layer_tree_view.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/content/renderer/compositor/layer_tree_view.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/content/renderer/compositor/layer_tree_view_delegate.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/content/renderer/render_view_impl.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/content/renderer/render_view_impl.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/content/renderer/render_widget.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/content/renderer/render_widget.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/content/renderer/render_widget_owner_delegate.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/content/renderer/render_widget_unittest.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/content/shell/test_runner/web_view_test_proxy.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/content/shell/test_runner/web_view_test_proxy.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/content/shell/test_runner/web_widget_test_client.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/content/shell/test_runner/web_widget_test_proxy.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/content/test/stub_layer_tree_view_delegate.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/third_party/blink/public/platform/web_layer_tree_view.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/third_party/blink/public/web/web_widget_client.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/third_party/blink/renderer/core/exported/web_page_popup_impl.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/third_party/blink/renderer/core/exported/web_view_impl.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/third_party/blink/renderer/core/exported/web_view_impl.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/third_party/blink/renderer/core/exported/web_view_test.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/third_party/blink/renderer/core/frame/frame_test_helpers.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/third_party/blink/renderer/core/frame/web_frame_widget_base.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/third_party/blink/renderer/core/frame/web_frame_widget_impl.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/third_party/blink/renderer/core/frame/web_view_frame_widget.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/third_party/blink/renderer/core/frame/web_view_frame_widget.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/third_party/blink/renderer/core/page/chrome_client_impl.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/third_party/blink/renderer/core/testing/sim/sim_compositor.cc
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/third_party/blink/renderer/core/testing/sim/sim_compositor.h
[modify] https://crrev.com/53f46b89a44013ec4ffece80fe3f1f044e4a4f49/third_party/blink/renderer/core/testing/sim/sim_test.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Dec 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3788017f9d2c2904fb37b9df12e3134490ca98c2

commit 3788017f9d2c2904fb37b9df12e3134490ca98c2
Author: danakj <danakj@chromium.org>
Date: Tue Dec 11 21:33:01 2018

Split TestWebViewClient and TestWebWidgetClient.

WebViewClient and WebWidgetClient no longer inherit each other, do the
same with these test overrides.

WebViewHelper takes a TestWebViewClient and if null makes one itself.
Similarly TestWebViewClient takes a TestWebWidgetClient, and if null
makes one itself. Then WebViewHelper gets the WebWidgetClient from
the WebViewClient, avoiding us having 2 channels for this object
through WebViewHelper.

R=dcheng@chromium.org

Change-Id: If9ba127bafc19a8a881c971aefdb25c201656d51
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1370720
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615669}
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/css/style_engine_test.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/exported/web_frame_test.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/exported/web_layer_test.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/exported/web_view_test.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/frame/browser_controls_test.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/frame/frame_serializer_test.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/frame/frame_test_helpers.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/frame/frame_test_helpers.h
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/frame/visual_viewport_test.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/input/ime_on_focus_test.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/input/touch_action_test.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/layout/scrollbars_test.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/page/chrome_client_impl_test.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/page/scrolling/root_scroller_test.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator_test.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/page/spatial_navigation_test.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/page/viewport_test.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/testing/sim/sim_compositor.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/testing/sim/sim_compositor.h
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/testing/sim/sim_test.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/testing/sim/sim_test.h
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/testing/sim/sim_web_view_client.cc
[modify] https://crrev.com/3788017f9d2c2904fb37b9df12e3134490ca98c2/third_party/blink/renderer/core/testing/sim/sim_web_view_client.h

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/573f46751824b8dcfbec675291eacc8c581ae441

commit 573f46751824b8dcfbec675291eacc8c581ae441
Author: danakj <danakj@chromium.org>
Date: Tue Dec 11 22:50:40 2018

Remove code to store the last popup transiently in WebFrameWidgetImpl

This code was copied over from WebViewImpl when adding the HidePopups
call in order to have a pinch zoom or scroll tap outside the current
popup in a non-main-frame-local-rooted iframe hide the current popup.

This is modifying state on WebViewImpl meant to track between TapDown
and Tap, to avoid the Tap showing a popup that was hidden by TapDown.

WebFrameWidgetImpl does not show popups on Tap, and if it did, it
should track this transient state locally not on WebViewImpl.

Also remove the undocumented FALLTHROUGH which was not explained
in 671732 as it now goes to nothing.

R=dcheng@chromium.org

Change-Id: I9d67539cf0afbb9db239b73bf83418e1a877e6db
Bug: 912193,  671732 
Reviewed-on: https://chromium-review.googlesource.com/c/1372539
Reviewed-by: James MacLean <wjmaclean@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615708}
[modify] https://crrev.com/573f46751824b8dcfbec675291eacc8c581ae441/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Dec 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dc76bd1252ad56309ecad13729305c94b1f57ba7

commit dc76bd1252ad56309ecad13729305c94b1f57ba7
Author: Alice Boxhall <aboxhall@chromium.org>
Date: Wed Dec 12 02:11:12 2018

Revert "Remove code to store the last popup transiently in WebFrameWidgetImpl"

This reverts commit 573f46751824b8dcfbec675291eacc8c581ae441.

Reason for revert: Seems to be causing EffectiveTouchActionPropagatesAcrossNestedFrames to fail https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8927388648425983952/+/steps/content_browsertests_on_Intel_GPU_on_Mac_on_Mac-10.12.6/0/logs/SitePerProcessBrowserTouchActionTest.EffectiveTouchActionPropagatesAcrossNestedFrames/0

Original change's description:
> Remove code to store the last popup transiently in WebFrameWidgetImpl
> 
> This code was copied over from WebViewImpl when adding the HidePopups
> call in order to have a pinch zoom or scroll tap outside the current
> popup in a non-main-frame-local-rooted iframe hide the current popup.
> 
> This is modifying state on WebViewImpl meant to track between TapDown
> and Tap, to avoid the Tap showing a popup that was hidden by TapDown.
> 
> WebFrameWidgetImpl does not show popups on Tap, and if it did, it
> should track this transient state locally not on WebViewImpl.
> 
> Also remove the undocumented FALLTHROUGH which was not explained
> in 671732 as it now goes to nothing.
> 
> R=​dcheng@chromium.org
> 
> Change-Id: I9d67539cf0afbb9db239b73bf83418e1a877e6db
> Bug: 912193,  671732 
> Reviewed-on: https://chromium-review.googlesource.com/c/1372539
> Reviewed-by: James MacLean <wjmaclean@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Commit-Queue: danakj <danakj@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#615708}

TBR=danakj@chromium.org,dcheng@chromium.org,wjmaclean@chromium.org

Change-Id: Ifddbb605fc6165505774105d5618d57b62e3159c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 912193,  671732 
Reviewed-on: https://chromium-review.googlesource.com/c/1372110
Reviewed-by: Alice Boxhall <aboxhall@chromium.org>
Commit-Queue: Alice Boxhall <aboxhall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615783}
[modify] https://crrev.com/dc76bd1252ad56309ecad13729305c94b1f57ba7/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc

Blockedon: 689777
re focus con't: https://bugs.chromium.org/p/chromium/issues/detail?id=689777

I'm going to smush all my comments up into #0
Description: Show this description
Description: Show this description
Description: Show this description
Description: Show this description
Project Member

Comment 16 by bugdroid1@chromium.org, Dec 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/72ac928f90e123b0a0fd54e3be0f6ab1fb79812d

commit 72ac928f90e123b0a0fd54e3be0f6ab1fb79812d
Author: danakj <danakj@chromium.org>
Date: Wed Dec 12 16:53:02 2018

Reland "Remove code to store the last popup transiently in WebFrameWidgetImpl"

This is a reland of 573f46751824b8dcfbec675291eacc8c581ae441

Was reverted because SitePerProcessBrowserTouchActionTest.EffectiveTouchActionPropagatesAcrossNestedFrames
failed when it landed. But the test went back to green for a few runs before
this was reverted, so I don't think it was at fault. We'll see if it starts
failing again on reland, and I'll watch the mac bots here in the CQ.

TBR=dcheng

Original change's description:
> Remove code to store the last popup transiently in WebFrameWidgetImpl
>
> This code was copied over from WebViewImpl when adding the HidePopups
> call in order to have a pinch zoom or scroll tap outside the current
> popup in a non-main-frame-local-rooted iframe hide the current popup.
>
> This is modifying state on WebViewImpl meant to track between TapDown
> and Tap, to avoid the Tap showing a popup that was hidden by TapDown.
>
> WebFrameWidgetImpl does not show popups on Tap, and if it did, it
> should track this transient state locally not on WebViewImpl.
>
> Also remove the undocumented FALLTHROUGH which was not explained
> in 671732 as it now goes to nothing.
>
> R=dcheng@chromium.org
>
> Change-Id: I9d67539cf0afbb9db239b73bf83418e1a877e6db
> Bug: 912193,  671732 
> Reviewed-on: https://chromium-review.googlesource.com/c/1372539
> Reviewed-by: James MacLean <wjmaclean@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Commit-Queue: danakj <danakj@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#615708}

Bug: 912193,  671732 
Change-Id: I18e8e146b5b525239d1667e267d44fa8a295599d
Reviewed-on: https://chromium-review.googlesource.com/c/1374193
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615925}
[modify] https://crrev.com/72ac928f90e123b0a0fd54e3be0f6ab1fb79812d/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc

Project Member

Comment 17 by bugdroid1@chromium.org, Dec 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/89ae4532e2e5a3d32a205c15b2e17e74da6617ad

commit 89ae4532e2e5a3d32a205c15b2e17e74da6617ad
Author: danakj <danakj@chromium.org>
Date: Wed Dec 12 22:52:55 2018

Clean up RenderWidget type logic for main- vs sub-frames.

Remove RenderWidget::WidgetType, replace it with for_frame(), which can
derive an answer from the presence of owner_delegate_ (for a main frame)
and for_child_local_root_frame_ (for sub frames).

This changes pepper plugin widgets from being considered frames to not,
which seems okay. One piece of code wanted to run only for popup widgets
but its in SetWindowRect which is not used on the pepper widget.

Remove use of IsWebView() and IsWebFrameWidget() on the WebWidget from
RenderWidget. Instead use for_frame() or its derivative parts.

We want to stop checking for the presence of a WebFrameWidget and drop
IPCs early when a RenderWidget is frozen, but there's one bug that
prevents that still as the Frame (and FrameWidget) can be detached
without freezing the RenderWidget (crbug.com/906340#c7).

R=ajwong@chromium.org, avi@chromium.org

Change-Id: I83589e2b0cf5a4c68dde77eaae87404ba1de4cc0
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1373887
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Albert J. Wong <ajwong@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616093}
[modify] https://crrev.com/89ae4532e2e5a3d32a205c15b2e17e74da6617ad/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/89ae4532e2e5a3d32a205c15b2e17e74da6617ad/content/renderer/render_frame_impl.h
[modify] https://crrev.com/89ae4532e2e5a3d32a205c15b2e17e74da6617ad/content/renderer/render_view_impl.cc
[modify] https://crrev.com/89ae4532e2e5a3d32a205c15b2e17e74da6617ad/content/renderer/render_widget.cc
[modify] https://crrev.com/89ae4532e2e5a3d32a205c15b2e17e74da6617ad/content/renderer/render_widget.h
[modify] https://crrev.com/89ae4532e2e5a3d32a205c15b2e17e74da6617ad/content/renderer/render_widget_fullscreen_pepper.cc
[modify] https://crrev.com/89ae4532e2e5a3d32a205c15b2e17e74da6617ad/content/renderer/render_widget_unittest.cc
[modify] https://crrev.com/89ae4532e2e5a3d32a205c15b2e17e74da6617ad/content/test/web_test_support.cc

Project Member

Comment 18 by bugdroid1@chromium.org, Dec 13

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610

commit a5c39d5f43575a87c7f6b6c858b3ee5c3be24610
Author: danakj <danakj@chromium.org>
Date: Thu Dec 13 22:20:56 2018

Clean up WebPagePopup APIs and move them from WebWidget to WebView.

This moves WebWidget::GetPagePopup() to WebView, as there is only 1
popup per view, not per widget. WebTest code was grabbing the popup
off the WebWidget and is changed to grab it from the WebView instead
when the WebWidget is for the main frame (which it always is right now
but we add conditions for correctness regardless).

WebViewImpl had a bunch of ways to close the current popup, and we
remove most of the redundant ways: HideSelectPopup() is removed.
HidePopups() is removed, and CancelPagePopup() is changed to replace
it.

SetLastHiddenPagePopup() is removed from the public API of WebViewImpl
as it is no longer used externally, and code inside changed to use the
variable directly.

WebPagePopupClient::ClosePopup() is renamed to CancelPopup() to give
consistent naming throughout the Cancel code.

WebViewTestProxy changed to defer WidgetClient() through to the
WebViewTestClient, like it does for other methods, and we pass the
ProxyWebWidgetClient to the WebViewTestClient for it to hand out,
instead of giving it null.

R=dcheng@chromium.org
TBR=

Change-Id: Ibaddec943ead28153290cd03a3d94790ac5d4fe0
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1372657
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616455}
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/android_webview/renderer/aw_render_frame_ext.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/content/renderer/render_view_impl.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/content/shell/renderer/web_test/web_test_render_frame_observer.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/content/shell/test_runner/event_sender.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/content/shell/test_runner/layout_and_paint_async_then.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/content/shell/test_runner/layout_and_paint_async_then.h
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/content/shell/test_runner/pixel_dump.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/content/shell/test_runner/test_runner_for_specific_view.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/content/shell/test_runner/web_test_interfaces.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/content/shell/test_runner/web_test_interfaces.h
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/content/shell/test_runner/web_view_test_proxy.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/content/shell/test_runner/web_view_test_proxy.h
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/content/shell/test_runner/web_widget_test_client.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/content/shell/test_runner/web_widget_test_client.h
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/content/shell/test_runner/web_widget_test_proxy.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/third_party/blink/public/web/web_view.h
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/third_party/blink/public/web/web_widget.h
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/third_party/blink/renderer/core/exported/web_page_popup_impl.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/third_party/blink/renderer/core/exported/web_view_impl.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/third_party/blink/renderer/core/exported/web_view_impl.h
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/third_party/blink/renderer/core/frame/web_view_frame_widget.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/third_party/blink/renderer/core/frame/web_view_frame_widget.h
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/third_party/blink/renderer/core/html/forms/color_chooser_popup_ui_controller.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/third_party/blink/renderer/core/html/forms/color_chooser_popup_ui_controller.h
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/third_party/blink/renderer/core/html/forms/date_time_chooser_impl.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/third_party/blink/renderer/core/html/forms/date_time_chooser_impl.h
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/third_party/blink/renderer/core/html/forms/internal_popup_menu.cc
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/third_party/blink/renderer/core/html/forms/internal_popup_menu.h
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/third_party/blink/renderer/core/page/page_popup_client.h
[modify] https://crrev.com/a5c39d5f43575a87c7f6b6c858b3ee5c3be24610/third_party/blink/renderer/core/page/page_popup_controller.cc

EffectiveTouchActionPropagatesAcrossNestedFrames failed again:

https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/linux-chromeos-rel/17272
From https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=content_browsertests&tests=EffectiveTouchActionPropagatesAcrossNestedFrames it looks like EffectiveTouchActionPropagatesAcrossNestedFrames is consistently flaky, but has been flaky while my CL was not in the tree too.

It failed in this run (pass on retry): https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac10.11%20Tests/31680

Which was at 615821.
My popup CL landed 615708, reverted 615783, reland 615925.
So this flake was between revert and reland.
I filed 915270 for this test.
Project Member

Comment 22 by bugdroid1@chromium.org, Dec 14

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c497a559cf4e56d4ca95cdf87071e1555916bc77

commit c497a559cf4e56d4ca95cdf87071e1555916bc77
Author: danakj <danakj@chromium.org>
Date: Fri Dec 14 17:29:35 2018

Remove use of WebWidget's IsWebView() and IsWebFrameWidget().

Use is-main-frame logic instead, which will remain true as we convert
the WebWidget for the main frame away from a WebView to a
WebFrameWidget.

This removes a dependency on WebWidget being-a WebView.

R=avi@chromium.org, dcheng@chromium.org

Change-Id: I8af02679ba0aaff8ef638757e04a533b84ce364d
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1374463
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616725}
[modify] https://crrev.com/c497a559cf4e56d4ca95cdf87071e1555916bc77/content/shell/test_runner/web_view_test_proxy.cc
[modify] https://crrev.com/c497a559cf4e56d4ca95cdf87071e1555916bc77/content/shell/test_runner/web_widget_test_client.cc
[modify] https://crrev.com/c497a559cf4e56d4ca95cdf87071e1555916bc77/content/shell/test_runner/web_widget_test_client.h
[modify] https://crrev.com/c497a559cf4e56d4ca95cdf87071e1555916bc77/content/shell/test_runner/web_widget_test_proxy.cc
[modify] https://crrev.com/c497a559cf4e56d4ca95cdf87071e1555916bc77/content/shell/test_runner/web_widget_test_proxy.h
[modify] https://crrev.com/c497a559cf4e56d4ca95cdf87071e1555916bc77/content/test/web_test_support.cc

Project Member

Comment 23 by bugdroid1@chromium.org, Dec 14

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/19f3e51301b570e9edbd6c8b56b20e7c0466ac58

commit 19f3e51301b570e9edbd6c8b56b20e7c0466ac58
Author: danakj <danakj@chromium.org>
Date: Fri Dec 14 21:02:05 2018

Remove WebWidget::IsPagePopup() and IsWebView().

Neither is used anymore after this CL. IsPagePopup was only used to
verify a cast from WebWidget to WebPagePopupImpl. We can change the
type from WebWidget to WebPagePopup though, in which case it's not
needed and we get more clear code in the process :)

IsWebView() can not be true if the WebViewImpl is no longer also a
WebWidget, so remove it since we are going to make it always false.

R=dcheng@chromium.org

Change-Id: I040f5d62f1b88d825c8587104acdf0155bcef7f7
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1376092
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616817}
[modify] https://crrev.com/19f3e51301b570e9edbd6c8b56b20e7c0466ac58/content/renderer/render_view_impl.cc
[modify] https://crrev.com/19f3e51301b570e9edbd6c8b56b20e7c0466ac58/content/renderer/render_view_impl.h
[modify] https://crrev.com/19f3e51301b570e9edbd6c8b56b20e7c0466ac58/content/renderer/render_widget.h
[modify] https://crrev.com/19f3e51301b570e9edbd6c8b56b20e7c0466ac58/third_party/blink/public/web/web_view_client.h
[modify] https://crrev.com/19f3e51301b570e9edbd6c8b56b20e7c0466ac58/third_party/blink/public/web/web_widget.h
[modify] https://crrev.com/19f3e51301b570e9edbd6c8b56b20e7c0466ac58/third_party/blink/renderer/core/exported/web_page_popup_impl.h
[modify] https://crrev.com/19f3e51301b570e9edbd6c8b56b20e7c0466ac58/third_party/blink/renderer/core/exported/web_view_impl.cc
[modify] https://crrev.com/19f3e51301b570e9edbd6c8b56b20e7c0466ac58/third_party/blink/renderer/core/exported/web_view_impl.h
[modify] https://crrev.com/19f3e51301b570e9edbd6c8b56b20e7c0466ac58/third_party/blink/renderer/core/frame/web_view_frame_widget.h

Project Member

Comment 24 by bugdroid1@chromium.org, Dec 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a

commit d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a
Author: danakj <danakj@chromium.org>
Date: Fri Dec 21 23:06:09 2018

Move BackgroundColor from widgets and child frames to the WebView.

SetBackgroundOpaque() is a concept that applies only to WebViews, not to
WebWidgets. It is set by ChromeOS UI pieces, which each have their own
WebView/Page. It is also set by webview tag, which has its own WebView
contained inside another outer one. So we move the SetBackgroundOpaque()
methods and IPCs from RenderWidget to RenderView.

In the renderer, the WebWidget::BackgroundColor() is not used except
internally, so remove it from the WebWidget API. The WebFrameWidgetImpl
is only used for child frames, and during Initialize(), it will set its
background color to be overridden to transparent, preventing any future
colors to matter, unless the override was cleared. But since clearing
overrides only happens by IPC to the main frame widget (now to the
RenderView) that clearing can't happen. So remove all background color
code from WebFrameWidgetImpl, and just set the compositor's background
color to transparent during startup.

Android WebView and ChromeCast code was also setting the base background
color via the WebFrameWidget, but both are in code that corresponds to a
view, not a widget, so pass the value to WebViewImpl directly
instead by adding SetBaseBackgroundColor to the WebView API. Then we
remove all background color APIs from WebFrameWidget as well.

R=ajwong@chromium.org, avi@chromium.org, dcheng@chromium.org
TBR=dcheng

Change-Id: I3d83064d13836f286f8ebc89118b990bbdbb80d3
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1382861
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Reviewed-by: Albert J. Wong <ajwong@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618653}
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/android_webview/renderer/aw_render_frame_ext.cc
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/chromecast/renderer/cast_content_renderer_client.cc
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/browser/renderer_host/render_view_host_impl.cc
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/browser/renderer_host/render_view_host_impl.h
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/browser/renderer_host/render_view_host_unittest.cc
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/browser/renderer_host/render_widget_host_impl.h
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/browser/renderer_host/render_widget_host_owner_delegate.h
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/browser/renderer_host/render_widget_host_unittest.cc
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/browser/renderer_host/render_widget_host_view_base.cc
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/browser/renderer_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/browser/renderer_host/render_widget_host_view_mac.mm
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/common/view_messages.h
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/common/widget_messages.h
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/renderer/render_view_impl.cc
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/renderer/render_view_impl.h
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/renderer/render_widget.cc
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/renderer/render_widget.h
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/test/BUILD.gn
[add] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/test/stub_render_widget_host_owner_delegate.cc
[add] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/content/test/stub_render_widget_host_owner_delegate.h
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/third_party/blink/public/web/web_frame_widget.h
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/third_party/blink/public/web/web_view.h
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/third_party/blink/public/web/web_widget.h
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/third_party/blink/renderer/core/exported/web_view_impl.cc
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/third_party/blink/renderer/core/exported/web_view_impl.h
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/third_party/blink/renderer/core/exported/web_view_test.cc
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/third_party/blink/renderer/core/frame/web_frame_widget_impl.h
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/third_party/blink/renderer/core/frame/web_view_frame_widget.cc
[modify] https://crrev.com/d51fd53d74e3db5f790bf3f226fb9ba02c39bd8a/third_party/blink/renderer/core/frame/web_view_frame_widget.h

Project Member

Comment 25 by bugdroid1@chromium.org, Dec 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1eb4333cdffa000ccdedc8570259a4125a7b4f0c

commit 1eb4333cdffa000ccdedc8570259a4125a7b4f0c
Author: danakj <danakj@chromium.org>
Date: Fri Dec 21 23:29:15 2018

Add structs to WebViewImpl to hold members.

One struct holds things that will stay in the eventual WebViewImpl, and
the other holds things that will move to WebWidgetImpl once they are
split.

This will allow us to DCHECK that you're not inside a WebWidget API call
when you access ViewData, or vice versa. And it makes users clear within
the WebViewImpl class which one they are acting on, as we make a
decision where each variable belongs. It also allows us to do that
incrementally.

R=dcheng@chromium.org

Change-Id: I255cf0de838928e3f88c805563017702067e0d48
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1388920
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618666}
[modify] https://crrev.com/1eb4333cdffa000ccdedc8570259a4125a7b4f0c/third_party/blink/public/web/web_view_client.h
[modify] https://crrev.com/1eb4333cdffa000ccdedc8570259a4125a7b4f0c/third_party/blink/renderer/core/exported/web_view_impl.cc
[modify] https://crrev.com/1eb4333cdffa000ccdedc8570259a4125a7b4f0c/third_party/blink/renderer/core/exported/web_view_impl.h

Project Member

Comment 26 by bugdroid1@chromium.org, Jan 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5b84fad446f70aa6d48b0e3047c4388e2a8d638c

commit 5b84fad446f70aa6d48b0e3047c4388e2a8d638c
Author: danakj <danakj@chromium.org>
Date: Mon Jan 07 18:12:42 2019

Remove GetRenderViewHost() from the RenderWidgetHostOwnerDelegate.

For each caller of GetRenderViewHost(), which used to be a caller of
RenderViewHost::From(RenderWidgetHost*), add an appropriate method to
the owner delegate and call that directly instead.

Mostly this is pretty straightforward, and the code that called
GetRenderViewHost() to get something moves into RenderViewHostImpl (as
the impl of the owner delegate) which returns that something to the
RenderWidgetHost code.

One exception is that on mac we punch a hole in DEPS to allow use of
WebContents directly from the RenderWidgetHostView. In order to not
extend DEPS of web_contents.h beyond those files into the
RenderViewHostImpl implementation, we
a) Put GetWebContentsForWidget() behind #ifdef OS_MACOSX so the API
does not exist elsewhere.
b) Put the implementation of this into its own .cc file, which has
the appropriate DEPS hole punching applied to it.

This is all pretty sad looking to me, but it seems that the
RenderWidgetHostViewMac code should really be going through a delegate
and it is not, and this is the result.

R=asvitkine@chromium.org, avi@chromium.org
TBR=dcheng

Change-Id: I9a812381126f049a2f52e420bddde9d00e72f028
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1385467
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620379}
[modify] https://crrev.com/5b84fad446f70aa6d48b0e3047c4388e2a8d638c/content/browser/renderer_host/render_view_host_impl.cc
[modify] https://crrev.com/5b84fad446f70aa6d48b0e3047c4388e2a8d638c/content/browser/renderer_host/render_view_host_impl.h
[modify] https://crrev.com/5b84fad446f70aa6d48b0e3047c4388e2a8d638c/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/5b84fad446f70aa6d48b0e3047c4388e2a8d638c/content/browser/renderer_host/render_widget_host_impl.h
[modify] https://crrev.com/5b84fad446f70aa6d48b0e3047c4388e2a8d638c/content/browser/renderer_host/render_widget_host_owner_delegate.h
[modify] https://crrev.com/5b84fad446f70aa6d48b0e3047c4388e2a8d638c/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/5b84fad446f70aa6d48b0e3047c4388e2a8d638c/content/browser/renderer_host/render_widget_host_view_cocoa.mm
[modify] https://crrev.com/5b84fad446f70aa6d48b0e3047c4388e2a8d638c/content/browser/renderer_host/render_widget_host_view_mac.h
[modify] https://crrev.com/5b84fad446f70aa6d48b0e3047c4388e2a8d638c/content/browser/renderer_host/render_widget_host_view_mac.mm
[modify] https://crrev.com/5b84fad446f70aa6d48b0e3047c4388e2a8d638c/content/common/render_widget_host_ns_view.mojom
[modify] https://crrev.com/5b84fad446f70aa6d48b0e3047c4388e2a8d638c/content/test/stub_render_widget_host_owner_delegate.cc
[modify] https://crrev.com/5b84fad446f70aa6d48b0e3047c4388e2a8d638c/content/test/stub_render_widget_host_owner_delegate.h

Project Member

Comment 27 by bugdroid1@chromium.org, Jan 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a1ff1e7479fb4b4cf22c684d5663567ef5def75f

commit a1ff1e7479fb4b4cf22c684d5663567ef5def75f
Author: danakj <danakj@chromium.org>
Date: Tue Jan 08 16:27:34 2019

Remove WebViewClient::WidgetClient()

There need not be a WebWidget{Client} for a WebView in the future, so
we must ensure code that is for views does not rely on there being a
widget. To aid this you can no longer get a WebWidgetClient from a
WebViewClient.

Most of this change is for frame_test_helpers to pass in these two
things separately again. And then move the LayerTreeView from the
TestWebViewClient to the TestWebWidgetClient.

R=dcheng@chromium.org
TBR=avi

Change-Id: I9cac9dae2ca8abc98a71c603bdacdbf62129a222
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1389320
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620748}
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/components/plugins/renderer/webview_plugin.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/components/plugins/renderer/webview_plugin.h
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/components/printing/renderer/print_render_frame_helper.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/content/renderer/render_view_impl.h
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/content/shell/test_runner/web_view_test_client.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/content/shell/test_runner/web_view_test_client.h
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/content/shell/test_runner/web_view_test_proxy.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/content/shell/test_runner/web_view_test_proxy.h
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/public/web/web_view_client.h
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/css/style_engine_test.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/exported/web_frame_test.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/exported/web_layer_test.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/exported/web_view_test.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/frame/browser_controls_test.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/frame/frame_serializer_test.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/frame/frame_test_helpers.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/frame/frame_test_helpers.h
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/frame/visual_viewport_test.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/input/ime_on_focus_test.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/input/touch_action_test.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/layout/scrollbars_test.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/page/scrolling/main_thread_scrolling_reasons_test.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/page/scrolling/root_scroller_test.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator_test.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/page/viewport_test.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/testing/sim/sim_compositor.cc
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/testing/sim/sim_compositor.h
[modify] https://crrev.com/a1ff1e7479fb4b4cf22c684d5663567ef5def75f/third_party/blink/renderer/core/testing/sim/sim_test.cc

Project Member

Comment 28 by bugdroid1@chromium.org, Jan 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d0928c6372f3d55866f4c0822a783c11c0b9004e

commit d0928c6372f3d55866f4c0822a783c11c0b9004e
Author: danakj <danakj@chromium.org>
Date: Tue Jan 08 16:28:13 2019

Remove PaintContent's Page dependency and PaintContentIgnoringCompositing

PaintContentIgnoringCompositing is no longer used so remove it.

Meanwhile PaintContent was passing along the Page in order to get a
deprecated device scale from it. Instead grab the scale the recommended
way from the LocalFrameView.

R=dcheng@chromium.org

Change-Id: I83def77e5b58d2ef8eff337eb8817086208df770
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1399519
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620749}
[modify] https://crrev.com/d0928c6372f3d55866f4c0822a783c11c0b9004e/third_party/blink/public/web/web_widget.h
[modify] https://crrev.com/d0928c6372f3d55866f4c0822a783c11c0b9004e/third_party/blink/renderer/core/exported/web_frame_test.cc
[modify] https://crrev.com/d0928c6372f3d55866f4c0822a783c11c0b9004e/third_party/blink/renderer/core/exported/web_page_popup_impl.cc
[modify] https://crrev.com/d0928c6372f3d55866f4c0822a783c11c0b9004e/third_party/blink/renderer/core/exported/web_view_impl.cc
[modify] https://crrev.com/d0928c6372f3d55866f4c0822a783c11c0b9004e/third_party/blink/renderer/core/exported/web_view_impl.h
[modify] https://crrev.com/d0928c6372f3d55866f4c0822a783c11c0b9004e/third_party/blink/renderer/core/page/page_widget_delegate.cc
[modify] https://crrev.com/d0928c6372f3d55866f4c0822a783c11c0b9004e/third_party/blink/renderer/core/page/page_widget_delegate.h

Description: Show this description
Project Member

Comment 30 by bugdroid1@chromium.org, Jan 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f456aeefda399d09d0641f7670ebeabdad24e609

commit f456aeefda399d09d0641f7670ebeabdad24e609
Author: danakj <danakj@chromium.org>
Date: Wed Jan 09 20:34:46 2019

Move Page into the WebView portion of WebViewImpl.

Accessors of it grab it through AsView(). After this we will start to
add guards to prevent AsView() calls inside WebWidget API methods.

1st open question is if WebWidget APIs should be able to access the
main frame and if so if it should be through the WebView/Page or
elseways.

2nd open question is if WebView APIs using the Page should be allowed
to touch the frames (and frame views) at all.

R=dcheng@chromium.org

Change-Id: I141e5660d48ae5b3227aed8525e6f6999c6f6413
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1399742
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621292}
[modify] https://crrev.com/f456aeefda399d09d0641f7670ebeabdad24e609/third_party/blink/renderer/core/exported/web_view_impl.cc
[modify] https://crrev.com/f456aeefda399d09d0641f7670ebeabdad24e609/third_party/blink/renderer/core/exported/web_view_impl.h

Project Member

Comment 31 by bugdroid1@chromium.org, Jan 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/505476798f697b46fad4b8e7572b23e7e4dfeb67

commit 505476798f697b46fad4b8e7572b23e7e4dfeb67
Author: danakj <danakj@chromium.org>
Date: Fri Jan 11 23:53:46 2019

Set the display mode from the CreateViewParams not from RenderWidget.

We want to not use the RenderWidget before it's initialized, and we
want to move initialization to where there is a main frame already
(or part of making the main frame). So stop using the RenderWidget
to grab the display mode when setting it on the WebView, since we
have it in the CreateViewParams anyways.

R=avi@chromium.org

Change-Id: Ia9d5a1ecf9dc222a662bfc74de94764f50143ab3
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1407635
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622226}
[modify] https://crrev.com/505476798f697b46fad4b8e7572b23e7e4dfeb67/content/renderer/render_view_impl.cc

Project Member

Comment 32 by bugdroid1@chromium.org, Jan 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ed946461469e9dc33302b1b7e9ebe69aeaac0f84

commit ed946461469e9dc33302b1b7e9ebe69aeaac0f84
Author: danakj <danakj@chromium.org>
Date: Wed Jan 16 00:00:59 2019

Move RenderViewImpl code that configure WebSettings out to helper method

There's a bunch of code to parse CommandLine flags and set values on
WebSettings when initializing the RenderViewImpl and the WebView. To
make things more clear, put all of these out to a helper method that
accepts a WebSettings* so it's clear no use of WebView itself (or use
of the RenderWidget) is happening in them.

R=avi@chromium.org

Change-Id: I8dcf9d683c401fcdea5f814808dba795179f2254
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1407444
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622888}
[modify] https://crrev.com/ed946461469e9dc33302b1b7e9ebe69aeaac0f84/content/renderer/render_view_impl.cc

Project Member

Comment 33 by bugdroid1@chromium.org, Jan 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ed946461469e9dc33302b1b7e9ebe69aeaac0f84

commit ed946461469e9dc33302b1b7e9ebe69aeaac0f84
Author: danakj <danakj@chromium.org>
Date: Wed Jan 16 00:00:59 2019

Move RenderViewImpl code that configure WebSettings out to helper method

There's a bunch of code to parse CommandLine flags and set values on
WebSettings when initializing the RenderViewImpl and the WebView. To
make things more clear, put all of these out to a helper method that
accepts a WebSettings* so it's clear no use of WebView itself (or use
of the RenderWidget) is happening in them.

R=avi@chromium.org

Change-Id: I8dcf9d683c401fcdea5f814808dba795179f2254
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1407444
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622888}
[modify] https://crrev.com/ed946461469e9dc33302b1b7e9ebe69aeaac0f84/content/renderer/render_view_impl.cc

Project Member

Comment 34 by bugdroid1@chromium.org, Jan 16 (6 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/284d557d42d9179990b260046c5a25e1ffd25277

commit 284d557d42d9179990b260046c5a25e1ffd25277
Author: danakj <danakj@chromium.org>
Date: Wed Jan 16 17:00:26 2019

Split WebWidgetClient setting out of WebView::Create().

Add WebView::SetWebWidgetClient() that is called before setting up the
main frame and attaching it to the view. TODOs are sprinkled around as
what we should do in follow-ups.

Callers other than RenderViewImpl move the SetWebWidgetClient to be
called after initializing the WebView, but before making the main
frame. Next should be to remove SetWebWidgetClient calls from all
these places and move it to where RenderViewImpl attaches the
WebFrameWidget to the RenderWidget.

Then, RenderWidget::Init() should be moved to be after the attachment
of the main frame, and at that point RenderWidget will always have a
WebFrameWidget (instead of WebView as a WebWidget), except when the
RenderWidget is frozen (the main frame is remote).

Last, we then want to remove the SetWebWidgetClient calls (or reset
it to null) when the main frame is remote, but CloseWidgetSoon goes
through WebWidgetClient and should go through WebViewClient instead,
so a TODO is added. There may be more cases like this.

R=dcheng@chromium.org
TBR=dcheng

Change-Id: Id6b9d85501c4bf5a3cdfc3106b6bb18656a7c11f
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1406195
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623264}
[modify] https://crrev.com/284d557d42d9179990b260046c5a25e1ffd25277/components/plugins/renderer/webview_plugin.cc
[modify] https://crrev.com/284d557d42d9179990b260046c5a25e1ffd25277/components/printing/renderer/print_render_frame_helper.cc
[modify] https://crrev.com/284d557d42d9179990b260046c5a25e1ffd25277/content/renderer/render_view_impl.cc
[modify] https://crrev.com/284d557d42d9179990b260046c5a25e1ffd25277/extensions/renderer/scoped_web_frame.cc
[modify] https://crrev.com/284d557d42d9179990b260046c5a25e1ffd25277/media/blink/webmediaplayer_impl_unittest.cc
[modify] https://crrev.com/284d557d42d9179990b260046c5a25e1ffd25277/third_party/blink/public/web/web_view.h
[modify] https://crrev.com/284d557d42d9179990b260046c5a25e1ffd25277/third_party/blink/public/web/web_widget_client.h
[modify] https://crrev.com/284d557d42d9179990b260046c5a25e1ffd25277/third_party/blink/renderer/core/exported/web_view_impl.cc
[modify] https://crrev.com/284d557d42d9179990b260046c5a25e1ffd25277/third_party/blink/renderer/core/exported/web_view_impl.h
[modify] https://crrev.com/284d557d42d9179990b260046c5a25e1ffd25277/third_party/blink/renderer/core/exported/web_view_test.cc
[modify] https://crrev.com/284d557d42d9179990b260046c5a25e1ffd25277/third_party/blink/renderer/core/exported/worker_shadow_page.cc
[modify] https://crrev.com/284d557d42d9179990b260046c5a25e1ffd25277/third_party/blink/renderer/core/frame/frame_test_helpers.cc
[modify] https://crrev.com/284d557d42d9179990b260046c5a25e1ffd25277/third_party/blink/renderer/core/frame/frame_test_helpers.h

Project Member

Comment 35 by bugdroid1@chromium.org, Jan 16 (6 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/efcb843fdd5fefaf4f0c106f04f308ed1aba7919

commit efcb843fdd5fefaf4f0c106f04f308ed1aba7919
Author: danakj <danakj@chromium.org>
Date: Wed Jan 16 18:47:14 2019

Don't use WebView as a proxy to show FPS counter in the compositor.

1. Move the API from WebLayerTreeView to WebWidgetClient
2. Have RenderViewImpl set the value each time a new WebFrameWidget
is attached, as in the future each one will have a new WebWidgetClient.
3. Have inspector go through the WebFrameWidget's client instead of
through WebView (and WebLayerTreeView).

Also removes the WebSetting for this, which was not used before this
CL.

R=enne@chromium.org

Change-Id: Ide83b5372033574cb965e973d50ac43d44f2e8fa
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1407633
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: enne <enne@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623313}
[modify] https://crrev.com/efcb843fdd5fefaf4f0c106f04f308ed1aba7919/content/renderer/compositor/layer_tree_view.cc
[modify] https://crrev.com/efcb843fdd5fefaf4f0c106f04f308ed1aba7919/content/renderer/compositor/layer_tree_view.h
[modify] https://crrev.com/efcb843fdd5fefaf4f0c106f04f308ed1aba7919/content/renderer/render_view_impl.cc
[modify] https://crrev.com/efcb843fdd5fefaf4f0c106f04f308ed1aba7919/content/renderer/render_widget.cc
[modify] https://crrev.com/efcb843fdd5fefaf4f0c106f04f308ed1aba7919/content/renderer/render_widget.h
[modify] https://crrev.com/efcb843fdd5fefaf4f0c106f04f308ed1aba7919/third_party/blink/public/platform/web_layer_tree_view.h
[modify] https://crrev.com/efcb843fdd5fefaf4f0c106f04f308ed1aba7919/third_party/blink/public/web/web_settings.h
[modify] https://crrev.com/efcb843fdd5fefaf4f0c106f04f308ed1aba7919/third_party/blink/public/web/web_view.h
[modify] https://crrev.com/efcb843fdd5fefaf4f0c106f04f308ed1aba7919/third_party/blink/public/web/web_widget_client.h
[modify] https://crrev.com/efcb843fdd5fefaf4f0c106f04f308ed1aba7919/third_party/blink/renderer/core/exported/web_settings_impl.cc
[modify] https://crrev.com/efcb843fdd5fefaf4f0c106f04f308ed1aba7919/third_party/blink/renderer/core/exported/web_settings_impl.h
[modify] https://crrev.com/efcb843fdd5fefaf4f0c106f04f308ed1aba7919/third_party/blink/renderer/core/exported/web_view_impl.cc
[modify] https://crrev.com/efcb843fdd5fefaf4f0c106f04f308ed1aba7919/third_party/blink/renderer/core/exported/web_view_impl.h
[modify] https://crrev.com/efcb843fdd5fefaf4f0c106f04f308ed1aba7919/third_party/blink/renderer/core/inspector/inspector_overlay_agent.cc

Project Member

Comment 36 by bugdroid1@chromium.org, Jan 16 (6 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b08b371a00245bc09c6d0bb6189289fe8da218fb

commit b08b371a00245bc09c6d0bb6189289fe8da218fb
Author: danakj <danakj@chromium.org>
Date: Wed Jan 16 18:59:56 2019

Set the WebWidgetClient from WebViewFrameWidget.

When making a WebViewFrameWidget have it set the WebWidgetClient on the
WebViewImpl. This delays setting a client until the main frame is
created.

Conservatively, if making a remote main frame, have RenderViewImpl
explictly set the WebWidgetClient on the WebViewImpl directly even
though there's no WebFrameClient. We'll work to remove that as there
should be no WebWidgetClient when there's no local main frame and
WebWidget.

When the WebViewFrameWidget closes it removes the WebWidgetClient,
however to be conservative.. RenderViewImpl immediately puts the
WebWidgetClient back similar to the remote main frame case during
init.

R=dcheng@chromium.org
TBR=dcheng

Change-Id: I4b0f04a2d5c74d012f5f71b4b72fc573cef45f8c
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1407630
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623315}
[modify] https://crrev.com/b08b371a00245bc09c6d0bb6189289fe8da218fb/components/plugins/renderer/webview_plugin.cc
[modify] https://crrev.com/b08b371a00245bc09c6d0bb6189289fe8da218fb/components/printing/renderer/print_render_frame_helper.cc
[modify] https://crrev.com/b08b371a00245bc09c6d0bb6189289fe8da218fb/content/public/test/render_view_test.cc
[modify] https://crrev.com/b08b371a00245bc09c6d0bb6189289fe8da218fb/content/renderer/render_view_browsertest.cc
[modify] https://crrev.com/b08b371a00245bc09c6d0bb6189289fe8da218fb/content/renderer/render_view_impl.cc
[modify] https://crrev.com/b08b371a00245bc09c6d0bb6189289fe8da218fb/third_party/blink/public/web/web_view.h
[modify] https://crrev.com/b08b371a00245bc09c6d0bb6189289fe8da218fb/third_party/blink/renderer/core/exported/web_view_impl.cc
[modify] https://crrev.com/b08b371a00245bc09c6d0bb6189289fe8da218fb/third_party/blink/renderer/core/frame/frame_test_helpers.cc
[modify] https://crrev.com/b08b371a00245bc09c6d0bb6189289fe8da218fb/third_party/blink/renderer/core/frame/web_view_frame_widget.cc

Project Member

Comment 37 by bugdroid1@chromium.org, Jan 16 (6 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e691e85e0e55cee7518dc8a8b23c1981705f3e9e

commit e691e85e0e55cee7518dc8a8b23c1981705f3e9e
Author: danakj <danakj@chromium.org>
Date: Wed Jan 16 22:49:04 2019

Stop going through WebView to set debug flags on the compositor

Instead of going through WebView (which may or may not have a main
frame being composited), go through the client of the frame's
WebFrameWidget.

For each debug property:
1. Move the API from WebLayerTreeView to WebWidgetClient
2. Have inspector go through the WebFrameWidget's client instead of
through WebView (and WebLayerTreeView).

Also removes the WebSetting for these, which were not used before this
CL.

R=avi@chromium.org, enne@chromium.org, pdr@chromium.org

Change-Id: I7c615878fe7f481d589548470d3c8878cf0b36e9
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1407438
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623417}
[modify] https://crrev.com/e691e85e0e55cee7518dc8a8b23c1981705f3e9e/content/renderer/compositor/layer_tree_view.cc
[modify] https://crrev.com/e691e85e0e55cee7518dc8a8b23c1981705f3e9e/content/renderer/compositor/layer_tree_view.h
[modify] https://crrev.com/e691e85e0e55cee7518dc8a8b23c1981705f3e9e/content/renderer/render_widget.cc
[modify] https://crrev.com/e691e85e0e55cee7518dc8a8b23c1981705f3e9e/content/renderer/render_widget.h
[modify] https://crrev.com/e691e85e0e55cee7518dc8a8b23c1981705f3e9e/third_party/blink/public/platform/web_layer_tree_view.h
[modify] https://crrev.com/e691e85e0e55cee7518dc8a8b23c1981705f3e9e/third_party/blink/public/web/web_settings.h
[modify] https://crrev.com/e691e85e0e55cee7518dc8a8b23c1981705f3e9e/third_party/blink/public/web/web_view.h
[modify] https://crrev.com/e691e85e0e55cee7518dc8a8b23c1981705f3e9e/third_party/blink/public/web/web_widget_client.h
[modify] https://crrev.com/e691e85e0e55cee7518dc8a8b23c1981705f3e9e/third_party/blink/renderer/core/exported/web_settings_impl.cc
[modify] https://crrev.com/e691e85e0e55cee7518dc8a8b23c1981705f3e9e/third_party/blink/renderer/core/exported/web_settings_impl.h
[modify] https://crrev.com/e691e85e0e55cee7518dc8a8b23c1981705f3e9e/third_party/blink/renderer/core/exported/web_view_impl.cc
[modify] https://crrev.com/e691e85e0e55cee7518dc8a8b23c1981705f3e9e/third_party/blink/renderer/core/exported/web_view_impl.h
[modify] https://crrev.com/e691e85e0e55cee7518dc8a8b23c1981705f3e9e/third_party/blink/renderer/core/inspector/inspector_overlay_agent.cc

Project Member

Comment 38 by bugdroid1@chromium.org, Jan 18 (4 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ff8b4bf8d5ecb2c1c4c647302cb4ddaa575a5135

commit ff8b4bf8d5ecb2c1c4c647302cb4ddaa575a5135
Author: danakj <danakj@chromium.org>
Date: Fri Jan 18 20:52:37 2019

Remove gpu raster statefulness from WebViewImpl

This state only exists for unit tests, and they can just look at the
side effects on LayerTreeHost directly. This removes a widget-only
state from WebViewImpl, so we don't have to worry about setting it
correctly if it changed while the RenderWidget was frozen.

R=enne@chromium.org

Change-Id: I360da46f62f7754e4b79af33ff09f0e115051863
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1418837
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624272}
[modify] https://crrev.com/ff8b4bf8d5ecb2c1c4c647302cb4ddaa575a5135/cc/trees/layer_tree_host.h
[modify] https://crrev.com/ff8b4bf8d5ecb2c1c4c647302cb4ddaa575a5135/third_party/blink/renderer/core/exported/web_view_impl.cc
[modify] https://crrev.com/ff8b4bf8d5ecb2c1c4c647302cb4ddaa575a5135/third_party/blink/renderer/core/exported/web_view_impl.h
[modify] https://crrev.com/ff8b4bf8d5ecb2c1c4c647302cb4ddaa575a5135/third_party/blink/renderer/core/page/viewport_test.cc

Project Member

Comment 39 by bugdroid1@chromium.org, Yesterday (33 hours ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/84bbf551ed771ef0f5a3b6924442804ccb21a95c

commit 84bbf551ed771ef0f5a3b6924442804ccb21a95c
Author: danakj <danakj@chromium.org>
Date: Mon Jan 21 21:33:31 2019

Rename ApplyNewSizeForWidget() to CancelPagePopupForWidget()

Make the API clear about it's intent, and only call it from RenderWidget
when the size changes, so the RenderView code is now just a pass-through
to the WebView.

R=avi@chromium.org

Change-Id: I6941e7d6bc152b09d8bf47ab392a312b67c215d6
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1426082
Commit-Queue: danakj <danakj@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Auto-Submit: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624679}
[modify] https://crrev.com/84bbf551ed771ef0f5a3b6924442804ccb21a95c/content/renderer/render_view_impl.cc
[modify] https://crrev.com/84bbf551ed771ef0f5a3b6924442804ccb21a95c/content/renderer/render_view_impl.h
[modify] https://crrev.com/84bbf551ed771ef0f5a3b6924442804ccb21a95c/content/renderer/render_widget.cc
[modify] https://crrev.com/84bbf551ed771ef0f5a3b6924442804ccb21a95c/content/renderer/render_widget_delegate.h
[modify] https://crrev.com/84bbf551ed771ef0f5a3b6924442804ccb21a95c/content/renderer/render_widget_unittest.cc

Sign in to add a comment