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

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

Issue 490473003: Defer call to updateWidgetPositions() outside of RenderLayerScrollableArea. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: doctype Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 , m_isTrackingPaintInvalidations(false) 114 , m_isTrackingPaintInvalidations(false)
115 , m_scrollCorner(nullptr) 115 , m_scrollCorner(nullptr)
116 , m_shouldAutoSize(false) 116 , m_shouldAutoSize(false)
117 , m_inAutoSize(false) 117 , m_inAutoSize(false)
118 , m_didRunAutosize(false) 118 , m_didRunAutosize(false)
119 , m_hasSoftwareFilters(false) 119 , m_hasSoftwareFilters(false)
120 , m_visibleContentScaleFactor(1) 120 , m_visibleContentScaleFactor(1)
121 , m_inputEventsScaleFactorForEmulation(1) 121 , m_inputEventsScaleFactorForEmulation(1)
122 , m_layoutSizeFixedToFrameSize(true) 122 , m_layoutSizeFixedToFrameSize(true)
123 , m_didScrollTimer(this, &FrameView::didScrollTimerFired) 123 , m_didScrollTimer(this, &FrameView::didScrollTimerFired)
124 , m_needsUpdateWidgetPositions(false)
124 { 125 {
125 ASSERT(m_frame); 126 ASSERT(m_frame);
126 init(); 127 init();
127 128
128 if (!m_frame->isMainFrame()) 129 if (!m_frame->isMainFrame())
129 return; 130 return;
130 131
131 ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed); 132 ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed);
132 ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed); 133 ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed);
133 } 134 }
(...skipping 2507 matching lines...) Expand 10 before | Expand all | Expand 10 after
2641 return; 2642 return;
2642 2643
2643 if (m_frame->isMainFrame()) { 2644 if (m_frame->isMainFrame()) {
2644 if (m_frame->page()->chrome().client().paintCustomOverhangArea(context, horizontalOverhangArea, verticalOverhangArea, dirtyRect)) 2645 if (m_frame->page()->chrome().client().paintCustomOverhangArea(context, horizontalOverhangArea, verticalOverhangArea, dirtyRect))
2645 return; 2646 return;
2646 } 2647 }
2647 2648
2648 ScrollView::paintOverhangAreas(context, horizontalOverhangArea, verticalOver hangArea, dirtyRect); 2649 ScrollView::paintOverhangAreas(context, horizontalOverhangArea, verticalOver hangArea, dirtyRect);
2649 } 2650 }
2650 2651
2652 void FrameView::updateWidgetPositionsIfNeeded()
2653 {
2654 if (!m_needsUpdateWidgetPositions)
2655 return;
2656
2657 m_needsUpdateWidgetPositions = false;
2658
2659 updateWidgetPositions();
2660 }
2661
2651 void FrameView::updateLayoutAndStyleForPainting() 2662 void FrameView::updateLayoutAndStyleForPainting()
2652 { 2663 {
2653 // Updating layout can run script, which can tear down the FrameView. 2664 // Updating layout can run script, which can tear down the FrameView.
2654 RefPtr<FrameView> protector(this); 2665 RefPtr<FrameView> protector(this);
2655 2666
2656 updateLayoutAndStyleIfNeededRecursive(); 2667 updateLayoutAndStyleIfNeededRecursive();
2657 2668
2669 updateWidgetPositionsIfNeeded();
2670
2658 if (RenderView* view = renderView()) { 2671 if (RenderView* view = renderView()) {
2659 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up dateLayerTree", "frame", m_frame.get()); 2672 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up dateLayerTree", "frame", m_frame.get());
2660 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Ti meline migrates to tracing. 2673 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Ti meline migrates to tracing.
2661 InspectorInstrumentation::willUpdateLayerTree(m_frame.get()); 2674 InspectorInstrumentation::willUpdateLayerTree(m_frame.get());
2662 2675
2663 view->compositor()->updateIfNeededRecursive(); 2676 view->compositor()->updateIfNeededRecursive();
2664 2677
2665 if (view->compositor()->inCompositingMode() && m_frame->isLocalRoot()) 2678 if (view->compositor()->inCompositingMode() && m_frame->isLocalRoot())
2666 m_frame->page()->scrollingCoordinator()->updateAfterCompositingChang eIfNeeded(); 2679 m_frame->page()->scrollingCoordinator()->updateAfterCompositingChang eIfNeeded();
2667 2680
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
3131 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3144 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3132 { 3145 {
3133 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3146 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3134 if (AXObjectCache* cache = axObjectCache()) { 3147 if (AXObjectCache* cache = axObjectCache()) {
3135 cache->remove(scrollbar); 3148 cache->remove(scrollbar);
3136 cache->handleScrollbarUpdate(this); 3149 cache->handleScrollbarUpdate(this);
3137 } 3150 }
3138 } 3151 }
3139 3152
3140 } // namespace blink 3153 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698