зеркало из https://github.com/mozilla/gecko-dev.git
s/BumpPriority/AdjustPriority/ (bug 278531) r=shaver sr=brendan
This commit is contained in:
Родитель
d9cd304238
Коммит
bdb13852d9
|
@ -305,7 +305,7 @@ nsImageFrame::Init(nsPresContext* aPresContext,
|
|||
// Give image loads associated with an image frame a small priority boost!
|
||||
nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(currentRequest);
|
||||
if (p)
|
||||
p->BumpPriority(-1);
|
||||
p->AdjustPriority(-1);
|
||||
}
|
||||
|
||||
if (currentLoadStatus & imgIRequest::STATUS_ERROR) {
|
||||
|
|
|
@ -231,7 +231,7 @@ static nsresult NewImageChannel(nsIChannel **aResult,
|
|||
if (aLoadFlags & nsIRequest::LOAD_BACKGROUND)
|
||||
++priority; // further reduce priority for background loads
|
||||
|
||||
p->BumpPriority(priority);
|
||||
p->AdjustPriority(priority);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -335,7 +335,7 @@ PRInt32 imgRequest::Priority() const
|
|||
return priority;
|
||||
}
|
||||
|
||||
void imgRequest::BumpPriority(imgRequestProxy *proxy, PRInt32 delta)
|
||||
void imgRequest::AdjustPriority(imgRequestProxy *proxy, PRInt32 delta)
|
||||
{
|
||||
// only the first proxy is allowed to modify the priority of this image load.
|
||||
//
|
||||
|
@ -349,7 +349,7 @@ void imgRequest::BumpPriority(imgRequestProxy *proxy, PRInt32 delta)
|
|||
|
||||
nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(mChannel);
|
||||
if (p)
|
||||
p->BumpPriority(delta);
|
||||
p->AdjustPriority(delta);
|
||||
}
|
||||
|
||||
/** imgILoad methods **/
|
||||
|
|
|
@ -121,9 +121,9 @@ private:
|
|||
// PRIORITY_NORMAL if it doesn't support nsISupportsPriority.
|
||||
PRInt32 Priority() const;
|
||||
|
||||
// Bump the priority of the underlying network request by the given delta
|
||||
// Adjust the priority of the underlying network request by the given delta
|
||||
// on behalf of the given proxy.
|
||||
void BumpPriority(imgRequestProxy *aProxy, PRInt32 aDelta);
|
||||
void AdjustPriority(imgRequestProxy *aProxy, PRInt32 aDelta);
|
||||
|
||||
public:
|
||||
NS_DECL_IMGILOAD
|
||||
|
|
|
@ -366,14 +366,14 @@ NS_IMETHODIMP imgRequestProxy::GetPriority(PRInt32 *priority)
|
|||
NS_IMETHODIMP imgRequestProxy::SetPriority(PRInt32 priority)
|
||||
{
|
||||
NS_ENSURE_STATE(mOwner);
|
||||
mOwner->BumpPriority(this, priority - mOwner->Priority());
|
||||
mOwner->AdjustPriority(this, priority - mOwner->Priority());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP imgRequestProxy::BumpPriority(PRInt32 priority)
|
||||
NS_IMETHODIMP imgRequestProxy::AdjustPriority(PRInt32 priority)
|
||||
{
|
||||
NS_ENSURE_STATE(mOwner);
|
||||
mOwner->BumpPriority(this, priority);
|
||||
mOwner->AdjustPriority(this, priority);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ RescheduleRequest(nsIRequest *aRequest, PRInt32 delta)
|
|||
{
|
||||
nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(aRequest);
|
||||
if (p)
|
||||
p->BumpPriority(delta);
|
||||
p->AdjustPriority(delta);
|
||||
}
|
||||
|
||||
PR_STATIC_CALLBACK(PLDHashOperator)
|
||||
|
@ -837,11 +837,11 @@ nsLoadGroup::GetPriority(PRInt32 *aValue)
|
|||
NS_IMETHODIMP
|
||||
nsLoadGroup::SetPriority(PRInt32 aValue)
|
||||
{
|
||||
return BumpPriority(aValue - mPriority);
|
||||
return AdjustPriority(aValue - mPriority);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsLoadGroup::BumpPriority(PRInt32 aDelta)
|
||||
nsLoadGroup::AdjustPriority(PRInt32 aDelta)
|
||||
{
|
||||
// Update the priority for each request that supports nsISupportsPriority
|
||||
if (aDelta != 0) {
|
||||
|
|
|
@ -3664,7 +3664,7 @@ nsHttpChannel::SetPriority(PRInt32 value)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHttpChannel::BumpPriority(PRInt32 delta)
|
||||
nsHttpChannel::AdjustPriority(PRInt32 delta)
|
||||
{
|
||||
return SetPriority(mPriority + delta);
|
||||
}
|
||||
|
|
|
@ -1509,14 +1509,14 @@ NS_IMETHODIMP nsDocLoader::SetPriority(PRInt32 aPriority)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocLoader::BumpPriority(PRInt32 aDelta)
|
||||
NS_IMETHODIMP nsDocLoader::AdjustPriority(PRInt32 aDelta)
|
||||
{
|
||||
PR_LOG(gDocLoaderLog, PR_LOG_DEBUG,
|
||||
("DocLoader:%p: BumpPriority(%d) called\n", this, aDelta));
|
||||
("DocLoader:%p: AdjustPriority(%d) called\n", this, aDelta));
|
||||
|
||||
nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(mLoadGroup);
|
||||
if (p)
|
||||
p->BumpPriority(aDelta);
|
||||
p->AdjustPriority(aDelta);
|
||||
|
||||
PRInt32 count = mChildList.Count();
|
||||
|
||||
|
@ -1524,7 +1524,7 @@ NS_IMETHODIMP nsDocLoader::BumpPriority(PRInt32 aDelta)
|
|||
for (PRInt32 i=0; i < count; i++) {
|
||||
loader = NS_STATIC_CAST(nsDocLoader*, ChildAt(i));
|
||||
if (loader) {
|
||||
loader->BumpPriority(aDelta);
|
||||
loader->AdjustPriority(aDelta);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -73,5 +73,5 @@ interface nsISupportsPriority : nsISupports
|
|||
* reduce the amount of coding required to increment or decrement the value
|
||||
* of the priority attribute.
|
||||
*/
|
||||
void bumpPriority(in long delta);
|
||||
void adjustPriority(in long delta);
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче