Commit graph

293 commits

Author SHA1 Message Date
Ms2ger
a65c80231a Stop using u/i suffixes in layout. 2015-04-02 15:14:09 +02:00
Patrick Walton
4011291bf2 layout: Stop rebuilding all inline-block flows unconditionally, and
bubble intrinsic inline sizes as necessary when doing incremental
reflow.
2015-04-01 10:52:15 -07:00
Ms2ger
da1e3a3f11 Use usize for debug ids. 2015-03-28 22:37:41 +01:00
Manish Goregaokar
3479d3fa7f Replace unsafe_blocks by unsafe_code. 2015-03-21 10:27:32 +01:00
Ms2ger
5f15eb5fbf Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev. 2015-03-18 13:18:31 -04:00
Glenn Watson
7ca3c8d6e3 Restore part of PR #5125 that was accidentally removed in PR #5160. 2015-03-16 15:02:26 +10:00
Patrick Walton
f9cdd05d58 layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1
§ 12.3-12.5.

Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.
2015-03-09 17:13:45 -07:00
Dan Fox
559ff68b31 Get rid of servo_util 2015-03-05 17:42:05 +00:00
Dan Fox
19686acdec Merge in servo/master 2015-03-05 17:34:18 +00:00
Glenn Watson
86baef2cc0 Remove compositor layers when iframes are removed from doc or display:none. 2015-03-04 07:51:46 +10:00
Dan Fox
3441b2c329 layout/layout_data.rs -> layout/data.rs 2015-03-03 19:59:38 +00:00
Dan Fox
3f9032c1a1 Re-alphabetise imports 2015-03-03 18:16:50 +00:00
Dan Fox
dd0df4e9c5 Rename util.rs -> layout_data.rs 2015-03-03 18:12:06 +00:00
Dan Fox
b424de2092 Extract OpaqueNodeMethods to own file 2015-03-03 17:49:10 +00:00
bors-servo
65454e51c8 auto merge of #5086 : glennw/servo/reap-more-stuff, r=jdm
Also introduce a clear() function to layout data which will be used to clear items such as compositor layouts.

Clear the layout data when a node becomes display:none.
2015-03-02 16:45:51 -07:00
Glenn Watson
611fd7a846 Reap layout data whenever a node is removed from the tree.
Also introduce a clear() function to layout data which will be used to clear items such as compositor layouts.

Clear the layout data when a node becomes display:none.
2015-03-03 07:12:51 +10:00
Bryan Bell
ec2fa2558c Remove interior borders during flow construction
Instead of looking at the boundaries of the text run, set the border
width to zero and the border style to none on border sides that are not
the outermost for a node container that is display: inline.
2015-02-27 15:52:12 -08:00
Glenn Watson
a2f1f12c96 Fix setting display:none after a layout where the element was visible.
Prior to incremental layout, the code would remove the existing
construction result. However, with incremental layout the construction result
is cloned rather than removed. This change ensures that the previous
construction result is cleared when an element's display type
changes to none.
2015-02-27 07:44:24 +10:00
Simon Sapin
d5dd1d658e Upgrade to rustc ba2f13ef0 2015-02-04 2015-02-11 14:48:34 -08:00
Simon Sapin
d13d36f57f End the libstyle 'pub use' madness. 2015-01-30 15:08:29 +01: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
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
1b3e368bcd Don't shadow lifetimes in layout. 2015-01-28 14:44:32 +01:00
Manish Goregaokar
b68b7e87c8 self import 2015-01-28 13:46:00 +05:30
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
Ms2ger
13c7cf928a Stop calling deref() and deref_mut() explicitly. 2015-01-22 16:04:21 +01:00
Ms2ger
faefb27f3e Use std::sync::atomic::Ordering explicitly. 2015-01-22 14:49:25 +01:00
Ms2ger
01ed338746 Move to to_owned rather than into_string.
into_string has been removed from Rust.
2015-01-20 14:49:07 +01:00
Edit Balint
81f47344d6 CanvasRenderTask connected to Layout
Update rust-azure to f4a02f3f621b0a994a20d42e438371a87c62f898.
2015-01-09 18:53:10 +01:00
Ms2ger
16c7060bc8 Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19. 2015-01-08 09:58:46 -05:00
Patrick Walton
bf540d590a layout: Explicitly thread border box dimensions and relative offsets
through display list building.

The old `flow_origin` concept was ill-defined (sometimes the border box
plus the flow origin, sometimes including horizontal margins and
sometimes not, sometimes including relative position and sometimes not),
leading to brittleness and test failures. This commit reworks the logic
to always pass border box origins in during display list building.
2015-01-04 17:43:05 -08:00
Megha Gupta
5031096853 Fix inheritance enums for htmlmediaelement and htmltablecellelement 2015-01-02 23:10:32 +05:30
Megha Gupta
f85b9e37cc Add HTMLElementTypeId enum (fixes #3625) 2015-01-02 23:10:31 +05:30
Manish Goregaokar
c7dfb1d24b layout: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
Patrick Walton
a3f6f4e75b layout: Implement caption-side per CSS 2.1 § 17.4.1.
`caption-side` is used by 4% of pages by number of loads.
2014-12-17 22:06:14 -08:00
Patrick Walton
5675274c44 layout: Implement empty-cells per CSS 2.1 § 17.6.1.1. 2014-12-17 21:25:12 -08:00
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
Patrick Walton
3029fbab92 layout: Implement basic lists and the CSS1 list properties.
The exact rendering is ill-spec'd. Some things are ugly (especially the
width and height of list style images) but they are infrequently used
and I believe this implementation matches the spec. Numeric lists are
not supported yet, since they will require a separate layout pass.

The implementation is a subclass of `BlockFlow`, on advice from Robert
O'Callahan.
2014-12-15 16:25:06 -08:00
Matthew Rasmus
ed37b53a62 Updates WPT to expect newly passing tests
Addresses reviews

More review addressing
2014-12-05 12:31:31 -08:00
Matthew Rasmus
29241699fd Implements multi line text input for TextArea 2014-12-05 12:21:31 -08:00
Corey Richardson
4d55ab8157 Don't categorize HTMLInputElement as a TableCellFragment
Closes  #4196.
2014-12-03 21:44:18 -08:00
Claes 'Letharion' Gyllensvärd
2737db3ad7 Remove bitfield! macro in favour of bitflags! 2014-11-18 19:26:10 +01:00
Jack Moffitt
d1b433a3b3 Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
Cameron Zwarich
5043a63284 Remove InputFragment
Fixes #3724.
2014-11-03 15:48:20 -08:00
Patrick Walton
08fc7c2795 layout: Make incremental reflow more fine-grained by introducing "reflow
out-of-flow" and "reconstruct flow" damage bits.

This is needed for good performance on the maze solver.
2014-10-31 12:24:40 -07:00
Patrick Walton
587cf98209 layout: Promote absolute positioning, floatedness, and clearance into
flags to avoid virtual calls.

These were showing up really high in the maze solver profile.
2014-10-28 19:38:22 -07:00
bors-servo
c20bb66aef auto merge of #3841 : pcwalton/servo/removing-whitespace-damage, r=cgaebel
Avoids total reflow of the entire document on the maze solver.

I have tested Wikipedia reflow and it still works.

r? @cgaebel
2014-10-28 19:12:39 -06:00
bors-servo
08288fea41 auto merge of #3840 : pcwalton/servo/ib-splits-linked-list, r=glennw
r? @glennw
2014-10-28 18:36:41 -06:00
Patrick Walton
01965c399e layout: Stop adding damage when removing whitespace.
Avoids total reflow of the entire document on the maze solver.
2014-10-28 14:56:39 -07:00