зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1312770 - Slightly increase loading priority for images that need size information for layout. r=tnikkel
MozReview-Commit-ID: 3SHpPXyIdVB --HG-- extra : rebase_source : 55c06dd175a957d7e976f7e03869784320e73d67
This commit is contained in:
Родитель
7eb27c99ad
Коммит
980860cb2a
|
@ -285,7 +285,14 @@ nsImageFrame::Init(nsIContent* aContent,
|
|||
getter_AddRefs(currentRequest));
|
||||
|
||||
if (currentRequest) {
|
||||
currentRequest->BoostPriority(imgIRequest::CATEGORY_FRAME_INIT);
|
||||
uint32_t categoryToBoostPriority = imgIRequest::CATEGORY_FRAME_INIT;
|
||||
|
||||
// Increase load priority further if intrinsic size might be important for layout.
|
||||
if (!HaveSpecifiedSize(StylePosition())) {
|
||||
categoryToBoostPriority |= imgIRequest::CATEGORY_SIZE_QUERY;
|
||||
}
|
||||
|
||||
currentRequest->BoostPriority(categoryToBoostPriority);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче