mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Auto merge of #20012 - alexfjw:avoid_Window-GetComputedStyle_when_checking_for_display-none, r=emilio
Avoid `Window::GetComputedStyle` when checking for `display: none` <!-- Please describe your changes on the following line: --> Refactored Window::GetComputedStyle to use Element::Style. Not sure which tests are relevant, but I've ran the dom, fetch & 2dcontext wpt tests. They don't seem to give errors. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #19885. <!-- Either: --> - [x] These changes do not require tests because it's a refactoring task <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20012) <!-- Reviewable:end -->
This commit is contained in:
commit
ac162e8f72
5 changed files with 9 additions and 18 deletions
|
@ -70817,7 +70817,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"mozilla/transitionend_safety.html": [
|
||||
"778e43b049aa421bad7f86eb03d0955576a84ce0",
|
||||
"16d238e94b2cc2843c9aee4210db43d496bb3114",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/union.html": [
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
elem.textContent = 'hi there';
|
||||
elem.style.transition = 'color 10ms';
|
||||
elem.style.color = 'black';
|
||||
elem.ontransitionend = t.step_func_done();
|
||||
|
||||
t.step_timeout(function() {
|
||||
elem.style.color = 'red';
|
||||
|
@ -20,6 +19,7 @@
|
|||
document.body.removeChild(elem);
|
||||
elem = null;
|
||||
window.gc();
|
||||
t.step_timeout(t.step_func_done(), 100);
|
||||
}, 0);
|
||||
}, 0);
|
||||
}, 'Nodes cannot be GCed while a CSS transition is in effect.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue