Bug 1365871 - stylo: Make editor/libeditor/tests pass by removing MOZ_CRASH from CSSEditUtils. r?xidorn
The MOZ_CRASH was added because we were lacking a implementation of ServoDeclarationBlock::GetPropertyValueByID, but it was added in Bug1294299
MozReview-Commit-ID: GPsFvTLxsMd
--- a/editor/libeditor/CSSEditUtils.cpp
+++ b/editor/libeditor/CSSEditUtils.cpp
@@ -544,25 +544,23 @@ CSSEditUtils::GetCSSInlinePropertyBase(n
return NS_OK;
}
MOZ_ASSERT(aStyleType == eSpecified);
RefPtr<DeclarationBlock> decl = element->GetInlineStyleDeclaration();
if (!decl) {
return NS_OK;
}
- if (decl->IsServo()) {
- MOZ_CRASH("stylo: not implemented");
- return NS_ERROR_NOT_IMPLEMENTED;
- }
+
nsCSSPropertyID prop =
nsCSSProps::LookupProperty(nsDependentAtomString(aProperty),
CSSEnabledState::eForAllContent);
MOZ_ASSERT(prop != eCSSProperty_UNKNOWN);
- decl->AsGecko()->GetPropertyValueByID(prop, aValue);
+
+ decl->GetPropertyValueByID(prop, aValue);
return NS_OK;
}
already_AddRefed<nsComputedDOMStyle>
CSSEditUtils::GetComputedStyle(Element* aElement)
{
MOZ_ASSERT(aElement);