Граф коммитов

562 Коммитов

Автор SHA1 Сообщение Дата
Ravi Shankar ef541c8a2c servo: Merge #13902 - Prefer auto-generation for some keyword props (from Wafflespeanut:keyword); r=emilio
<!-- 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-geckolib` 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? @Manishearth or @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: 3c16dde1f268ffab3e2b220fda7e5be299d005b4
2016-10-26 02:27:13 -05:00
Martin Robinson bc43e4931e servo: Merge #13848 - Remove concept of Layers from Servo (from mrobinson:remove-layers); r=glennw
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because this PR should not change behavior.

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

Layers were a feature of the legacy drawing path. If we re-add them at
some point, it probably makes more sense to make them a product of
display list inspection.

This change also remove a bunch of dead painting code.

Source-Repo: https://github.com/servo/servo
Source-Revision: bb271ef4afea02b6b1b5d207e773d1fedccd2906
2016-10-21 01:43:25 -05:00
Martin Robinson d9473c9c44 servo: Merge #13820 - Remove the concept of nested stacking contexts from display list builder (from mrobinson:remove-nesting); r=glennw
<!-- 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
- [ ] 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 should not change behavior.

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

With the removal of the legacy rendering path, we don't need to worry
about nested stacking contexts. This change just pushes the
complication to the WebRender conversion step, but a later change will
remove the concept from WebRender as well.

This also helps to prepare for the introduction of ids for particular
scrolling regions, an integral part of multiple ScrollLayers per block.

Source-Repo: https://github.com/servo/servo
Source-Revision: e667e62f0ca8cd5fd21282333808cccaed8c957c
2016-10-19 12:54:40 -05:00
Ms2ger 482f4dabf3 servo: Merge #13811 - Remove unused DisplayItem::LayeredItem (from servo:LayeredItem); r=mrobinson
Source-Repo: https://github.com/servo/servo
Source-Revision: 89ced788ebb89b6cab82b15f4a1bab0b822e953c
2016-10-18 03:30:17 -05:00
Martin Robinson 71416f64ac servo: Merge #13810 - Remove Class from DisplayItem enum names (from mrobinson:names); r=Ms2ger
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because this PR does not change behavior. It's only a rename.

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

This is probably a holdover from the days before namespaced enums. We
can remove this part of the name to avoid a lot of visual noise.

Source-Repo: https://github.com/servo/servo
Source-Revision: 275278be44b96b683bee40a8d8a6462198ec9e39
2016-10-18 02:24:44 -05:00
Glenn Watson 5d056c5039 servo: Merge #13711 - Remove old rendering backend (from glennw:remove-old-renderer); r=larsbergstrom
This removes paint threads, rust-layers dependency, and changes
optional webrender types to be required.

The use_webrender option has been removed, however I've left
the "-w" command line option in place for now so that wpt
runner can continue to pass that. Once it's removed from there
we can also remove the -w option.

Once this stage is complete, it should be fine to change the
display list building code to generate webrender display
lists directly and avoid the conversion step.

Source-Repo: https://github.com/servo/servo
Source-Revision: f96718d03da969510dc992699cb6f25c2e21ae1e
2016-10-17 19:22:20 -05:00
Patrick Walton abf10e1cb1 servo: Merge #13756 - layout: Rewrite clipping to be a two-phase process that takes physical border box positions and transforms into account (from pcwalton:relative-position-clip); r=notriddle
Clipping region computation now follows a simple process: (1) in the
parent's coordinate system, parents store appropriate clipping regions
into children; (2) each child moves its clipping region to its own
coordinate system if necessary.

Because clipping region computation is now based on stacking-relative
border box positions and the `transform_rect` method, it can handle
`position: relative` offsets and more types of transforms, such as
scaling.

Improves etsy.com.

Closes #13753.

Source-Repo: https://github.com/servo/servo
Source-Revision: c1abd8797c5b257c9339fbaf6ca4b7480c43a755
2016-10-15 16:19:10 -05:00
Martin Robinson 7ca3c89ebb servo: Merge #13682 - Integrate stacking contexts into the display list (from mrobinson:push_pop); r=pcwalton
<!-- 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
- [ ] These changes fix #__ (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. -->

Integrate stacking contexts into the display list by adding two new
entry types, PushStackingContext and PopStackingContext. This allows us
to eliminate the ugly offsets map that DisplayList used to contain
and seems to speed up display list construction. With this approach
we are able to also completely prune pseudo-stacking contexts from the
final display list and remove their (minimal) overhead from display
list traversal Traversing the display list is also a bit simpler now.

Additionally, this will allow easier editing of the DisplayList to
properly support scrolling roots. The push/pop entries can be
duplicated to clone complex StackingContext trees between layers.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6e0d7326ab2901ef493c6de5b41969f8ee602864
2016-10-13 17:25:03 -05:00
Martin Robinson a894e56028 servo: Merge #13696 - Add a custom Debug formatter for ClippingRegion (from mrobinson:clipping_region_print); r=emilio
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because debug printing is untested.

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

This will make display list dumps more likely to fit on a single line.

Source-Repo: https://github.com/servo/servo
Source-Revision: b9bd15ebb0e84b48d5b0e7d1e952a911960d4fef
2016-10-11 20:58:49 -05:00
Patrick Walton e87bbe3700 servo: Merge #13602 - layout: Rewrite Servo's `vertical-align` support to match CSS 2.1 § 10.8, and implement `vertical-align: middle` per CSS 2.1 § 10.8.1 (from pcwalton:vertical-align-middle); r=mbrubeck
`InlineMetrics` has been split into `InlineMetrics` for fragments and
`LineMetrics` for lines. Both structures' fields have been renamed in
order to more clearly delineate the difference between *space* and
*content*. Vertical positioning of fragments has been reworked to take
margins and borders into account only for replaced content.

This patch fixes the `vertical_align_super_a.html` reftest. Servo now
matches the rendering that Gecko and WebKit produce.

Additionally, this includes a test for the popular inline-block
centering technique described here:
https://s.codepen.io/shshaw/fullpage/gEiDt?#Inline-Block

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 768a699fa5d822173b2247d6348413d09951a8bb
2016-10-11 15:33:47 -05:00
Anthony Ramine d480281b15 servo: Merge #13649 - Update to Rust 1.14.0-nightly (19ac57926 2016-10-08) (from servo:rustup); r=larsbergstrom
Source-Repo: https://github.com/servo/servo
Source-Revision: 39d3fce1af89bf30e201dcb873d7f2ffe0ad3d42
2016-10-09 20:12:38 -05:00
Ravi Shankar d64bc1a997 servo: Merge #13636 - Add 'image-rendering' support and some cleanup (from Wafflespeanut:properties); r=Manishearth
<!-- 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-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes have been tested manually

![screenshot](https://cloud.githubusercontent.com/assets/6691262/19195866/eb46ffce-8cd0-11e6-8642-a9525da8bf38.png)

r? @Manishearth

<!-- 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: a25e0670b39df0efcc4c6642775c0de414461a3d
2016-10-07 16:30:29 -05:00
Glenn Watson 54c431be71 servo: Merge #13567 - Minimal Win32 font platform implementation (from glennw:win-fonts); r=larsbergstrom
This uses a (very simple) Win32 API call to enumerate font
families available, and load them as byte buffers.

The font rasterization itself is done by freetype.

This gets Servo + WR + Windows working, but should be improved
by adding a proper implementation that matches fonts correctly
and also uses DirectWrite (or GDI) to handle font rasterization.

Source-Repo: https://github.com/servo/servo
Source-Revision: eb3333eb2f6dbac75ecf23e84cbb12149b3dc969
2016-10-04 20:06:29 -05:00
Ms2ger 3562383730 servo: Merge #13571 - Simplify fetching code (from servo:simplify-fetching); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: b80769dbf5e8f0c59db353b8e0ee7e4d77813294
2016-10-04 08:05:44 -05:00
Felipe Lacerda 8d886ed6cb servo: Merge #13414 - Implement `word-break: keep-all` (#9673) (from flacerdk:master); r=mbrubeck
<!-- Please describe your changes on the following line: -->
Implement the `keep-all` value for the `word-break` property, as specified in [CSS](https://drafts.csswg.org/css-text-3/#word-break-property).

The relevant CSSWG tests (in `tests/wpt/css-tests/css-text-3_dev/html/word-break-keep-all-*.htm`) do not currently pass. As far as I can tell, this is because the tests use some JavaScript code that is not working properly. (But then, it seems that most tests in this directory are failing at the moment. I'm not sure what can be done here for now.)

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

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

Source-Repo: https://github.com/servo/servo
Source-Revision: c9442346d3b454d9cbfcbd76d887e4f22f942531
2016-09-29 19:20:55 -05:00
Martin Robinson aefcd15165 servo: Merge #13417 - Simplify stacking context collection (from mrobinson:simplify-stacking-context-collection); r=glennw
<!-- 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
- [ ] These changes fix #__ (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. -->

Simplify the way that stacking contexts are collected. Instead of
passing the StackingContextId down the tree, pass the parent
StackingContext itself. This will allow future patches to get more
information about the parent stacking context (such as location).

Also remove the return value of collect_stacking_contexts, which was
unused.

Source-Repo: https://github.com/servo/servo
Source-Revision: 81dfa6a96b99eae8a7232eab39de96edf663ba99
2016-09-29 09:01:33 -05:00
Martin Robinson e21db129b2 servo: Merge #13331 - Add support for background-repeat: space and round (from mrobinson:background-repeat); r=emilio
<!-- Please describe your changes on the following line: -->

Add support for new background-repeat modes and upgrade Euclid, which now has support for basic arithmetic with Size2D.

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

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

This adds support for more background-repeat modes using the legacy
rasterization backend.

Source-Repo: https://github.com/servo/servo
Source-Revision: efdd94a2b629e4ae41d81a4209ad80b89eb6b937
2016-09-22 06:37:10 -05:00
Josh Matthews 90b9f0fa80 servo: Merge #13322 - Make dummy font implementation conform to API changes (from jdm:msvc-build-fix); r=KiChjang
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13321
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: 7d3c7beb215c18f10c03fb394eff9d152313dc59
2016-09-19 15:37:16 -05:00
Josh Matthews 3ac97ac930 servo: Merge #12076 - Make font template data load fallible (from jdm:font-load); r=pcwalton
Remove a TODO around dealing with a failed file operation.

Can we write an automated test for this? I don't really know what font template data is, but this failure seems to be fontconfig-specific...

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12037
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

Source-Repo: https://github.com/servo/servo
Source-Revision: a82d5106bd15d243c8552bf58472e3e9889d1ce2
2016-09-19 09:14:55 -05:00
UK992 f8cb9971b7 servo: Merge #13205 - Tidy: Fix ordering use statements with braces (from UK992:tidy-sort); r=Wafflespeanut
This hack fixes https://github.com/servo/servo/issues/7412 and matches behavior with rustfmt.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3117787fd2a8b7748cfde1e9b8c5be3c00f2c599
2016-09-08 22:19:19 -05:00
Keith Yeung b97448190e servo: Merge #13090 - Update string_cache to 0.2.26 (from KiChjang:update-string-cache); r=Manishearth
<!-- 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: -->
- [ ] `./mach build -d` does not report any hahahas
- [ ] `./mach test-tidy` does not report any hahahas
- [ ] These changes fix #hahaha (github issue number if applicable).

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

<!-- 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: 73bea84b41fe573856a4e9456b209e9faa6fef48
2016-08-28 09:52:38 -05:00
Anthony Ramine 58640cfec1 servo: Merge #13055 - Update Rust to 1.13.0-nightly (198713106 2016-08-26) (from servo:rustup); r=metajack
(Do not merge) Update Rust to 1.13.0-nightly (198713106 2016-08-26)

Source-Repo: https://github.com/servo/servo
Source-Revision: 1c2b45f87f23278d365913506e9c1776799ec345
2016-08-28 07:53:33 -05:00
Emilio Cobos Álvarez 4b5727104d servo: Merge #12841 - Fix hit testing to take into account nested stacking contexts #12777 (from emilio:hit-test); r=pcwalton
<!-- Please describe your changes on the following line: -->

Fixes #12833.

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 9b4713f5366aa43ac0db6a8f1d96f33b2f527978
2016-08-25 13:44:27 -05:00
Keegan McAllister 254dc5a305 servo: Merge #12938 - Sanitise web fonts (from nox:fontsan); r=larsbergstrom
Source-Repo: https://github.com/servo/servo
Source-Revision: 785fcd55806b546e2d5d15d5618fdf575262a012
2016-08-22 19:20:19 -05:00
Ms2ger f612660bd1 servo: Merge #12970 - Move thread_state to style (from servo:thread-state); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 1911606e5c7d81e41b79fa25c41b1d7def7aef62

--HG--
rename : servo/components/util/thread_state.rs => servo/components/style/thread_state.rs
2016-08-22 10:39:51 -05:00
Anthony Ramine 5177259222 servo: Merge #12941 - Update euclid to 0.10.1 (from nox:euclid); r=metajack,emilio
Source-Repo: https://github.com/servo/servo
Source-Revision: bb0ba644a8a028d6de8b5daf1b578a82ab23d49e
2016-08-20 20:04:17 -05:00
Anthony Ramine df3073f7dd servo: Merge #12925 - Update to webrender 0.4.0 (from nox:wr-merge); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: c769db69108c6dc50492abeaf1cd4de1653a04c9
2016-08-18 13:30:12 -05:00
Vladimir Vukicevic 1f90e0074c servo: Merge #11756 - MSVC support for Servo, and CMake builds for native code (from vvuk:servo-msvc); r=larsbergstrom
This is the base PR for MSVC builds of servo and dependent crates.  It's got replacements in the Cargo.toml to pull in the right versions, to make sure that crates were properly converted to CMake for all other platforms, not just Windows.  (Servo builds with MSVC 2015 with this PR; also with 2013, though a manual change in rust-mozjs to select a different set of bindings is needed.)

This PR isn't quite ready yet, but I want bors-servo to do builds.

Source-Repo: https://github.com/servo/servo
Source-Revision: ec53136863f20b80caf165d2f15e8a77d614536e
2016-08-17 13:22:52 -05:00
Emilio Cobos Álvarez b79bea109c servo: Merge #12843 - layout: Make the stacking context take into account the children transform when calculating overflow areas (from emilio:transforms); r=glennw
<!-- Please describe your changes on the following line: -->

This is a potential fix for #12842. I have done only the math to handle simple transforms because it's three AM, but I'd like @pcwalton to verify my approach, or suggest an alternative.

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

<!-- Either: -->
- [x] There are tests for these changes.

<!-- 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: 5f169581dc290e3cf0e8d6e7fc0550f1031fb25f
2016-08-17 00:35:16 -05:00
Patrick Trottier 54b48901bc servo: Merge #12849 - Fix GFX Warnings (from Coder206:gfxWarnings); r=Wafflespeanut
<!-- 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 #12624 (github issue number if applicable).

- [ ] 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 41296d20b962cc95bde813b13617aba022615796
2016-08-14 12:48:06 -05:00
David Tolnay bb87ffde99 servo: Merge #12834 - Remove #[serde(bound = "")] attributes (from dtolnay:bound); r=nox
These were fixed in serde_codegen 0.8.0 by serde-rs/serde#456.

cc @nox

- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because: the generated code continues to compile

Source-Repo: https://github.com/servo/servo
Source-Revision: 11b853fbf1916fb71b49fefbf2ebeaccaec50ee2
2016-08-12 19:01:28 -05:00
Anthony Ramine 64c09a7eda servo: Merge #12828 - Update serde to 0.8 (fixes #12659) (from nox:serde); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 9abe9e450b54ef9151bbee1aa0bd2dedb685fa7a
2016-08-12 12:23:10 -05:00
Martin Robinson c116a510e2 servo: Merge #12817 - Update to euclid 0.8 (from servo:euclid); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 5b915c403d2e96bd2917e7df4f2a58a6668a0c0e
2016-08-11 20:12:29 -05:00
Emilio Cobos Álvarez 64a444210a servo: Merge #12777 - layout: Take into account the client point for fixed positioned stacking contexts (from emilio:hit-test); r=pcwalton
<!-- 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 #12763 (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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 9b4b94aa755a04d4b9c9703574b01c03ad25a788
2016-08-10 18:50:33 -05:00
Ravi Shankar c069acc623 servo: Merge #12783 - Prefer length and percentage for word spacing (from Wafflespeanut:word_spacing); r=Manishearth
<!-- Please describe your changes on the following line: -->
The goal is to make use of `LengthOrPercentage` for word spacing in `ShapingOptions`, but since it makes use of `f32` which doesn't implement `Hash`, we're going for `NotNan<f32>` from [ordered-float](https://github.com/reem/rust-ordered-float/), which supports hashing. Instead of implementing `Hash` for `LengthOrPercentage` and thereby the inner types like `CSSFloat`, `CalcLengthOrPercentage`, etc., we convert it to `(Au, NotNan<f32>)`.

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

<!-- 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: 3b676bc85dc66ed0e80756204f347bf1842b01a0
2016-08-09 10:13:30 -05:00
Anthony Ramine 993ce31dd6 servo: Merge #12770 - Use expect calls to investigate #12540 and #12288 (from nox:intermittent-study); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: c420a870c1b1bca7e740e8bb737ef2bcdb1a139d
2016-08-08 09:59:40 -05:00
Martin Robinson 163d68347b servo: Merge #12742 - Simplify and extend trans-stacking-context subpixel accumulation (from mrobinson:off-by-one-ng-2); r=pcwalton
<!-- 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 #10881 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [x] 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. -->

Simplify the situations in which subpixels are accumulated, so that it
is only done for translation or identity transformation matrices. Also,
apply accumulated subpixels to more operations in PaintContext. This
fixes several pre-existing reftests and hopefully will eliminate
off-by-one errors in flaky reftests.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3ae94fca708bb7783c9e0e356f58521fc19fcdbf
2016-08-08 08:41:49 -05:00
Glenn Watson 8181f16ecc servo: Merge #12711 - Update webrender, copy new shaders, pin ipc-channel (from servo:wr-wr-next); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: e2d4ff5b62aff7fc6f40460270af44e1ab5283d4

--HG--
rename : servo/components/script/dom/validation.rs => servo/resources/shaders/ps_blend.glsl
rename : servo/resources/shaders/box_shadow.fs.glsl => servo/resources/shaders/ps_box_shadow.fs.glsl
rename : servo/resources/shaders/debug_color.fs.glsl => servo/resources/shaders/ps_clear.fs.glsl
rename : servo/components/script/dom/validation.rs => servo/resources/shaders/ps_clear.glsl
rename : servo/resources/shaders/mask.fs.glsl => servo/resources/shaders/ps_image_transform.glsl
rename : servo/resources/shaders/debug_color.fs.glsl => servo/resources/shaders/ps_rectangle.fs.glsl
rename : servo/components/script/dom/validation.rs => servo/resources/shaders/ps_rectangle.glsl
rename : servo/ports/geckolib/gecko_bindings/sugar/mod.rs => servo/resources/shaders/ps_rectangle_transform.glsl
rename : servo/components/script/dom/validation.rs => servo/resources/shaders/ps_text.glsl
2016-08-03 07:50:06 -05:00
Sergey Alexandrov ae3c7b56ff servo: Merge #11850 - Fix PaintContext page_rect due to display list origin (from splav:box-shadow#11662); r=glennw
Fix PaintContext page_rect due to non zero display list origin.

---
<!-- 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 #11662 (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: abdf01ed058478ea120137a925a09d918c47cd02
2016-07-27 18:54:32 -05:00
Emilio Cobos Álvarez e6192bfc52 servo: Merge #12563 - stylo: Improve restyling performance (from emilio:stylo); r=bholley,jdm,pcwalton
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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 944d371b8f0e72f6aa5465be38c0c8daeab66127
2016-07-27 17:56:26 -05:00
Martin Robinson 849f2102d3 servo: Merge #12543 - Accumulate subpixels through stacking contexts (from mrobinson:off-by-one-ng); r=pcwalton
<!-- 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
- [ ] These changes fix #__ (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. -->

Instead of simply rounding layer origins and discarding subpixel
offsets, accumulate them by transforming them into the space of the
next child stacking context. This is an attempt to eliminate subpixel
differences that are caused by different stacking context boundaries in
reference tests.

Currently these accumulated subpixels are only used for text
positioning, but the plan is that they can be used for all drawing in
the future.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4077ae7d04e64d66e2dfd1577dc4d337c45fecd4
2016-07-27 05:17:22 -05:00
Eduard Burtescu 67ca178f91 servo: Merge #12586 - Update Rust to 1.12.0-nightly (9316ae515 2016-07-24) (from servo:rustup); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 0be8e6857f4f767129dd694bf1e7e86060d307a4
2016-07-26 17:18:41 -05:00
Alan Jeffrey 528ece6c24 servo: Merge #12468 - Removed panic channel, replaced by integrated logging and issue reporting (from asajeffrey:constellation-remove-panic-channel); r=emilio
<!-- Please describe your changes on the following line: -->

Remove the previous ad hoc panic channel, replace it by an integrated logging and panicking mechanism, including crash reporting. All thread panics are now reported, not just content threads.

---
<!-- 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 #11838
- [X] These changes do not require tests because we don't test error reporting

<!-- 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: df1b00d43db615244e8e4bcf8296ed51b64249ea
2016-07-21 11:20:37 -05:00
Simon Sapin c710b104be servo: Merge #12515 - Make the style crate more concrete (from servo:concrete-style); r=bholley
Background:

The changes to Servo code to support Stylo began in the `selectors` crate with making pseudo-elements generic, defined be the user, so that different users (such as Servo and Gecko/Stylo) could have a different set of pseudo-elements supported and parsed. Adding a trait makes sense there since `selectors` is in its own repository and has others users (or at least [one](https://github.com/SimonSapin/kuchiki)).

Then we kind of kept going with the same pattern and added a bunch of traits in the `style` crate to make everything generic, allowing Servo and Gecko/Stylo to do things differently. But we’ve also added a `gecko` Cargo feature to do conditional compilation, at first to enable or disable some CSS properties and values in the Mako templates. Since we’re doing conditional compilation anyway, it’s often easier and simpler to do it more (with `#[cfg(feature = "gecko")]` and `#[cfg(feature = "servo")]`) that to keep adding traits and making everything generic. When a type is generic, any method that we want to call on it needs to be part of some trait.

----

The first several commits move some code around, mostly from `geckolib` to `style` (with `#[cfg(feature = "gecko")]`) but otherwise don’t change much.

The following commits remove some traits and many type parameters through the `style` crate, replacing them with pairs of conditionally-compiled API-compatible items (types, methods, …).

Simplifying code is nice to make it more maintainable, but this is motivated by another change described in https://github.com/servo/servo/pull/12391#issuecomment-232183942. (Porting Servo for that change proved difficult because some code in the `style` crate was becoming generic over `String` vs `Atom`, and this PR will help make that concrete. That change, in turn, is motivated by removing geckolib’s `[replace]` override for string-cache, in order to enable using a single Cargo "workspace" in this repository.)

r? @bholley

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require new 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. -->

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

--HG--
rename : servo/ports/geckolib/selector_impl.rs => servo/components/style/gecko_selector_impl.rs
rename : servo/ports/geckolib/values.rs => servo/components/style/gecko_values.rs
rename : servo/ports/geckolib/properties.mako.rs => servo/components/style/properties/gecko.mako.rs
2016-07-20 02:58:34 -05:00
Rahul Sharma 7fc9b5fc26 servo: Merge #11727 - Integrate service worker manager thread (from creativcoder:swmanager); r=jdm
<!-- 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 are part of #11091

<!-- Either: -->
- [X] There are tests for these changes at my [gh-pages](https://github.com/creativcoder/gsoc16/tree/gh-pages) branch to test  the instantiation of service workers by their manager, but will need to discuss how that would integrate into master.

Changes:
- Introduces a `ServiceWorkerManager`, which maintains an map of registered service workers as well as a map of active workers keyed by their `scope_url`.
- Adds the initialization of ServiceWorkerManager, at the `script::init()`, which makes it available as a single entity listening for requests from different script threads.
- Adds a timeout thread in `serviceworkerglobalscope`, which terminates the workers, after a timeout of 60 secs, thereby removing it from the active workers list.
- Adds the matching of scope urls, in longest prefix way rather than path structural way, according to [spec](https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#scope-match-algorithm).
- Make ServiceWorkerManager, the holder of network sender, instead of script thread, so it can send `CustomResponse`.

<!-- 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: 513811f6b40d522bc425c2588320b889614f2973
2016-07-18 09:50:59 -07:00
Alan Jeffrey 3502f92cc3 servo: Merge #12447 - All our Cargo.toml files should contain an MPL-2.0 license field (from asajeffrey:license-mpl-2.0); r=frewsxcv
<!-- Please describe your changes on the following line: -->

Added a `license = "MPL-2.0"` field to all our `Cargo.toml` files, and added a check to `test-tidy` that the license is present.

---
<!-- 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 #12434
- [X] There are tests for these changes

<!-- 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: 650d1d1185eecdc4c8b605bb0290ece7de839015
2016-07-14 09:33:18 -07:00
Ms2ger 346257437f servo: Merge #12381 - Move some unit type definitions to style_traits (from Ms2ger:units); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 1c7bec4b493174742c579b67ddb6f5411892d3d2
2016-07-11 03:17:55 -07:00
Ms2ger aa21d1fab9 servo: Merge #12311 - Move the cache module out of util (from Ms2ger:cache); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: d475a277eebaa7d91d1b070b169e205b4c533c4f

--HG--
rename : servo/tests/unit/util/cache.rs => servo/tests/unit/style/cache.rs
2016-07-08 07:46:00 -07:00
Matt Brubeck 3b39a53a78 servo: Merge #12291 - Bail out gracefully on malformed kern table headers (from mbrubeck:font-panic); r=Wafflespeanut
This changes a debug assert to a debug log and early return.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because I'm just removing an assertion

<!-- 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: b3c58f25ef9b9c503dcdbbc74883f702c8494531
2016-07-07 11:54:11 -07:00
Anthony Ramine 0bb8bc58dc servo: Merge #12208 - Continue loading font-face sources on missing local font (from nox:fontloading); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: 3679b0a328aaf37e6086d7ee7161f2cceb999067
2016-07-06 10:16:23 -07:00
Anthony Ramine 0f1c59e62d servo: Merge #12256 - Move some stuff from util to style (from nox:die-util-die); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: bb916bb38bc4298477bfc8134b94dc906054bce1

--HG--
rename : servo/components/util/str.rs => servo/components/style/str.rs
rename : servo/components/util/tid.rs => servo/components/style/tid.rs
rename : servo/tests/unit/util/str.rs => servo/tests/unit/style/str.rs
2016-07-05 02:04:42 -07:00
Hugh Gallagher c96830b1ea servo: Merge #12237 - Avoid many uses of unwrap in font_cache_thread.rs (from hgallagher1993:servo); r=jdm
Replaced `result.send(...blah...).unwrap()` with `let _ = result.send(...blah...);` in `components/gfx/font_cache_thread.rs`

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12188

- [X] These changes do not require tests because @jdm said if it compiles it's good enough

Source-Repo: https://github.com/servo/servo
Source-Revision: e3eeb643f0b64107bcec01c9075f8bd9cefe58b3
2016-07-05 00:06:44 -07:00
Travis Dean 60ed5d9499 servo: Merge #12243 - Add style check and test for else braces (from TravisDean:else-brace-check); r=ConnorGBrewster
<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: e21b47c2cc14897380a8c4ef2dfa650b1dd48ab5
2016-07-04 16:52:19 -07:00
Anthony Ramine cc183b15a7 servo: Merge #12224 - Remove some stuff from util (from nox:die-util-die); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 3b0dadda529a5ba45a8a0dc394187f43a66e7c1f

--HG--
rename : servo/components/util/print_tree.rs => servo/components/gfx_traits/print_tree.rs
rename : servo/components/util/workqueue.rs => servo/components/style/workqueue.rs
2016-07-04 12:57:00 -07:00
Corey Farwell df29454b47 servo: Merge #12178 - Refactor `util::prefs` operations to be methods on static struct (from frewsxcv:prefs); r=emilio
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] 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: b0a8ce5341f5148e36523fee0b0fcbc2684c0a68
2016-07-03 08:19:04 -07:00
Ms2ger df0f6b8d3d servo: Merge #11900 - Various DisplayList cleanup (from Ms2ger:displaylist-cleanup); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: ffb8b35d3549ead90e0a05d492558bf8cabfbbe1
2016-06-29 03:32:52 -05:00
Patrick Walton d5442bd70e servo: Merge #11918 - gfx: Don't create paint threads when WebRender is in use (from pcwalton:wr-no-paint-threads); r=glennw
They're unused and just waste memory and process table entries.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 5c41cda9a51490b0764938a57218e7c19735104f
2016-06-28 21:01:42 -05:00
Anthony Ramine 68261846c3 servo: Merge #11871 - Update Rust to 1.11.0-nightly (ad7fe6521 2016-06-23) (from servo:rustup); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: e3e5a51ff692635e7eabd2b244a975686f1064c4
2016-06-27 09:47:34 -05:00
Ms2ger 304be268ab servo: Merge #11852 - Move ChromeToPaintMsg to gfx_traits (from Ms2ger:ChromeToPaintMsg); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 9ee0a01f66b4b6fcbfd86e0316d6aed35ef99ebf
2016-06-25 00:26:37 -05:00
Simon Sapin 993d896521 servo: Merge #11816 - Make the style crate (almost) build with a stable compiler (from servo:stable-style); r=nox
<!-- Please describe your changes on the following line: -->

The bulk of this is adding cargo features to make derived implementations of `heapsize` and `serde` traits optional.

"Almost" because `std::intrinsics::discriminant_value` is currently unstable and doesn’t have any stable replacement that I know of. For now, this PR conditionally replaces it with `unimplemented!()`.

r? @nox

---
<!-- 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 <s>fix</s> are part of #11815 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not <s>require tests</s> *have tests yet* because that requires https://github.com/servo/servo/issues/11806, but I still want to land this before it bitrots. (Tests should check that the build succeeds with a stable compiler.)

<!-- 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: 0fb5d634a007f3d0424f95569ac3f83d500d054c
2016-06-22 09:43:20 -05:00
Ms2ger 874621db97 servo: Merge #11754 - Move ServoLayoutNode and related structs to script (from Ms2ger:wrapper-traits-prep2); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: ee8c5c5a67e1181eca163d3cd1189866d230b8f0

--HG--
rename : servo/components/script/reporter.rs => servo/components/script_layout_interface/reporter.rs
rename : servo/components/layout/incremental.rs => servo/components/script_layout_interface/restyle_damage.rs
2016-06-20 12:54:20 -05:00
Keith Yeung 2c8f932ff1 servo: Merge #11799 - Update string_cache to v0.2.20 (from KiChjang:update-string-cache); r=Wafflespeanut
Source-Repo: https://github.com/servo/servo
Source-Revision: fa0f2898fb8917cff54e07a6bd3ad8730ef10605
2016-06-20 01:29:33 -05:00
Patrick Walton 2120477f7d servo: Merge #11680 - script: When using WebRender, keep the DOM-side scroll positions for elements with `overflow: scroll` up to date, and take them into account when doing hit testing (from pcwalton:wr-overflow-scroll-hit-testing); r=jdm
Closes #11648.

r? @jdm
cc @paulrouget

Source-Repo: https://github.com/servo/servo
Source-Revision: 2d9338085561e7908c80ec7b2dd6d30125489aac
2016-06-11 11:01:36 -05:00
Anthony Ramine 331b90272e servo: Merge #11702 - Don't load all font faces sources (from nox:fonts); r=metajack
We stop at the first one we manage to load.

Source-Repo: https://github.com/servo/servo
Source-Revision: ce88b8ed30feff9c7d3f067041fe5d781e012351
2016-06-10 14:52:55 -05:00
Ms2ger b390fb8a56 servo: Merge #11623 - Move some code out of util::str (from Ms2ger:str); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 9a4460bed101655e55c18be051ead955a70ea3ce
2016-06-06 02:16:07 -05:00
Ms2ger 4264bd5479 servo: Merge #11619 - Some cleanup in gfx (from Ms2ger:freetype); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: d768ee5d4c2ef0429e88191f01f977338c964359
2016-06-05 06:57:18 -05:00
Ms2ger a9b041b2e8 servo: Merge #11607 - Remove the layout and paint shutdown channels (from Ms2ger:shutdown-channels); r=asajeffrey
Source-Repo: https://github.com/servo/servo
Source-Revision: 80a58cadc5f864bfb44671e2e7228d7c6cdf4ab4
2016-06-04 14:24:56 -05:00
Alan Jeffrey 7ceb3d690c servo: Merge #11585 - Avoid deadlock when closing a pipeline (from asajeffrey:constellation-avoid-deadlock-during-pipeline-closure); r=larsbergstrom
<!-- Please describe your changes on the following line: -->
At the moment, the constellation blocks on a pipeline during closure. This PR makes pipeline closure asynchronous.

---
<!-- 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 #11546.
- [X] These changes do not require tests because testing for absence of deadlock is difficult.

<!-- 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: 6581e3504a60aa1e7c363cc93b1036b4a174c166
2016-06-03 22:22:49 -05:00
Ms2ger b36f668619 servo: Merge #11573 - Remove some options code (from Ms2ger:opts); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 1f5b0008ac763bbb2209a70afddb6434d18cff9d
2016-06-03 09:50:29 -05:00
Patrick Walton c3daa72338 servo: Merge #11398 - script: Keep the DOM-side viewport up to date when scrolling happens in WebRender (from pcwalton:webrender-viewport); r=glennw
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.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 27d1f182713077395426a53a9c91ec35c95887ee
2016-05-31 20:54:29 -05:00
Josh Matthews 7f10c47c0a servo: Merge #11472 - Report blank lines that follow an open brace (from jdm:wip); r=mbrubeck
This automates something that I find myself frequently commenting on in PRs.

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 3ec20d9cf517c67f4d280e8958cc58c4c2b4fbb2
2016-05-27 18:14:25 -05:00
Cullen Rhodes 2bd22f97ce servo: Merge #11329 - Report use statements that use {} with only one entry (from c-rhodes:11320); 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 --faster` does not report any errors
- [X ] These changes fix #11320  (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: 2f9796fa696e9514280777398467696dd4f004b3
2016-05-27 07:11:17 -05:00
Matt Brubeck d0d3845f0b servo: Merge #11394 - Reduce the size of StackingContextId (from mbrubeck:stacking-context-id); r=pcwalton
r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 2acb257a82601ad9b48a544cff20ce83f6311a47
2016-05-26 07:25:58 -05:00
Rahul Sharma c1289018c9 servo: Merge #11376 - Bump string-cache to 0.2.18 (from creativcoder:update-string-cache); r=nox
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy --faster` does not report any errors
- [X] These changes do not require tests because its a crate version bump.

Source-Repo: https://github.com/servo/servo
Source-Revision: 116faa7617aa2cb648d57307505b23504900bc9f
2016-05-25 10:13:29 -05:00
Matt Brubeck 70b7a1aa47 servo: Merge #11303 - Always include the last-resort font (from mbrubeck:last-resort); r=pcwalton
This is used as a fallback for any characters that don't have glyphs in the specified font.  Without this, per-glyph font fallback doesn't work because the FontGroup always contains only one font.  Fixes missing glyphs on many pages on my Linux box.

As a follow-up, we should probably have a smarter strategy for finding fallback fonts, possibly varying by script.  (Currently we just have a few hard-coded family names.)

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: aa9f50a1d406e72d8b443f79439aaf9fd2ba4425
2016-05-24 10:39:44 -07:00
Matt Brubeck 033133b73c servo: Merge #11347 - Don't create HarfBuzz shaper if it isn't used (from mbrubeck:fast-shape); r=pcwalton
Move the fast shaping code out of `text::shaping::harfbuzz`, and initialize the HarfBuzz shaper lazily to avoid allocating unnecessary HarfBuzz objects.

Note: As the fast shaping code grows and gains OpenType support, I'll probably factor it out into a whole new `text::shaping::fast` module.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 8b633c979eb57c94e59d93888df9971193a3d533
2016-05-23 18:21:06 -07:00
Keith Yeung ae05ea6335 servo: Merge #11331 - Update string_cache to 0.2.17 (from KiChjang:update-string-cache); r=nox
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [x] These changes do not require tests because crate version bump

Source-Repo: https://github.com/servo/servo
Source-Revision: 3c1b8e10c4fb9c200975df41d1c5c071534cf9bd
2016-05-23 07:17:58 -07:00
Rahul Sharma 934afa2733 servo: Merge #10961 - adding interface for custom responses (from creativcoder:custom_response_iface); r=jdm
Fixes #10960

Source-Repo: https://github.com/servo/servo
Source-Revision: 1a34137ac41276239850d91073bec2c0ef2344d9
2016-05-21 01:12:54 -07:00
Matt Brubeck 88b9e1fcd2 servo: Merge #11273 - Add a fast path for shaping ASCII text (from mbrubeck:fast-shape); r=pcwalton
On both my Linux laptop and iMac, this is about twice as fast as Harfbuzz text shaping on https://en.wikipedia.org/wiki/Barack_Obama.

I haven't tested this on any high-DPI (retina) displays, and I'm not 100% certain that the font unit scaling is correct there.

Depends on servo/core-text-rs#50.

Source-Repo: https://github.com/servo/servo
Source-Revision: c0c70ef0946da25ce31c44037f4a5ff2028b9aee
2016-05-20 17:58:23 -07:00
Ms2ger 3d3386f307 servo: Merge #11289 - Simplify PaintThread::create() (from Ms2ger:paintthread); r=nox
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 _____

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: a4e215974ca1b471db2b10c6a5eae64dd1523e00
2016-05-20 05:08:40 -07:00
Zhen Zhang 036cdcf2ea servo: Merge #11189 - Refactor resource thread code (from izgzhen:refactor-resource-thread); r=nox
- [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 it is refactoring

Source-Repo: https://github.com/servo/servo
Source-Revision: bcea0ada27de694cd0c465d04fd35eba70503d62
2016-05-19 19:15:08 -07:00
Ms2ger c69abc638b servo: Merge #11270 - Remove ConstellationChan (from servo:ConstellationChan); r=asajeffrey
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 _____

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

It's a pointless abstraction that propagates the obsolete chan terminology,
swaps the order in which the sender and receiver are returned, and hides a
source of panics.

Source-Repo: https://github.com/servo/servo
Source-Revision: 27c25e859a45c3d79c85e96b85ec5226a3231e10
2016-05-19 12:38:26 -07:00
Bobby Holley 7d70cec87c servo: Merge #11242 - Add basic support for Gecko atoms (from bholley:gecko_atoms); r=emilio
This is a rough initial implementation of gecko atoms. This allows us to get rid of the custom rust-selectors branch we use to build stylo.

The gecko changes are at https://bugzilla.mozilla.org/show_bug.cgi?id=1273771

Source-Repo: https://github.com/servo/servo
Source-Revision: e3be7184fb79d9d0b7b2a491769a58c59a990460
2016-05-18 11:35:28 -07:00
Anthony Ramine 61bd80a453 servo: Merge #11191 - Update bitflags to 0.7 (from servo:bitflags); r=pcwalton
- [x] https://github.com/servo/cocoa-rs/pull/126 https://github.com/servo/cocoa-rs/pull/127 https://github.com/servo/cocoa-rs/pull/128 https://github.com/servo/glutin/pull/91
- [x] https://github.com/cyderize/rust-websocket/pull/78
- [x] https://github.com/sfackler/rust-openssl/pull/393
- [x] https://github.com/PistonDevelopers/image-png/pull/36
- [x] https://github.com/servo/rust-selectors/pull/87
- [x] https://github.com/vberger/wayland-kbd/pull/12
- [x] https://github.com/vberger/wayland-client-rs/pull/50
- [x] https://github.com/netvl/xml-rs/pull/122 https://github.com/netvl/xml-rs/pull/123

Source-Repo: https://github.com/servo/servo
Source-Revision: 6c08ad857ea4139bb266c481eebe4315bdd460d5
2016-05-17 15:43:14 -07:00
Ms2ger aae9059d1d servo: Merge #11229 - Simplify FontContext::create_layout_font (from Ms2ger:create_layout_font); r=emilio
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8bfeea5f2097cb792a0272eef7198fab6ed0d5a1
2016-05-17 05:30:53 -07:00
Matt Brubeck 283598ac1a servo: Merge #11206 - Fix unused item warning on 32-bit platforms (from mbrubeck:warnings); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 3a28aad349473d7a9fcb6c5e4841abf3972fd733
2016-05-16 11:57:50 -07:00
Per Lundberg 28632dc3a1 servo: Merge #11192 - Removed unused imports (from perlun:remove-unused-imports); r=Manishearth
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11185
- [X] These changes do not require tests because it only removes dead code.

----

This fixes #11185.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2c674d0397927ef6563feb70e54f46815af55600
2016-05-15 15:41:16 -07:00
Matt Brubeck 1d79544c32 servo: Merge #11180 - Minor cleanup and optimizations in glyph/style caching (from mbrubeck:text-cleanup); r=pcwalton
Gets rid of some unnecessary String and Arc clones during text shaping and style matching.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: e2990766dc1c7461b55c96f0ce7116d35d4fd3c6
2016-05-14 09:06:53 -07:00
Emilio Cobos Álvarez 93c0fa9130 servo: Merge #11166 - gfx: Add expect messages to FontCacheThread::exit() (from emilio:fontcache-exit); r=mbrubeck
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 only add debug info.

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

One of these two unwraps is the one that is causing most occurrences
of #8815.

I'd go with removing the second unwrap entirely, but let's get some
debug info first, since it might probably be a race.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2e049a85330ebc71212b4629119d561652ac9bef
2016-05-12 16:39:03 -07:00
Patrick Walton b6bde70e16 servo: Merge #11103 - gfx: Map CSS `normal` font weight to Regular font weight on the Mac (from pcwalton:mac-font-matching); r=metajack
This series of commits fixes #9487, and improves the look of nytimes.com among others.

r? @metajack

Source-Repo: https://github.com/servo/servo
Source-Revision: 1fd9c5583455b873fca1c95b2784f969870073bd
2016-05-10 14:11:35 -07:00
Ulf Nilsson abe21b5d60 servo: Merge #11109 - Make `text-align: justify` incremental layout safe (from kaksmet:justify-fix); r=mbrubeck
Closes #10499
Closes #9057

Source-Repo: https://github.com/servo/servo
Source-Revision: 069be91e8451d197c8f66790fbf53086f22150d7
2016-05-10 12:54:26 -07:00
Patrick Walton 969a1ef5d7 servo: Merge #10937 - gfx: Map `sans-serif` to Helvetica on Mac and DejaVu Sans on Linux (from pcwalton:mac-helvetica); r=metajack
This matches what I believe the OS native defaults to be.

Partially addresses #9487.

r? @metajack
cc @paulrouget

Source-Repo: https://github.com/servo/servo
Source-Revision: 180a9813aa5ecce0a3013cdd30c1ef99ed1d1f6d
2016-05-09 13:02:23 -07:00
Matt Brubeck b40d3af015 servo: Merge #11032 - Filter out whitespace glyphs from display list (from mbrubeck:no-whitespace); r=pcwalton
Fixes #10244. r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: df8008cfe6a0113ae9153e9eb3424f8b3a4030e8
2016-05-07 11:05:14 -07:00
Patrick Walton 0d424df05f servo: Merge #10691 - layout: Fix float speculation with percentage inline sizes, rewrite vertical alignment, fix inline block ascent/descent computation, and fix absolute inline-block hypothetical boxes (from pcwalton:float-fixes); r=mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 35ba29355f40f27b2febe87aad7d7ffba20160c0
2016-05-04 13:49:23 -07:00
Michael Howell ecd9f482b8 servo: Merge #10983 - Minor reduction in the amount of allocation display list building does (from notriddle:no_alloc_sort_display); r=mbrubeck
Use `mem::replace` to perform the lifetime-trick without allocating a whole new buffer.

(An older of this switched from the built-in heapsort to a non-allocating introsort. Unfortunately, introsort is not a stable sorting algorithm, and the display list system relies on it being stable.)

Source-Repo: https://github.com/servo/servo
Source-Revision: 2e849b7064bdb30beedc4af13033b3f6a407f4b1
2016-05-03 23:51:53 -07:00
Matt Brubeck ffeadc8422 servo: Merge #10975 - Update even more dependencies (from mbrubeck:more-deps); r=KiChjang
Adds a temporary exception to allow multiple versions of lazy_static. PRs have already been filed on the packages that are still using the old version.

Source-Repo: https://github.com/servo/servo
Source-Revision: 361b2b900eeea821a9a79d8566f8cd31dfb1b1ea
2016-05-02 16:48:45 -07:00
Matt Brubeck eacfe16cd2 servo: Merge #10913 - Use xi-unicode for line breaking (from mbrubeck:xi-unicode); r=pcwalton
This uses the xi-unicode crate by @raphlinus to detect line-break opportunities, replacing Servo's custom code that only detects ASCII whitespace.  xi-unicode is licensed under the Apache-2.0 license.

See mbrubeck/servo#2 for some discussion on an earlier draft of this code.  This PR implements the "search backward to find trailing whitespace" solution discussed there.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: fc1e4c808541ca11e25831c7c6b5cfa924945fa5
2016-04-30 21:20:38 -07:00
Matt Brubeck ff8a4f5c36 servo: Merge #10944 - Upgrade a bunch of dependencies (from mbrubeck:bitflags-0.6); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: 8db0367301b5ad5ab5ea4704d57755c166cfd5de
2016-04-30 15:21:22 -07:00
Matt Brubeck 22979e08c6 servo: Merge #10895 - Use byte indices instead of char indices for text runs (from mbrubeck:byteindex); r=pcwalton
Replace character indices with UTF-8 byte offsets throughout all code dealing with text runs.  This eliminates a lot of complexity when converting from one to the other, and interoperates better with the rest of the Rust ecosystem.

For most code this is just a simple replacement of char indices with byte indices.  In a few places like glyph storage and text fragment scanning, it also lets us get rid of code that existed only to map between bytes and chars.

Also includes some related fixes to text shaping, discovered while working on this conversion.  See the commit messages for details.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: cf121ad8dff90b8fa55558ca9bdcbfe29512a617
2016-04-28 20:22:09 -07:00
Matt Brubeck 6885947f82 servo: Merge #10880 - Code cleanup in gfx::text (from mbrubeck:char-at); r=nox
* Fix deprecation warnings by replacing `str::char_at` and related functions with iterators.
* Replace some uses of `range::Range` with `std::ops::Range`.

Source-Repo: https://github.com/servo/servo
Source-Revision: 224bcd7057c9b5aeb8f0064de9e1d0551b75a01b
2016-04-28 05:01:24 -07:00