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

Unified Diff: content/renderer/render_widget.cc

Issue 2431473003: Intersection Observer support for OOPIF (Closed)
Patch Set: dcheng comments addressed Created 3 years, 11 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
« no previous file with comments | « content/renderer/render_widget.h ('k') | third_party/WebKit/LayoutTests/FlagExpectations/site-per-process » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 4c0fda13bb72976e3dd52db55248cf0bf05495d2..c03656f24a0ca3959b5d459cee8e6b6e865115be 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -618,6 +618,8 @@ bool RenderWidget::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection)
IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck)
IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects)
+ IPC_MESSAGE_HANDLER(ViewMsg_SetViewportIntersection,
+ OnSetViewportIntersection)
IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests,
OnWaitNextFrameForTests)
IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdate,
@@ -1636,6 +1638,15 @@ void RenderWidget::OnUpdateWindowScreenRect(
window_screen_rect_ = window_screen_rect;
}
+void RenderWidget::OnSetViewportIntersection(
+ const gfx::Rect& viewport_intersection) {
+ if (GetWebWidget() && GetWebWidget()->isWebFrameWidget()) {
+ DCHECK(popup_type_ == WebPopupType::WebPopupTypeNone);
+ static_cast<WebFrameWidget*>(GetWebWidget())
+ ->setRemoteViewportIntersection(viewport_intersection);
+ }
+}
+
void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) {
if (compositor_)
compositor_->OnHandleCompositorProto(proto);
« no previous file with comments | « content/renderer/render_widget.h ('k') | third_party/WebKit/LayoutTests/FlagExpectations/site-per-process » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698