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

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

Issue 1304063016: Refactor the API for setting dynamic resource load priorities (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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/fetch/ResourceLoaderSet.h ('k') | Source/core/layout/LayoutBlock.h » ('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 21 matching lines...) Expand all
32 #include "core/compositing/DisplayListCompositingBuilder.h" 32 #include "core/compositing/DisplayListCompositingBuilder.h"
33 #include "core/css/FontFaceSet.h" 33 #include "core/css/FontFaceSet.h"
34 #include "core/css/resolver/StyleResolver.h" 34 #include "core/css/resolver/StyleResolver.h"
35 #include "core/dom/AXObjectCache.h" 35 #include "core/dom/AXObjectCache.h"
36 #include "core/dom/Fullscreen.h" 36 #include "core/dom/Fullscreen.h"
37 #include "core/editing/EditingUtilities.h" 37 #include "core/editing/EditingUtilities.h"
38 #include "core/editing/FrameSelection.h" 38 #include "core/editing/FrameSelection.h"
39 #include "core/editing/RenderedPosition.h" 39 #include "core/editing/RenderedPosition.h"
40 #include "core/editing/markers/DocumentMarkerController.h" 40 #include "core/editing/markers/DocumentMarkerController.h"
41 #include "core/fetch/ResourceFetcher.h" 41 #include "core/fetch/ResourceFetcher.h"
42 #include "core/fetch/ResourceLoadPriorityOptimizer.h"
43 #include "core/frame/FrameHost.h" 42 #include "core/frame/FrameHost.h"
44 #include "core/frame/LocalFrame.h" 43 #include "core/frame/LocalFrame.h"
45 #include "core/frame/Settings.h" 44 #include "core/frame/Settings.h"
46 #include "core/html/HTMLFrameElement.h" 45 #include "core/html/HTMLFrameElement.h"
47 #include "core/html/HTMLPlugInElement.h" 46 #include "core/html/HTMLPlugInElement.h"
48 #include "core/html/HTMLTextFormControlElement.h" 47 #include "core/html/HTMLTextFormControlElement.h"
49 #include "core/html/parser/TextResourceDecoder.h" 48 #include "core/html/parser/TextResourceDecoder.h"
50 #include "core/input/EventHandler.h" 49 #include "core/input/EventHandler.h"
51 #include "core/inspector/InspectorInstrumentation.h" 50 #include "core/inspector/InspectorInstrumentation.h"
52 #include "core/inspector/InspectorTraceEvents.h" 51 #include "core/inspector/InspectorTraceEvents.h"
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 // We need to ensure that we mark up all layoutObjects up to the Lay outView 858 // We need to ensure that we mark up all layoutObjects up to the Lay outView
860 // for paint invalidation. This simplifies our code as we just alway s 859 // for paint invalidation. This simplifies our code as we just alway s
861 // do a full tree walk. 860 // do a full tree walk.
862 if (LayoutObject* container = root->container()) 861 if (LayoutObject* container = root->container())
863 container->setMayNeedPaintInvalidation(); 862 container->setMayNeedPaintInvalidation();
864 } 863 }
865 } else { 864 } else {
866 layoutFromRootObject(*layoutView()); 865 layoutFromRootObject(*layoutView());
867 } 866 }
868 867
869 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->updateAllIma geResourcePriorities(); 868 m_frame->document()->fetcher()->updateAllImageResourcePriorities();
870 869
871 lifecycle().advanceTo(DocumentLifecycle::AfterPerformLayout); 870 lifecycle().advanceTo(DocumentLifecycle::AfterPerformLayout);
872 871
873 TRACE_EVENT_END1(PERFORM_LAYOUT_TRACE_CATEGORIES, "FrameView::performLayout" , 872 TRACE_EVENT_END1(PERFORM_LAYOUT_TRACE_CATEGORIES, "FrameView::performLayout" ,
874 "counters", analyzerCounters()); 873 "counters", analyzerCounters());
875 } 874 }
876 875
877 void FrameView::scheduleOrPerformPostLayoutTasks() 876 void FrameView::scheduleOrPerformPostLayoutTasks()
878 { 877 {
879 if (m_postLayoutTasksTimer.isActive()) 878 if (m_postLayoutTasksTimer.isActive())
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
1552 1551
1553 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) 1552 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache())
1554 cache->handleScrollPositionChanged(this); 1553 cache->handleScrollPositionChanged(this);
1555 1554
1556 layoutView()->clearHitTestCache(); 1555 layoutView()->clearHitTestCache();
1557 frame().loader().saveScrollState(); 1556 frame().loader().saveScrollState();
1558 } 1557 }
1559 1558
1560 void FrameView::didScrollTimerFired(Timer<FrameView>*) 1559 void FrameView::didScrollTimerFired(Timer<FrameView>*)
1561 { 1560 {
1562 if (m_frame->document() && m_frame->document()->layoutView()) { 1561 if (m_frame->document() && m_frame->document()->layoutView())
1563 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->updateAl lImageResourcePriorities(); 1562 m_frame->document()->fetcher()->updateAllImageResourcePriorities();
1564 }
1565 } 1563 }
1566 1564
1567 void FrameView::updateLayersAndCompositingAfterScrollIfNeeded() 1565 void FrameView::updateLayersAndCompositingAfterScrollIfNeeded()
1568 { 1566 {
1569 // Nothing to do after scrolling if there are no fixed position elements. 1567 // Nothing to do after scrolling if there are no fixed position elements.
1570 if (!hasViewportConstrainedObjects()) 1568 if (!hasViewportConstrainedObjects())
1571 return; 1569 return;
1572 1570
1573 RefPtrWillBeRawPtr<FrameView> protect(this); 1571 RefPtrWillBeRawPtr<FrameView> protect(this);
1574 1572
(...skipping 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after
3963 3961
3964 if (!graphicsLayer) 3962 if (!graphicsLayer)
3965 return; 3963 return;
3966 3964
3967 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect); 3965 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect);
3968 3966
3969 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect))); 3967 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect)));
3970 } 3968 }
3971 3969
3972 } // namespace blink 3970 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceLoaderSet.h ('k') | Source/core/layout/LayoutBlock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698