Commit graph

585 commits

Author SHA1 Message Date
bors-servo
2dbc314e2d Auto merge of #8796 - cheba:zero-point, r=SimonSapin
Replaced ZERO_POINT with Point2D::zero()

This is a proposed in servo/servo#8792 clean up.

Fixes #8792.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8796)
<!-- Reviewable:end -->
2015-12-04 11:09:59 +05:30
bors-servo
68922e0ac2 Auto merge of #8797 - cheba:rect-contains, r=Manishearth
Replaced rect_contains_point with Rect.contains()

This is a proposed in servo/servo#8791 clean up.

Fixes #8791.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8797)
<!-- Reviewable:end -->
2015-12-04 04:01:44 +05:30
Alexander Mankuta
ee746e252c Replaced ZERO_POINT with Point2D::zero() 2015-12-03 19:46:45 +02:00
Alexander Mankuta
96a8b442b8 Replaced rect_contains_point with Rect.contains() 2015-12-03 16:15:34 +02:00
Alexander Mankuta
546d2f564f Replaced ZERO_RECT with Rect::zero() 2015-12-03 15:39:30 +02:00
bors-servo
8b95d7b8d8 Auto merge of #8757 - servo:skia, r=mbrubeck
Use skia and deps from crates.io.

This makes the initial download for skia go from a 300 MB git repository to a 5 MB tarball. This should help with issues like #6132 and #7687.

Fix https://github.com/servo/skia/issues/70

This builds, but the at the moment causes a number of tidy errors for duplicated crates.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8757)
<!-- Reviewable:end -->
2015-12-03 12:58:29 +05:30
Simon Sapin
aa1eba4f5a Use skia and deps from crates.io.
Fix https://github.com/servo/skia/issues/70
2015-12-02 19:07:59 +01:00
bors-servo
dbff1ab336 Auto merge of #8692 - GuillaumeGomez:patch-1, r=Wafflespeanut
Ensure crate are alphabetically sorted

cc @nox

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8692)
<!-- Reviewable:end -->
2015-11-28 19:34:11 +05:30
Guillaume Gomez
6e7de62b38 Add check up on extern crate order and sort extern crates alphabetically 2015-11-28 03:11:08 +01:00
Manish Goregaokar
dc0e467945 Upgrade to rustc 1.6.0-nightly (d5fde83ae 2015-11-12)
… and libc 0.2 and many other dependencies
2015-11-27 00:15:29 -05:00
bors-servo
5e7306bf19 Auto merge of #8598 - g-k:split-scriptmsg, r=KiChjang
Split paint task messages from ScriptMsg

Refs: https://github.com/servo/servo/issues/8592

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8598)
<!-- Reviewable:end -->
2015-11-26 03:02:47 +05:30
Greg Guthe
7668fd0503 Split paint task messages from ScriptMsg
Refs: https://github.com/servo/servo/issues/8592
2015-11-25 14:35:52 -05:00
Alan Jeffrey
3dec6edd10 Update string_cache to 0.2.
Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced atom!(foo) by atom!("foo").
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.
2015-11-25 10:13:21 -06:00
Patrick Walton
2843000810 Update ipc-channel to pick up the improved error reporting.
Intended to help diagnose intermittent failures.
2015-11-23 16:38:39 -08:00
Patrick Walton
1c130819ca compositing: Split Servo up into multiple sandboxed processes.
Multiprocess mode is enabled with the `-M` switch, and sandboxing is
enabled with the `-S` switch.
2015-11-19 16:38:04 -05:00
bors-servo
acbe413052 Auto merge of #8530 - KiChjang:split-constellation-msg, r=jdm
Split ConstellationMsg into ScriptMsg and CompositorMsg

Fixes #8356.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8530)
<!-- Reviewable:end -->
2015-11-19 04:39:20 +05:30
Keith Yeung
19294db6e5 Split ConstellationMsg into ScriptMsg and CompositorMsg 2015-11-16 23:10:53 -08:00
Michael Wu
7cbef87b00 Avoid overflow in freetype/font_context.rs 2015-11-16 13:07:56 -05:00
Michael Howell
24c35a2185 Draw layers that are under sub-displaylists.
Fixes #8325
2015-11-14 09:49:30 -07:00
Michael Howell
4fccb9e74f Clean up use of Option in font_cache_task. 2015-11-12 10:27:38 -07:00
bors-servo
9a465c5842 Auto merge of #8355 - Ms2ger:Exit, r=nox
Cleanup exit messages and related code.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8355)
<!-- Reviewable:end -->
2015-11-07 22:34:45 +05:30
bors-servo
8d8ffa8265 Auto merge of #7696 - mskrzypkows:PaintContext_Units, r=mbrubeck
Draft. Change PaintContext rects to TypedRects #7023

I created draft. I'm not sure if we need any units conversion in PaintContext. There is also strange 'clear' method, we use PagePx origin and ScreenPx size is it OK?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7696)
<!-- Reviewable:end -->
2015-11-07 00:22:59 +05:30
Ms2ger
f37b8e9f4d Remove the unused PipelineExitType field from ChromeToPaintMsg::Exit. 2015-11-05 16:32:46 +01:00
Ms2ger
995d022bb9 Remove the unused PipelineExitType from LayoutToPaintMsg::Exit. 2015-11-05 16:00:06 +01:00
Ms2ger
a01fd7732d Remove the unused Option around the IpcSender from LayoutToPaintMsg::Exit. 2015-11-05 15:48:39 +01:00
Ms2ger
eb44bdb33a Remove the unused IpcSender from ChromeToPaintMsg::Exit. 2015-11-05 15:48:17 +01:00
Martin Robinson
e5b2feda3f Remove DisplayListBuildingResult
Always produce a DisplayList when processing nodes for display list
construction. StackingContexts are now added to the positioned content
section of DisplayLists. This makes the code a bit simpler and opens up
the possibility of producing a StackingContext in another section of
the DisplayList. This doesn't change behavior, but is a cleanup
prerequisite for proper inline stacking context support.
2015-11-04 12:52:14 -08:00
Maciej Skrzypkowski
2a7927d074 Change PaintContext rects to TypedRects #7023
Needs update to_nearest_pixel method in app_unit module.
Argument of to_nearest_pixel should be:
ScaleFactor<PagePx, ScreenPx, f32>
2015-11-04 08:39:15 +01:00
Martin Robinson
c1a38e240a Mix stacking contexts into the positioned content list
Sometimes positioned content needs to be layered on top of stacking
contexts. The layer synthesis code can do this, but the current design
prevents it because stacking contexts are stored in a separate struct
member. In order to preserve tree order, mix stacking contexts into the
positioned content list, by adding a new StackingContextClass
DisplayItem. Such items do not have a base DisplayItem.

In some ways this simplifies the code, because we no longer have to
have a separate code path in the StackingContextLayerCreator.

Fixes #7779.
Fixes #7983.
Fixes #8122.
Fixes #8310.
2015-11-03 17:47:39 -08:00
Martin Robinson
a7a58e47a0 Expand DisplayList layer bounds to whole pixels
Before passing these layers to the paint task, expand them to pixel
boundaries. This ensures that subpixel edges of the layer will not be
clipped away and helps prevent rounding issues with layer contents.

Fixes #8166.
2015-10-28 18:11:59 -07:00
Manish Goregaokar
184b2bacf3 Fix serde_macros 2015-10-28 21:53:15 +05:30
Manish Goregaokar
ce5586f74a Update euclid to 0.3 2015-10-28 21:34:23 +05:30
bors-servo
11d23a41b3 Auto merge of #7950 - mrobinson:layerize-iframes, r=pcwalton
Integrate iframes into the display list

Instead of always promoting iframes to StackingContexts, integrate them
into the display list. This prevents stacking bugs when
non-stacking-context elements should be drawn on top of iframes.

To accomplish this, we add another step to ordering layer creation,
where LayeredItems in the DisplayList are added to layers described by
the LayerInfo structures collected at the end of the DisplayList.
Unlayered items that follow these layered items are added to
synthesized layers.

Another result of this change is that iframe layers can be positioned
directly at the location of the iframe fragment, eliminating the need
for the SubpageLayerInfo struct entirely.

Iframes are the first type of content treated this way, but this change
opens up the possibility to properly order canvas and all other layered
content that does not create a stacking context.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7950)
<!-- Reviewable:end -->
2015-10-20 16:01:38 -06:00
Eli Friedman
3a451ff845 Add support for pre-wrap and pre-line values for white-space.
This is mostly straightforward.  I had to modify a couple of places
which were accidentally discarding whitespace.

Fixes #1513.
2015-10-20 10:44:51 -07:00
Martin Robinson
ac5525aeeb Integrate iframes into the display list
Instead of always promoting iframes to StackingContexts, integrate them
into the display list. This prevents stacking bugs when
non-stacking-context elements should be drawn on top of iframes.

To accomplish this, we add another step to ordering layer creation,
where LayeredItems in the DisplayList are added to layers described by
the LayerInfo structures collected at the end of the DisplayList.
Unlayered items that follow these layered items are added to
synthesized layers.

Another result of this change is that iframe layers can be positioned
directly at the location of the iframe fragment, eliminating the need
for the SubpageLayerInfo struct entirely.

Iframes are the first type of content treated this way, but this change
opens up the possibility to properly order canvas and all other layered
content that does not create a stacking context.

Fixes #7566.
Fixes #7796.
2015-10-20 07:29:06 -07:00
Corey Farwell
20beaf5af3 Fix issues found by rust-clippy 2015-10-12 20:21:49 -04:00
bors-servo
0f8493a566 Auto merge of #7918 - nox:partialeq-font, r=mbrubeck
Derive PartialEq on the style Font structure

We check the hash first.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7918)
<!-- Reviewable:end -->
2015-10-10 12:26:07 -06:00
bors-servo
6d52bdf4ff Auto merge of #7891 - mrobinson:display-list-paint-layer, r=pcwalton
Properly size synthesized layers

Layers that are composed of several stacking contexts that need to be
rendered on top of other layered content need synthesized layers.
Previously, these layers were placed into a stacking context that was
the same size as their parent. This patch creates a new type of
PaintLayer which simply holds a display list. The layer is sized to the
bounds of the DisplayList and its children are positioned relative to
the parent stacking context.

This will also be useful in the future, when items outside of
StackingContexts are given their own layer for render order purposes.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7891)
<!-- Reviewable:end -->
2015-10-09 17:00:21 -06:00
Paul Rouget
99cccb2193 Snap to screen pixels instead of px 2015-10-08 06:44:05 +02:00
Anthony Ramine
6d6dbf0129 Derive PartialEq on the style Font structure
We check the hash first.
2015-10-08 00:32:58 +02:00
Martin Robinson
fb80e51bd1 Properly size synthesized layers
Layers that are composed of several stacking contexts that need to be
rendered on top of other layered content need synthesized layers.
Previously, these layers were placed into a stacking context that was
the same size as their parent. This patch creates a new type of
PaintLayer which simply holds a display list. The layer is sized to the
bounds of the DisplayList and its children are positioned relative to
the parent stacking context.

This will also be useful in the future, when items outside of
StackingContexts are given their own layer for render order purposes.
2015-10-07 15:12:36 -07:00
Patrick Walton
e3b988a1fe layout: Add a field in the display list for simple border radii on box
shadows.

Only supported in WebRender (with my upcoming PR) for now.
2015-10-06 14:04:50 -07:00
bors-servo
c0b397db77 Auto merge of #7827 - Ms2ger:jumpy-variant, r=pcwalton
Check for font_variant equality in LayoutFontGroupCacheKey::eq.

This fixes an issue whereby normal text would intermittently be rendered as
small-caps and vice versa.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7827)
<!-- Reviewable:end -->
2015-10-06 10:03:24 -06:00
bors-servo
098bdb5f22 Auto merge of #7807 - glennw:pid, r=jdm
Make it possible for iframes to create their own pipeline ID.

This doesn't change any functionality, but it's the first step towards removing SubpageId.

Adding this change now will allow us to gradually change over code referencing subpage id rather than in one massive PR.

Introduces a namespace for pipeline ID generation - there is a namespace for the constellation thread, and one per script thread.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7807)
<!-- Reviewable:end -->
2015-10-06 01:08:32 -06:00
Glenn Watson
5645dba1fa Make it possible for iframes to create their own pipeline ID.
This doesn't change any functionality, but it's the first step towards removing SubpageId.

Adding this change now will allow us to gradually change over code referencing subpage id rather than in one massive PR.

Introduces a namespace for pipeline ID generation - there is a namespace for the constellation thread, and one per script thread.
2015-10-06 17:06:53 +10:00
Martin Robinson
553f1fc192 Rework how StackingContexts are dynamically added to layers
StackingContexts are added to layers when it is necessary to maintain
their ordering on top of other layered StackingContexts. Instead of
tracking the information about a layer scattered around into different
structs, combine it all into LayerInfo. LayerInfo will be used in the
future to hold layer information for DisplayItems that are layerized
independently of StackingContexts.
2015-10-05 13:35:31 -07:00
Ms2ger
05ed98a49c Check for font_variant equality in LayoutFontGroupCacheKey::eq.
This fixes an issue whereby normal text would intermittently be rendered as
small-caps and vice versa.
2015-10-02 11:02:35 +02:00
Patrick Walton
24fdc8a3c7 Handle zero-sized source surfaces properly, and upgrade ipc-channel to
incorporate the fix for zero-sized shmem on Mac.

Depends on servo/rust-azure#201 and pcwalton/ipc-channel#10.

Closes #7422.
2015-09-30 23:09:36 -07:00
bors-servo
0860be4c28 Auto merge of #7811 - glennw:use-crates-au, r=larsbergstrom
Update servo to use published app units crate



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7811)
<!-- Reviewable:end -->
2015-09-30 22:21:36 -06:00
Glenn Watson
1999ea5e43 Update servo to use published app units crate 2015-10-01 11:45:35 +10:00