Commit graph

20 commits

Author SHA1 Message Date
Jack Moffitt
a7ef1cd35e Upgrade to latest Rust. 2014-01-12 19:45:45 -07:00
Patrick Walton
9e2b63ddd3 layout: Move the LayoutNode wrapper from script into layout. 2013-12-17 18:07:41 -08:00
Patrick Walton
c506e52c7c layout: Add a lifetime to LayoutNode to prevent layout from stuffing
them into evil places.
2013-12-17 18:07:41 -08:00
Patrick Walton
ee9873bdb5 script: Harden layout a bit more by mostly prohibiting it from seeing
`AbstractNode` at all.

It can still see it by calling `with_element` for now, although that
needs to be fixed.
2013-12-17 18:07:12 -08:00
Patrick Walton
be69a503fe script: Eliminate the phantom type in favor of just whitelisting methods
that layout can safely call.

This is simpler. Currently, the set of methods is not safe, but I plan
to lock it down more soon.
2013-12-17 18:07:12 -08:00
Patrick Walton
199ca33b72 script: Make trees less generic 2013-12-17 13:46:14 -08:00
Patrick Walton
971f77d2c6 layout: Stop going to the DOM for iframe sizes 2013-12-13 15:10:04 -08:00
Patrick Walton
dc8504fd12 layout: Store image dimensions inside image boxes instead of going to
the DOM for them.
2013-12-12 17:51:31 -08:00
Patrick Walton
4c8383c38b layout: Reference count ComputedValues structures like Gecko does.
This has no difference in CSS selector matching performance and results
in a 31% speedup in constraint solving on the rainbow page.
2013-12-12 14:44:24 -08:00
Patrick Walton
dcacab8149 layout: Don't delete non-text boxes from the list of input boxes when
flushing text clumps. Fixes this page:

    http://en.wikipedia.org/wiki/Yellow_River

This is not the most efficient thing to do; a FIXME has been added
noting what is most correct.
2013-12-11 14:35:13 -08:00
patrick kim
0026eb0899 remove @ in LayoutTask.FontContext 2013-12-11 11:42:14 +09:00
Patrick Walton
1ba71432ee layout: Change ~Box to Box.
63% improvement in box building on the rainbow page.
2013-12-10 18:00:38 -08:00
Ryan Choi
d26bf36833 removing @ from flowtree. (but cloning boxes when creating a display list) 2013-12-10 13:44:20 +09:00
Patrick Walton
30bbaa49b7 Revert "auto merge of #1356 : ksh8281/servo/remove_@_in_LayoutTask.FontContext, r=pcwalton"
This reverts commit e8ffac13d7, reversing
changes made to db923feffe.

Reverting this change because FreeType is *not* thread safe. See the
documentation here:

http://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html

"In multi-threaded applications, make sure that the same FT_Library
object or any of its children doesn't get accessed in parallel."

We will need to use a `MutexArc` instead.
2013-12-09 19:40:08 -08:00
patrick kim
f187035e25 remove @ in LayoutTask.FontContext 2013-12-10 08:59:43 +09:00
Keegan McAllister
dda6d2b53c Convert LayoutContext.image_cache from @mut to MutexArc
LocalImageCache isn't Freeze so we have to use unsafe_access,
which exists for MutexArc and not RWArc.
2013-12-06 11:31:49 -08:00
Patrick Walton
4fda26f76e layout: Change RenderBox to an enum and shorten its name in
preparation for removing its `@`-ness.

Also removes a few text copies that were taking place.

This sure does remove a lot of code!
2013-12-05 17:41:41 -08:00
Bruno de Oliveira Abinader
ac45d70a4a Remove 'FloatFlow'
Removes 'FloatFlow' in favor of FloatBlockFlow, which is cointained
inside BlockFlow in a 'has-a' relationship. This avoids a bunch of
duplicated code.

This patch is for:
https://github.com/mozilla/servo/issues/1281
2013-12-03 14:36:31 -04:00
Bruno de Oliveira Abinader
bf277e634b s/FlowContext/Flow
This patch is for:
https://github.com/mozilla/servo/issues/1282
2013-12-02 16:14:06 -04:00
Patrick Walton
155befe10d Rewrite flow construction to be incrementalizable and parallelizable.
This replaces flow construction with a strict bottom-up tree traversal,
allowing for parallelism. Each step of the traversal creates a flow or
a `ConstructionItem`, similar to how Gecko works. {ib} splits are
handled by not creating `InlineFlow`s until the containing block is
reached.

This should be able to be incrementalized by storing the `Flow` from
layout to layout, and performing fixups during flow construction
and/or wiping containing blocks in a previous pass.
2013-11-18 11:24:11 -08:00