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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 86533002: Raise the loading priority of in-viewport images. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index aa4988f149f2db66f85fdc75c814b79b31926950..1fe8afd98beab13368f4685b39d707a544abe089 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -36,6 +36,7 @@
#include "core/editing/FrameSelection.h"
#include "core/events/OverflowEvent.h"
#include "core/fetch/ResourceFetcher.h"
+#include "core/fetch/ResourceLoadPriorityOptimizer.h"
#include "core/fetch/TextResourceDecoder.h"
#include "core/html/HTMLFrameElement.h"
#include "core/html/HTMLHtmlElement.h"
@@ -907,6 +908,9 @@ void FrameView::performLayout(RenderObject* rootForThisLayout, bool inSubtreeLay
LayoutIndicator layoutIndicator;
rootForThisLayout->layout();
+
+ ResourceLoadPriorityOptimizer modifier;
+ rootForThisLayout->didLayout(modifier);
}
bool autosized = frame().document()->textAutosizer()->processSubtree(rootForThisLayout);
@@ -914,6 +918,9 @@ void FrameView::performLayout(RenderObject* rootForThisLayout, bool inSubtreeLay
TRACE_EVENT0("webkit", "2nd layout due to Text Autosizing");
LayoutIndicator layoutIndicator;
rootForThisLayout->layout();
+
+ ResourceLoadPriorityOptimizer modifier;
+ rootForThisLayout->didLayout(modifier);
}
m_inLayout = false;
@@ -1662,6 +1669,9 @@ void FrameView::scrollPositionChanged()
if (renderView->usesCompositing())
renderView->compositor()->frameViewDidScroll();
}
+
+ ResourceLoadPriorityOptimizer modifier;
+ m_frame->document()->renderer()->didScroll(modifier);
}
void FrameView::repaintFixedElementsAfterScrolling()

Powered by Google App Engine
This is Rietveld 408576698