Junyoung Cho
ab589403ed
Fix: whitespace is considered as spaces(U+0020), tabs(U+0009), and line breaks(U+000D U+000A)
2014-02-21 21:20:48 +09:00
Junyoung Cho
327e1e20a9
Prevent ' ' from stripping as whitespace
2014-02-21 17:30:15 +09:00
Youngmin Yoo
13f9a66632
Impl Basic support for object element
2014-02-20 17:31:16 +09:00
Adam Sinnett
ffcd3833de
Change Text, Comment and ProcessingInstructions parent name from element to characterdata
...
All other node's parent type names reflect the actual type of the parent. This change extends that convention to the indicated nodes.
closes #1594
2014-02-15 13:52:33 -08:00
Patrick Walton
1678cc9a88
layout: Implement basic style sharing.
...
No improvement on the rainbow page, but necessary for some other
optimizations we want to do.
2014-02-14 17:37:50 -08:00
Patrick Walton
758f5ba755
style: Separate out style structs into inherited and initial structs.
...
This doesn't make much of a difference in performance, but will be
necessary for style struct sharing.
2014-02-14 17:37:12 -08:00
Bruno de Oliveira Abinader
aa4b5bb948
Implement ProcessingInstruction DOM interface
...
Spec:
http://dom.spec.whatwg.org/#interface-processinginstruction
Closes #1619 .
2014-02-06 14:41:55 -04:00
Patrick Walton
18c025a8ed
layout: Lazily create boxes for whitespace, speculating that they won't
...
be needed.
33% win in flow construction on the rainbow page.
2014-02-06 09:34:14 -08:00
Patrick Walton
d34ebf521d
layout: Refactor flow construction to move around large structs less.
...
5% perf win, and a net loss in lines of code.
2014-02-04 23:09:14 -08:00
Patrick Walton
17eea6bb45
layout: Enforce that flow construction is thread-safe.
...
Closes #1584 .
2014-01-31 17:54:13 -08:00
Patrick Walton
a8e35fbeac
layout: Use the concurrent hash map for the leaf sets.
...
64% improvement in style recalc.
2014-01-30 15:11:35 -08:00
Patrick Walton
b27f4a8969
layout: Introduce a DOM leaf set as a prerequisite for parallel flow
...
construction.
This will be very slow until we have the concurrent hash table, but we
might as well get it in.
2014-01-29 21:05:50 -08:00
Patrick Walton
e579daefc2
layout: Stop adding flows to the leaf set that are obviously never going
...
to be leaves.
60% improvement in flow tree construction time on the rainbow page.
2014-01-29 15:01:26 -08:00
patrick kim
c2ced790ba
implement inline border
2014-01-27 12:45:23 +09:00
Patrick Walton
18a2050a64
layout: Port parallel layout over to a generic "work queue"
...
infrastructure.
The work queue accepts abstract generic "work units", which in this case
are layout operations. The same speedups have been observed.
2014-01-24 20:50:30 -08:00
Patrick Walton
5cc744d25d
layout: Destroy flows properly under display: none
.
...
Fixes a crash on http://en.wikipedia.org/wiki/South_China_Sea
It plants a destructor bomb on flows so that this can't happen again.
2014-01-24 10:37:46 -08:00
patrick kim
815d222e00
change position of setting inline_data for "<span>asdf<div>b</div></span>" case
2014-01-23 09:51:08 +09:00
Patrick Walton
54f0f17f83
layout: Implement parallel reflow for the bubble-widths and
...
assign-heights phases.
This uses the new work-stealing deque. By default, 3/4 of a thread per
logical CPU is used. This can be tuned with the `-y` flag.
I measured a 65% reflow speedup on `perf-rainbow.html` and a 247% reflow
speedup on `http://en.wikipedia.org/wiki/South_China_Sea ` on a 4-core
HyperThreaded Core i7. However, numbers were fairly volatile, especially
for the latter.
2014-01-22 15:59:21 -08:00
Isabelle Carter
084c7fb734
Position fixed displays out of normal flow.
2014-01-16 15:14:55 -06:00
Isabelle Carter
f58fd54875
Flagging of blocks as fixed displays
2014-01-16 15:00:28 -06:00
patrick kim
6364103d29
some refactor & add comment
2014-01-16 09:34:38 +09:00
patrick kim
25a3da6180
initial implement for inline background
2014-01-15 13:39:33 +09:00
Patrick Walton
ff213b6ad7
layout: Rename FlowData
to BaseFlow
to match other types
2014-01-13 14:13:14 -08:00
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