Commit Graph

1440 Commits

Author SHA1 Message Date
Manish Goregaokar
ae260ad8c3 servo: Merge #16570 - Compute scriptminsize against the parent font base size (from Manishearth:scriptmin-parent); r=heycam
It's supposed to be, because it is used in the computation of the font size, so we can't have the current font size as a dependency.

http://searchfox.org/mozilla-central/rev/7aa21f3b531ddee90a353215bd86e97d6974e25b/layout/style/nsRuleNode.cpp#3842

Source-Repo: https://github.com/servo/servo
Source-Revision: 7aeed78eef0a082a8cc2314c421eb27ff6539bc3

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 31f48543c555276fcf1c560d826ae51859eb4486
2017-04-25 13:06:23 -05:00
Aaron Cunningham
e36974081a servo: Merge #16598 - Fix various build warnings (from aacunningham:fix-build-errors); r=jdm
This removes six separate warnings when building servo. One of
the warnings was an unused mut, and the other were various dead code
warnings

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they address warnings from the build process

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

Source-Repo: https://github.com/servo/servo
Source-Revision: f3c1bbe0700806ef2def3b0c5ce0dde4eba107ea

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 6f8c8212a51601e9dba5e8f8a345ba5ae89db147
2017-04-25 01:02:56 -05:00
Simon Sapin
c23b19c46c servo: Merge #16589 - Update to cssparser 0.13 (from servo:cssparserup); r=emilio
https://github.com/servo/rust-cssparser/pull/140

Source-Repo: https://github.com/servo/servo
Source-Revision: e3e10ada09cf98df776d560d363fa70fcabfb64f

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 4021fd2840923dfe8b3f5496968319341d1abe9e
2017-04-24 18:47:00 -05:00
Simon Sapin
c00039e1dc servo: Merge #16585 - Don’t log CSS parsing errors in user-agent stylesheets (from servo:log); r=emilio
This used to make `RUST_LOG=style` basically useless.

Source-Repo: https://github.com/servo/servo
Source-Revision: fd7af58becbcee8facfc07c5f9d028bb9c86c3a0

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 0d040c4ed39378f0ba827f96ab204b2a18cb40bc
2017-04-24 05:05:51 -05:00
Emilio Cobos Álvarez
fb27e0b5de servo: Merge #16575 - style: trivially cleanup the matching code (from emilio:cleanup-matching); r=Wafflespeanut
I'm reworking this, and found this cleanup that I think is worth to land.

Source-Repo: https://github.com/servo/servo
Source-Revision: dfe0f4c2019001a204b0d6ef91fe10a358e20ce7

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : a615b1f87a21d2ebb453709378a71a755152c77a
2017-04-23 04:55:34 -05:00
Nathan Froyd
8d40df4dc7 servo: Merge #16550 - switch gecko_bindings over to the gecko_debug feature [DO NOT MERGE] (from froydnj:gecko-bindings-gecko-debug); r=froydnj
...so that they use the correct Gecko structs regardless of whether Rust
code is being compiled with debug assertions or not.

This is the second part of the Servo-side changes for https://bugzilla.mozilla.org/show_bug.cgi?id=1357556

- [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 building is a sufficient test.

Source-Repo: https://github.com/servo/servo
Source-Revision: f795eb1a8b7443ea9dc1cf1c81a6ac0484894659

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 049baa0afced4f2123eb4bf1758ec023ef4a9d8a
2017-04-22 18:40:47 -05:00
Manish Goregaokar
5339fc495b servo: Merge #16564 - stylo: Support system fonts (from Manishearth:stylo-sys-2); r=xidorn
r=xidorn https://bugzilla.mozilla.org/show_bug.cgi?id=1349417

(take 2, we backed out the last one due to heap hazards)

Source-Repo: https://github.com/servo/servo
Source-Revision: 97c14f05df33fe4ce118f51bb23abf39000b4217

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 06c82246b4c04977e19eb0142ac405354d755f0a
2017-04-21 17:03:28 -05:00
Imanol Fernandez
cda127d899 servo: Merge #15773 - Android life cycle improvements and Gradle integration (from MortimerGoro:android_improvements); r=larsbergstrom,fabricedesre
This PR includes Android life cycle Improvements and Gradle integration for android packaging.

Android life cycle improvements are implemented in both the new [MainActivity](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-f43708b102e98272c2af7454b8846927) and native code in this related PR: https://github.com/servo/glutin/pull/117
- Properly handle the life cycle of the Android Activity: manage EGLContext lost & restore, and animation loop pause/resume when the app goes to background/foreground or orientation changes. In the current upstream Servo crashes when the app goes to background, activity stops or changes orientation
- Handle event loop awake for Servo Animation loop
- Handle screen resize & orientation events
- Implement new keep_screen_on preference which keeps Android device's screen from ever going to sleep: very useful for games or WebVR
- Implement a full screen mode enabled by preference: very useful for games or WebVR
- Implement new shell.native-orientation preference which allows to lock the Activity to a specific orientation
- Automatically sync new android assets to sdcard when the Android version code is changed.  In the current upstream only the existence of the folder is check but resources are not updated

ofscreen_gl_context is updated to fix this: https://github.com/emilio/rust-offscreen-rendering-context/pull/83

This PR integrates Gradle build system for android packaging. Most of the code is implemented in this [build.gradle](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-89cdb9324addb994cdba0a158b209547) . We can get rid of [build-apk](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-40f5a7cf22f94aad059b2c1795347f5e) and manual jar dependency copying in the [package_commands.py](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-0d425b142c8d10ae6ac1f3711fb5c23a). The correct version of gradle is automatically downloaded using the gradlew wrapper.

Some improvements:
- Allows to include more complex android dependencies/SDKs like AARs, manifest auto-merging and more.
- Improved packaging process: The gradle project is always in the same folder, it uses relative paths for everything (assets, native libraries) and outputs the apk into the correct target folder in servo. In the current upstream, ant/python build system copies the manifest, project, resources and jars each time so you end with multiple copies of the same files.
- Improved dependency declaration. We do not have to manually copy jar dependencies in the python script anymore. The gradle build scripts itself is able to search for the dependencies in the correct servo target folder.
- Supports packaging apks with different architectures: armeabi, armeabi-v7a, aarch64. We still need to fix some native servo compilation issues with armeabi-v7a, aarch64 due to dependencies which use `make`. I'll push this changes in a separate PR of the python build files but the gradle file is already ready to handle that.
- We can easily create product flavors for different versions of Servo. For example a default browser, a WebVR browser with additional dependencies or a Servo android Webview component
- Fixes minor.major.52 build error when blurdroid cargo dependency is compiled using java8 (the default in new Linux machines). The gradle build file enables the new Jack compiler which supports Java8 dependencies.
- The project can be opened with Android Studio and run the brand new GPU debugger on any Android phone. I'll add some docs in the Wiki about this.

---
<!-- 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 #14568 (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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 2b5c17c43a517b6d6bd981f5fa905536dddd3beb

--HG--
rename : servo/support/android/apk/AndroidManifest.xml => servo/support/android/apk/app/src/main/AndroidManifest.xml
rename : servo/support/android/apk/res/mipmap/servo.png => servo/support/android/apk/app/src/main/res/mipmap/servo.png
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 2da8cf56223c150832fddb3e8878432f4d64bc6e
2017-04-21 15:52:13 -05:00
Boris Chiou
b4f9c9e925 servo: Merge #16554 - stylo: Bug 1332633 - Implement ComputeDistance trait (from BorisChiou:stylo/animation/compute_distance); r=emilio
These patches implement ComputeDistance trait, so we can use it for SMIL animation and for testing test_transitions_per_property.html, which uses nsDOMWindowUtils::ComputeAnimationDistance() to get the the distance between two AnimationValues.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix Bug 1332633.
- [X] These changes do not require tests because we have test cases in Gecko. (If Servo wants to use this feature, we can add more tests in Servo in the future.)

Source-Repo: https://github.com/servo/servo
Source-Revision: 350d9c6c47fe1f20ebbd911f7675c23bcaa9ba2f

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : f7ddd6f8b8c3129966d9b6a832831ef49eefab11
2017-04-21 00:52:13 -05:00
Nathan Froyd
5927e502c2 servo: Merge #16545 - add the gecko_debug feature (from froydnj:moz-debug-feature); r=emilio
add the moz_debug feature

debug_assertions is not a reliable guide to whether Gecko C++ code is
being compiled with debugging assertions, since we can now compile Gecko
with --enable-optimize --disable-debug --enable-rust-debug: Gecko will
be compiled without debugging assertions (and debugging struct layouts)
and Rust code will be compiled with debug_assertions.  The struct
mismatches in the binding layer lead to startup crashes.

This feature is not presently used, but will be set by some Gecko-side
changes and then used by some Servo-side changes.  These changes need to
be made first so that CI on both sides works correctly at all
intermediate stages along the way.

This is in service of https://bugzilla.mozilla.org/show_bug.cgi?id=1357556

<!-- 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: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because no code is being changed

Source-Repo: https://github.com/servo/servo
Source-Revision: 93fa0ae1e3bcfe9e70a6fea91d137f20d8b5f790

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 4cacfdafbff60de0ca4997f9f629987ed7797092
2017-04-20 15:14:25 -05:00
Emilio Cobos Álvarez
7137669b17 servo: Merge #16516 - stylo: Centralize stylesheet handling (from emilio:stylesheet-handling); r=bholley
This is needed for both bug 1357461 and bug 1273303, where I plan to add smarter
invalidations than what we have now.

Also, it's cleaner.

Ideally I'll move this onto stylist, though that may require extra work to make
it work fine for Servo, so for now let's just do the obvious thing.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5274991545fedd9b7188c40abffb61b4067daa8a

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 17ddaf895b46ba68b9bd930c8e962e208f735afa
2017-04-19 03:41:08 -05:00
coalman
3fa74a14ad servo: Merge #16495 - Make tidy check that opening and closing braces that begin a line do … (from coalman:tidy-brace-alignment); r=emilio
…so with proper alignment.

---
<!-- 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 #16486 (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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 195100f3cac99b979e25157eb437e63bd3262e6f

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 1f340388b3b70f620cbfba6d216955d3ef23b7cb
2017-04-19 03:06:31 -05:00
Cameron McCormack
8f8bcda062 servo: Merge #16524 - Revert #16517 for Gecko heap write hazard failures (from heycam:backout-system-fonts); r=heycam
Source-Repo: https://github.com/servo/servo
Source-Revision: 91386e8367b333e5a3832ece5cba482baeb2c0fe

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : b3c1d33d70cef0ff6bc670787509d10750e08c46
2017-04-19 01:56:10 -05:00
Manish Goregaokar
690efb0293 servo: Merge #16517 - stylo: Support system fonts (from Manishearth:stylo-sys); r=xidorn
r=xidorn https://bugzilla.mozilla.org/show_bug.cgi?id=1349417

Source-Repo: https://github.com/servo/servo
Source-Revision: 2f8d9013a09b7b6dfad253a2438b9810d6d077dc

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 5143f2371d7f4e7c85e54651e767ea87358a0cf8
2017-04-18 20:52:11 -05:00
Jonathan Turner
bb8678e3b4 servo: Merge #16390 - Add back in last keydown fixes (from jonathandturner:real_win_keydown_fix); r=jdm
<!-- Please describe your changes on the following line: -->

This is a follow-up PR to https://github.com/servo/servo/pull/16198

The approved patch included these changes as well, but I accidentally excluded them from the squash that landed.

r? @jdm

---
<!-- 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: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they are part of previously reviewed code

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 967fef15de75fd969dd04686cb50d732330295a5

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 8a991d13ca6a5a7517fd5756e6a35eed1bab42d1
2017-04-18 04:17:01 -05:00
Paul Rouget
c2a80aa4cb servo: Merge #16498 - Properly modify scroll_location (from paulrouget:scroll_lock); r=jdm
As described in #16442, scroll orientation is not locked. `delta` was copied.

Source-Repo: https://github.com/servo/servo
Source-Revision: a914409f5eec036857a5d55d60d2d9feb25d17e8

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 154590651eb277589e81a0c8f645ebc25a01fe06
2017-04-17 10:54:23 -05:00
Boris Chiou
2568e13f60 servo: Merge #16496 - stylo: Bug 1341372 - Detect new transitions and let it run (from BorisChiou:stylo/transition/trigger); r=heycam
These are interdependent patches of Bug 1341372. We let animation-only restyle also work for RESTYLE_CSS_TRANSITIONS, and check if we need to update transitions by each transition property. If it is necessary to create/replace/cancel transitions, we create a SequentialTask for CSS_TRANSITIONS.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix Bug 1341372
- [X] These changes do not require tests because there are tests in Gecko already.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4d8c9c10cb011084e71a04b7d236282bf54c9fab

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 6c532f5d11b4349d35c326f64f6c259d25ef0ef2
2017-04-17 05:07:23 -05:00
Simon Sapin
9c39cd7b69 servo: Merge #16473 - Upgrade to rustc 1.18.0-nightly (5f13a3b54 2017-04-15) (from servo:rustup); r=emilio
This version enables [struct field reordering][1] which brings the size of the types for specified values of some CSS properties under the threshold such that they shouldn’t be boxed anymore, making unit tests fail.

Simply unboxing them moves the test failure to Stylo’s unit tests, since the stable compiler used in that case does not do field re-ordering. Therefore, we manually reorder a couple fields to effectively bring this optimization to older compilers for a few specific types.

[1]: https://github.com/rust-lang/rust/pull/40377

Source-Repo: https://github.com/servo/servo
Source-Revision: c453e2ef89b32798dabbb23b22cfd5a72dddf6a5

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 89b15d84b3f4b106d58ca90b3fd18f552d1a6633
2017-04-16 00:13:28 -05:00
Hiroyuki Ikezoe
b802b1057e servo: Merge #16470 - Canvas font handling (from hiikezoe:canvas-font-handling); r=heycam
<!-- Please describe your changes on the following line: -->
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1324700

---
<!-- 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 it's for stylo.

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

Source-Repo: https://github.com/servo/servo
Source-Revision: a9e917cf87a0a72c41cedfb67e053e08fdfa5ebe

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 217bdbf43760bdfbe508fad71d3068746243da6d
2017-04-15 06:20:52 -05:00
J. Ryan Stinnett
a498868ba9 servo: Merge #16454 - Stylo: SVG length parsing mode (from jryans:svg-parse-unitless); r=emilio
Reviewed by @emilio in [bug 1329088](https://bugzilla.mozilla.org/show_bug.cgi?id=1329088).

r? @emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

Source-Repo: https://github.com/servo/servo
Source-Revision: 5c56640508b4f24a67fe92c5d3179d89d030e959

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 1f33735051b5be8d58a32eec5044f6365b6dab32
2017-04-14 04:49:29 -05:00
Brad Werth
9b7c1718fa servo: Merge #16365 - Stylo: Add a bool property to PerDocumentStyleDataImpl, and pass the … (from bradwerth:authoredStyle); r=heycam
https://bugzilla.mozilla.org/show_bug.cgi?id=1341721
https://reviewboard.mozilla.org/r/121214/
r=heycam

Source-Repo: https://github.com/servo/servo
Source-Revision: 605637fe1de114e08b9c0be52bcefb67ee38d1a2

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 6a994edaa437ee5ba4272a5bf3cd1bd1d32f35e4
2017-04-13 21:23:07 -05:00
mckaymatt
149e726153 servo: Merge #16394 - Support line number offsets for inline stylesheets (from mckaymatt:line_num_offset__issue_15693); r=SimonSapin
<!-- Please describe your changes on the following line: -->
This allows accurate line numbers when reporting stylesheet errors.

@jdm This is going to require some effort to merge my changes with other recent changes to `ParserContext`. Because of that I would appreciate a quick sanity check before I put the time into performing the merge.
For example, should I store the `offset` as a u64, or should it be an Option?

---
<!-- 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 #15693 (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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 94397ff0b4fed138241760770ff2d230985bed8a

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 3ebb0c3b05f4529ae61351b2c9120f013d1d3339
2017-04-13 20:12:08 -05:00
Emilio Cobos Álvarez
6ef6f7cb8e servo: Merge #16378 - stylo: A bunch of media query fixes (from emilio:media-fixes); r=upsuper
Source-Repo: https://github.com/servo/servo
Source-Revision: bb66bf81d5b699f40c8b59ea5eb7390dc23579bb

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 41562f8f656e98ab95e0c7f7df73a9c93296fa55
2017-04-12 10:00:26 -05:00
Manish Goregaokar
911bb85b69 servo: Merge #16376 - stylo: Support mathml and background preshints (from Manishearth:stylo-mathml); r=emilio
r=emilio https://bugzilla.mozilla.org/show_bug.cgi?id=1339711

Source-Repo: https://github.com/servo/servo
Source-Revision: 8298ee75c77bdc6061afd8c00d3f57e7f0c2db16

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : b77c250883a7d2ceac24e62b38d5bfd941223a85
2017-04-12 09:16:55 -05:00
Jonathan Turner
6a6ec71a53 servo: Merge #16198 - Fix windows glutin keydown (from jonathandturner:fix_windows_gluten_keydown); r=jdm
<!-- Please describe your changes on the following line: -->
This fixes #12937 where keypresses arrive in a one-off fashion, effectively delaying each keystroke.  This PR is based heavily on @codec-abc's https://github.com/servo/servo/pull/16193 PR, with some further fixes and cleanup.  From the original PR comments:

> There are 2 types of events associated with keyboard: Key event (up or down) and Character Input.
>
> * A character is not necessary created one a key is pressed (like the home key).
> * A character may be created only using a combination of several key. For example, using a Qwerty International layout you have to type ` then e to get é. The first key press on ` will create no character.
> * In servo, we currently merge the 2 events together, meaning that we store a Character Input event in a field to fire a single event later on when we get a Key event.
>
> The order of events seems to be system dependent. For example, let's say that we type the A key on a Qwerty Layout. In Linux and MacOs we will get this:
>
> * Character Input for character A
> * Key down event with virtual key code of the key A
> * Key up event with virtual key code of the key A
>
> while in Windows we get:
>
> * Key down event with virtual key code of the key A
> * Character Input for character A
> * Key up event with virtual key code of the key A
>
> It seems that glutin make no attempt to reorder the event to make the order independent of the Operating System. I think it would be easier for Servo if it were handled by the library.

This fix is a stopgap for the current state of glutin.  We may want to look into a deeper fix in the future.  For now, this is hopefully adequate solution until a more permanent one can be found.

This is the last remaining issue for the Windows nightly blockers meta-issue https://github.com/servo/servo/issues/12125

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they are around Windows keyboard eventing.

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 4c851925fbbd8446f6bfc36ff6836e9b24ad635b

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : ed025584e25c5979861919d48ddedfe656f32729
2017-04-12 08:09:50 -05:00
Boris Chiou
9d5e5af718 servo: Merge #16381 - stylo: Bug 1343753 - Use ComputedValues while updating transitions in Gecko (from BorisChiou:stylo/transition/use_computed_values); r=manishearth
These are interdependent patches of Bug 1343753. We want to use ComputedValues and AnimationValues to start/update/stop the transitions.

---
<!-- 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 Bug 1343753.
- [X] These changes do not require tests because we have tests in Gecko already.

Source-Repo: https://github.com/servo/servo
Source-Revision: e817666859f381648e41b690a7e35ad22cf48bbe

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : bd521c13192c7a3b3711b6cb6d97dc27dbffa843
2017-04-12 07:00:20 -05:00
J. Ryan Stinnett
efd838dbde servo: Merge #16373 - Stylo: Disable viewport units for @page (from jryans:at-page-viewport-units); r=emilio
Reviewed by @emilio in [bug 1353191](https://bugzilla.mozilla.org/show_bug.cgi?id=1353191).

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

Source-Repo: https://github.com/servo/servo
Source-Revision: 5f6c27bb945eba1242be2fb4812ea5095ef26377

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 5b14918d20ee9b9b5cf4fe9be7b303251e6e9bb1
2017-04-12 05:38:50 -05:00
Bobby Holley
9ab23a87f3 servo: Merge #16369 - Store style system options in the global style data and shared style context (from bholley:style_system_options); r=SimonSapin
I wanted to add an environmental variable to disable the style sharing
cache for gecko, but the current pattern involves lazy_static!, which
involves an atomic operation on lookup, which is a bit hot to do each
time we try to share styles. This makes that work happen once per
process.

Source-Repo: https://github.com/servo/servo
Source-Revision: 54ecfb155dba40382764ee20186a31f067a507be

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 35cbfe0f6490eadf25d9de020f0d2ea851badaba
2017-04-12 02:27:02 -05:00
Cameron McCormack
400b837401 servo: Merge #16359 - stylo: Assert that we have computed style in Servo_ResolveStyle when lazy computation is forbidden (from heycam:assert-unstyled); r=bholley
From https://bugzilla.mozilla.org/show_bug.cgi?id=1345695.

Source-Repo: https://github.com/servo/servo
Source-Revision: effdf7e9959754cf706d3a83559b1af277a3fefa

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 426ced99177bb558c3af7885d2af11d4a890585c
2017-04-11 21:05:32 -05:00
Gregory Szorc
28c1793e3b Backed out changeset f00f1ad996f7 (bug 1345695) for touching servo/
Autoland should have prevented this. A bug is on file so it hopefully
won't happen again.

MozReview-Commit-ID: 1tN1lAyTLyE

--HG--
extra : rebase_source : 9377f92151e481446481fec263c39e369dab5246
2017-04-11 09:36:48 -07:00
Cameron McCormack
43e68fc196 Bug 1345695 - stylo: Assert that we have computed style in Servo_ResolveStyle when lazy computation is forbidden. r=bholley
MozReview-Commit-ID: Bul00XOpfxA

--HG--
extra : rebase_source : 485668d0a92c9407c9dfeb5cd569aa1b07569a14
2017-03-30 12:54:25 +08:00
Brad Werth
a370854d37 servo: Merge #16328 - Stylo: Add FFI interfaces for exposing style sources (from bradwerth:computedStyles); r=heycam
https://bugzilla.mozilla.org/show_bug.cgi?id=1346256
https://reviewboard.mozilla.org/r/119044/

Source-Repo: https://github.com/servo/servo
Source-Revision: a0a60ba61dccef2bfea803654a33d77606dd3224

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : ea2176f21c226ff48ec7b350a9dba244f76dc0fe
2017-04-10 04:04:54 -05:00
Manish Goregaokar
633a064655 servo: Merge #16333 - stylo: support font metrics (from Manishearth:stylo-metrics); r=heycam
r=heycam https://bugzilla.mozilla.org/show_bug.cgi?id=1341724

Source-Repo: https://github.com/servo/servo
Source-Revision: dafa6c94eb3c748d6aa81f460e262882741cf7bd

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 421534b0e9f8691861a96baee131c2e8206b2693
2017-04-10 01:35:18 -05:00
J. Ryan Stinnett
17f4c379b2 servo: Merge #16315 - Stylo: @page support (from jryans:at-page-stylo); r=xidorn
Reviewed by upsuper in https://bugzilla.mozilla.org/show_bug.cgi?id=1345206.

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

Source-Repo: https://github.com/servo/servo
Source-Revision: 80f6160580477d5ca984071eeeef26866be5c68e

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 7d1005d11d0e336b69f1cab1f7e007f774d0ba89
2017-04-09 21:47:59 -05:00
Manish Goregaokar
c357d4646c servo: Merge #16316 - stylo: Make font base size computation threadsafe (from Manishearth:stylo-threadsafe); r=emilio
r=emilio https://bugzilla.mozilla.org/show_bug.cgi?id=1351200

Source-Repo: https://github.com/servo/servo
Source-Revision: d77d7529905e52c29597048422556a2416550b76

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 22f72365127df85cf53f1fd89b955be092cedb70
2017-04-09 06:15:51 -05:00
Bobby Holley
ec70de47f6 servo: Merge #16312 - Make the sequential traversal breadth-first (from bholley:breadth_first_sequential); r=emilio
Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1354806

Source-Repo: https://github.com/servo/servo
Source-Revision: fd2b092839ec5229066ed1d608a81a556f38c55b

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 4a85dcd1bb4c702c61c0bc277e858da48d9f0cdc
2017-04-09 01:55:09 -05:00
Cameron McCormack
ba496d5598 servo: Merge #16309 - style: add a "for frame reconstruction" mode for restyle traversal (from heycam:restyle-reconstruct); r=bholley
This is the Servo part of https://bugzilla.mozilla.org/show_bug.cgi?id=1351535.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2f67f69e895206135012c7445a86fb07d6e3b6b5

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : fbd7a0657af2e60eb295c93b18d6d61622d159c0
2017-04-09 01:04:57 -05:00
Xidorn Quan
fb31179442 servo: Merge #16296 - Update cssparser in Cargo.toml (from upsuper:cssparser); r=heycam
This helps Stylo builds to actually use the new cssparser.

Source-Repo: https://github.com/servo/servo
Source-Revision: 535d0e421a3188473fc0c3cefca569c1276c4804

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : d72cbe5b073fd7a22eb291a86007734c7b54e42b
2017-04-07 01:10:25 -05:00
Xidorn Quan
d7042054d2 servo: Merge #16282 - Move dummy url data to be a static member of URLExtraData (from upsuper:bug1343964); r=heycam
This is the Servo side change of [bug 1343964](https://bugzilla.mozilla.org/show_bug.cgi?id=1343964) which has been reviewed on Bugzilla.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9ad95a5dc74455c52233963fba4fb31324c40847

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 2d135f6e480fc2e1ff0b820ec4c4211465de5415
2017-04-06 19:33:35 -05:00
Hiroyuki Ikezoe
d02f339a80 servo: Merge #16280 - Handle base style (from hiikezoe:handle-base-style); r=heycam,birtles
<!-- Please describe your changes on the following line: -->
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1311257

---
<!-- 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 it's for stylo.

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

Source-Repo: https://github.com/servo/servo
Source-Revision: d7fb2cc27f666c53bfa79bf95f924b2b87e9b0f2

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : a5a08fdf6fd816bfc99f215952802e005b2e1cde
2017-04-05 22:53:30 -05:00
Iris Hsiao
1fda9ec2ec Backed out changeset aa46d54ab74b (bug 1321754) for stylo test failures 2017-04-05 16:56:36 +08:00
Ting-Yu Lin
0119bb6b75 Bug 1321754 - Add an enum value to SheetParsingMode for agent sheets that use no unsafe rules. r=heycam
scrollbars.css is the only sheet which is parsed as author level, but later
added as agent level in [1]. Add a new enum value so that it can be parsed
as author level in gecko (nsCSSParser::AgentRulesEnabled() will exclude it),
but servo can recognize it as agent level sheet when the sheet is created.

Delete UserRulesEnabled() because no one uses it.

[1] http://searchfox.org/mozilla-central/rev/7419b368156a6efa24777b21b0e5706be89a9c2f/layout/base/nsDocumentViewer.cpp#2326

MozReview-Commit-ID: 2lrV4ogfnHM

--HG--
extra : rebase_source : 9d80a146f2ec5629999076ea1587e7d36f06afe7
2017-03-28 18:06:26 +08:00
Xidorn Quan
73064eb8b6 servo: Merge #16241 - Stop passing url as string into Servo side (from upsuper:bug1352763-bug1352025); r=Manishearth,emilio
This is the Servo side changes of [bug 1352763](https://bugzilla.mozilla.org/show_bug.cgi?id=1352763) and [bug 1352025](https://bugzilla.mozilla.org/show_bug.cgi?id=1352025) which have been reviewed on Bugzilla.

Source-Repo: https://github.com/servo/servo
Source-Revision: 679b41893782663f7a2294cdf94dcedcf1337f98

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 135f4003dbf47eab0842f02be2aa9f766e066721
2017-04-03 07:05:42 -05:00
Xidorn Quan
5ed46cc5d0 servo: Merge #16235 - Create URLExtraData for holding base uri, referrer, and principal (from upsuper:bug1351957); r=heycam
This is the Servo side change of [bug 1351957](https://bugzilla.mozilla.org/show_bug.cgi?id=1351957) which has been reviewed on Bugzilla.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5b037a0aa080799faae93efe59e56938a1eba913

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 263b43f65d0486e4111f2ddcf13f630e82d6ece2
2017-04-02 23:30:56 -05:00
Manish Goregaokar
d06219f652 servo: Merge #16201 - stylo: Handle text-emphasis-position pres attrs (from Manishearth:text-emph-pos); r=emilio
Somehow slipped through the cracks.

try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e1d349e847b528be3d61ad2ebf374a791800cfbb
Source-Repo: https://github.com/servo/servo
Source-Revision: 955d3a8b8746b5060d421253263cf9bb05808866

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 60a1a4262b452db861b18e104377c6ba8370b526
2017-03-31 06:01:06 -05:00
Boris Chiou
d9d214de1d servo: Merge #16202 - stylo: Bug 1352067 - Initialize StyleAnimationValue with zeros (from BorisChiou:stylo/animation/initial_computed_keyframes); r=emilio
AnimationValue::mGecko and AnimationValue::mServo are mutually
exclusive, so we have to make sure mGecko.IsNull() returns reasonable
value, or we will got assertions. Hence, we should initialize it during
constructing StyleAnimationValue from Servo side.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix Bug 1352067.
- [X] These changes do not require tests because there are enough tests in Gecko

Source-Repo: https://github.com/servo/servo
Source-Revision: a70e4ac5b25251ca1c05e8eced12f2aefea4410d

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : bc8e26879318bc65845aaf0679d45f669c3d3713
2017-03-31 05:20:26 -05:00
Cameron McCormack
7515360521 servo: Merge #16191 - geckolib: fix debug message about skipping traversal with an unstyled parent (from servo:debug-fix); r=Wafflespeanut
Source-Repo: https://github.com/servo/servo
Source-Revision: 6a795f4795f936789a3f34ad87a367e52cf1bf97

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : d134f03fbc99a0c0b4c796da8cc15246c9613838
2017-03-30 04:34:25 -05:00
Xidorn Quan
2c07788709 servo: Merge #16187 - Implement access to CSSFontFaceRule for stylo (from upsuper:bug1345696); r=Manishearth,heycam
This is the Servo part of [bug 1345696](https://bugzilla.mozilla.org/show_bug.cgi?id=1345696) which has been reviewed on Bugzilla.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2084ee29c40291c9abf9b0922e05f0663b215333

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : c179cfffd618252dff4ae25a3c4d6a52bc29bc5e
2017-03-29 20:50:47 -05:00
Simon Sapin
a67d00ed06 servo: Merge #16183 - Replace ParsedDeclaration::expand with non-generic method (from servo:expand-diet); r=emilio
... to reduce its code size impact.

https://bugzilla.mozilla.org/show_bug.cgi?id=1351737

Source-Repo: https://github.com/servo/servo
Source-Revision: f3a5ad2f497a13aff0faf7873ce98f0868e56101

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 982e09797171fa3eec5bcd165fe7e5990234de6c
2017-03-29 13:43:06 -05:00
Bobby Holley
42c51d7bff servo: Merge #16159 - Centralize note_dirty_descendants implementation, and fully propagate dirty_descendants in resolve_style (from bholley:note_dirty_descendants); r=heycam
The current code can leave the tree in an inconsistent state, with the dirty
descendants bit not fully propagated.

Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1350441

Source-Repo: https://github.com/servo/servo
Source-Revision: 8adf1919732a764617ce7c8c26e772a9a7663b98

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 2778ab00a757f5a03c3e060fb32780cafc16d7e9
2017-03-29 06:52:07 -05:00