Patrick Walton
aabda89a90
layout: Fix percentages in relatively positioned elements
2014-04-03 14:51:19 -07:00
Patrick Walton
10aed5bc1f
layout: Rewrite the margin collapse code to work with negative margins.
2014-04-03 14:50:57 -07:00
Patrick Walton
e6665a2f14
layout: Take padding into account for inline boxes
2014-04-03 14:50:56 -07:00
Patrick Walton
cd9d824c21
servo: Implement stacking contexts and allow multiple layers per
...
pipeline. This handles fixed positioning mostly correctly.
2014-04-03 14:50:56 -07:00
Junyoung Cho
008be170d4
Construct table-related flow and calculate fixed layout
2014-03-24 16:14:27 +09:00
Lars Bergstrom
bbac8aa5c3
Rust upgrades
2014-03-18 09:30:35 -05:00
S Pradeep Kumar
070be51910
Implement position: absolute
for replaced elements.
...
Add reftests for replaced and nested absolute flows.
2014-03-04 11:08:46 +09:00
S Pradeep Kumar
c4d177a354
Implement position: absolute
for non-replaced elements.
...
+ Re-implement fixed positioning using the absolute positioning code.
+ Add reftests for absolute positioning and fixed positioning.
+ Refactor assign_widths in BlockFlow to isolate the calculation of
widths and margins.
+ Pass down details of the Containing Block for absolute and fixed flows
during layout. Use it to calculate the static position of absolute flows.
+ Defer calculation of absolute flow dimensions till we build the
display list.
2014-03-03 11:27:49 +09:00
Patrick Walton
014cf702e4
layout: Rewrite the float context.
...
This rewrites the float context to avoid dynamic failures resulting from
`.clone()` misuse. It also renames the float context to the simpler
`Floats`. The new version is modeled on WebKit's `FloatingObjects`.
2014-02-26 20:37:20 -08:00
Patrick Walton
282bd1d031
layout: Construct flows in parallel, without a leaf set
2014-02-24 18:12:44 -08:00
Josh Matthews
625325434b
Implement JSManaged for DOM objects.
2014-02-24 15:16:42 -05:00
Keegan McAllister
b7dea86283
Rename Box.position to border_box
2014-02-19 12:51:19 -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
Keegan McAllister
78d2118f47
Eliminate the extra indirection of DList<~Flow>
2014-02-05 14:42:32 -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 kim
a90c2e3a26
implement position:relative
2014-02-05 09:39:44 +09:00
Isabelle Carter
0892fada74
Multiple display list support
2014-01-30 17:11:17 -06:00
Deokjin Kim
765e1f2a36
Fix white-space property(pre)
...
If html has empty line, it is not handled currently.
Because pending line is empty in such case, flushing current line doesn't care empty line.
For example, below html has two empty line(line 2 and line 4)
<div>
test1
test2
</div>
To handle empty line, added empty box to pending line.
2014-01-28 09:04:28 +09:00
patrick kim
c2ced790ba
implement inline border
2014-01-27 12:45:23 +09:00
Deokjin Kim
3d941413da
Implement white-space property(pre)
...
In order to support line-break by new-line character,
Fist, calculate new-line character's position.(fn flush_clump_to_list)
Second, split box(which includes new-line character) and do line-break.(fn scan_for_lines)
2014-01-23 13:21:59 +09:00
bors-servo
6662fb0c32
auto merge of #1506 : ksh8281/servo/inline_add, r=pcwalton
...
add inline stuff & color support
it makes same result with firefox in "http://www.w3.org/Style/CSS/Test/CSS1/current/sec543.htm "
makes line-height property can inherit
2014-01-22 17:13:03 -08:00
patrick kim
4133982050
RareFlowFlags -> ~RareFlowFlags
2014-01-23 10:10:38 +09:00
patrick kim
b0380ae96a
fix text-decoration property in layout
2014-01-23 09:51:08 +09:00
patrick kim
5ce3bae160
add assign_height in box_
2014-01-22 14:29:54 +09:00
patrick kim
8912df8a5b
some refactor & fix image size compute
2014-01-20 18:46:26 +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 kim
117f55069c
fix try_to_append_line for ImageBox
2014-01-07 14:57:07 +09: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
199ca33b72
script: Make trees less generic
2013-12-17 13:46:14 -08:00
Patrick Walton
b39861bf34
layout: Stop going to the DOM for vertical align font sizing.
2013-12-16 15:02:15 -08:00
Patrick Walton
5b685bc1bd
layout: Stop going to the DOM for text alignment.
...
Verified against the existing text alignment reftests.
2013-12-16 15:02:15 -08:00
Patrick Walton
971f77d2c6
layout: Stop going to the DOM for iframe sizes
2013-12-13 15:10:04 -08:00
Daniel Hedlund
555e04475e
InlineFlow should always inherit text-width from base style
...
Fixes #222 .
2013-12-13 08:18:44 -08:00
bors-servo
c168e04fe1
auto merge of #1399 : pcwalton/servo/store-image-dimensions, r=kmcallister
...
the DOM for them.
r? @kmcallister
2013-12-12 18:22:18 -08:00
Patrick Walton
a2e91d242b
layout: Perform text decoration propagation per CSS 2.1 § 16.3.1 without
...
going to the DOM.
2013-12-12 17:54:51 -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
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
2624b937aa
layout: Refactor InlineFlow::assign_height
to pull out horizontal
...
position calculation into a separate function.
2013-12-09 19:25:04 -08:00
Patrick Walton
7148a28611
layout: Refactor try_append_to_line
to eliminate duplicate code.
2013-12-09 18:54:17 -08:00
patrick kim
964b5e9d9a
remove SendableTextRun & remove @mut Font From TextRun&Shaper(Font),Font.shaper,
...
fontfamily,fontgroup,render_context.font_ctx
2013-12-07 09:52:06 +09:00
Keegan McAllister
94b70e25e1
Remove unnecessary @mut from LineboxScanner
2013-12-06 11:26:47 -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
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
Tetsuharu OHZEKI
bce462a1d5
Integrate 'BoxModel' into 'RenderBoxBase'. ( #1257 )
2013-11-18 22:43:34 +09:00
Patrick Walton
b67ec304de
layout: Add debug strings for float flows and boxes
2013-11-13 11:19:18 +09:00