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

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

Issue 1774653002: Decouple scheduling animation of webview plugins from layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 2587 matching lines...) Expand 10 before | Expand all | Expand 10 after
2598 RELEASE_ASSERT(!needsLayout()); 2598 RELEASE_ASSERT(!needsLayout());
2599 2599
2600 // WebView plugins need to update regardless of whether the LayoutEmbeddedOb ject 2600 // WebView plugins need to update regardless of whether the LayoutEmbeddedOb ject
2601 // that owns them needed layout. 2601 // that owns them needed layout.
2602 // TODO(leviw): This currently runs the entire lifecycle on plugin WebViews. We 2602 // TODO(leviw): This currently runs the entire lifecycle on plugin WebViews. We
2603 // should have a way to only run these other Documents to the same lifecycle stage 2603 // should have a way to only run these other Documents to the same lifecycle stage
2604 // as this frame. 2604 // as this frame.
2605 const ChildrenWidgetSet* viewChildren = children(); 2605 const ChildrenWidgetSet* viewChildren = children();
2606 for (const RefPtrWillBeMember<Widget>& child : *viewChildren) { 2606 for (const RefPtrWillBeMember<Widget>& child : *viewChildren) {
2607 if ((*child).isPluginContainer()) 2607 if ((*child).isPluginContainer())
2608 toPluginView(child.get())->layoutIfNeeded(); 2608 toPluginView(child.get())->updateAllLifecyclePhases();
2609 } 2609 }
2610 2610
2611 RELEASE_ASSERT(!needsLayout()); 2611 RELEASE_ASSERT(!needsLayout());
2612 2612
2613 // FIXME: Calling layout() shouldn't trigger script execution or have any 2613 // FIXME: Calling layout() shouldn't trigger script execution or have any
2614 // observable effects on the frame tree but we're not quite there yet. 2614 // observable effects on the frame tree but we're not quite there yet.
2615 WillBeHeapVector<RefPtrWillBeMember<FrameView>> frameViews; 2615 WillBeHeapVector<RefPtrWillBeMember<FrameView>> frameViews;
2616 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree ().nextSibling()) { 2616 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree ().nextSibling()) {
2617 if (!child->isLocalFrame()) 2617 if (!child->isLocalFrame())
2618 continue; 2618 continue;
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after
4114 return m_hiddenForThrottling && m_crossOriginForThrottling; 4114 return m_hiddenForThrottling && m_crossOriginForThrottling;
4115 } 4115 }
4116 4116
4117 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const 4117 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const
4118 { 4118 {
4119 ASSERT(layoutView()); 4119 ASSERT(layoutView());
4120 return *layoutView(); 4120 return *layoutView();
4121 } 4121 }
4122 4122
4123 } // namespace blink 4123 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698