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

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

Issue 2859543003: Don't run IntersectionObserver lifecycle in frames with dirty layout. (Closed)
Patch Set: Run RecordDeferredLoadingStats even if layout is dirty. Created 3 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 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 4889 matching lines...) Expand 10 before | Expand all | Expand 10 after
4900 // TODO(dcheng): Since FrameViewBase tree updates are deferred, FrameViews 4900 // TODO(dcheng): Since FrameViewBase tree updates are deferred, FrameViews
4901 // might still be in the FrameViewBase hierarchy even though the associated 4901 // might still be in the FrameViewBase hierarchy even though the associated
4902 // Document is already detached. Investigate if this check and a similar check 4902 // Document is already detached. Investigate if this check and a similar check
4903 // in lifecycle updates are still needed when there are no more deferred 4903 // in lifecycle updates are still needed when there are no more deferred
4904 // FrameViewBase updates: https://crbug.com/561683 4904 // FrameViewBase updates: https://crbug.com/561683
4905 if (!GetFrame().GetDocument()->IsActive()) 4905 if (!GetFrame().GetDocument()->IsActive())
4906 return; 4906 return;
4907 4907
4908 if (target_state == DocumentLifecycle::kPaintClean) { 4908 if (target_state == DocumentLifecycle::kPaintClean) {
4909 RecordDeferredLoadingStats(); 4909 RecordDeferredLoadingStats();
4910 // Notify javascript IntersectionObservers 4910 if (!NeedsLayout()) {
4911 if (GetFrame().GetDocument()->GetIntersectionObserverController()) { 4911 // Notify javascript IntersectionObservers
4912 GetFrame() 4912 if (GetFrame().GetDocument()->GetIntersectionObserverController()) {
4913 .GetDocument() 4913 GetFrame()
4914 ->GetIntersectionObserverController() 4914 .GetDocument()
4915 ->ComputeTrackedIntersectionObservations(); 4915 ->GetIntersectionObserverController()
4916 ->ComputeTrackedIntersectionObservations();
4917 }
4916 } 4918 }
4917 } 4919 }
4918 4920
4919 // Don't throttle display:none frames (see updateRenderThrottlingStatus). 4921 // Don't throttle display:none frames (see updateRenderThrottlingStatus).
4920 HTMLFrameOwnerElement* owner_element = frame_->DeprecatedLocalOwner(); 4922 HTMLFrameOwnerElement* owner_element = frame_->DeprecatedLocalOwner();
4921 if (hidden_for_throttling_ && owner_element && 4923 if (hidden_for_throttling_ && owner_element &&
4922 !owner_element->GetLayoutObject()) { 4924 !owner_element->GetLayoutObject()) {
4923 // No need to notify children because descendants of display:none frames 4925 // No need to notify children because descendants of display:none frames
4924 // should remain throttled. 4926 // should remain throttled.
4925 UpdateRenderThrottlingStatus(hidden_for_throttling_, subtree_throttled_, 4927 UpdateRenderThrottlingStatus(hidden_for_throttling_, subtree_throttled_,
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
5386 void FrameView::SetAnimationHost( 5388 void FrameView::SetAnimationHost(
5387 std::unique_ptr<CompositorAnimationHost> host) { 5389 std::unique_ptr<CompositorAnimationHost> host) {
5388 animation_host_ = std::move(host); 5390 animation_host_ = std::move(host);
5389 } 5391 }
5390 5392
5391 LayoutUnit FrameView::CaretWidth() const { 5393 LayoutUnit FrameView::CaretWidth() const {
5392 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); 5394 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1));
5393 } 5395 }
5394 5396
5395 } // namespace blink 5397 } // 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