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

Unified Diff: Source/core/page/PageAnimator.cpp

Issue 749333002: Plumbing for frame-specific WebWidgets (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed broken popup bug Created 6 years, 1 month 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: Source/core/page/PageAnimator.cpp
diff --git a/Source/core/page/PageAnimator.cpp b/Source/core/page/PageAnimator.cpp
index 0d429bae2ab329236e0351c91e2c33213606c226..a746d08d250338dd151dc18884f482b36baecfb2 100644
--- a/Source/core/page/PageAnimator.cpp
+++ b/Source/core/page/PageAnimator.cpp
@@ -66,12 +66,20 @@ void PageAnimator::serviceScriptedAnimations(double monotonicAnimationStartTime)
documents[i]->serviceScriptedAnimations(monotonicAnimationStartTime);
}
-void PageAnimator::scheduleVisualUpdate()
+void PageAnimator::scheduleVisualUpdate(LocalFrame* rootFrame)
{
// FIXME: also include m_animationFramePending here. It is currently not there due to crbug.com/353756.
if (m_servicingAnimations || m_updatingLayoutAndStyleForPainting)
return;
- m_page->chrome().scheduleAnimation();
+ // FIXME: The frame-specific version of scheduleAnimation() is for
+ // out-of-process iframes. Passing 0 or the top-level frame to this method
+ // causes scheduleAnimation() to be called for the page, which still uses
+ // a page-level WebWidget (the WebViewImpl).
+ if (rootFrame && !rootFrame->isMainFrame() && rootFrame->isLocalRoot()) {
dcheng 2014/11/24 22:30:39 Shouldn't we be able to assert rootFrame->isLocalR
kenrb 2014/11/25 17:14:56 This goes to the WebViewImpl by default, which pre
dcheng 2014/11/25 20:05:13 OK, can we still add an assert like ASSERT(!rootFr
kenrb 2014/11/26 16:17:11 No, it is called with non-root frames often. In th
+ m_page->chrome().scheduleAnimationForFrame(rootFrame);
+ } else {
+ m_page->chrome().scheduleAnimation();
+ }
}
void PageAnimator::updateLayoutAndStyleForPainting(LocalFrame* rootFrame)

Powered by Google App Engine
This is Rietveld 408576698