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

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

Issue 2743053003: [Reland #1] Don't create layout objects for children of display-none iframes. (Closed)
Patch Set: Fix DOM object leaks. Diff this against Patch Set 10. Created 3 years, 9 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
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 4772 matching lines...) Expand 10 before | Expand all | Expand 10 after
4783 } 4783 }
4784 4784
4785 // Don't throttle display:none frames (see updateRenderThrottlingStatus). 4785 // Don't throttle display:none frames (see updateRenderThrottlingStatus).
4786 HTMLFrameOwnerElement* ownerElement = m_frame->deprecatedLocalOwner(); 4786 HTMLFrameOwnerElement* ownerElement = m_frame->deprecatedLocalOwner();
4787 if (m_hiddenForThrottling && ownerElement && !ownerElement->layoutObject()) { 4787 if (m_hiddenForThrottling && ownerElement && !ownerElement->layoutObject()) {
4788 // No need to notify children because descendants of display:none frames 4788 // No need to notify children because descendants of display:none frames
4789 // should remain throttled. 4789 // should remain throttled.
4790 updateRenderThrottlingStatus(m_hiddenForThrottling, m_subtreeThrottled, 4790 updateRenderThrottlingStatus(m_hiddenForThrottling, m_subtreeThrottled,
4791 DontForceThrottlingInvalidation, 4791 DontForceThrottlingInvalidation,
4792 DontNotifyChildren); 4792 DontNotifyChildren);
4793 DCHECK(!canThrottleRendering());
4794 } 4793 }
4795 4794
4796 for (Frame* child = m_frame->tree().firstChild(); child; 4795 for (Frame* child = m_frame->tree().firstChild(); child;
4797 child = child->tree().nextSibling()) { 4796 child = child->tree().nextSibling()) {
4798 if (!child->isLocalFrame()) 4797 if (!child->isLocalFrame())
4799 continue; 4798 continue;
4800 if (FrameView* view = toLocalFrame(child)->view()) 4799 if (FrameView* view = toLocalFrame(child)->view())
4801 view->updateViewportIntersectionsForSubtree(targetState); 4800 view->updateViewportIntersectionsForSubtree(targetState);
4802 } 4801 }
4803 } 4802 }
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
5262 void FrameView::setAnimationHost( 5261 void FrameView::setAnimationHost(
5263 std::unique_ptr<CompositorAnimationHost> host) { 5262 std::unique_ptr<CompositorAnimationHost> host) {
5264 m_animationHost = std::move(host); 5263 m_animationHost = std::move(host);
5265 } 5264 }
5266 5265
5267 LayoutUnit FrameView::caretWidth() const { 5266 LayoutUnit FrameView::caretWidth() const {
5268 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); 5267 return LayoutUnit(getHostWindow()->windowToViewportScalar(1));
5269 } 5268 }
5270 5269
5271 } // namespace blink 5270 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698