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

Unified Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp

Issue 1774653002: Decouple scheduling animation of webview plugins from layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
index d271fda573e4ac7c9021df040a087c5a84ec7b8a..d5933128fa01faf526e6b48bd83b588247183f86 100644
--- a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
@@ -109,12 +109,12 @@ void WebPluginContainerImpl::setFrameRect(const IntRect& frameRect)
Widget::setFrameRect(frameRect);
}
-void WebPluginContainerImpl::layoutIfNeeded()
+void WebPluginContainerImpl::updateAllLifecyclePhases()
{
if (!m_webPlugin)
return;
- m_webPlugin->layoutIfNeeded();
+ m_webPlugin->updateAllLifecyclePhases();
}
void WebPluginContainerImpl::paint(GraphicsContext& context, const CullRect& cullRect) const
@@ -426,10 +426,10 @@ void WebPluginContainerImpl::scrollRect(const WebRect& rect)
invalidateRect(rect);
}
-void WebPluginContainerImpl::setNeedsLayout()
+void WebPluginContainerImpl::scheduleAnimation()
{
- if (m_element->layoutObject())
- m_element->layoutObject()->setNeedsLayoutAndFullPaintInvalidation("Plugin needs layout");
+ if (auto* frameView = m_element->document().view())
+ frameView->scheduleAnimation();
}
void WebPluginContainerImpl::reportGeometry()

Powered by Google App Engine
This is Rietveld 408576698