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

@ -3932,7 +3932,8 @@ GatherDocRuleEnumFunc(css::Rule* aRule, void* aData)
"mMustGatherDocumentRules is true");
if (css::Rule::MEDIA_RULE == type ||
css::Rule::SUPPORTS_RULE == type) {
css::Rule::SUPPORTS_RULE == type ||
css::Rule::LAYER_BLOCK_RULE == type) {
css::GroupRule* groupRule = static_cast<css::GroupRule*>(aRule);
if (!groupRule->EnumerateRulesForwards(GatherDocRuleEnumFunc, aData)) {
return false;
@ -4011,7 +4012,8 @@ CascadeRuleEnumFunc(css::Rule* aRule, void* aData)
}
}
else if (css::Rule::MEDIA_RULE == type ||
css::Rule::SUPPORTS_RULE == type) {
css::Rule::SUPPORTS_RULE == type ||
css::Rule::LAYER_BLOCK_RULE == type) {
css::GroupRule* groupRule = static_cast<css::GroupRule*>(aRule);
const bool use =
groupRule->UseForPresentation(data->mPresContext, data->mCacheKey);