mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 841547 - Only set the 'decoded' class on top-level image documents. r=jaws, r=Ms2ger
This commit is contained in:
parent
a07141c566
commit
ccfd1c8cb1
@ -444,7 +444,7 @@ ImageDocument::Notify(imgIRequest* aRequest, int32_t aType, const nsIntRect* aDa
|
||||
nsDOMTokenList* classList = mImageContent->AsElement()->GetClassList();
|
||||
mozilla::ErrorResult rv;
|
||||
if (aType == imgINotificationObserver::DECODE_COMPLETE) {
|
||||
if (mImageContent) {
|
||||
if (mImageContent && !nsContentUtils::IsChildOfSameType(this)) {
|
||||
// Update the background-color of the image only after the
|
||||
// image has been decoded to prevent flashes of just the
|
||||
// background-color.
|
||||
@ -455,7 +455,7 @@ ImageDocument::Notify(imgIRequest* aRequest, int32_t aType, const nsIntRect* aDa
|
||||
|
||||
if (aType == imgINotificationObserver::DISCARD) {
|
||||
// mImageContent can be null if the document is already destroyed
|
||||
if (mImageContent) {
|
||||
if (mImageContent && !nsContentUtils::IsChildOfSameType(this)) {
|
||||
// Remove any decoded-related styling when the image is unloaded.
|
||||
classList->Remove(NS_LITERAL_STRING("decoded"), rv);
|
||||
NS_ENSURE_SUCCESS(rv.ErrorCode(), rv.ErrorCode());
|
||||
|
Loading…
Reference in New Issue
Block a user