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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2809913004: Revert of Remove unneeded calls to plugin.SetParentVisible. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 4701 matching lines...) Expand 10 before | Expand all | Expand 10 after
4712 // and potentially child frame views. 4712 // and potentially child frame views.
4713 SetNeedsCompositingUpdate(GetLayoutViewItem(), kCompositingUpdateRebuildTree); 4713 SetNeedsCompositingUpdate(GetLayoutViewItem(), kCompositingUpdateRebuildTree);
4714 4714
4715 FrameViewBase::SetParentVisible(visible); 4715 FrameViewBase::SetParentVisible(visible);
4716 4716
4717 if (!IsSelfVisible()) 4717 if (!IsSelfVisible())
4718 return; 4718 return;
4719 4719
4720 for (const auto& child : children_) 4720 for (const auto& child : children_)
4721 child->SetParentVisible(visible); 4721 child->SetParentVisible(visible);
4722
4723 for (const auto& plugin : plugins_)
4724 plugin->SetParentVisible(visible);
4722 } 4725 }
4723 4726
4724 void FrameView::Show() { 4727 void FrameView::Show() {
4725 if (!IsSelfVisible()) { 4728 if (!IsSelfVisible()) {
4726 SetSelfVisible(true); 4729 SetSelfVisible(true);
4727 if (ScrollingCoordinator* scrolling_coordinator = 4730 if (ScrollingCoordinator* scrolling_coordinator =
4728 this->GetScrollingCoordinator()) 4731 this->GetScrollingCoordinator())
4729 scrolling_coordinator->FrameViewVisibilityDidChange(); 4732 scrolling_coordinator->FrameViewVisibilityDidChange();
4730 SetNeedsCompositingUpdate(GetLayoutViewItem(), 4733 SetNeedsCompositingUpdate(GetLayoutViewItem(),
4731 kCompositingUpdateRebuildTree); 4734 kCompositingUpdateRebuildTree);
4732 UpdateParentScrollableAreaSet(); 4735 UpdateParentScrollableAreaSet();
4733 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && 4736 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() &&
4734 !RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { 4737 !RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
4735 // The existance of scrolling properties depends on visibility through 4738 // The existance of scrolling properties depends on visibility through
4736 // isScrollable() so ensure properties are updated if visibility changes. 4739 // isScrollable() so ensure properties are updated if visibility changes.
4737 SetNeedsPaintPropertyUpdate(); 4740 SetNeedsPaintPropertyUpdate();
4738 } 4741 }
4739 if (IsParentVisible()) { 4742 if (IsParentVisible()) {
4740 for (const auto& child : children_) 4743 for (const auto& child : children_)
4741 child->SetParentVisible(true); 4744 child->SetParentVisible(true);
4745
4746 for (const auto& plugin : plugins_)
4747 plugin->SetParentVisible(true);
4742 } 4748 }
4743 } 4749 }
4744 4750
4745 FrameViewBase::Show(); 4751 FrameViewBase::Show();
4746 } 4752 }
4747 4753
4748 void FrameView::Hide() { 4754 void FrameView::Hide() {
4749 if (IsSelfVisible()) { 4755 if (IsSelfVisible()) {
4750 if (IsParentVisible()) { 4756 if (IsParentVisible()) {
4751 for (const auto& child : children_) 4757 for (const auto& child : children_)
4752 child->SetParentVisible(false); 4758 child->SetParentVisible(false);
4759
4760 for (const auto& plugin : plugins_)
4761 plugin->SetParentVisible(false);
4753 } 4762 }
4754 SetSelfVisible(false); 4763 SetSelfVisible(false);
4755 if (ScrollingCoordinator* scrolling_coordinator = 4764 if (ScrollingCoordinator* scrolling_coordinator =
4756 this->GetScrollingCoordinator()) 4765 this->GetScrollingCoordinator())
4757 scrolling_coordinator->FrameViewVisibilityDidChange(); 4766 scrolling_coordinator->FrameViewVisibilityDidChange();
4758 SetNeedsCompositingUpdate(GetLayoutViewItem(), 4767 SetNeedsCompositingUpdate(GetLayoutViewItem(),
4759 kCompositingUpdateRebuildTree); 4768 kCompositingUpdateRebuildTree);
4760 UpdateParentScrollableAreaSet(); 4769 UpdateParentScrollableAreaSet();
4761 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && 4770 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() &&
4762 !RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { 4771 !RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
5322 void FrameView::SetAnimationHost( 5331 void FrameView::SetAnimationHost(
5323 std::unique_ptr<CompositorAnimationHost> host) { 5332 std::unique_ptr<CompositorAnimationHost> host) {
5324 animation_host_ = std::move(host); 5333 animation_host_ = std::move(host);
5325 } 5334 }
5326 5335
5327 LayoutUnit FrameView::CaretWidth() const { 5336 LayoutUnit FrameView::CaretWidth() const {
5328 return LayoutUnit(GetHostWindow()->WindowToViewportScalar(1)); 5337 return LayoutUnit(GetHostWindow()->WindowToViewportScalar(1));
5329 } 5338 }
5330 5339
5331 } // namespace blink 5340 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698