mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Remove unneeded SlotForValue calls (since SlotForValue will soon require EnsureMutable has been called). (Bug 522595) r=bzbarsky
This commit is contained in:
parent
b540b44323
commit
703198f766
@ -148,11 +148,16 @@ public:
|
||||
void* slot = mData->SlotForValue(aProperty);
|
||||
|
||||
NS_ASSERTION(!slot || !mImportantData ||
|
||||
!mImportantData->SlotForValue(aProperty),
|
||||
!mImportantData->StorageFor(aProperty),
|
||||
"Property both important and not?");
|
||||
return slot;
|
||||
}
|
||||
|
||||
PRBool HasNonImportantValueFor(nsCSSProperty aProperty) const {
|
||||
NS_ABORT_IF_FALSE(!nsCSSProps::IsShorthand(aProperty), "must be longhand");
|
||||
return !!mData->StorageFor(aProperty);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the data, in preparation for its replacement with entirely
|
||||
* new data by a call to |CompressFrom|.
|
||||
|
@ -739,8 +739,8 @@ BuildStyleRule(nsCSSProperty aProperty,
|
||||
doc->GetDocumentURI(), baseURI,
|
||||
aTargetElement->NodePrincipal(),
|
||||
declaration, &changed)) ||
|
||||
// SlotForValue checks whether property parsed w/out CSS parsing errors
|
||||
!declaration->SlotForValue(propertyToCheck) ||
|
||||
// check whether property parsed without CSS parsing errors
|
||||
!declaration->HasNonImportantValueFor(propertyToCheck) ||
|
||||
NS_FAILED(NS_NewCSSStyleRule(getter_AddRefs(styleRule), nsnull,
|
||||
declaration))) {
|
||||
NS_WARNING("failure in BuildStyleRule");
|
||||
|
Loading…
Reference in New Issue
Block a user