Josh Matthews
7b239bd246
Move border computation into unpruned traversal. Get rid of extraneous explicit initial reflow. Fixes #935 .
2013-09-13 16:40:13 -07:00
bors-servo
df2906fc29
auto merge of #831 : SimonSapin/servo/newnewcss, r=metajack
...
I started this in a [separate repository](https://github.com/SimonSapin/servo-style ), and imported it with [git-subtree](https://github.com/git/git/blob/master/contrib/subtree/git-subtree.txt ) into `servo/src/components/script/style` after some Rust minor upgrades.
I move this into the script crate because it’s gonna both need stuff there (the content tree, for selector matching) and be needed by stuff there (the HTML parser calls the CSS parser). As far as I know, we can not have circular dependencies between crates.
2013-09-04 10:00:52 -07:00
Josh Matthews
79444596d1
Make querying layout for content boxes an infallible operation.
2013-09-04 11:07:11 -04:00
Keegan McAllister
51c639c380
Remove a layer of Option on LayoutData
...
The individual fields are also Options, and LayoutData::new() is a fine default
value.
2013-09-03 16:00:14 -07:00
Keegan McAllister
c22547a4ef
Embed layout data directly in Node
...
This eliminates
layout_data: Option<@mut ()>
and the unsafe casting around it, which was causing crashes on exit.
Fixes #762 .
2013-09-03 13:10:51 -07:00
Simon Sapin
0c726b4581
Upgrade to rustc 0.8-pre (0ac3e02 2013-08-30 05:45:45 -0700)
2013-09-02 17:25:35 +01:00
Jack Moffitt
9f669c2989
Rename to_px to to_nearest_px for clarity.
2013-08-23 17:11:48 -06:00
Eric Atkinson
5e3ff91a2d
Fix nits; warning police
2013-08-20 11:47:50 -07:00
Eric Atkinson
9b08fd8d18
Switch flow tree to owned pointers
2013-08-20 11:29:39 -07:00
Eric Atkinson
eb58e4f5d1
Remove extraneous references to flow tree objects.
2013-08-20 11:29:39 -07:00
Keegan McAllister
307f1074d3
For loops and misc changes
2013-08-15 13:56:29 -07:00
Keegan McAllister
1bdaff0fad
Reorganize tree ref / node traits
...
rustc is no longer happy with
impl<NR:TreeNodeRef<N>,N:TreeNode<NR>> TreeUtils for NR
2013-08-15 13:55:40 -07:00
Keegan McAllister
be061a9aa0
Library changes
2013-08-15 13:55:40 -07:00
Keegan McAllister
ffe60ea027
Trait changes, and eliminate 'copy'
2013-08-15 13:55:40 -07:00
Eric Atkinson
eb1b40db13
Don't use a whole in-order traversal for computing heights.
2013-08-09 00:05:31 -07:00
Keegan McAllister
ea5fb8c4a3
First attempt at incremental layout
...
For now we only prune the bubble_widths traversal, because of inability to
reuse FloatContexts. Other limitations are likewise marked with FIXME
comments.
2013-08-01 15:31:58 -07:00
Keegan McAllister
aae230c73f
Clean up calls to layout_root.dump()
...
We had two calls, one of which was dead code.
2013-08-01 15:31:57 -07:00
Tim Kuehn
e9888b299c
structural changes to support Iframes
2013-07-29 11:03:17 -07:00
Jack Moffitt
94d83f96f1
Fix flow tree debug printing.
...
Nested `debug!()` calls are no-ops, so change it now does a `println`. Also
moved to the `debug!()` calls out of the profiled block.
2013-07-22 10:43:02 -06:00
Eric Atkinson
9c5ab1545c
Fix regression on clicking links
2013-07-17 16:32:02 -07:00
Eric Atkinson
5fc794fbc4
Refactor display lists to use an explicit traversal
2013-07-15 17:46:14 -07:00
Tim Kuehn
a6eaffcd93
forward/back navigation with shift+backspace and backspace
...
script caches last loaded url -- currently no caching policy
naive caching of render layers for near-instant forward/back
handling evicted pipelines is currently broken
2013-07-02 17:26:30 -07:00
Tim Kuehn
d17a1f2ad7
rename engine --> constellation
2013-07-01 11:03:31 -07:00
Tim Kuehn
fba7ec423c
add pipeline.rs, modularized pipelines communicating with constellation
2013-07-01 11:03:31 -07:00
Brian Anderson
56e5ba1b82
Update for language changes
2013-06-26 13:44:26 -07:00
Eric Atkinson
94e7a86b7e
Added floats to the flow tree
2013-06-24 16:07:02 -07:00
Jack Moffitt
a9e1354118
Refactor renderer into single function.
...
This removes the task per tile rendering and instead renders tiles
serially. This also unwraps the rendering into a single function so that it's
much clearer.
2013-06-17 15:10:41 -06:00
Tim Kuehn
577a410f80
refactor compositor interfaces \--> RenderListener + ScriptListener; AttachCompositorMsg added to render_task::Msg
...
updated to reflect comments
2013-06-17 12:37:02 -07:00
Tim Kuehn
b5dac3f426
decouple script from compositor
...
communicate via layout
refactor channel wrappers from *Task --> *Chan
fix merge fallout
2013-06-14 21:46:29 -07:00
Patrick Walton
204c5b663a
Add a spinner for layout
2013-06-12 11:02:56 -07:00
Tim Kuehn
a53a7f689d
Add link following and refactor the profiler.
2013-06-12 11:02:49 -07:00
Jack Moffitt
5425154f96
Merge remote-tracking branch 'origin/master' into pcwalton-master
...
Conflicts:
src/components/main/layout/box_builder.rs
2013-06-10 21:31:11 -06:00
Eric Atkinson
4c6b4fb593
Refactor flow tree construction and actually use display property.
2013-06-07 14:55:12 -07:00
Patrick Walton
c65d51f812
Address review comments
2013-06-06 13:55:14 -07:00
Patrick Walton
ae5b2dfc72
Roll up block layout changes
2013-06-05 21:40:11 -07:00
Patrick Walton
7a435fc6ed
Refactor document damage to distinguish it from layout/style damage.
...
Also, standardize on the name "reflow" instead of "relayout" or "build".
2013-06-04 22:00:33 -07:00
Patrick Walton
40a69fc517
Address review comments
2013-06-04 15:23:18 -07:00
Patrick Walton
8d3b6aefa8
Stop rendering when script queries layout
2013-06-04 11:43:52 -07:00
Patrick Walton
f77eef5988
Basic hit testing functionality
2013-05-30 17:28:08 -07:00
Patrick Walton
2d1a00c3cf
Don't clip layers to the screen area
2013-05-30 14:05:22 -07:00
Patrick Walton
bf82bc54f3
Separate the DOM and layout into separate crates.
2013-05-28 17:13:40 -07:00
Patrick Walton
0ea1a94f8e
Remove the layout debug methods.
...
Premature abstraction; nothing used the traits polymorphically. Furthermore,
they increased coupling between layout and the DOM.
2013-05-28 16:55:07 -07:00
Patrick Walton
0a95672236
Reduce coupling between layout and the DOM by separating out the layout interface.
...
Eventually, the layout interface will be moved along with the DOM into a
separate crate.
2013-05-28 16:41:55 -07:00
Patrick Walton
4f3ca373d4
Introduce a phantom type to prevent script from accessing the layout data directly.
...
Nodes are now parameterized over a "View" type. The particular View type
determines which methods can be called. Layout data accessors and mutators are
only accessible to nodes with a LayoutView. The only way to convert a
`Node<ScriptView>` to a `Node<LayoutView>` is through a transmutation, which is
done at the moment the layout task receives nodes. (This should be factored
better to contain the unsafety.)
We should also lock down DOM node mutation to the ScriptView to forbid data
races, but this patch doesn't do that.
This also reduces coupling between DOM and layout. Soon I would like to move
the DOM into its own crate, and this is a step on the way of doing that.
2013-05-28 15:40:47 -07:00
Patrick Walton
c7bce98236
Remove the servo-
prefix from core components.
2013-05-28 15:40:47 -07:00