Commit graph

10890 commits

Author SHA1 Message Date
bors-servo
72e4c6dc21 Auto merge of #13418 - stshine:location-replace, r=KiChjang
Make document url mutable and implement location.replace()

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

<!-- Either: -->
- [X] There are tests for these changes OR

<!-- 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/13418)

<!-- Reviewable:end -->
2016-11-20 02:27:54 -06:00
bors-servo
b78622bd53 Auto merge of #14256 - heycam:rn-gc-heuristic, r=emilio
GC the rule tree only when the free list gets to a certain size.

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

Use a heuristic similar to Gecko's to decide when to GC the rule tree.

r? @emilio

<!-- 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/14256)
<!-- Reviewable:end -->
2016-11-19 22:01:12 -06:00
bors-servo
7e34f4cb5b Auto merge of #14284 - nox:fnv, r=Wafflespeanut
Use FnvHasher in http_loader::load

Should help with #11100.

<!-- 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/14284)
<!-- Reviewable:end -->
2016-11-19 19:18:10 -06:00
Pu Xingyu
5287e70829 Minor fixes and update test expectations 2016-11-20 06:30:10 +08:00
Anthony Ramine
7a8c5ae8e3 Use FnvHasher in http_loader::load
Should help with #11100.
2016-11-19 14:10:37 +01:00
bors-servo
a4e26d503a Auto merge of #14227 - chenpighead:font-size-adjust-gecko, r=Manishearth
Stylo - gecko glue code for font-size-adjust.

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

Implement the gecko-side glue code for font-size-adjust.
This is a followup for #14125, which is originally filed in #13875.

---
<!-- 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
- [ ] 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14227)
<!-- Reviewable:end -->
2016-11-19 05:07:46 -06:00
bors-servo
1e42e4d9ce Auto merge of #14272 - connorimes:fix-energy-profiling-feature, r=Manishearth
Fix energy profiling feature

<!-- Please describe your changes on the following line: -->
The `energy-profiling` feature was broken at some point when `#![deny(unsafe_code)]` was introduced to the `profile_traits` component.  This PR sets `#[allow(unsafe_code)]` on the `energy` module.
There is an additional commit (my original intention) to update the profiler logging to use the current `ProfilerCategory` enum values for (typically developer-only) performance/power analysis.

---
<!-- 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 it fixes is a compile error for a feature.

<!-- 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/14272)
<!-- Reviewable:end -->
2016-11-19 02:32:00 -06:00
Manish Goregaokar
3d5b26ac26 Uplift bitfield fix for nsChangeHint 2016-11-18 21:45:12 -08:00
bors-servo
9c6f6ebf3e Auto merge of #14270 - larsbergstrom:disable_android_debugger, r=nox
Disable the debugger on Android until mio works on Android

<!-- Please describe your changes on the following line: -->
r? @nox

The recent change to `ws-rs` introduced a dependency on `mio`, which depends on `nix`, which does not build on Android (https://github.com/nix-rust/nix/issues/313). I've disabled the debugger in this change.

Fixes #14171

cc @mmatyas

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

<!-- Either: -->
- [ ] 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14270)
<!-- Reviewable:end -->
2016-11-18 23:40:20 -06:00
bors-servo
0c55d461f1 Auto merge of #14261 - Wafflespeanut:lon, r=SimonSapin
Prefer Either type for LengthOrNumber

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

This adds `impl GeckoStyleCoordConvertible for Either<A, B>` and makes `LengthOrNumber` prefer `Either<A, B>`.

---
<!-- 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 build-geckolib` 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 a refactor

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

r? @SimonSapin

<!-- 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/14261)
<!-- Reviewable:end -->
2016-11-18 22:20:04 -06:00
bors-servo
fdcf510ac8 Auto merge of #14250 - nox:write, r=SimonSapin
Make ServoParser::pending_input hold onto a BufferQueue

<!-- 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/14250)
<!-- Reviewable:end -->
2016-11-18 19:46:15 -06:00
Lars Bergstrom
d05114f66d Move build.rs along with the other Servo files from components to ports 2016-11-18 10:59:14 -06:00
Simon Sapin
dca1772086 Remove unused dependency 2016-11-18 17:16:54 +01:00
bors-servo
731264f20e Auto merge of #14238 - canaltinova:cssom-tocss, r=Manishearth
Implement ToCss serialization for CSSRules

<!-- Please describe your changes on the following line: -->
Implementation of ToCss serialization for CSSRules. It requires #14190 to merge first to uncomment `CssRule::Style` branch in CssRule's ToCss implementation.

r? @Manishearth

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

- [X] These changes do not require tests because it's serialization changes and I'm not sure there is a test for that.

<!-- 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/14238)
<!-- Reviewable:end -->
2016-11-18 10:15:52 -06:00
Simon Sapin
cf7adcdca5 Make Stylesheet.dirty_on_viewport_size_change an AtomicBool 2016-11-18 17:13:30 +01:00
Simon Sapin
236c575c50 Replace Stylesheet::set_media with a constructor argument 2016-11-18 17:12:44 +01:00
Simon Sapin
f4dcc38816 Remove unused Stylesheet::from_bytes_iter 2016-11-18 16:44:20 +01:00
Simon Sapin
8eeaef5b1c CSSOM: Add Arc<RwLock<_>> around Stylesheet.media 2016-11-18 16:44:04 +01:00
bors-servo
696b806284 Auto merge of #14249 - vvuk:wr-record, r=kvark
Add -Z wr-record

This adds `-Z wr-record`, which flips `enable_recording` to true for Webrender.

<!-- 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/14249)
<!-- Reviewable:end -->
2016-11-18 08:29:27 -06:00
Guillaume Gomez
861bcb2b79 Add missing actions in CreateContextualFragment method 2016-11-18 11:39:02 +01:00
Pu Xingyu
0818b44459 Implement range index with the Position enum on ServoUrl 2016-11-18 17:46:36 +08:00
Nazım Can Altınova
fdbadcdce2 Implement ToCss serialization for CSSRules 2016-11-18 12:17:53 +03:00
Cameron McCormack
4e52bb49b9 GC the rule tree only when the free list gets to a certain size. 2016-11-18 17:12:33 +08:00
Anthony Ramine
a3da819d10 Make ServoParser::pending_input hold onto a BufferQueue 2016-11-18 10:12:06 +01:00
Emilio Cobos Álvarez
181208a4e4 rule tree: Avoid yet another dumb assertion when dropping the rule tree. 2016-11-18 17:10:09 +08:00
Pu Xingyu
91f3d4f474 Remove redundant url clones
They are now redundant since now document.url() returns a struct rather
than a reference.
2016-11-18 12:39:22 +08:00
Pu Xingyu
fb6cc15208 Implement Location.replace 2016-11-18 12:38:12 +08:00
Pu Xingyu
9863149043 Move fragment navigation into Document object
Move the `check_and_scroll_fragment()` method into Document, make the
mothod set the fragment of url after navigation, and use the
`perform_a_scroll()` method to scroll rather than an individual
method. Also removes the broken `Window.fragment` fields.
2016-11-18 12:33:30 +08:00
Pu Xingyu
eca8f1d0b4 Make 'Document.url' field mutable
Use DOMRefCell as the type of the url field.
2016-11-18 12:29:02 +08:00
Ravi Shankar
6ac3fcbfeb Prefer Either<A, B> for LengthOrNumber 2016-11-18 09:14:09 +05:30
Ravi Shankar
73eabad1c2 Add impl GeckoStyleCoordConvertible for Either<A, B> 2016-11-18 09:08:23 +05:30
Connor Imes
263278a4dc Update profiler logging with current ProfilerCategory enum values 2016-11-17 19:36:58 -08:00
Connor Imes
889b9ad3f0 Allow unsafe code for energy module (build failure otherwise) 2016-11-17 19:33:32 -08:00
Manish Goregaokar
9fb589dfd2 Regenerate bindings 2016-11-17 17:48:28 -08:00
Lars Bergstrom
ca0078a6e1 Disable the debugger on Android until mio works on Android 2016-11-17 19:11:30 -06:00
Alan Jeffrey
c228a4cf03 Report errors using the top-level frame id rather than the pipeline id. 2016-11-17 18:08:24 -06:00
bors-servo
22aebdf5d4 Auto merge of #14246 - emilio:servo-url, r=SimonSapin
Urlmageddon

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

Still needs a bunch of code in net to be converted in order to get more
advantage of this for images and stuff, but meanwhile this should help quite a
bit with #13778.

Still wanted to get this in.

r? @SimonSapin

<!-- 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/14246)
<!-- Reviewable:end -->
2016-11-17 15:34:47 -06:00
bors-servo
b3ad71353b Auto merge of #13917 - Wafflespeanut:keywords, r=Manishearth
Remove usage of 'keyword_list'

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

We're using `keyword_list` to generate code for some of the animation properties. This could be achieved with `single_keyword` (passing `vector=True`).

---

<!-- 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 build-geckolib` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because it's a cleanup

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

r? @emilio

<!-- 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/13917)

<!-- Reviewable:end -->
2016-11-17 14:34:33 -06:00
bors-servo
e4a27c4d16 Auto merge of #14214 - bholley:dirtiness_overhaul, r=emilio
Overhaul dirtiness handling in Servo to prepare for the new incremental restyle architecture

<!-- 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/14214)
<!-- Reviewable:end -->
2016-11-17 12:25:52 -06:00
Ravi Shankar
b5bc2a1f53 Remove Mako helper: keyword_list 2016-11-17 23:41:48 +05:30
Ravi Shankar
c51db9f5f1 Remove usage of keyword_list (and prefer single_keyword) 2016-11-17 23:41:38 +05:30
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
Bobby Holley
95a49863c7 Prevent nodes from having DIRTY_DESCENDANTS set by default. 2016-11-17 09:31:44 -08:00
Zakor Gyula
f98fbecfda Rename blacklist to blocklist 2016-11-17 15:23:14 +01:00
bors-servo
f70fc6644d Auto merge of #14096 - fflorent:11485-make-dom-methods-taking-mut-JSContent-unsafe, r=nox
11485 make dom methods taking mut js content unsafe

This is a rebased version of PR #11595

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because: no code logic was changed

<!-- 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/14096)
<!-- Reviewable:end -->
2016-11-17 02:44:54 -06:00
bors-servo
8c6703637f Auto merge of #14223 - Manishearth:fix-logical-cascade, r=emilio
Delegate logical bitfield setters to physical to fix cascade

(fixes #14222)

Five minutes early for "tomorrow", _shrug_.

I'm not entirely sure of this fix. It depends on properties going through the cascade in source order all else being the same. I think that's the case.

Fixes wikipedia though.

r? @emilio or @SimonSapin

<!-- 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/14223)
<!-- Reviewable:end -->
2016-11-16 19:10:25 -06:00
bors-servo
f14e7339b5 Auto merge of #14172 - servo:ports, r=jdm
Move the servo binary to ports.

<!-- 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/14172)
<!-- Reviewable:end -->
2016-11-16 16:40:18 -06:00
bors-servo
afc60bee28 Auto merge of #14190 - Manishearth:cssom, r=SimonSapin
Immutable CSSOM

This PR is intended to add basic support for all CSSOM interfaces, with the ability to index `document.styleSheets` and css rule lists, and serializing individual css rules. Handling individual interface methods for CSSRule subclasses can probably be done with easy/medium bugs.

Mutation safety isn't dealt with here; if the css rule list is mutated the CSSOM will be in an inconsistent state. I intend to deal with this via zero sized tokens, see https://groups.google.com/forum/#!topic/mozilla.dev.servo/AnxJoVmtMXQ .  I'll handle that when I start making the CSSOM mutable. (Getting the immutable bit landed first opens this up for easy bugs)

This doesn't really change style aside from adding an extra arc in the CSS rule list as discussed in the linked thread. So far this same design can be used by stylo as well when the time comes.

f? @SimonSapin @emilio

cc @upsuper

part of #11420
Todo:

 - [x] Stubs for rest of the CSSRule subclasses
 - [x] <s>ToCSS impls for CSSRules.</s> May make into easy bugs and stub out in this PR https://github.com/servo/servo/issues/14195
 - [x] Cache CSSStyleSheet on the relevant node

<!-- 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/14190)
<!-- Reviewable:end -->
2016-11-16 15:05:59 -06:00
Bobby Holley
b31ed2298c Eliminate HAS_CHANGED in favor of explicit RestyleDamage. 2016-11-16 12:09:49 -08:00
Bobby Holley
f1043f6305 Track all node damage with PendingRestyles. 2016-11-16 12:09:47 -08:00