Commit graph

1740 commits

Author SHA1 Message Date
Ms2ger
f0ca775c80 Remove the ConvertPipelineIdToWebRender trait. 2016-05-28 14:10:32 +02:00
Josh Matthews
3cb8af20c2 Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
Cullen Rhodes
40acd24e8f Report use statements that use {} with only one entry 2016-05-27 10:18:44 +01:00
bors-servo
86e583fbed Auto merge of #11408 - Ms2ger:layoutthread-url, r=Manishearth
Take LayoutThread::url out of its RefCell.

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.

<!-- 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/11408)
<!-- Reviewable:end -->
2016-05-26 22:37:23 -05:00
Matt Brubeck
5c09e26e55 Stop generating flows under display: none.
Because this is a bottom-up traversal it can generates flows and throw them away. To prevent that, this cascades an internal `-servo-under-display-none` property and then checks that during flow construction.  Fixes #1536.
2016-05-25 11:54:21 -07:00
bors-servo
116faa7617 Auto merge of #11376 - creativcoder:update-string-cache, r=nox
Bump string-cache to 0.2.18

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

<!-- 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/11376)
<!-- Reviewable:end -->
2016-05-25 10:13:29 -05:00
Pu Xingyu
a7733b38d4 Add remaining longhand flexbox style properties
Add the remaining longhand CSS properties of flexbox for servo,
including `flex-wrap`, `flex-grow`, `flex-shrink`, `justify-content`,
`align-items`, `align-self` and `align-content`.

tests for the remaining longhand properties are also enabled. Test for
default value of `align-self` is modified because the new default value
for this property is "auto" is current flexbox CR.
2016-05-25 21:40:34 +08:00
bors-servo
586c0702a0 Auto merge of #11373 - servo:threadfactory, r=larsbergstrom
Use associated types to improve LayoutThreadFactory and ScriptThreadFactory.

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.

<!-- 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/11373)
<!-- Reviewable:end -->
2016-05-25 04:25:50 -05:00
Rahul Sharma
6a0dde6485 Bump string-cache to 0.2.18 2016-05-25 14:35:36 +05:30
Ms2ger
2d9248dc36 Take LayoutThread::url out of its RefCell. 2016-05-25 09:25:17 +02:00
bors-servo
aa9f50a1d4 Auto merge of #11303 - mbrubeck:last-resort, r=pcwalton
Always include the last-resort font

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

<!-- 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/11303)
<!-- Reviewable:end -->
2016-05-24 10:39:44 -07:00
Ms2ger
49d244d39c Use associated types to improve LayoutThreadFactory and ScriptThreadFactory. 2016-05-24 17:50:06 +02:00
Matt Brubeck
e588943b4f Always include the last-resort font
This is used as a fallback for any characters that don't have glyphs in the
specified font.
2016-05-24 08:30:44 -07:00
Connor Brewster
5e734112a0 Fixed colspan not including cell spacing 2016-05-23 23:09:24 -06:00
Keith Yeung
b2ae32917b Update string_cache to 0.2.17 2016-05-23 09:19:14 -04:00
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