summaryrefslogtreecommitdiffstats
path: root/layout/base/nsCounterManager.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:42 +0000
commitda4c7e7ed675c3bf405668739c3012d140856109 (patch)
treecdd868dba063fecba609a1d819de271f0d51b23e /layout/base/nsCounterManager.cpp
parentAdding upstream version 125.0.3. (diff)
downloadfirefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz
firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/base/nsCounterManager.cpp')
-rw-r--r--layout/base/nsCounterManager.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/layout/base/nsCounterManager.cpp b/layout/base/nsCounterManager.cpp
index 7c2e9bb776..f2bbb5e50e 100644
--- a/layout/base/nsCounterManager.cpp
+++ b/layout/base/nsCounterManager.cpp
@@ -203,7 +203,11 @@ void nsCounterList::SetScope(nsCounterNode* aNode) {
// the element itself, then we use that scope.
// Otherwise, fall through to consider scopes created by siblings (and
// their descendants) in reverse document order.
- if (aNode->mType != nsCounterNode::USE &&
+ // Do this only for the list-item counter, while the CSSWG discusses what the
+ // right thing to do here is, see bug 1548753 and
+ // https://github.com/w3c/csswg-drafts/issues/5477.
+ if (mCounterName == nsGkAtoms::list_item &&
+ aNode->mType != nsCounterNode::USE &&
StaticPrefs::layout_css_counter_ancestor_scope_enabled()) {
for (auto* p = aNode->mPseudoFrame; p; p = p->GetParent()) {
// This relies on the fact that a RESET node is always the first