Commit graph

1300 commits

Author SHA1 Message Date
Patrick Walton
df93b1f194 gfx: Measure text shaping time in the time profiler. 2015-12-15 13:28:05 -08:00
GauriGNaik
fc81276c8e Add pipeline information to CSS error reporting. 2015-12-14 11:18:30 -05:00
Alex Gaynor
d57ac454d5 Removed use of a #![feature] that is now stable 2015-12-10 07:16:53 -05:00
Tomas Cernaj
5507be2653 Move ScriptMsg from msg crate into script_traits 2015-12-09 20:50:11 +01:00
Keith Yeung
2ee446de5d Fix build errors after rebasing and address review comments 2015-12-09 10:56:21 -08:00
Arnaud Marant
8cdafe8ffc remove Option because it is never used as None 2015-12-09 02:10:40 -08:00
Arnaud Marant
239f1ae1a7 fix for Layout memory reporter uses pre-redirect url #6872 2015-12-09 01:58:11 -08:00
Ms2ger
2e40297885 Move from clock_ticks to time.
This is recommended at <https://github.com/tomaka/clock_ticks>.
2015-12-07 11:03:48 -05:00
bors-servo
2dbc314e2d Auto merge of #8796 - cheba:zero-point, r=SimonSapin
Replaced ZERO_POINT with Point2D::zero()

This is a proposed in servo/servo#8792 clean up.

Fixes #8792.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8796)
<!-- Reviewable:end -->
2015-12-04 11:09:59 +05:30
bors-servo
32b90cdb6f Auto merge of #8800 - servo:warnings, r=metajack
Fix warnings

Fixing unused attributes warnings required updating serde_macros
which required updating to rustc 1.6.0-nightly (a2866e387 2015-11-30)
which required updating some other dependencies.

Fix #8709.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8800)
<!-- Reviewable:end -->
2015-12-04 05:37:38 +05:30
Alexander Mankuta
ee746e252c Replaced ZERO_POINT with Point2D::zero() 2015-12-03 19:46:45 +02:00
Simon Sapin
b19cc7e44c Fix warnings
Fixing unused attributes warnings required updating serde_macros
which required updating to rustc 1.6.0-nightly (a2866e387 2015-11-30)
which required updating some other dependencies.
2015-12-03 17:05:26 +01:00
Alexander Mankuta
546d2f564f Replaced ZERO_RECT with Rect::zero() 2015-12-03 15:39:30 +02:00
bors-servo
8b95d7b8d8 Auto merge of #8757 - servo:skia, r=mbrubeck
Use skia and deps from crates.io.

This makes the initial download for skia go from a 300 MB git repository to a 5 MB tarball. This should help with issues like #6132 and #7687.

Fix https://github.com/servo/skia/issues/70

This builds, but the at the moment causes a number of tidy errors for duplicated crates.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8757)
<!-- Reviewable:end -->
2015-12-03 12:58:29 +05:30
Simon Sapin
aa1eba4f5a Use skia and deps from crates.io.
Fix https://github.com/servo/skia/issues/70
2015-12-02 19:07:59 +01:00
Bobby Holley
cf33f00018 Generalize the rest of layout to operate on generic Layout*.
There wasn't a good way to split this up, unfortunately.

With this change, the only remaining usage of the Servo-specific structures is
in layout_task, where the root node is received from the script task. \o/
2015-11-28 18:01:02 -08:00
Bobby Holley
77a8091996 Generalize css/matching.rs to operate on generic Layout*. 2015-11-28 18:01:02 -08:00
Bobby Holley
3aeaff35de Switch ChildrenIterator to be an associated type.
If we use ThreadsafeLayoutNodeChildrenIterator directly as the return type of children(),
we need to export the DangerousThreadSafeLayoutNode which the iterator implementation
relies upon.
2015-11-28 18:01:02 -08:00
Bobby Holley
2cfe4de09b Constrain the ConcreteLayoutFoo associated types to provide full tri-ality among the types.
Otherwise we end up with this problem: http://is.gd/ACBLAU
2015-11-28 18:01:02 -08:00
bors-servo
dbff1ab336 Auto merge of #8692 - GuillaumeGomez:patch-1, r=Wafflespeanut
Ensure crate are alphabetically sorted

cc @nox

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8692)
<!-- Reviewable:end -->
2015-11-28 19:34:11 +05:30
bors-servo
d50b87edec Auto merge of #8702 - mrobinson:fragments, r=pcwalton
Build Fragments without the RECONSTRUCT_FLOW bit

The RECONSTRUCT_FLOW restyle damage bit shouldn't apply to newly
constructed flow tree elements. It is explicitly removed for Flows, but
not for Fragments. This causes RECONSTRUCT_FLOW to bubble up to Flows
that contain any Fragments at all. Instead explicitly remove the
RECONSTRUCT_FLOW bit when creating a new Fragment.

There isn't a good way to test this currently, but all tests should
continue to pass.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8702)
<!-- Reviewable:end -->
2015-11-28 10:04:28 +05:30
Guillaume Gomez
6e7de62b38 Add check up on extern crate order and sort extern crates alphabetically 2015-11-28 03:11:08 +01:00
Martin Robinson
12db4594dd Build Fragments without the RECONSTRUCT_FLOW bit
The RECONSTRUCT_FLOW restyle damage bit shouldn't apply to newly
constructed flow tree elements. It is explicitly removed for Flows, but
not for Fragments. This causes RECONSTRUCT_FLOW to bubble up to Flows
that contain any Fragments at all. Instead explicitly remove the
RECONSTRUCT_FLOW bit when creating a new Fragment.

There isn't a good way to test this currently, but all tests should
continue to pass.
2015-11-27 22:27:21 +01:00
bors-servo
99223656fb Auto merge of #8675 - GuillaumeGomez:master, r=nox
Add XMLDocument object

Fixes #8000

(Still working on it)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8675)
<!-- Reviewable:end -->
2015-11-27 19:29:04 +05:30
Guillaume Gomez
adf8b359bb Add XMLDocument object 2015-11-27 14:55:41 +01:00
Manish Goregaokar
dc0e467945 Upgrade to rustc 1.6.0-nightly (d5fde83ae 2015-11-12)
… and libc 0.2 and many other dependencies
2015-11-27 00:15:29 -05:00
GauriGNaik
996e9e06b2 Defined new trait ParseErrorReporter and added error_reporter member to ParserContext 2015-11-25 18:28:30 -05:00
Alan Jeffrey
3dec6edd10 Update string_cache to 0.2.
Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced atom!(foo) by atom!("foo").
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.
2015-11-25 10:13:21 -06:00
bors-servo
4f625d3ab6 Auto merge of #8670 - pcwalton:animation-expiration, r=glennw
Write animated values into the `ComputedValues` structures when animations complete or are interrupted.

This adds a new pair of reader-writer locks. I measured the performance
of style recalculation on Wikipedia and the overhead of the locks was
not measurable.

Closes #7816.

cc @paulrouget

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8670)
<!-- Reviewable:end -->
2015-11-25 08:00:14 +05:30
bors-servo
13a96fcaf7 Auto merge of #8660 - pcwalton:ipc-channel-errors, r=larsbergstrom
Update `ipc-channel` to pick up the improved error reporting.

Intended to help diagnose intermittent failures.

r? @jdm or @larsbergstrom (or whoever)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8660)
<!-- Reviewable:end -->
2015-11-25 07:31:15 +05:30
Patrick Walton
e881f0feeb Write animated values into the ComputedValues structures when
animations complete or are interrupted.

This adds a new pair of reader-writer locks. I measured the performance
of style recalculation on Wikipedia and the overhead of the locks was
not measurable.

Closes #7816.
2015-11-24 19:50:52 -06:00
Patrick Walton
2843000810 Update ipc-channel to pick up the improved error reporting.
Intended to help diagnose intermittent failures.
2015-11-23 16:38:39 -08:00
Martin Robinson
8dd664a438 Improve readability of flow tree dump
Use the PrintTree utility to improve the readability of flow tree
dumps. Blocks and fragments are now split over two dump levels, because
otherwise they are impenetrable. Also start printing the restyle damage of
fragments.
2015-11-23 15:17:32 -08:00
bors-servo
711f516d80 Auto merge of #8639 - bholley:generalize_wrappers2, r=pcwalton
Use associated types for layout wrapper trait, and generalized ThreadSafeLayoutFoo

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8639)
<!-- Reviewable:end -->
2015-11-24 04:01:32 +05:30
bors-servo
6449cd09eb Auto merge of #8542 - KiChjang:style-whitespace-methods, r=SimonSapin
Extend whitespace::T with additional helper methods

Fixes #8128.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8542)
<!-- Reviewable:end -->
2015-11-23 23:39:07 +05:30
bors-servo
e3eee5a41b Auto merge of #8597 - r0e:testing, r=Manishearth
Fix for #8593 'loop..match' should be 'while let'

As per #8593.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8597)
<!-- Reviewable:end -->
2015-11-23 08:18:20 +05:30
bors-servo
3199eace98 Auto merge of #8642 - jmr0:master, r=jdm
making internal pub enums, functions, and structs private

Refactoring to fix #8620

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8642)
<!-- Reviewable:end -->
2015-11-22 16:15:36 +05:30
jmr0
aef98c5210 making internal pub enums, functions, and structs private 2015-11-21 20:26:31 -05:00
Bobby Holley
afa3834f3b Rename ThreadSafeLayoutFoo to ServoThreadSafeLayoutFoo and TThreadSafeLayoutFoo to ThreadSafeLayoutFoo. 2015-11-21 11:26:49 -08:00
Bobby Holley
a85ae24c51 Hoist exported ThreadSafeLayoutFoo functionality into traits. 2015-11-21 11:25:20 -08:00
Bobby Holley
05db7b3652 Use associated types instead of wrapper types. 2015-11-21 10:18:02 -08:00
Bobby Holley
516619b230 Make the LayoutElement trait implement TElementAttributes. 2015-11-21 10:18:01 -08:00
bors-servo
8b6bfb615a Auto merge of #8628 - mrobinson:damage-bits, r=pcwalton
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.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8628)
<!-- Reviewable:end -->
2015-11-21 04:44:28 +05:30
bors-servo
c19b01c2f4 Auto merge of #8559 - glennw:transform-layers, r=pcwalton
Include transform changes in list that cause incremental reflows.

Also ensure that 3d translations get layers.

Fixes #8329.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8559)
<!-- Reviewable:end -->
2015-11-21 02:28:18 +05:30
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