From 16b9ed1c92db219b272b299d86e57ef205c93367 Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Sat, 14 Nov 2009 19:16:59 -0800 Subject: [PATCH] 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 --- layout/style/nsCSSDataBlock.cpp | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/layout/style/nsCSSDataBlock.cpp b/layout/style/nsCSSDataBlock.cpp index 1db551f05a2..c632944df21 100644 --- a/layout/style/nsCSSDataBlock.cpp +++ b/layout/style/nsCSSDataBlock.cpp @@ -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(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;