Issue #2112 - Part 6: Remove IsStyledByServo function and callers

This commit is contained in:
FranklinDM 2024-03-25 02:09:12 +08:00 committed by roytam1
commit 10bf8705d0
13 changed files with 16 additions and 181 deletions

View file

@ -18,7 +18,6 @@
#include "nsWrapperCacheInlines.h"
#include "nsIFrame.h"
#include "ActiveLayerTracker.h"
#include "ServoDeclarationBlock.h"
#include "StyleSetHandle.h"
#include "DeclarationBlockInlines.h"
@ -134,12 +133,8 @@ nsDOMCSSAttributeDeclaration::GetCSSDeclaration(Operation aOperation)
// cannot fail
RefPtr<DeclarationBlock> decl;
if (mElement->IsStyledByServo()) {
decl = new ServoDeclarationBlock();
} else {
decl = new css::Declaration();
decl->AsGecko()->InitializeEmpty();
}
decl = new css::Declaration();
decl->AsGecko()->InitializeEmpty();
// this *can* fail (inside SetAttrAndNotify, at least).
nsresult rv;