Skip to content
Permalink
Browse files
[css-contain] Support contain:style for counters
https://bugs.webkit.org/show_bug.cgi?id=226458

Patch by Rob Buis <rbuis@igalia.com> on 2021-10-24
Reviewed by Antti Koivisto.

Remove unneeded logic from r284642 change.

* rendering/RenderCounter.cpp:
(WebCore::previousInPreOrder):

Canonical link: https://commits.webkit.org/243464@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
rwlbuis authored and webkit-commit-queue committed Oct 24, 2021
1 parent a26e094 commit 7a65cb376d4170e2361ba8d6f47f706aa5339e5e
Showing 2 changed files with 17 additions and 12 deletions.
@@ -1,3 +1,15 @@
2021-10-24 Rob Buis <rbuis@igalia.com>

[css-contain] Support contain:style for counters
https://bugs.webkit.org/show_bug.cgi?id=226458

Reviewed by Antti Koivisto.

Remove unneeded logic from r284642 change.

* rendering/RenderCounter.cpp:
(WebCore::previousInPreOrder):

2021-10-23 Rob Buis <rbuis@igalia.com>

Null check in traverseNodesForSerialization
@@ -79,18 +79,11 @@ static RenderElement* previousInPreOrder(const RenderElement& renderer)
Element* previous = ElementTraversal::previousIncludingPseudo(*renderer.element());
Element* styleContainAncestor = ancestorStyleContainmentObject(*renderer.element());

while (true) {
while (previous && !previous->renderer())
previous = ElementTraversal::previousIncludingPseudo(*previous, styleContainAncestor);
if (!previous)
return nullptr;
Element* previousStyleContainAncestor = ancestorStyleContainmentObject(*previous);
if (previousStyleContainAncestor == styleContainAncestor)
return previous->renderer();
if (!previousStyleContainAncestor)
return nullptr;
previous = previousStyleContainAncestor;
}
while (previous && !previous->renderer())
previous = ElementTraversal::previousIncludingPseudo(*previous, styleContainAncestor);
if (!previous)
return nullptr;
return previous->renderer();
}

static inline Element* parentOrPseudoHostElement(const RenderElement& renderer)

0 comments on commit 7a65cb3

Please sign in to comment.