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

202 Коммитов

Автор SHA1 Сообщение Дата
Shing Lyu 4821e9de84 servo: Merge #14978 - Implemented display: inline-flex (from shinglyu:inline-flex); r=notriddle
<!-- 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 #14685 (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: c75946c3ed52d262aae585055023becd5a2e9769
2017-01-22 19:57:49 -08:00
Michael Howell 779c5cda4b servo: Merge #14989 - Fix the incrmental reflow behavior of text-overflow (from notriddle:ellipsis_reflow); r=emilio
This patch allows Servo to incrementally reflow truncated fragments correctly.

* The untruncated version of a fragment is preserved, and when incrementally reflowing, the untruncated version is what gets reflowed. If it needs truncated, it will get truncated again.
* The ellipsis fragments are skipped when incrementally reflowing a line. If it is still needed, it will be recreated.

---

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 6a04aea4a5a0da583e8cc7fc0f76c9bfea857538
2017-01-12 17:31:19 -08:00
Martin Robinson 1798734219 servo: Merge #14603 - Rework the way scroll roots are collected (from mrobinson:collect-scoll-roots); 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 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. -->

Collect scroll roots during the collect_stacking_context phase instead
of during display list construction. This will be useful in order to
collect containing block scroll roots as well as to give scroll roots
sequential ids in the future. This change also pulls stacking context
children out of the StackingContext struct itself, which should reduce
very slightly the memory used by the finished display list. This also
simplifies the DisplayListBuilder because it no longer has to maintain
a stack of ScrollRootIds and StackingContextIds and can instead just
rely on the program stack.

Source-Repo: https://github.com/servo/servo
Source-Revision: dabb79c7878fce31b8b979dd5fcfdfb8713a9d80
2017-01-10 04:48:31 -08:00
Emilio Cobos Álvarez 89013f9ba5 servo: Merge #14801 - style: Document and force documentation in a big chunk of the style crate (from emilio:no-missing-docs); r=mbrubeck,Manishearth,Wafflespeanut
Style no forced docs for the properties code and similar, but I ran out of time, and I think it's a nice improvement.

I'd appreciate a fast-ish turn-around time because this is pretty much prone to bitrot.

Source-Repo: https://github.com/servo/servo
Source-Revision: bd67163438317daa711b2411ce302aaf5bf4136a
2016-12-31 03:19:02 -08:00
Bobby Holley b0588eeb56 servo: Merge #14610 - Simplify style context architecture and make it safer (from bholley:style_context_refactor); r=emilio
See the discussion at https://bugzilla.mozilla.org/show_bug.cgi?id=1323372

Not done here, but want to get a try run in on the first patch.

Source-Repo: https://github.com/servo/servo
Source-Revision: a4ecdf2d5fda281f25e2689852bc2134429e07c6
2016-12-16 11:38:27 -08:00
Pu Xingyu d9d8fc335a servo: Merge #14490 - layout: Unify size calculation of replaced elements (from stshine:replaced-size); 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: -->
- [ ] `./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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 1993b6e812de30de06100e7d52c1d90af929f24f
2016-12-12 03:25:03 -08:00
Nikhil Shagrithaya cea225d1f4 servo: Merge #13924 - implemented string-valued text-overflow (from cynicaldevil:text-overflow); 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
- [X] These changes fix #13709

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

cc @Manishearth
The lorem-ipsum example from MDN works as expected.

Source-Repo: https://github.com/servo/servo
Source-Revision: a91f48ee05933784630fdf918fc4b66037dba9f1
2016-11-09 16:36:45 -06:00
Bobby Holley bc86bdcc31 servo: Merge #14034 - incremental restyle: Use more concrete types in the style system (from bholley:more_concrete_types); r=emilio
We need to hang both snapshots and restyle damage off of ElementData, and so we need them to be concrete to avoid infecting ElementData with the trait hierarchy.

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

--HG--
rename : servo/resources/shaders/debug_color.fs.glsl => servo/components/style/servo/mod.rs
rename : servo/components/script_layout_interface/restyle_damage.rs => servo/components/style/servo/restyle_damage.rs
rename : servo/components/style/servo_selector_impl.rs => servo/components/style/servo/selector_impl.rs
2016-11-07 16:31:10 -06:00
Shing Lyu b988a636be servo: Merge #13740 - Migrated -Z trace-layout to serde_json (from shinglyu:layout_serde); r=jdm
<!-- Please describe your changes on the following line: -->

Migrated the trace-layout code from old `rustc-serialize` to `serde_json`. This will help us iterate faster on the layout viewer (#13432), #13436, #12675 and fix #12936.
---

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a relatively low risk debug tool

<!-- 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: 1c26f44cbb23e7da3b9d63f0223c8d5d43eec958
2016-11-07 02:15:03 -06:00
Michael Howell 5b347f4041 servo: Merge #14053 - Make `FlowRef` a newtype (from notriddle:flow_ref_unsafe); r=pcwalton
This creates a sharp distinction between `Arc<Flow>`s, which may be
owned by anyone, and `FlowRef`s, which may only be owned by the
traversal code. By checking the reference count, we ensure that a `Flow`
cannot be pointed to by `Arc`s and `FlowRef`s simultaneously.

This is not a complete fix for #6503, though it is a necessary start
(enforcing the no-aliasing rule of `FlowRef::deref_mut` will require far
more work).

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14014 (github issue number if applicable).
- [X] These changes do not require tests because the existing tests, plus the added assertions, should be sufficient

Source-Repo: https://github.com/servo/servo
Source-Revision: 2b4a7b0b7ad9dd568dfde15ab47dc634ec561d70
2016-11-04 16:53:38 -05:00
Martin Robinson 9a67ba798b servo: Merge #13957 - Track overflow:scroll stacking contexts with ScrollRootId instead of StackingContextId (from mrobinson:scroll_root); 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 3a3f3192a87dbcd5d05efb82a1f4dde23f9c4cf7

--HG--
rename : servo/resources/shaders/box_shadow.fs.glsl => servo/resources/shaders/cs_box_shadow.fs.glsl
rename : servo/resources/shaders/ps_box_shadow.glsl => servo/resources/shaders/cs_box_shadow.glsl
2016-10-30 15:27:56 -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
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
Patrick Walton b458933086 servo: Merge #13490 - layout: Place inline absolute hypothetical boxes properly during block fragment position assignment (from pcwalton:inline-absolute-hypothetical-metrics); r=notriddle
r? @notriddle

Closes #13471.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1c62520142a250da5dd6ac027ce531a255096acf
2016-10-04 21:03:55 -05:00
Michael Howell 0c9d616de3 servo: Merge #13401 - Implement sequential fallback to float speculation (from notriddle:master); r=pcwalton
This shouldn't impact any pages that are already rendering correctly, but it is a very naive implementation of this pass.

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13284 and fix #13223
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: 4ebecc915a13cd944b25738dd5859f1a6072a4ff
2016-09-29 13:16:24 -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
Patrick Walton 31b454a47b servo: Merge #13470 - layout: Improve the interaction between baseline-offset-of-last-line-in-flow logic and inline absolute hypothetical boxes (from pcwalton:inline-absolute-hypothetical-baseline); r=notriddle
See commits for details. These changes place the heart icon on Twitter in the right place.

r? @notriddle

Source-Repo: https://github.com/servo/servo
Source-Revision: ccfc60161b8d92217b9f77040d6928d429bcbe9d
2016-09-29 00:11:33 -05:00
Patrick Walton b13d5121e5 servo: Merge #13346 - layout: Make some major improvements to incremental layout to improve CNN (from pcwalton:cnn); r=notriddle
CNN is still too slow to be usable, but this is a partial solution.

r? @notriddle (feel free to reassign if you like)

Source-Repo: https://github.com/servo/servo
Source-Revision: cbe54582727e3d756aa084e94520f2f29f9d7c86
2016-09-26 20:57:59 -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
Ms2ger 8466cae183 servo: Merge #13012 - Stop creating a LayoutContext in build_display_list_for_subtree (from servo:shared-layout-context); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 6191748907e0480059a9a33c5c8c7be42d79efe3
2016-08-24 09:38:31 -05:00
Alexandrov Sergey 29a9720f2d servo: Merge #12669 - Inline pseudo elements layout#12367 (from splav:inline_pseudo_elements_layout#12367); r=notriddle
<!-- Please describe your changes on the following line: -->
This PR fixes ignored paddings and margins for inline pseudo elements.

---
<!-- 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 #12367 (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: 9ffda4c7b33f14c291404655bd137b544969fff9
2016-08-11 03:38:14 -05:00
Alexandrov Sergey 3e310fec9b servo: Merge #12760 - Inline split fixes#12699 (from splav:inline_split_fixes#12699); r=notriddle
<!-- Please describe your changes on the following line: -->
Fix fragment splitting algorithm to set FIRST/LAST_FRAGMENT_OF_ELEMENT flag correctly, account for border_padding for border_box and set zero border_padding between for new fragments.

---
<!-- 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 #12699 (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: 2420dc4a3e9338977e6f24184e65abff9749afb4
2016-08-09 11:05:57 -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
Ms2ger 013bec0ca2 servo: Merge #12385 - Move arc_ptr_eq to style (from Ms2ger:arc_ptr_eq); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: c3a8cbbd38570d4a9095ca94ee4a970956691051
2016-07-11 05:11:48 -07:00
Emilio Cobos Álvarez 74b652d758 servo: Merge #12370 - Fix line-breaking with white-space: pre-wrap/pre-line; (from emilio:wrap); r=mbrubeck
Fix line-breaking with white-space: pre-wrap/pre-line;

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

Not sure if this is the appropriate fix, but we'll know soon.

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

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

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 8ded106186aa0855a2bd991d573e7095590efca1
2016-07-11 01:08:57 -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
Ms2ger ac18eb8bf1 servo: Merge #11822 - Avoid creating a LayoutContext in parallel::assign_inline_sizes (from Ms2ger:sharedcontext); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 44b0bddf413563890481fd77e43d3d073bd6b627
2016-06-23 03:03:02 -05:00
Matt Brubeck 274e69bf1e servo: Merge #11752 - Minor code cleanup in layout (from mbrubeck:cleanup); r=pcwalton
r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 47387a5c442c5a0167b5286fa1113124ba8d67db
2016-06-21 17:51:26 -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
Darin Minamoto 1323bc22a5 servo: Merge #11746 - Image with height defined in % resizes properly (from DarinM223:master); r=mbrubeck
<!-- Please describe your changes on the following line: -->

Checked the html in the github issue and the image looks like it is resized properly in Servo.
Fixed image resizing when height is specified in percentages.
---
<!-- 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 #11723  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because this issue is marked with has-test?

<!-- 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: d2db39634e6e39f4cb054e0b443339409ae69350
2016-06-16 03:57:38 -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
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
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
Matt Brubeck 62459e1c7b servo: Merge #11039 - Remove redundant code in whitespace stripping (from mbrubeck:strip-trailing); r=pcwalton
LineBreaker calls Fragment::strip_trailing_whitespace_if_necessary and then recalculates the fragment's inline size.  But this isn't necessary because strip_trailing_whitespace_if_necessary already recalculates the size.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: f80641e7a16b832ce755cf936ed9ea6a9289fda9
2016-05-06 21:53:27 -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
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
malayaleecoder 643c9837e8 servo: Merge #10320 - Rename imm_child_iter() and child_iter() (from malayaleecoder:master); r=KiChjang
Fixes #10286

Source-Repo: https://github.com/servo/servo
Source-Revision: 0a1efe4578e43c4ffc2f90ff0118660899a83ac4
2016-04-09 03:25:40 +05:01
Matt Brubeck 90eddfedb0 servo: Merge #10469 - Some minor layout cleanups (from mbrubeck:layout-misc); r=pcwalton
* Prevent unnecessary copying in `strip_leading_whitespace_if_necessary`
* Remove unused argument to `adjust_clipping_region_for_children` (silences a compiler warning)

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: bd2051d06a4b5f5a261b1c816c5ce9960d3e9b23
2016-04-08 09:41:11 +05:01
Mauricio Collares 14d64f2465 servo: Merge #10407 - Move some CSS properties to match Gecko's representation (from mauricioc:issue10403); r=bholley
Fixes #10403. Animation had an extra transition-delay property, which was also moved to Box. Let me know if I should squash the commits.

Source-Repo: https://github.com/servo/servo
Source-Revision: 256b865055c10082731b218f41373d47ad632062
2016-04-07 02:49:15 +05:01
Michael Howell b55c60ea5b servo: Merge #10419 - Whitespace stripping should not result in a dangling, open border (from notriddle:whitespace_border); r=mbrubeck
No open issue (found it while working on #7681).

Source-Repo: https://github.com/servo/servo
Source-Revision: cb943b016f77b9d670291c5026b8566b5c0d5edf
2016-04-06 15:01:51 +05:01
Emilio Cobos Álvarez 6a77e7f71e servo: Merge #10252 - Implement ::selection pseudo-element (from emilio:selection); r=mbrubeck
It only supports `color` and `background`, for now, but it shouldn't be hard to add more properties (like text-shadow).

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 723989b9dddeb9bcdc28dc7d640fd6fd7247a27f
2016-03-31 00:18:07 +05:01
Per Lundberg 206f878009 servo: Merge #10277 - Renamed TComputedValues to ComputedValues (from perlun:rename-tcomputedvalues-to-computedvalues); r=SimonSapin
This is a followup to #10210, and a continuation of #10185.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0ec96ac02a6c40ffda98e1074ceb9874dd1fb3cb
2016-03-30 10:35:57 +05:01
Per Lundberg ad08fc1cc0 servo: Merge #10210 - ComputedValues is now ServoComputedValues (from perlun:rename-computedvalues-to-servocomputedvalues); r=SimonSapin
This is the first part of #10185. More to follow. I have built this locally with both servo and geckolib without errors; let's see if it succeeds on all platforms as well.

Source-Repo: https://github.com/servo/servo
Source-Revision: 639fdd6b128e0cfd418e4ae0dd78de3f5aecac4c
2016-03-29 17:56:40 +05:01
Matt Brubeck 610e3a8057 servo: Merge #10246 - Restore stripped whitespace before reflowing text fragments (from mbrubeck:strip-leading); r=pcwalton
Fixes #10200. r? @pcwalton

Note: The reftest uses a transition of non-zero duration, because I couldn't find any other way to reproduce the bug.  Unfortunately this makes it unreliable in debug builds. I tried to fix this using reftest-wait with setTimeout and requestAnimationFrame, but it still wouldn't complete the animation consistently.  To make the test work in debug builds we may need `transitionend` events (#10245) or a different way to reproduce the bug.

Source-Repo: https://github.com/servo/servo
Source-Revision: 159be44193ef7d60a5c35629d791323e5357e7db
2016-03-29 14:01:40 +05:01
Matt Brubeck 7f2f49fe54 servo: Merge #10176 - Highlight selected text in input fields (from mbrubeck:selection-range); r=pcwalton
Fixes #9993.  This does not yet allow stylesheets to set the selection colors; instead it uses a hard-coded orange background and white foreground.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: bed91b3334786970c91a47c3bc95889d8675b4d5
2016-03-26 07:47:20 +05:01
Bobby Holley 6e1def963d servo: Merge #10155 - Generalize the style structs (from bholley:generalize_style_structs); r=SimonSapin
This allows geckolib to pass gecko style structs and have the style system write to them directly, provided we implement all the traits.

Source-Repo: https://github.com/servo/servo
Source-Revision: 605842f193aedc1151ab38a99c49f693c76e5cf3
2016-03-25 02:58:33 +05:01
Matt Brubeck 7bea7698c9 servo: Merge #9969 - Don't re-resolve already-resolved generated content (from mbrubeck:quotes-036); r=pcwalton
This fixes #7846, a failure in the "quotes-036.htm" test. Servo lays out this test correctly in its initial layout, but then messes it up in any relayout (whether it's an incremental or full layout).

The problem is that the ResolveGeneratedContent traversal is not safe to run more than once on the same flow. It mutates some GeneratedContent fragments into ScannedText fragments, but leaves others unmodified (in particular, those that generate empty content). The next time layout runs, these remaining GeneratedContent fragments are processed *again* but with an incorrect correct quote nesting level (because some of the surrounding GeneratedContent fragments are gone).

This patch ensures that each GeneratedContent fragment is resolved only once.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 71b1122e97303c51bac73d03d8af617069a75d21
2016-03-12 02:13:10 +05:01
Matt Brubeck fcb954fef7 servo: Merge #9961 - Fix work list order after split_line_at_last_known_good_position (from mbrubeck:split-line-work-list); r=pcwalton
This fixes a bug in line splitting caused by the following actions when `LineBreaker::split_line_at_last_known_good_position` is called:

1. Push some number of previous fragments onto the front of the work list.
2. Push the current fragment back onto the front work list.

This resulted in the work list being out of order.  The correct order is action 2 followed by action 1.  Fixes #9830. r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 059edc3287909ce705ba90804c778ee50f1e157e
2016-03-11 22:50:43 +05:01
Patrick Walton 73f8220db0 servo: Merge #9843 - Optimize flat display lists (from pcwalton:optimize-flat-display-lists); r=mrobinson
Flat display lists were a 2x regression on the spheres demo. This patch series fixes that.

See the individual commits for more details.

r? @mrobinson

Source-Repo: https://github.com/servo/servo
Source-Revision: 55fc48e4c46917a0f036d0054fac296bb5719434
2016-03-04 02:20:04 +05:01