Commit graph

385 commits

Author SHA1 Message Date
Ms2ger
b6483c96be Move layout to libc from crates.io. 2015-02-19 21:38:25 +01:00
Ms2ger
aaed4a54c7 Use rustc-serialize rather than the built-in deprecated serialize. 2015-02-17 13:24:15 +01:00
bors-servo
a452652317 auto merge of #4938 : nnethercote/servo/dont-clone-bloom-filter, r=Ms2ger
When a cached bloom filter is found during traversal, there are two
cases, both of which currently do unnecessary allocations. This patch
avoids these allocations. In the process, it renders correct two
previously-incorrect comments, and moves one of those comments into a
better spot.

While scrolling moderately fast all the way through the "Guardians of
the Galaxy" Wikipedia page, this patch (a) avoids 1.2 million calls to
`clone()` and (b) replaces 111,000 `BloomFilter::new()` calls with
`clear()` calls.
2015-02-16 15:54:48 -07:00
Nicholas Nethercote
65cc902564 Update a comment about STYLE_BLOOM. 2015-02-16 14:02:07 -08:00
bors-servo
6d2e840bf4 auto merge of #4934 : glennw/servo/fix-1248, r=pcwalton 2015-02-16 14:06:52 -07:00
Nicholas Nethercote
edf00a50fc Avoid bloom filter churn.
When a cached bloom filter is found during traversal, there are two
cases, both of which currently do unnecessary allocations. This patch
avoids these allocations. In the process, it renders correct two
previously-incorrect comments, and moves one of those comments into a
better spot.

While scrolling moderately fast all the way through the "Guardians of
the Galaxy" Wikipedia page, this patch (a) avoids 1.2 million calls to
`clone()` and (b) replaces 111,000 `BloomFilter::new()` calls with
`clear()` calls.
2015-02-15 21:23:35 -08:00
Glenn Watson
984012c9e3 Support root element having percentage heights in layout. This allows using standard CSS techniques to place a footer at the bottom of the page. 2015-02-16 14:46:19 +10:00
Glenn Watson
7aacf90161 Fixes background-color calculation for iframes. Fixes #1248 2015-02-16 08:16:18 +10:00
Adenilson Cavalcanti
ffa62c9688 Companion single Color patch.
This will also update the rust-azure dependency
to point to the hash where we have a single Color type.

Just executed ref-tests and no regressions found.
2015-02-13 14:49:28 -08:00
bors-servo
26aee53c82 auto merge of #4904 : mbrubeck/servo/dlist, r=pcwalton
r? @pcwalton
2015-02-12 16:39:53 -07:00
Matt Brubeck
04fb3a5267 Make dlist::split use new DList::split_off. 2015-02-12 15:39:08 -08:00
Ms2ger
1059115865 Use boxed::into_raw in create_or_get_local_context. 2015-02-12 22:58:08 +01:00
Ms2ger
2b0eb98c1d Fix some warnings in layout. 2015-02-12 18:58:38 +01:00
Simon Sapin
d5dd1d658e Upgrade to rustc ba2f13ef0 2015-02-04 2015-02-11 14:48:34 -08:00
Ms2ger
a09a912178 Import net as net rather than servo_net. 2015-02-10 12:55:24 +01:00
Ms2ger
b2fcc2397e Import msg as msg rather than servo_msg. 2015-02-10 11:40:36 +01:00
Josh Matthews
446f0f447e Allow unused variables, imports, and mutable. 2015-02-09 17:41:57 -05:00
Ms2ger
18b49fd68e Reduce duplicated code in from_thread_safe_layout_node. 2015-02-08 20:14:46 +01:00
Ms2ger
19e5c2c88c Remove a transmute from to_untrusted_node_address. 2015-02-08 20:03:44 +01:00
Ms2ger
7c6b03abfe Opt-in rather than opt-out to unsafe blocks in layout. 2015-02-08 20:03:27 +01:00
Ms2ger
a819b0b1b6 Fix the documentation comment syntax in flow_ref.rs. 2015-02-08 19:56:04 +01:00
Ms2ger
c3acbd90d8 Remove transmutes from put_task_local_bloom_filter. 2015-02-08 19:07:19 +01:00
bors-servo
e14c569ed0 auto merge of #4832 : Adenilson/servo/transparentBlack01, r=jdm
This patch set will implement a new helper function for transparent black, while changing the behavior of helper black() function returning opaque black by default.

It will also use the new Color equality operator to streamline the code in some points.
2015-02-04 04:21:49 -07:00
Adenilson Cavalcanti
3088b8fc30 Using the new equality operator in LayoutTask. 2015-02-03 18:14:42 -08:00
Adenilson Cavalcanti
ffa23088ff Using the new transparent_black() in the proper places. 2015-02-03 18:08:30 -08:00
bors-servo
1e72608f5c auto merge of #4823 : Ms2ger/servo/warnings, r=jdm 2015-02-03 17:57:51 -07:00
Martin Robinson
8855a25780 Revert "Using Color equality operators to streamline code" 2015-02-03 15:07:30 -08:00
Martin Robinson
728f723753 Merge pull request #4825 from Adenilson/usingColorOperators01
Using Color equality operators to streamline code
2015-02-03 11:12:44 -08:00
Adenilson Cavalcanti
cc404aba1a Using Color equality operators to streamline code in
PaintContext and LayoutTask.
2015-02-03 11:03:09 -08:00
Ms2ger
e2408355a7 Fix build warnings. 2015-02-03 18:22:27 +01:00
Alexandru Cojocaru
685fee02a0 add unwrap to send/recv calls 2015-02-03 16:05:13 +01:00
Matthew Rasmus
846fc6453a Shrink-to-fit inline-blocks with width set to auto 2015-02-02 15:52:12 -08:00
Matthew Rasmus
5b340599f2 Fix 'inline-block' sizing issues
Fixes #3624
2015-02-02 15:52:11 -08:00
Adenilson Cavalcanti
417ffca937 Implements 2 helper functions for Color type (white() and black())
and uses it in layout_task.rs.
2015-02-02 10:52:17 -08:00
Tetsuharu OHZEKI
2cca095481 Add LayoutJS<T: Reflectable>.get_jsobject(). 2015-02-01 01:54:38 +09:00
Tetsuharu OHZEKI
9f57fa17d0 Add LayoutJS<Node>::from_trusted_node_address() 2015-02-01 01:54:38 +09:00
Tetsuharu OHZEKI
8889041c19 Use BarCast::to_layout_js() instead of LayoutJS.to_script(). 2015-02-01 01:54:37 +09:00
Tetsuharu OHZEKI
6b1e2bd11c Use LayoutJS<T> in layout crate. 2015-02-01 01:54:37 +09:00
Josh Matthews
9e01d91947 Lock crates.io dependencies to specific versions. 2015-01-31 01:27:26 +01:00
bors-servo
172aed535b auto merge of #4757 : servo/servo/newnewnewcss, r=mbrubeck
(Still off by default. Enable with `RUST_LOG=style`.)

r? @mbrubeck
2015-01-30 15:27:53 -07:00
Patrick Walton
7934bf294d layout: Fix warnings. 2015-01-30 11:35:50 -08:00
Simon Sapin
d13d36f57f End the libstyle 'pub use' madness. 2015-01-30 15:08:29 +01:00
Patrick Walton
5fdaba05a6 layout: Implement text-align: justify and text-justify per
CSS-TEXT-3 § 7.3.

`text-justify: distribute` is not supported.

The behavior of `text-justify: none` does not seem to match what Firefox
and Chrome do, but it seems to match the spec.

Closes #213.
2015-01-29 17:00:41 -08:00
Glenn Watson
1f37c6eabe Add layout support and tests for inline iframes. Fixes #1697. 2015-01-29 16:36:20 +10:00
Patrick Walton
d891c677aa layout: Implement floated list items.
This patch also makes Servo not crash when
`generated_containing_block_rect()` is called on a list item (as, for
example, GitHub does), and for good measure I added the fix to other
flows as well.
2015-01-28 19:58:24 -08:00
bors-servo
c8e68fa45c auto merge of #4592 : pcwalton/servo/text-overflow, r=mbrubeck
Only the one-value syntax is supported for now.

r? @mbrubeck
2015-01-28 17:24:50 -07:00
Patrick Walton
0f8e436745 layout: Implement text-overflow: ellipsis per CSS-UI-3 § 6.2.
Only the one-value syntax is supported for now.
2015-01-28 16:23:31 -08:00
Ms2ger
2026cbada2 Fix various build warnings. 2015-01-28 20:42:39 +01:00
bors-servo
6dc2b895b8 auto merge of #4656 : PeterReid/servo/issue4125, r=mbrubeck
Fixes #4125

Conforming to section 5.5 (Rounded Corners/Overlapping Curves) of "CSS Background and Borders Module Level 3", border radii on elements whose border curves would have overlapped are uniformly scaled down to the point that they no longer do.

http://dev.w3.org/csswg/css-backgrounds/#corner-overlap
2015-01-28 10:18:52 -07:00
Ms2ger
1b3e368bcd Don't shadow lifetimes in layout. 2015-01-28 14:44:32 +01:00