Commit graph

2521 commits

Author SHA1 Message Date
Permutator
defa7d99a6
Actually, node_position probably won't be needed later.
This is why you shouldn't make assumptions about what you'll need later!
2017-01-13 09:13:23 -08:00
Permutator
4825169fb0
Split 123-character line 2017-01-13 09:13:23 -08:00
Permutator
699fc4b216
Use InlineFragmentNodeFlags in ParentOffsetBorderBoxIterator 2017-01-13 09:13:22 -08:00
Permutator
fa0cb7c8da
Assert self.node_offset_box is None if fragment.node == self.node_address 2017-01-13 09:13:22 -08:00
Permutator
6a76525107
Replaced trivial pattern matching with is_none() and is_some() 2017-01-13 09:13:22 -08:00
Permutator
18793af44d
Don't crash when offset parent querying an element not in the document 2017-01-13 09:13:21 -08:00
Permutator
66235837e7
offsetParent queries now basically work on inline nodes. 2017-01-13 09:13:21 -08:00
Permutator
0a5218dc75
Fixed ParentOffsetBorderBoxIterator's keeping track of parents 2017-01-13 09:13:20 -08:00
Permutator
014ad76b97
Added assertion to process_offset_parent_query 2017-01-13 09:13:05 -08:00
bors-servo
6a04aea4a5 Auto merge of #14989 - notriddle:ellipsis_reflow, r=emilio
Fix the incrmental reflow behavior of text-overflow

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14989)
<!-- Reviewable:end -->
2017-01-12 17:31:19 -08:00
Michael Howell
cef4ebed20 Preserve the un-truncated version of fragments
Fixes #14952
2017-01-12 22:02:53 +00:00
Michael Howell
8a90cda09f Do not replace an ellipsis when reflowing a line
The ellipsis should be replaced, if needed, when the text itself is reflowed.
2017-01-12 21:16:27 +00:00
Florian Merz
b40db5b55d Position insertion point in input field with mouse 2017-01-11 09:04:03 +01:00
bors-servo
f674a9db8b Auto merge of #14938 - servo:gfx-traits, r=nox
Various cleanup around gfx_traits.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14938)
<!-- Reviewable:end -->
2017-01-10 07:02:23 -08:00
Martin Robinson
29876d2703 Rework the way scroll roots are collected
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.
2017-01-10 13:33:08 +01:00
Ms2ger
5d2a68033a Replace gfx_traits::ScrollPolicy by webrender_traits::ScrollPolicy. 2017-01-10 09:45:53 +01:00
Bobby Holley
3fcfc9c5fc Bug 1325734 - Simplify ElementData and eliminate the concept of consuming styles. r=emilio 2017-01-09 11:51:37 -08:00
Bobby Holley
92b9d70c3a Bug 1325734 - Pass the thread-local context into should_traverse_children. r=emilio 2017-01-09 11:51:37 -08:00
Bobby Holley
3060865577 Bug 1325734 - Parameterize the style traversal on TElement instead of TNode. r=emilio
This works around the issue described in https://github.com/rust-lang/rust/issues/38917
2017-01-09 11:51:36 -08:00
Bobby Holley
962a4a79bb Bug 1325734 - Remove Servo Layout's dependency on the initial-ness of the style. r=emilio 2017-01-09 11:51:36 -08:00
bors-servo
93ac10d9b1 Auto merge of #14917 - fkautz:pr_out_renaming_default_features_to_default_features_as_per_cargo_s_manifest_format, r=emilio
Renaming default_features to default-features as per Cargo's Manifest Format

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14917)
<!-- Reviewable:end -->
2017-01-09 07:35:28 -08:00
Martin Robinson
f3577e41c1 Move some methods from display_list_builder.rs
These methods are not only used during display list construction, so
they are a better fit for the flow structs themselves. This does
not introduce any behavior change, but should make it easier to fix
2017-01-09 12:33:23 +01:00
Frederick F. Kautz IV
5f3339d22a Renaming default_features to default-features as per Cargo's Manifest Format 2017-01-08 19:24:19 -08:00
bors-servo
b6c137b36f Auto merge of #14896 - g1smo:tidy-assignments, r=jdm
Tidy assignments

<!-- Please describe your changes on the following line: -->
I've added a new tidy rule (no = in the beginning of line) + tests for it. Also cleaned up a few rust source files to accord with the new rule.

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

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

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14896)
<!-- Reviewable:end -->
2017-01-07 09:40:46 -08:00
Jure Podgoršek
bb91ca616c Tidy up rust code with regard to new rule (no = in beginning of line) 2017-01-06 20:57:16 +01:00
Simon Sapin
67aea3bba4 Upgrade to rustc 1.16.0-nightly (6f1ae663e 2017-01-06) 2017-01-06 17:43:31 +01:00
Boris Zbarsky
61f6025dc3 Bug 1298588 part 9, servo piece. Pass through useful default styles to cascade(). r=bholley 2017-01-04 23:13:46 -05:00
Boris Zbarsky
09c74190b9 Bug 1298588 part 8. Pass a SharedStyleContext, not a Stylist, to Legalizer methods. r=bholley 2017-01-04 23:13:45 -05:00
Bobby Holley
b9d99390ad Switch to crates.io for atomic_refcell. 2017-01-03 18:14:27 -08:00
bors-servo
bd67163438 Auto merge of #14801 - emilio:no-missing-docs, r=mbrubeck,Manishearth,Wafflespeanut
style: Document and force documentation in a big chunk of the style crate.

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.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14801)
<!-- Reviewable:end -->
2016-12-31 03:19:02 -08:00
Emilio Cobos Álvarez
b023791af5
style: Document the animated_properties code. 2016-12-31 12:16:55 +01:00
Emilio Cobos Álvarez
fa26e87030
layout: Remove get_font_arc in favor of clone_font.
Since they do the same.
2016-12-31 04:53:36 +01:00
Matt Brubeck
37d200e628 Fix rowspan handling for rows that span to the end of the rowgroup 2016-12-30 17:27:20 -08:00
Gabriel Poesia
d7a9c3f8e5 TableWrapper: fix content inline size calculation
The preferred size of all columns was always being used before, but this
caused problems when it does not fit along with margins.
2016-12-30 23:17:03 -02:00
Ms2ger
8dce3e5c9a Stop allowing unsafe code around thread_local. 2016-12-30 11:11:25 +01:00
bors-servo
58fec2f05a Auto merge of #14124 - shinglyu:flexbox-trace, r=glennw
Flexbox trace

<!-- Please describe your changes on the following line: -->
This is a follow up for #13740, so r? @jdm

The first patch enables JSON serialization for flexbox flows, the second one fixed format incompatibilities for the layout viewer.

The 3rd and 4th patches are just layout viewer UI enhancements, we could split that to a spearate PR if you prefer.

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

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

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

<!-- Reviewable:start -->

---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14124)
<!-- Reviewable:end -->
2016-12-28 00:33:31 -08:00
Shing Lyu
344ad61f2c Added a toolbar for going to previous and next node 2016-12-28 15:31:48 +08:00
Shing Lyu
4b2d80afcf Activate flexbox layout tracing 2016-12-28 15:31:45 +08:00
Bobby Holley
ab71b29959 style: Add a special, explicit path for lazy style resolution and use it for GetComputedStyle.
MozReview-Commit-ID: KAM9mVoxCHE
2016-12-28 11:52:46 +08:00
bors-servo
a6d206eb66 Auto merge of #14703 - canaltinova:perspective-transform, r=Wafflespeanut
Add gecko glue for perspective/transform properties

<!-- Please describe your changes on the following line: -->
To be able to add glue for these properties,  we needed to change their structs. They are moved from effects to box and added stylo glue.
This PR covers these properties:
- perspective
- perspective-origin
- backface-visibility
- transform-box
- transform-style
- transform-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

<!-- Either: -->
- [X] These changes do not require tests because they are stylo changes

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14703)
<!-- Reviewable:end -->
2016-12-26 21:48:52 -08:00
bors-servo
9d320d5a34 Auto merge of #14518 - mbrubeck:rowspan2, r=notriddle
Fix inline layout of table cells impacted by rowspan

This is part of the fix for #11297. This PR fixes the inline layout of table cells impacted by row-spanning cells from previous rows. A separate PR to follow will fix the table block size calculations to account for rowspan.

This PR doesn't yet include any test changes. If it doesn't cause any existing tests to pass, I will add a new test to it.

r? @pcwalton

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14518)
<!-- Reviewable:end -->
2016-12-26 10:09:09 -08:00
Nazım Can Altınova
2e9d4df223 Move transform related properties from effects to box. 2016-12-26 16:04:57 +03:00
Emilio Cobos Álvarez
cd00d65ffd
layout: Simplify layout debugging scope. 2016-12-25 19:18:32 +01:00
Michael Howell
7c7f76ca75 Fix an outdated comment 2016-12-23 17:23:12 +00:00
Nazım Can Altınova
aeb5d34394 Move perspective and perspective-origin properties from effects to box. 2016-12-23 19:01:32 +03:00
Bobby Holley
940cda1d15 Remove generation, remove filter pop, and add size tests. 2016-12-22 11:09:55 -08:00
Bobby Holley
b6e948dc5d Hoist bloom filter into scoped TLS and simplify code. 2016-12-22 10:42:53 -08:00
Bobby Holley
946e7fb7c3 Stop using UnsafeNode in the StyleSharingCandidateCache. 2016-12-21 11:10:41 -08:00
Bobby Holley
c5f01fe3b8 Introduce and use Scoped TLS.
It turns out that it's problematic to embed ThreadLocalStyleContext within
LayoutContext, because parameterizing the former on TElement (which we do
in the next patch) infects all the traversal stuff with the trait parameters,
which we don't really want.

In general, it probably makes sense to use separate scoped TLS types for
the separate DOM and Flow tree passes, so we can add a different ScopedTLS
type for the Flow pass if we ever need it.

We also reorder the |scope| and |shared| parameters in parallel.rs, because
it aligns more with the order in style/parallel.rs. I did this when I was
adding a TLS parameter to all these functions, which I realized we don't need
for now.
2016-12-21 11:10:39 -08:00
Bobby Holley
5c66815a21 Upgrade to rayon 0.6.
jpeg-decoder still needs updating. Until then we'll just have two copies.
2016-12-21 10:57:37 -08:00