mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
In the ValueList case, don't start image loads for declarations that are overridden by others (just like we already do for the Value case). (Bug 517224) r=bzbarsky
This commit is contained in:
parent
d7d8f0ef43
commit
6e161b5b9c
@ -290,24 +290,26 @@ nsCSSCompressedDataBlock::MapRuleInfoInto(nsRuleData *aRuleData) const
|
||||
} break;
|
||||
|
||||
case eCSSType_ValueList:
|
||||
if (iProp == eCSSProperty_background_image ||
|
||||
iProp == eCSSProperty_content) {
|
||||
for (nsCSSValueList* l = ValueListAtCursor(cursor);
|
||||
l; l = l->mNext)
|
||||
TryToStartImageLoad(l->mValue, doc);
|
||||
} else if (iProp == eCSSProperty_cursor) {
|
||||
for (nsCSSValueList* l = ValueListAtCursor(cursor);
|
||||
l; l = l->mNext)
|
||||
if (l->mValue.GetUnit() == eCSSUnit_Array) {
|
||||
const nsCSSValue& image =
|
||||
l->mValue.GetArrayValue()->Item(0);
|
||||
TryToStartImageLoad(image, doc);
|
||||
}
|
||||
}
|
||||
// fall through
|
||||
case eCSSType_ValuePairList: {
|
||||
void** target = static_cast<void**>(prop);
|
||||
if (!*target) {
|
||||
if (iProp == eCSSProperty_background_image ||
|
||||
iProp == eCSSProperty_content) {
|
||||
for (nsCSSValueList* l = ValueListAtCursor(cursor);
|
||||
l; l = l->mNext) {
|
||||
TryToStartImageLoad(l->mValue, doc);
|
||||
}
|
||||
} else if (iProp == eCSSProperty_cursor) {
|
||||
for (nsCSSValueList* l = ValueListAtCursor(cursor);
|
||||
l; l = l->mNext) {
|
||||
if (l->mValue.GetUnit() == eCSSUnit_Array) {
|
||||
const nsCSSValue& image =
|
||||
l->mValue.GetArrayValue()->Item(0);
|
||||
TryToStartImageLoad(image, doc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void* val = PointerAtCursor(cursor);
|
||||
NS_ASSERTION(val, "oops");
|
||||
*target = val;
|
||||
|
Loading…
Reference in New Issue
Block a user