diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-05-20 09:47:09 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-06-07 11:15:42 +0000 |
commit | 189d4fd8fad9e3c776873be51938cd31a42b6177 (patch) | |
tree | 6497caeff5e383937996768766ab3bb2081a40b2 /chromium/third_party/blink/renderer/core/frame/frame_view.cc | |
parent | 8bc75099d364490b22f43a7ce366b366c08f4164 (diff) | |
download | qtwebengine-chromium-189d4fd8fad9e3c776873be51938cd31a42b6177.tar.gz |
BASELINE: Update Chromium to 90.0.4430.221
Change-Id: Iff4d9d18d2fcf1a576f3b1f453010f744a232920
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/frame/frame_view.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/frame/frame_view.cc | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/chromium/third_party/blink/renderer/core/frame/frame_view.cc b/chromium/third_party/blink/renderer/core/frame/frame_view.cc index 74da41ca624..e2dcf9909f6 100644 --- a/chromium/third_party/blink/renderer/core/frame/frame_view.cc +++ b/chromium/third_party/blink/renderer/core/frame/frame_view.cc @@ -43,10 +43,15 @@ bool FrameView::CanThrottleRenderingForPropagation() const { bool FrameView::DisplayLockedInParentFrame() { Frame& frame = GetFrame(); LayoutEmbeddedContent* owner = frame.OwnerLayoutObject(); + if (!owner) + return false; + DCHECK(owner->GetFrameView()); + if (owner->GetFrameView()->IsDisplayLocked()) + return true; // We check the inclusive ancestor to determine whether the subtree is locked, // since the contents of the frame are in the subtree of the frame, so they // would be locked if the frame owner is itself locked. - return owner && DisplayLockUtilities::NearestLockedInclusiveAncestor(*owner); + return DisplayLockUtilities::NearestLockedInclusiveAncestor(*owner); } void FrameView::UpdateViewportIntersection(unsigned flags, @@ -212,7 +217,8 @@ void FrameView::UpdateViewportIntersection(unsigned flags, subtree_throttled = parent_frame->View()->CanThrottleRenderingForPropagation(); } - UpdateRenderThrottlingStatus(hidden_for_throttling, subtree_throttled); + UpdateRenderThrottlingStatus(hidden_for_throttling, subtree_throttled, + DisplayLockedInParentFrame()); } void FrameView::UpdateFrameVisibility(bool intersects_viewport) { @@ -235,12 +241,14 @@ void FrameView::UpdateFrameVisibility(bool intersects_viewport) { void FrameView::UpdateRenderThrottlingStatus(bool hidden_for_throttling, bool subtree_throttled, + bool display_locked, bool recurse) { - bool visibility_changed = (hidden_for_throttling_ || subtree_throttled_) != - (hidden_for_throttling || subtree_throttled || - DisplayLockedInParentFrame()); + bool visibility_changed = + (hidden_for_throttling_ || subtree_throttled_ || display_locked_) != + (hidden_for_throttling || subtree_throttled || display_locked); hidden_for_throttling_ = hidden_for_throttling; - subtree_throttled_ = subtree_throttled || DisplayLockedInParentFrame(); + subtree_throttled_ = subtree_throttled; + display_locked_ = display_locked; if (visibility_changed) VisibilityForThrottlingChanged(); if (recurse) { @@ -250,7 +258,7 @@ void FrameView::UpdateRenderThrottlingStatus(bool hidden_for_throttling, child_view->UpdateRenderThrottlingStatus( child_view->IsHiddenForThrottling(), child_view->IsAttached() && CanThrottleRenderingForPropagation(), - true); + child_view->IsDisplayLocked(), true); } } } |