From 635056e199999c7040caa4a8c2d6c30aa5ad4048 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 11 Jan 2017 19:03:16 -0500 Subject: [PATCH] Bug 1330060 part 2. Gecko_GetServoDeclarationBlock should use Element::GetInlineStyleDeclaration instead of reinventing it. r=heycam --- layout/style/ServoBindings.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/layout/style/ServoBindings.cpp b/layout/style/ServoBindings.cpp index 916081938848..651855a9e5b5 100644 --- a/layout/style/ServoBindings.cpp +++ b/layout/style/ServoBindings.cpp @@ -308,11 +308,7 @@ Gecko_DropElementSnapshot(ServoElementSnapshotOwned aSnapshot) RawServoDeclarationBlockStrongBorrowedOrNull Gecko_GetServoDeclarationBlock(RawGeckoElementBorrowed aElement) { - const nsAttrValue* attr = aElement->GetParsedAttr(nsGkAtoms::style); - if (!attr || attr->Type() != nsAttrValue::eCSSDeclaration) { - return nullptr; - } - DeclarationBlock* decl = attr->GetCSSDeclarationValue(); + DeclarationBlock* decl = aElement->GetInlineStyleDeclaration(); if (!decl) { return nullptr; }