Issue #2111 - Follow-up: Add missing include and fix namespace conflict when building layout deunified

This commit is contained in:
FranklinDM 2024-03-29 10:56:00 +08:00 committed by roytam1
commit 5e34e0e81b

View file

@ -24,6 +24,7 @@
#include "nsDOMCSSDeclaration.h"
#include "nsNameSpaceManager.h"
#include "nsXMLNameSpaceMap.h"
#include "nsCSSParser.h"
#include "nsCSSPseudoClasses.h"
#include "nsCSSAnonBoxes.h"
#include "nsTArray.h"
@ -1619,7 +1620,7 @@ StyleRule::SetSelectorText(const nsAString& aSelectorText)
// NOTE: Passing a null loader means that the parser is always in
// standards mode and never in quirks mode.
nsCSSParser css(loader, sheet);
nsCSSParser parser(loader, sheet);
// StyleRule lives inside of the Inner, it is unsafe to call WillDirty
// if sheet does not already have a unique Inner.
@ -1628,7 +1629,7 @@ StyleRule::SetSelectorText(const nsAString& aSelectorText)
nsCSSSelectorList* selectorList = nullptr;
nsresult result = css.ParseSelectorString(
nsresult result = parser.ParseSelectorString(
aSelectorText, sheet->GetSheetURI(), 0, &selectorList);
if (NS_FAILED(result)) {
// Ignore parsing errors and continue to use the previous value.