Issue #2486 - Part 2: Implement parser support for layer block and layer statements

This does not deal with layer specificity.
This commit is contained in:
FranklinDM 2024-07-14 21:43:44 +08:00 committed by roytam1
commit 9630698d31
4 changed files with 100 additions and 2 deletions

View file

@ -18,6 +18,8 @@
#include "nsIDOMCSSImportRule.h"
#include "nsIDOMCSSMediaRule.h"
#include "nsIDOMCSSSupportsRule.h"
#include "nsIDOMCSSLayerBlockRule.h"
#include "nsIDOMCSSLayerStatementRule.h"
#include "nsIDOMCSSRule.h"
#include "nsIURI.h"
#include "nsIDocument.h"
@ -322,6 +324,12 @@ inCSSValueSearch::SearchRuleList(nsIDOMCSSRuleList* aRuleList, nsIURI* aBaseURL)
supportsRule->GetCssRules(getter_AddRefs(childRules));
SearchRuleList(childRules, aBaseURL);
} break;
case nsIDOMCSSRule::LAYER_BLOCK_RULE: {
nsCOMPtr<nsIDOMCSSLayerBlockRule> layerBlockRule = do_QueryInterface(rule);
nsCOMPtr<nsIDOMCSSRuleList> childRules;
layerBlockRule->GetCssRules(getter_AddRefs(childRules));
SearchRuleList(childRules, aBaseURL);
} break;
default:
// XXX handle nsIDOMCSSRule::PAGE_RULE if we ever support it
break;