зеркало из https://github.com/mozilla/gecko-dev.git
Attempt to fix Tp regression from bug 11011. Pending r=biesi, sr=roc.
This commit is contained in:
Родитель
d67e44decb
Коммит
0346043b72
|
@ -84,13 +84,10 @@ protected:
|
|||
* @param aForce If true, make sure to load the URI. If false, only
|
||||
* load if the URI is different from the currently loaded URI.
|
||||
* @param aNotify If true, nsIDocumentObserver state change notifications
|
||||
* will be sent as needed. Note that this is only here so
|
||||
* nsObjectFrame can avoid getting reframed inside reflow;
|
||||
* once objects load data from content we want to always
|
||||
* notify.
|
||||
* will be sent as needed.
|
||||
*/
|
||||
nsresult ImageURIChanged(const nsAString& aNewURI,
|
||||
PRBool aForce, PRBool aNotify = PR_TRUE);
|
||||
nsresult ImageURIChanged(const nsAString& aNewURI, PRBool aForce,
|
||||
PRBool aNotify);
|
||||
|
||||
/**
|
||||
* ImageState is called by subclasses that are computing their content state.
|
||||
|
|
|
@ -565,7 +565,7 @@ nsHTMLImageElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
|
|||
|
||||
// Force image loading here, so that we'll try to load the image from
|
||||
// network if it's set to be not cacheable...
|
||||
ImageURIChanged(aValue, PR_TRUE);
|
||||
ImageURIChanged(aValue, PR_TRUE, aNotify);
|
||||
|
||||
if (mCurrentRequest && !mPendingRequest &&
|
||||
oldCurrentRequest != mCurrentRequest) {
|
||||
|
@ -599,7 +599,9 @@ nsHTMLImageElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
|||
nsAutoString uri;
|
||||
nsresult result = GetAttr(kNameSpaceID_None, nsHTMLAtoms::src, uri);
|
||||
if (result == NS_CONTENT_ATTR_HAS_VALUE) {
|
||||
ImageURIChanged(uri, PR_FALSE);
|
||||
// Note: no need to notify here; since we're just now being bound
|
||||
// we don't have any frames or anything yet.
|
||||
ImageURIChanged(uri, PR_FALSE, PR_FALSE);
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
|
|
@ -461,7 +461,7 @@ nsHTMLInputElement::BeforeSetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
|
|||
} else if (aNotify && aName == nsHTMLAtoms::src &&
|
||||
aValue && mType == NS_FORM_INPUT_IMAGE) {
|
||||
// Null value means the attr got unset; don't trigger on that
|
||||
ImageURIChanged(*aValue, PR_TRUE);
|
||||
ImageURIChanged(*aValue, PR_TRUE, aNotify);
|
||||
} else if (aNotify && aName == nsHTMLAtoms::disabled) {
|
||||
SET_BOOLBIT(mBitField, BF_DISABLED_CHANGED, PR_TRUE);
|
||||
}
|
||||
|
@ -556,7 +556,7 @@ nsHTMLInputElement::AfterSetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
|
|||
nsAutoString src;
|
||||
nsresult rv = GetAttr(kNameSpaceID_None, nsHTMLAtoms::src, src);
|
||||
if (rv == NS_CONTENT_ATTR_HAS_VALUE) {
|
||||
ImageURIChanged(src, PR_FALSE);
|
||||
ImageURIChanged(src, PR_FALSE, aNotify);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1724,7 +1724,9 @@ nsHTMLInputElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
|||
nsAutoString uri;
|
||||
nsresult result = GetAttr(kNameSpaceID_None, nsHTMLAtoms::src, uri);
|
||||
if (result == NS_CONTENT_ATTR_HAS_VALUE) {
|
||||
ImageURIChanged(uri, PR_FALSE);
|
||||
// Note: no need to notify here; since we're just now being bound
|
||||
// we don't have any frames or anything yet.
|
||||
ImageURIChanged(uri, PR_FALSE, PR_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -387,7 +387,7 @@ nsSVGImageElement::DidModifySVGObservable(nsISVGValue* aObservable,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
ImageURIChanged(href, PR_TRUE);
|
||||
ImageURIChanged(href, PR_TRUE, PR_TRUE);
|
||||
}
|
||||
|
||||
return nsSVGImageElementBase::DidModifySVGObservable(aObservable, aModType);
|
||||
|
|
Загрузка…
Ссылка в новой задаче