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

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

Issue 2808723002: Remove unneeded calls to plugin.SetParentVisible. (Closed)
Patch Set: FrameRectsChanged is required 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);
4725 } 4722 }
4726 4723
4727 void FrameView::Show() { 4724 void FrameView::Show() {
4728 if (!IsSelfVisible()) { 4725 if (!IsSelfVisible()) {
4729 SetSelfVisible(true); 4726 SetSelfVisible(true);
4730 if (ScrollingCoordinator* scrolling_coordinator = 4727 if (ScrollingCoordinator* scrolling_coordinator =
4731 this->GetScrollingCoordinator()) 4728 this->GetScrollingCoordinator())
4732 scrolling_coordinator->FrameViewVisibilityDidChange(); 4729 scrolling_coordinator->FrameViewVisibilityDidChange();
4733 SetNeedsCompositingUpdate(GetLayoutViewItem(), 4730 SetNeedsCompositingUpdate(GetLayoutViewItem(),
4734 kCompositingUpdateRebuildTree); 4731 kCompositingUpdateRebuildTree);
4735 UpdateParentScrollableAreaSet(); 4732 UpdateParentScrollableAreaSet();
4736 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && 4733 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() &&
4737 !RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { 4734 !RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
4738 // The existance of scrolling properties depends on visibility through 4735 // The existance of scrolling properties depends on visibility through
4739 // isScrollable() so ensure properties are updated if visibility changes. 4736 // isScrollable() so ensure properties are updated if visibility changes.
4740 SetNeedsPaintPropertyUpdate(); 4737 SetNeedsPaintPropertyUpdate();
4741 } 4738 }
4742 if (IsParentVisible()) { 4739 if (IsParentVisible()) {
4743 for (const auto& child : children_) 4740 for (const auto& child : children_)
4744 child->SetParentVisible(true); 4741 child->SetParentVisible(true);
4745
4746 for (const auto& plugin : plugins_)
4747 plugin->SetParentVisible(true);
4748 } 4742 }
4749 } 4743 }
4750 4744
4751 FrameViewBase::Show(); 4745 FrameViewBase::Show();
4752 } 4746 }
4753 4747
4754 void FrameView::Hide() { 4748 void FrameView::Hide() {
4755 if (IsSelfVisible()) { 4749 if (IsSelfVisible()) {
4756 if (IsParentVisible()) { 4750 if (IsParentVisible()) {
4757 for (const auto& child : children_) 4751 for (const auto& child : children_)
4758 child->SetParentVisible(false); 4752 child->SetParentVisible(false);
4759
4760 for (const auto& plugin : plugins_)
4761 plugin->SetParentVisible(false);
4762 } 4753 }
4763 SetSelfVisible(false); 4754 SetSelfVisible(false);
4764 if (ScrollingCoordinator* scrolling_coordinator = 4755 if (ScrollingCoordinator* scrolling_coordinator =
4765 this->GetScrollingCoordinator()) 4756 this->GetScrollingCoordinator())
4766 scrolling_coordinator->FrameViewVisibilityDidChange(); 4757 scrolling_coordinator->FrameViewVisibilityDidChange();
4767 SetNeedsCompositingUpdate(GetLayoutViewItem(), 4758 SetNeedsCompositingUpdate(GetLayoutViewItem(),
4768 kCompositingUpdateRebuildTree); 4759 kCompositingUpdateRebuildTree);
4769 UpdateParentScrollableAreaSet(); 4760 UpdateParentScrollableAreaSet();
4770 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && 4761 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() &&
4771 !RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { 4762 !RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
5331 void FrameView::SetAnimationHost( 5322 void FrameView::SetAnimationHost(
5332 std::unique_ptr<CompositorAnimationHost> host) { 5323 std::unique_ptr<CompositorAnimationHost> host) {
5333 animation_host_ = std::move(host); 5324 animation_host_ = std::move(host);
5334 } 5325 }
5335 5326
5336 LayoutUnit FrameView::CaretWidth() const { 5327 LayoutUnit FrameView::CaretWidth() const {
5337 return LayoutUnit(GetHostWindow()->WindowToViewportScalar(1)); 5328 return LayoutUnit(GetHostWindow()->WindowToViewportScalar(1));
5338 } 5329 }
5339 5330
5340 } // namespace blink 5331 } // 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