Chromium Code Reviews| 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(); |
| } |