diff options
author | bors-servo <infra@servo.org> | 2023-04-24 07:55:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-24 07:55:25 +0200 |
commit | c44c6e8c11ae4bf5f65b8dcba3f5a942a52e9782 (patch) | |
tree | 9399202e69741609c48e3b92caecd959b91288a3 /python/servo/post_build_commands.py | |
parent | 06873da56625640f252814707befa96bf130dad4 (diff) | |
parent | c77e4e4e69ee50e971f781d03a43cb7ef862a9ec (diff) | |
download | servo-c44c6e8c11ae4bf5f65b8dcba3f5a942a52e9782.tar.gz servo-c44c6e8c11ae4bf5f65b8dcba3f5a942a52e9782.zip |
Auto merge of #29646 - CYBAI:fix-classname-filter, r=jdm
Fix checking for empty set in getElementsByClassName
Because empty set with `.all(predicate)` will always return `true`, it will result in always filtering wrong elements when the classes is empty set.
Thus, we return earlier with `always_empty` HTMLCollection in the empty classes case so that we can avoid filtering on empty sets.
With adding the checking, we can fix the failures in `/dom/nodes/getElementsByClassName-empty-set.html`.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
- [x] There are tests for these changes
Diffstat (limited to 'python/servo/post_build_commands.py')
0 files changed, 0 insertions, 0 deletions