diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-07-18 12:37:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-18 12:37:46 -0700 |
commit | a6739cb17f381b88531eb6173d048868aec8e082 (patch) | |
tree | d2cbc2ee8d249ef4a1777a32468cbc9c3c8b19fe /components/script/script_thread.rs | |
parent | eb26194dd12f1430e9089512d54973d3b12b2e36 (diff) | |
parent | 9ecb931c5e1f17ea1db880fc61ce39fbb44fe94d (diff) | |
download | servo-a6739cb17f381b88531eb6173d048868aec8e082.tar.gz servo-a6739cb17f381b88531eb6173d048868aec8e082.zip |
Auto merge of #17761 - cbrewster:ce_reactions, r=jdm
Add [CEReactions] to webidls
<!-- Please describe your changes on the following line: -->
Relies on #17614
---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- 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/17761)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index ccc5d97b282..6f811c8be67 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -753,6 +753,24 @@ impl ScriptThread { let _ = window.layout_chan().send(msg); } + pub fn push_new_element_queue() { + SCRIPT_THREAD_ROOT.with(|root| { + if let Some(script_thread) = root.get() { + let script_thread = unsafe { &*script_thread }; + script_thread.custom_element_reaction_stack.push_new_element_queue(); + } + }) + } + + pub fn pop_current_element_queue() { + SCRIPT_THREAD_ROOT.with(|root| { + if let Some(script_thread) = root.get() { + let script_thread = unsafe { &*script_thread }; + script_thread.custom_element_reaction_stack.pop_current_element_queue(); + } + }) + } + pub fn enqueue_callback_reaction(element:&Element, reaction: CallbackReaction) { SCRIPT_THREAD_ROOT.with(|root| { if let Some(script_thread) = root.get() { |