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:
L. David Baron 2009-11-14 19:16:59 -08:00
Родитель a704f489bf
Коммит 16b9ed1c92
1 изменённых файлов: 17 добавлений и 15 удалений

Просмотреть файл

@ -290,24 +290,26 @@ nsCSSCompressedDataBlock::MapRuleInfoInto(nsRuleData *aRuleData) const
} break;
case eCSSType_ValueList:
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)
l; l = l->mNext) {
TryToStartImageLoad(l->mValue, doc);
}
} else if (iProp == eCSSProperty_cursor) {
for (nsCSSValueList* l = ValueListAtCursor(cursor);
l; l = l->mNext)
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) {
}
void* val = PointerAtCursor(cursor);
NS_ASSERTION(val, "oops");
*target = val;