Commit graph

1625 commits

Author SHA1 Message Date
bors-servo
5bfebd4a99 Auto merge of #11294 - kilobtye:fix-resize, r=mbrubeck
Compute overflow when viewport size changed

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

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

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11294)
<!-- Reviewable:end -->
2016-05-20 11:18:25 -07:00
kilobtye
166e35a4c7 Compute overflow when viewport size changed 2016-05-20 18:55:36 +08:00
Ms2ger
9ee8c33a8d Remove pointless phantom arguments to ScriptThreadFactory and LayoutThreadFactory. 2016-05-20 10:20:58 +02:00
Ms2ger
cc2b2b50a7 Remove ConstellationChan.
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.
2016-05-19 17:13:44 +02:00
Bobby Holley
b521c293dc Add string_cache override for geckolib based on gecko atoms.
The work in these patches is based on Ms2ger's gecko-atom crate.
2016-05-18 11:33:38 -07:00
Anthony Ramine
b9cda99ca5 Update internal crates to bitflags 0.7 2016-05-17 23:34:04 +02:00
Anthony Ramine
d580226a9c Reorder dependencies in many Cargo.toml files 2016-05-17 23:34:02 +02:00
Per Lundberg
2f7ed1d73e Removed unused imports
This fixes #11185.
2016-05-15 22:24:26 +03:00
Ulf Nilsson
c8db7da36a Fix inline size adjustment when stripping trailing whitespace from fragments
The whitespace range was not properly shifted which caused us to adjust the fragment's inline size by the advance of a different set of characters.
This was causing justified text lines to be too long or too short.
2016-05-11 23:52:33 +02:00
bors-servo
98863746ae Auto merge of #11125 - pcwalton:reddit-block-formatting-context-fix, r=mbrubeck
layout: Take margins in the inline direction into account when guessing the inline-size of block formatting contexts.

Fixes the layout on reddit.com.

Partially addresses #10571.

r? @mbrubeck

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11125)
<!-- Reviewable:end -->
2016-05-11 00:41:00 -07:00
bors-servo
20f0be20d7 Auto merge of #10987 - shinglyu:flex-reverse, r=shinglyu
Bug #10181 - Implement *-reverse flex-directions

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10987)
<!-- Reviewable:end -->
2016-05-10 19:51:04 -07:00
Shing Lyu
89586ed3d8 Bug #10181 - Implement *-reverse flex-directions 2016-05-11 10:30:02 +08:00
Patrick Walton
b6bed345f5 layout: Take margins in the inline direction into account when
guessing the inline-size of block formatting contexts.

Fixes the layout on reddit.com.

Partially addresses #10571.
2016-05-10 17:11:28 -07:00
Ulf Nilsson
0f983cd11f Make text-align: justify incremental layout safe 2016-05-10 15:46:22 +02:00
Ms2ger
a5be5a82c1 Move some code from ServoThreadSafeLayoutNode::text_content into script. 2016-05-09 14:26:30 +02:00
Kosov Eugene
8b6a609764 move trait ConvertPipelineIdToWebRender to a better place 2016-05-09 01:20:24 +03:00
bors-servo
df8008cfe6 Auto merge of #11032 - mbrubeck:no-whitespace, r=pcwalton
Filter out whitespace glyphs from display list

Fixes #10244. r? @glennw

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11032)
<!-- Reviewable:end -->
2016-05-07 11:05:14 -07:00
bors-servo
f80641e7a1 Auto merge of #11039 - mbrubeck:strip-trailing, r=pcwalton
Remove redundant code in whitespace stripping

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11039)
<!-- Reviewable:end -->
2016-05-06 21:53:27 -07:00
Matt Brubeck
887f0e6454 Remove redundant code in whitespace stripping
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.
2016-05-05 16:46:31 -07:00
Matt Brubeck
dff1de46b2 Don't let restyle damage infect siblings
Currently `compute_layout_damage` does the following for each child of the
node it's processing.

1. Update the child with damage from the parent.
2. Update the parent with damage from the child.

When these steps are repeated for the next child, the parent's damage may
include flags that came from its previous sibling(s).  This means that damage
ends up propagating to later siblings, and not just between parents and
children as indended.

This patch propagates the same damage to all children, not including any
damage from their siblings.
2016-05-05 16:06:27 -07:00
Matt Brubeck
0f221521ab Filter out whitespace glyphs from display list
Fixes #10244.
2016-05-05 09:30:28 -07:00
bors-servo
8bc4785bed Auto merge of #10999 - heycam:move-width-height, r=SimonSapin
Move width and height from Box to Position.

This helps with style struct alignment between Servo and Gecko.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10999)
<!-- Reviewable:end -->
2016-05-04 19:52:25 -07:00
Patrick Walton
2bef5606bd layout: Minor whitespace cleanup. 2016-05-04 13:20:24 -07:00
Patrick Walton
d2511e33c6 layout: When printing out debug info for the float list, include
information about each float.
2016-05-04 13:20:23 -07:00
Patrick Walton
4ae6a68e35 layout: Fix non-vertical-align-correct wording in a comment. 2016-05-04 13:20:23 -07:00
Patrick Walton
0198a9dda8 layout: Include float information in flows' debug output. 2016-05-04 13:20:22 -07:00
Patrick Walton
9e1935c2ed layout: Make the hypothetical box for display: inline-block with
`position: absolute` inline per CSS 2.1 § 10.3.7.
2016-05-04 13:20:22 -07:00
Patrick Walton
b7c9674044 layout: Consider vertical alignment of fragments during line breaking.
This makes the line breaker determine the final block positions of each
line rather than doing it in a separate pass afterward. Not only does
this simplify the code, it makes `vertical-align` and float placement
interact properly.
2016-05-04 13:20:21 -07:00
Patrick Walton
04f05349b1 layout: Check flow descendants of inline block fragments to find their
baselines when aligning inline fragments per CSS 2.1 § 10.8.1.
2016-05-04 13:20:21 -07:00
Patrick Walton
8823f87276 layout: Don't pretend inline fragment sizes are zero when placing them
between floats.
2016-05-04 13:19:52 -07:00
Patrick Walton
94306cd183 layout: Speculate that the inline sizes of floats with percentage
inline sizes are nonzero.

This is a bit of a hack.
2016-05-04 13:19:51 -07:00
Cameron McCormack
550d780e17 Move width and height from Box to Position.
This helps with style struct alignment between Servo and Gecko.
2016-05-04 11:06:42 +10:00
Emilio Cobos Álvarez
aacf67afcd
layout: use debug! instead of warn! for the expected ThreadSafeLayoutElement methods 2016-05-04 00:34:05 +02:00
Emilio Cobos Álvarez
a87bf7c776
style: Minor documentation tweaks about lazy pseudo-elements 2016-05-04 00:34:00 +02:00
Emilio Cobos Álvarez
028f9b6cd2
style: layout: Allow a lazy pseudo-element implementation in Servo. 2016-05-04 00:33:58 +02:00
Emilio Cobos Álvarez
9caaa6004e
style: Support lazy pseudo-elements
These can't be supported in Servo as of right now, because I'm not
totally sure the accesses that should be done in layout would be
thread-safe.

It can be revisited later though.
2016-05-03 19:01:54 +02:00
Ben Striegel
08987c6f5a Fix unused mut warning 2016-05-02 21:02:20 -04:00
bors-servo
8db0367301 Auto merge of #10944 - mbrubeck:bitflags-0.6, r=frewsxcv
Upgrade a bunch of dependencies

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10944)
<!-- Reviewable:end -->
2016-04-30 15:21:22 -07:00
Matt Brubeck
1e23d90631 Upgrade to bitflags 0.6.0 and selectors 0.5.6
Types generated by `bitflags!` are now private by default.  This PR marks them
`pub` where necessary.
2016-04-30 10:14:03 -07:00
bors-servo
b5a23a16be Auto merge of #10941 - samlh:patch-2, r=mbrubeck
Remove dead code left over from #10085

cc @pcwalton

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10941)
<!-- Reviewable:end -->
2016-04-30 09:44:25 -07:00
bors-servo
0f1a921ba6 Auto merge of #10928 - servo:warnings, r=mbrubeck
Fix some warnings

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10928)
<!-- Reviewable:end -->
2016-04-30 05:16:46 -07:00
Samuel Harrington
4691dc0c6e Remove dead code from block.rs 2016-04-29 20:13:42 -07:00
Samuel Harrington
b2cd35da47 Delete dead code from flow.rs 2016-04-29 20:12:22 -07:00
Emilio Cobos Álvarez
9c44062836
layout: be clearer about resolved_style 2016-04-29 22:54:52 +02:00
Emilio Cobos Álvarez
5577a083ec
layout: Simplify ThreadSafeLayout::text_content 2016-04-29 22:54:50 +02:00
Emilio Cobos Álvarez
2e05190e68
layout: Add test for size of ServoThreadSafeLayoutNode 2016-04-29 22:54:50 +02:00
Emilio Cobos Álvarez
cf5c090576
layout: Don't force to overwrite display for pseudo-elements. 2016-04-29 22:54:49 +02:00
Emilio Cobos Álvarez
2a499d5a0b
layout: Stop storing PrecomputedStyleData in LayoutNode
Use the SharedStyleContext instead.
2016-04-29 22:54:48 +02:00
Emilio Cobos Álvarez
979c3a54b9
layout: Tidy a bit style pseudo-elements stuff 2016-04-29 22:54:47 +02:00
Emilio Cobos Álvarez
5a43c7e3cd
style: Allow inheritance when computing anonymous box styles
This is used a lot by Gecko, not still for servo though.
2016-04-29 22:54:46 +02:00