Commit graph

1356 commits

Author SHA1 Message Date
Martin Robinson
90e2f7bfbf Clean up restyle damage after it no longer applies
BUBBLE_ISIZES and REPAINT can become "stuck" on in the default Servo
configuration once they are activated. This is solved by removing these
damage bits after they no longer apply. There isn't a good way to test
this, other than noting that it doesn't break any existing CSS tests.
This will become more important in the future as the REPAINT bit is used
to implement display list patching.
2015-11-20 11:57:58 -08:00
Keith Yeung
7de7cb4786 Extend whitespace::T with additional helper methods 2015-11-20 11:05:36 -08:00
Ms2ger
b77576f34b Pass ServoLayoutNode to query functions.
This means we only deal with TrustedNodeAddress in LayoutTask::handle_reflow,
which is where the safety of this usage is guaranteed (by the ScriptReflow
destructor).
2015-11-20 14:34:10 +01:00
r0e
99acd46c48 Fix for #8593 'loop..match' should be 'while let'
changed line 641 of constellation.rs to while let

added while let at line 1201 in constellation.rs

added while let to line 1199 in block.rs
2015-11-19 21:48:45 -08:00
Patrick Walton
1c130819ca compositing: Split Servo up into multiple sandboxed processes.
Multiprocess mode is enabled with the `-M` switch, and sandboxing is
enabled with the `-S` switch.
2015-11-19 16:38:04 -05:00
Rizky Luthfianto
2c7117d73b refactor(layout_task.rs): move some functions to query.rs 2015-11-19 23:30:39 +07:00
Bobby Holley
2f6e94943a Rename Layout*Trait to Layout*.
The next step will be to remote the Servo-specificity of the layout code we want
to share by making it operate generically on Layout*.
2015-11-18 17:24:36 -08:00
Bobby Holley
9dd45b9f2a Prefix concrete types with 'Servo'. 2015-11-18 17:23:46 -08:00
Bobby Holley
54f2700ba6 Hoist exported wrapper functionality into a family of traits.
All the existing code still uses the concrete implementations, so this
shouldn't impact the generated code at all.
2015-11-18 17:23:29 -08:00
bors-servo
acbe413052 Auto merge of #8530 - KiChjang:split-constellation-msg, r=jdm
Split ConstellationMsg into ScriptMsg and CompositorMsg

Fixes #8356.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8530)
<!-- Reviewable:end -->
2015-11-19 04:39:20 +05:30
Ms2ger
8b786cca9a Make layout's modules private. 2015-11-18 15:00:59 +01:00
Ms2ger
5ec1cdea9b Remove dead code from layout. 2015-11-18 15:00:58 +01:00
Glenn Watson
f555e3861c Include transform changes in list that cause incremental reflows.
Also ensure that 3d translations get layers.

Fixes #8329.
2015-11-18 10:28:37 +10:00
bors-servo
cedaac8dbe Auto merge of #8549 - Ms2ger:privatize, r=pcwalton
Privatize from_layout_js functions.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8549)
<!-- Reviewable:end -->
2015-11-17 14:11:22 +05:30
Ms2ger
3fb16cc017 Privatize from_layout_js functions. 2015-11-17 09:40:51 +01:00
Keith Yeung
19294db6e5 Split ConstellationMsg into ScriptMsg and CompositorMsg 2015-11-16 23:10:53 -08:00
bors-servo
20d26853e1 Auto merge of #8548 - Ms2ger:unused-tna, r=pcwalton
Remove the unused arguments to hit_test and mouse_over.

I don't think this code is called when there is no document element, but I
added assertions to make sure we notice in case I was wrong.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8548)
<!-- Reviewable:end -->
2015-11-17 02:05:52 +05:30
Ms2ger
4e60412c6d Remove the unused arguments to hit_test and mouse_over.
I don't think this code is called when there is no document element, but I
added assertions to make sure we notice in case I was wrong.
2015-11-16 15:53:49 +01:00
Ms2ger
a2c08413dd Remove AutoJoinScriptTask.
I don't believe there is a case where it would make sense to drop the
ScriptReflow struct without joining the script thread. This approach should
be somewhat more robust, and avoids the code smell of a RAII guard in an
otherwise unused variable.
2015-11-16 12:41:25 +01:00
bors-servo
b6f519cd0a Auto merge of #8533 - Ms2ger:legacy, r=nox
Remove the `legacy` module.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8533)
<!-- Reviewable:end -->
2015-11-15 19:13:13 +05:30
Ms2ger
9c1d678b1b Remove get_unsigned_integer_attribute. 2015-11-15 11:24:03 +01:00
Ms2ger
5417df6397 Introduce a get_colspan method on LayoutJS<Element>. 2015-11-15 11:16:17 +01:00
bors-servo
33c97b2ebb Auto merge of #8529 - Ms2ger:unused-lifetime, r=eefriedman
Remove unused lifetime parameters from LayoutTask methods.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8529)
<!-- Reviewable:end -->
2015-11-15 01:32:35 +05:30
Alan Jeffrey
84bde75b42 Replaced DOMString constructor by conversion functions.
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
2015-11-12 17:52:59 -06:00
bors-servo
1e10b67b18 Auto merge of #8485 - hfaulds:make-layout-task-fields-private, r=Ms2ger
Make layout task fields private

For https://github.com/servo/servo/issues/8471

The second commit I'm slightly less sure about but with `chan` made private this warning was shown:

```
components/layout/layout_task.rs:152:5: 152:21 warning: struct field is never used: `chan`, #[warn(dead_code)] on by default
```

There might be some cleanup around `layout_chan` in https://github.com/hfaulds/servo/blob/make-layout-task-fields-private/components/layout/layout_task.rs#L244-L261 as well but that was a bit beyond me.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8485)
<!-- Reviewable:end -->
2015-11-13 02:26:12 +05:30
Hayden Faulds
c0f497d4ac remove unnecessary layout_chan 2015-11-12 13:52:08 +00:00
Hayden Faulds
5e7bf9cd9c remove chan from layout task 2015-11-12 13:15:17 +00:00
Hayden Faulds
66b85fe4fc make layout task fields private 2015-11-12 12:42:57 +00:00
bors-servo
efc31e619d Auto merge of #8376 - mrobinson:fix-inlines, r=pcwalton
Properly make stacking contexts for inlines

Instead of making a stacking context out of inline fragments parent
flow, make the inline fragment itself the stacking context. This fixes
positioning and rendering of these sort of fragments and prevents
over-layerization.

Fixes #7424.
Fixes #5812.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8376)
<!-- Reviewable:end -->
2015-11-12 12:26:39 +05:30
Martin Robinson
d572f1ca05 Properly make stacking contexts for inlines
Instead of making a stacking context out of inline fragments parent
flow, make the inline fragment itself the stacking context. This fixes
positioning and rendering of these sort of fragments and prevents
over-layerization.

Fixes #7424.
Fixes #5812.
2015-11-11 14:42:18 -08:00
Ms2ger
15245b31ae Remove unused lifetime parameters from LayoutTask methods. 2015-11-11 15:30:20 +01:00
Michael Howell
d32a2d6cfc Write reflow results, even with no root node.
Fixes #8240
2015-11-10 15:01:46 -07:00
Bobby Holley
b29369296c Add ::from_layout_js factory to LayoutNode, LayoutElement, and LayoutDocument. 2015-11-10 11:57:25 -08:00
Bobby Holley
7fa7936657 Implement attribute restyle hints.
Fixes #6942.
2015-11-10 11:57:24 -08:00
Bobby Holley
47744d95ad Make RESTYLE_SELF imply RESTYLE_DESCENDANTS.
This is a temporary workaround for #8438.
2015-11-10 11:41:28 -08:00
Ms2ger
1919e19633 Move viewport_size from LayoutTaskData to LayoutTask. 2015-11-09 09:04:05 +01:00
Ms2ger
dd920a06f3 Move epoch from LayoutTaskData to LayoutTask. 2015-11-09 09:04:04 +01:00
Ms2ger
4c3038f378 Pass the constellation_chan to animation::update_animation_state directly. 2015-11-09 09:04:03 +01:00
Ms2ger
c469d09543 Move running_animations from LayoutTaskData to LayoutTask. 2015-11-09 09:04:02 +01:00
Ms2ger
ee2b77e8f5 Move visible_rects from LayoutTaskData to LayoutTask. 2015-11-09 09:04:02 +01:00
Ms2ger
e8f31f2ed7 Move root_flow from LayoutTaskData to LayoutTask. 2015-11-09 09:04:01 +01:00
Ms2ger
53da53ef53 Move outstanding_web_fonts from LayoutTaskData to LayoutTask. 2015-11-09 09:04:00 +01:00
Ms2ger
5e4039d328 Move new_animations_receiver from LayoutTaskData to LayoutTask. 2015-11-09 09:03:59 +01:00
Ms2ger
604d1e8400 Move new_animations_sender from LayoutTaskData to LayoutTask. 2015-11-09 09:03:58 +01:00
Ms2ger
bdfa5fe804 Move generation from LayoutTaskData to LayoutTask. 2015-11-09 09:03:57 +01:00
Ms2ger
880fb9be0b Remove LayoutTaskData::image_cache_task. 2015-11-09 09:03:57 +01:00
Ms2ger
be178c0e5e Remove unused RwData arguments from LayoutTask::exit_now and LayoutTask::prepare_to_exit. 2015-11-09 09:03:56 +01:00
Ms2ger
dcea03c2b4 Move parallel_traversal from LayoutTaskData to LayoutTask. 2015-11-09 09:03:55 +01:00
Ms2ger
49691c1638 Make LayoutTask::solve_constraints_parallel a static method.
This matches LayoutTask::solve_constraints, and will be necessary when we
borrow parallel_traversal directly from the LayoutTask.
2015-11-09 09:03:54 +01:00
Ms2ger
cc1b7acbe6 Make LayoutTask::solve_constraints a static method.
It does not use self.
2015-11-09 09:03:53 +01:00