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

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

Issue 109153003: Raise the loading priority of in-viewport images. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changes from review. Created 7 years 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
« no previous file with comments | « Source/core/fetch/ResourceLoadPriorityOptimizer.cpp ('k') | Source/core/rendering/RenderBlock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 203f39d68eca5aba6e3818d7770d317d3a25b230..46bc5a2c9d24c1a19ebe0d3d572ab4e4f1a8e040 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -37,6 +37,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"
@@ -893,6 +894,9 @@ void FrameView::performLayout(RenderObject* rootForThisLayout, bool inSubtreeLay
LayoutIndicator layoutIndicator;
rootForThisLayout->layout();
gatherDebugLayoutRects(rootForThisLayout);
+
+ ResourceLoadPriorityOptimizer modifier;
+ rootForThisLayout->didLayout(modifier);
}
TextAutosizer* textAutosizer = frame().document()->textAutosizer();
@@ -902,6 +906,9 @@ void FrameView::performLayout(RenderObject* rootForThisLayout, bool inSubtreeLay
LayoutIndicator layoutIndicator;
rootForThisLayout->layout();
gatherDebugLayoutRects(rootForThisLayout);
+
+ ResourceLoadPriorityOptimizer modifier;
+ rootForThisLayout->didLayout(modifier);
}
m_inLayout = false;
@@ -1670,6 +1677,11 @@ void FrameView::scrollPositionChanged()
if (renderView->usesCompositing())
renderView->compositor()->frameViewDidScroll();
}
+
+ if (m_frame->document() && m_frame->document()->renderer()) {
+ ResourceLoadPriorityOptimizer modifier;
+ m_frame->document()->renderer()->didScroll(modifier);
+ }
}
void FrameView::repaintFixedElementsAfterScrolling()
« no previous file with comments | « Source/core/fetch/ResourceLoadPriorityOptimizer.cpp ('k') | Source/core/rendering/RenderBlock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698