Commit graph

694 commits

Author SHA1 Message Date
Anthony Ramine
51768844ed Update euclid to 0.10.1 2016-08-21 03:03:45 +02:00
Anthony Ramine
03a0170c91 Update to webrender 0.4.0 2016-08-18 19:33:12 +02:00
Anthony Ramine
7ad51dcd7a Update serde to 0.8 (fixes #12659) 2016-08-12 18:37:27 +02:00
Martin Robinson
6259df5e2d Update to euclid 0.8 2016-08-12 03:12:06 +02:00
Emilio Cobos Álvarez
805988e839
compositor: Send animation ticks to layout even if there are script animation frames.
The script tick ends up only processing JS callbacks related to animation
frames, so CSS transitions/animations end up not working as expected.

This could have accidentally worked before #12563 because we over-restyled, but
now this is no longer the case.

Other possible way to do it is making a layout reflow with RAF handle CSS
animations/transitions too, but that may not work if the reflow ends up being
suppressed (that could very well be the case), and we'd need to handle a lot
more state in the document, so this solution (assuming it doesn't break try)
seems a bit less flacky.

Fixes #12749.
2016-08-05 13:44:38 -07:00
Glenn Watson
db8c3ef727 Update cargo.lock for wr2, pin ipc-channel. 2016-08-03 10:44:10 +02:00
bors-servo
944d371b8f Auto merge of #12563 - emilio:stylo, r=bholley,jdm,pcwalton
stylo: Improve restyling performance

This commit adds hooks to the Servo style traversal to avoid traversing all the
DOM for every restyle. Additionally it changes the behavior of the dirty flag to
be propagated top down, to prevent extra overhead when an element is dirtied.

This commit doesn't aim to change the behavior on Servo just yet, since Servo does extra job when dirtying the node related with DOM revision counters that might be necessary.

CC @asajeffrey for the DOM revision counters stuff. When a node is dirty, do all its descendants really need to increment the revision counter, or is this an unintended effect? My intuition is that this is hurting performance quite a lot for servo.

r? @bholley

<!-- 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

<!-- Either: -->
- [x] These changes do not require tests because no geckolib tests yet.

<!-- 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/12563)
<!-- Reviewable:end -->
2016-07-27 17:56:26 -05:00
Eduard Burtescu
3d8eab424c Update Rust to 1.12.0-nightly (9316ae515 2016-07-24) 2016-07-26 19:35:51 +02:00
Emilio Cobos Álvarez
e6958d3947
script: Fix a few load related bugs.
This is what was making me hit the new test failures. So turns out that when the
DOMContentLoaded event is fired we fired no messages to the constellation, but
we fired the DOMLoad message from the DocumentProgressHandler, effectively after
having dispatched the Load message from script thread.

This also fixes the possibility of a subframe navigation not blocking the load
event of the parent document, for example.
2016-07-25 10:51:52 -07:00
Connor Brewster
f131818763 Implement beginnings of joint session history
Fix backward navigation

make use of history iterator

Add frame iterator
add different back logic

cleanup navigation_info

Add extra explanation for iter logic

Remove forward history on full frame tree

Rename navigation to traversal where appropriate

check full tree for can go back/forward

simplify frame iter logic

remove FrameIterator

cleanup history iter

reduce amount of vec allocations

removed extra parenthesis

Remove history iterator

cleanup after rebasing

avoid recursive vec allocation
remove full_frame_tree
remove_forward_history_in_frame_tree -> clear_joint_session_future
2016-07-21 20:51:38 -06:00
Alan Jeffrey
d1e5bafef0 Replace any errors caused by content-provided URLs by warnings. 2016-07-15 09:50:40 -05:00
Alan Jeffrey
62e95c5a61 All our Cargo.toml files should contain an MPL-2.0 license field. 2016-07-14 10:26:34 -05:00
Ms2ger
cbfe77cee1 Move some unit type definitions to style_traits. 2016-07-11 12:14:27 +02:00
Josh Matthews
04ce86c08c Associate logical and physical keypresses together to support non-QWERTY keyboards. 2016-07-05 18:06:42 -04:00
Ms2ger
b8fe9e9637 Move WindowSizeData to script_traits. 2016-07-05 09:02:43 +02:00
bors-servo
e21b47c2cc Auto merge of #12243 - TravisDean:else-brace-check, r=ConnorGBrewster
Add style check and test for else braces

<!-- Please describe your changes on the following line: -->
Added a regex check to enforce project style guidelines. Added unit check. Catches:
```
}
else {
```
when it should be
`} else {`

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors (no core files changed)
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12234 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12243)
<!-- Reviewable:end -->
2016-07-04 16:52:19 -07:00
Travis Dean
6642358217 Add style check, test, and code fixes for an else brace check. 2016-07-04 18:38:13 -04:00
Anthony Ramine
51ff916e09 Move util::print_tree to gfx_traits 2016-07-04 15:47:06 +02:00
Corey Farwell
22928f50ac Refactor util::prefs operations to be methods on static struct. 2016-07-02 16:43:39 -04:00
Patrick Walton
90e970a6d2 compositing: Only recomposite after a scroll if layers actually moved,
and fix the jerky scrolling "pops" during flings on Mac.

See the comments in compositor.rs for more details.

Requires servo/webrender#302 and servo/webrender_traits#64.
2016-06-30 10:18:16 +02:00
Anthony Ramine
f8f00fac5b Move util::time::duration_from_nanoseconds to its only caller 2016-06-29 18:00:21 +02:00
Anthony Ramine
38a79e4506 Update Rust to 1.11.0-nightly (ad7fe6521 2016-06-23)
I also properly bump any dependency related to the serde_macros removal
from webrender_traits
2016-06-27 14:13:44 +02:00
Anthony Ramine
abfd52a721 Reorder dependencies 2016-06-26 17:11:27 +02:00
Ms2ger
7d1421bd83 Move ChromeToPaintMsg to gfx_traits.
This allows compositing not to depend on gfx.
2016-06-24 14:57:10 +02:00
mrmiywj
909f0da3c2 add reload keyboard shortcut
rename the preference to shell.builtin-key-shortcuts.enabled
2016-06-23 17:37:56 +08:00
bors-servo
d620ab71c4 Auto merge of #10225 - jmr0:visibility_api, r=jdm
Implement non-visible pipeline and iframe visibility methods

This addresses #9566 and a good part of #9751, specifically:

* Pipeline has a notion of visibility
* IFrame setVisible/getVisible interface with IFrame's pipeline visibility
* IFrame mozbrowservisibilitychange responds to changes in visibility
* Pipeline visibility is used to limit animations (requestAnimationFrame does not tick animations when hidden) and to increase timer intervals (currently set to a minimum of 1 second while hidden)

Absent for now are any changes to the Document API and general implementation of the Page Visibility API, since the more interesting parts require knowledge of whether the user agent is minimized, OS screen locked, etc.

cc @paulrouget @jdm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10225)
<!-- Reviewable:end -->
2016-06-16 08:53:56 -05:00
jmr0
2bff131535 Implement non-visible pipeline and iframe visibility methods 2016-06-15 23:28:07 -04:00
Patrick Walton
8c5b7ff330 compositor: Rerequest scroll positions from WebRender while overscrolled
layers are bouncing back.

This fixes a very annoying issue whereby overscrolling would cause mouse
events to go to the wrong place until the layer was scrolled again.
2016-06-10 15:56:57 -07:00
Ms2ger
863cb03eca Remove a spurious field from the SetFrameTree message. 2016-06-08 16:11:47 +02:00
Connor Brewster
c0ea1f16a8 Added support for navigating by a delta 2016-06-04 18:47:38 -06:00
Andrew Shu
9c8d5d58d8 compositing: Remove CompositorThread struct 2016-06-02 22:36:45 -07:00
Patrick Walton
9a9762fc95 compositing: Don't translate points to layer space when using WebRender.
This makes mouse events take the same code path, regardless of whether
WebRender is in use or not. This approach enables accurate
display-list-based hit testing when WebRender is in use.

Closes #11108.
2016-06-02 15:33:46 -07:00
bors-servo
0594d58bc8 Auto merge of #11538 - Ms2ger:warnings, r=emilio
Fix some build warnings.

- [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 refactoring

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11538)
<!-- Reviewable:end -->
2016-06-01 15:43:58 -05:00
bors-servo
c641ec97f0 Auto merge of #11443 - kyleheadley:remove_trait_11339, r=asajeffrey
Remove CompositorEventListener trait

<!-- 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 fix #11339 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because refactoring

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11443)
<!-- Reviewable:end -->
2016-06-01 14:06:41 -05:00
Ms2ger
46ea78e960 Fix some build warnings. 2016-06-01 10:35:45 +02:00
Kyle Headley
2bb109b14f Removed CompositorEventListener trait 2016-05-31 15:29:19 -06:00
Patrick Walton
a86f77e36d script: Keep the DOM-side viewport up to date when scrolling happens in
WebRender.

This happens asynchronously, just as it does in non-WebRender mode.

This functionality is a prerequisite for doing proper display-list-based
hit testing in WebRender, since it moves the scroll offsets into Servo
(and, specifically, into the script thread, enabling iframe event
forwarding) instead of keeping them private to WebRender.

Requires servo/webrender_traits#55 and servo/webrender#277.

Partially addresses #11108.
2016-05-31 14:12:51 -07:00
Ms2ger
f0ca775c80 Remove the ConvertPipelineIdToWebRender trait. 2016-05-28 14:10:32 +02:00
Ms2ger
ec03c367ab Remove LayoutControlChan. 2016-05-28 11:43:19 +02:00
Cullen Rhodes
40acd24e8f Report use statements that use {} with only one entry 2016-05-27 10:18:44 +01:00
Ms2ger
4113eb6f72 Remove the script listener thread (fixes #11345).
We needed a separate thread in the chrome process because communication to the
compositor is done through a trait object, and cross-process virtual calls are
forbidden.

Also, the fact that these messages are ultimately handled by the compositor is
an implementation detail; conceptually, the relevant constellation is supposed
to handle these messages.

So instead, the script thread will now send the messages to the constellation,
which will ask the compositor to handle them.
2016-05-25 12:50:22 +02:00
bors-servo
220bdfec2e Auto merge of #11337 - Ms2ger:compositor-exit-wait, r=pcwalton
Don't block the script listener thread on window.close().

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 --faster` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because no tangible effect

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

This does not appear to have any effect. I believe this has been the case
since e841065351, when the helper thread was
introduced.

It was added in a7ef1cd35e, where it blocked the
script thread rather than this helper thread.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11337)
<!-- Reviewable:end -->
2016-05-25 01:03:38 -05:00
Ms2ger
f9a8c322af Use CompositorMsg from script_traits. 2016-05-24 12:29:22 +02:00
Ms2ger
47933479da Move CompositorMsg to script_traits. 2016-05-24 12:28:10 +02:00
bors-servo
a636b7127e Auto merge of #11343 - servo:privatize-compositing, r=nox
Privatize some things in compositing.

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 --faster` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because refactoring

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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11343)
<!-- Reviewable:end -->
2016-05-23 15:36:43 -07:00
Ms2ger
8a24e2cf75 Privatize some things in compositing. 2016-05-23 15:43:51 +02:00
Ms2ger
041c907d1b Don't block the script listener thread on window.close().
This does not appear to have any effect. I believe this has been the case
since e841065351, when the helper thread was
introduced.

It was added in a7ef1cd35e, where it blocked the
script thread rather than this helper thread.
2016-05-23 11:23:54 +02:00
Ms2ger
517e40725d Remove pub uses from compositor_thread.rs. 2016-05-23 08:53:43 +02:00
Ms2ger
38d96c9564 Move sandboxing into the constellation crate. 2016-05-22 14:49:28 +02:00
Ms2ger
76fae9fa28 Move pipeline into the constellation crate. 2016-05-21 16:33:57 +02:00