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

Unified Diff: components/plugins/renderer/webview_plugin.cc

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: components/plugins/renderer/webview_plugin.cc
diff --git a/components/plugins/renderer/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc
index 05611db29fa03b22b96bc626c86907cd498d2485..55faa2783faaaf977b7e8dafdb688e97df3ccead 100644
--- a/components/plugins/renderer/webview_plugin.cc
+++ b/components/plugins/renderer/webview_plugin.cc
@@ -135,7 +135,7 @@ bool WebViewPlugin::initialize(WebPluginContainer* container) {
// scheduleAnimation may be invoked before this initialize call (which
// comes through the widget update process). It doesn't hurt to mark
// for layout again, and it does help us in the race-condition situation.
Xianzhu 2016/03/07 21:53:04 Nit: does the above comment need update?
chrishtr 2016/03/07 22:23:43 Updated layout to animation.
- container_->setNeedsLayout();
+ container_->scheduleAnimation();
old_title_ = container_->element().getAttribute("title");
@@ -164,9 +164,7 @@ v8::Local<v8::Object> WebViewPlugin::v8ScriptableObject(v8::Isolate* isolate) {
return delegate_->GetV8ScriptableObject(isolate);
}
-// TODO(wkorman): Look into renaming this to something more in line with
-// either the Blink lifecycle or Compositor layer tree host nomenclature.
-void WebViewPlugin::layoutIfNeeded() {
+void WebViewPlugin::updateAllLifecyclePhases() {
web_view_->updateAllLifecyclePhases();
}
@@ -313,7 +311,7 @@ void WebViewPlugin::scheduleAnimation() {
if (container_) {
// This should never happen; see also crbug.com/545039 for context.
CHECK(!is_painting_);
- container_->setNeedsLayout();
+ container_->scheduleAnimation();
}
}

Powered by Google App Engine
This is Rietveld 408576698