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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2010963003: Restart any animations when we allocate a composited layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Working on test. Created 4 years, 7 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/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 3b83f9284b89e7d5a525dd57a3ddcc42399abf42..745035dcc59b9c5fb7aaa7bc7662dac8d3aa40f1 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -3857,14 +3857,19 @@ IntPoint FrameView::convertFromContainingWidgetToScrollbar(const Scrollbar& scro
return newPoint;
}
+static void setNeedsCompositingUpdate(LayoutViewItem layoutViewItem, CompositingUpdateType updateType)
+{
+ if (PaintLayerCompositor* compositor = !layoutViewItem.isNull() ? layoutViewItem.compositor() : nullptr)
+ compositor->setNeedsCompositingUpdate(updateType);
+}
+
void FrameView::setParentVisible(bool visible)
{
if (isParentVisible() == visible)
return;
// As parent visibility changes, we may need to recomposite this frame view and potentially child frame views.
- if (PaintLayerCompositor* compositor = !layoutViewItem().isNull() ? layoutViewItem().compositor() : nullptr)
- compositor->setNeedsCompositingUpdate(CompositingUpdateRebuildTree);
+ setNeedsCompositingUpdate(layoutViewItem(), CompositingUpdateRebuildTree);
Widget::setParentVisible(visible);
@@ -3879,6 +3884,7 @@ void FrameView::show()
{
if (!isSelfVisible()) {
setSelfVisible(true);
+ setNeedsCompositingUpdate(layoutViewItem(), CompositingUpdateRebuildTree);
wkorman 2016/05/28 00:59:44 As an alternative to adding this here and in line
updateScrollableAreaSet();
if (isParentVisible()) {
for (const auto& child : m_children)
@@ -3897,6 +3903,7 @@ void FrameView::hide()
child->setParentVisible(false);
}
setSelfVisible(false);
+ setNeedsCompositingUpdate(layoutViewItem(), CompositingUpdateRebuildTree);
wkorman 2016/05/28 00:59:44 This is not needed to fix the bug, but it maintain
updateScrollableAreaSet();
}

Powered by Google App Engine
This is Rietveld 408576698