Bug 1365871 - stylo: Make editor/libeditor/tests pass by removing MOZ_CRASH from CSSEditUtils. r?xidorn draft
authorFernando Jimenez Moreno <ferjmoreno@gmail.com>
Thu, 25 May 2017 09:27:40 +0200
changeset 584352 ba282c85f60a76cc6d8e8b72f6a11084cedb9ff1
parent 580912 8e98dab5054dd093a37ba20c62cf0523e484cfbd
child 630347 583b90e4917ad1b8f4780104083712cc576b648f
push id60703
push userferjmoreno@gmail.com
push dateThu, 25 May 2017 09:58:22 +0000
reviewersxidorn
bugs1365871, 1294299
milestone55.0a1
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
editor/libeditor/CSSEditUtils.cpp
--- 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);