Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move most animation processing to script #26464

Merged
merged 1 commit into from May 12, 2020

Conversation

@mrobinson
Copy link
Member

mrobinson commented May 7, 2020

This is preparation for sharing this code with layout_2020 and
implementing selective off-the-main-thread animations.

We still look for nodes not in the flow tree in the layout thread.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes do not require tests because they should not change behavior.
@highfive
Copy link

highfive commented May 7, 2020

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/document.rs, components/script/lib.rs, components/script/Cargo.toml, components/constellation/constellation.rs, components/script/animations.rs and 4 more
  • @cbrewster: components/constellation/constellation.rs
  • @KiChjang: components/script_traits/script_msg.rs, components/script/dom/document.rs, components/script/lib.rs, components/script/Cargo.toml, components/script/animations.rs and 5 more
  • @emilio: components/layout/lib.rs, components/style/animation.rs, components/layout/animation.rs, components/layout/context.rs
@highfive
Copy link

highfive commented May 7, 2020

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
  • These commits modify style, layout, and script code, but no tests are modified. Please consider adding a test!
@mrobinson
Copy link
Member Author

mrobinson commented May 7, 2020

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented May 7, 2020

Trying commit 69bf5d6 with merge 1bfeb85...

bors-servo added a commit that referenced this pull request May 7, 2020
Move most animation processing to script

This is preparation for sharing this code with layout_2020 and
implementing selective off-the-main-thread animations.

We still look for nodes not in the flow tree in the layout thread.

<!-- Please describe your changes on the following line: -->

---
<!-- 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 do not require tests because they should not change behavior.

<!-- 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. -->
@bors-servo
Copy link
Contributor

bors-servo commented May 7, 2020

☀️ Test successful - status-taskcluster
State: approved= try=True

@mrobinson mrobinson marked this pull request as ready for review May 7, 2020
@mrobinson mrobinson requested a review from jdm May 7, 2020
@mrobinson
Copy link
Member Author

mrobinson commented May 7, 2020

@jdm r?

@jdm jdm assigned jdm and unassigned ferjm May 8, 2020
@mrobinson mrobinson mentioned this pull request May 11, 2020
4 of 4 tasks complete
Copy link
Member

jdm left a comment

Great work!

components/layout_thread/lib.rs Show resolved Hide resolved
}
}

impl MallocSizeOf for Animations {

This comment has been minimized.

Copy link
@jdm

jdm May 11, 2020

Member

Can we use #[derive(MallocSizeOf)] on Animations instead?

This comment has been minimized.

Copy link
@mrobinson

mrobinson May 11, 2020

Author Member

I'm not sure this works because MallocSizeOf doesn't know what to do with ServoArc. I also cannot implement MallocSizeOf for ServoArc because it's defined outside the crate.

168 | impl MallocSizeOf for Arc<RwLock<FxHashMap<OpaqueNode, ElementAnimationSet>>> {
    | ^^^^^^^^^^^^^^^^^^^^^^-------------------------------------------------------
    | |                     |
    | |                     `style::servo_arc::Arc` is not defined in the current crate
    | impl doesn't use only types from inside the current crate

I have modified this to include the other member of the Animations though. Let me know if there's a better way to accomplish this.

This comment has been minimized.

Copy link
@jdm

jdm May 11, 2020

Member

Good point; Arcs always cause us problems. Let's add this comment above Animations:
// Make sure to update the MallocSizeOf implementation when changing the contents of this struct.

components/script/dom/bindings/trace.rs Outdated Show resolved Hide resolved
components/script/dom/window.rs Outdated Show resolved Hide resolved
components/script/script_thread.rs Outdated Show resolved Hide resolved
components/script/script_thread.rs Show resolved Hide resolved
@mrobinson mrobinson force-pushed the mrobinson:move-animations-to-script branch from 69bf5d6 to 938c488 May 11, 2020
@jdm
jdm approved these changes May 11, 2020
@jdm
Copy link
Member

jdm commented May 11, 2020

One last comment fix and this can merge! Thanks!

@mrobinson mrobinson force-pushed the mrobinson:move-animations-to-script branch from 938c488 to 9fc161f May 11, 2020
@jdm
Copy link
Member

jdm commented May 11, 2020

@bors-servo
Copy link
Contributor

bors-servo commented May 11, 2020

📌 Commit 9fc161f has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented May 11, 2020

Testing commit 9fc161f with merge 13a9479...

bors-servo added a commit that referenced this pull request May 11, 2020
Move most animation processing to script

This is preparation for sharing this code with layout_2020 and
implementing selective off-the-main-thread animations.

We still look for nodes not in the flow tree in the layout thread.

<!-- Please describe your changes on the following line: -->

---
<!-- 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 do not require tests because they should not change behavior.

<!-- 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. -->
@bors-servo
Copy link
Contributor

bors-servo commented May 11, 2020

💔 Test failed - status-taskcluster

@mrobinson
Copy link
Member Author

mrobinson commented May 11, 2020

The failure looks like a real issue. I'll take a look tomorrow.

1 unexpected results that are NOT known-intermittents:
  ▶ TIMEOUT [expected OK] /dom/events/webkit-transition-end-event.html
  │ 
  │ error: XDG_RUNTIME_DIR not set in the environment.
  └ libEGL warning: No hardware driver found, falling back to software rendering
  ▶ Unexpected subtest result in /dom/events/webkit-transition-end-event.html:
  │ TIMEOUT [expected PASS] webkitTransitionEnd event listener should not trigger if an unprefixed listener also exists
  └   → Test timed out
  ▶ Unexpected subtest result in /dom/events/webkit-transition-end-event.html:
  └ NOTRUN [expected PASS] webkitTransitionEnd event listener should not trigger if an unprefixed event handler also exists
  ▶ Unexpected subtest result in /dom/events/webkit-transition-end-event.html:
  └ NOTRUN [expected FAIL] event types for prefixed and unprefixed transitionend event listeners should be named appropriately
  ▶ Unexpected subtest result in /dom/events/webkit-transition-end-event.html:
  └ NOTRUN [expected PASS] webkitTransitionEnd event listener is case sensitive
This is preparation for sharing this code with layout_2020 and
implementing selective off-the-main-thread animations.

We still look for nodes not in the flow tree in the layout thread.
@mrobinson mrobinson force-pushed the mrobinson:move-animations-to-script branch from 9fc161f to 3b0619a May 12, 2020
@mrobinson
Copy link
Member Author

mrobinson commented May 12, 2020

@bors-servo try=wpt

Run wpt tests to see if this is a flake or a consistent failure.

@bors-servo
Copy link
Contributor

bors-servo commented May 12, 2020

Trying commit 3b0619a with merge 930794a...

bors-servo added a commit that referenced this pull request May 12, 2020
Move most animation processing to script

This is preparation for sharing this code with layout_2020 and
implementing selective off-the-main-thread animations.

We still look for nodes not in the flow tree in the layout thread.

<!-- Please describe your changes on the following line: -->

---
<!-- 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 do not require tests because they should not change behavior.

<!-- 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. -->
@bors-servo
Copy link
Contributor

bors-servo commented May 12, 2020

☀️ Test successful - status-taskcluster
State: approved= try=True

@mrobinson
Copy link
Member Author

mrobinson commented May 12, 2020

@bors-servo r=jdm

I think this failure might be a rare flake. I'm not able to reproduce it locally at all (despite trying pretty hard). I'm going to try to pass this through bors again and see if there is something about the commit process that is causing it.

@bors-servo
Copy link
Contributor

bors-servo commented May 12, 2020

📌 Commit 3b0619a has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented May 12, 2020

Testing commit 3b0619a with merge ebc139d...

bors-servo added a commit that referenced this pull request May 12, 2020
Move most animation processing to script

This is preparation for sharing this code with layout_2020 and
implementing selective off-the-main-thread animations.

We still look for nodes not in the flow tree in the layout thread.

<!-- Please describe your changes on the following line: -->

---
<!-- 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 do not require tests because they should not change behavior.

<!-- 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. -->
@bors-servo
Copy link
Contributor

bors-servo commented May 12, 2020

💔 Test failed - status-taskcluster

@mrobinson
Copy link
Member Author

mrobinson commented May 12, 2020

@bors-servo
Copy link
Contributor

bors-servo commented May 12, 2020

Testing commit 3b0619a with merge c5617ef...

@bors-servo
Copy link
Contributor

bors-servo commented May 12, 2020

☀️ Test successful - status-taskcluster
Approved by: jdm
Pushing c5617ef to master...

@bors-servo bors-servo merged commit c5617ef into servo:master May 12, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.