Commit graph

79 commits

Author SHA1 Message Date
bors-servo
c109f6ff77 auto merge of #3831 : pcwalton/servo/append-from, r=mbrubeck
This is tracked upstream as Rust bug #18402.

r? @mbrubeck
2014-10-28 13:48:58 -06:00
bors-servo
5bd0a578fd auto merge of #3823 : glennw/servo/default-opts, r=mbrubeck
This is required for unit tests like the image cache task, which can pass through code paths that query the command line options.
2014-10-28 12:36:51 -06:00
Patrick Walton
1a28960bd2 util: Add a method to push all elements from another doubly-linked list
without any moves.

This is tracked upstream as Rust bug #18402.
2014-10-28 10:47:04 -07:00
Clark Gaebel
6df1cc8e4c Run all task spawning through util, to allow for easy hooking.
During debugging, I found it useful to hook all task creation in a
central location, and util::task was the perfect place for it.

r? @pcwalton (or maybe someone else, I'm kinda sending you a bunch of
reviews today because I don't know who better to give them to)
2014-10-28 09:53:45 -07:00
Glenn Watson
743ea6381a If opts is retrieved, but not set by platform layer, return a default set.
This is required for unit tests like the image cache task, which can
pass through code paths that query the command line options.
2014-10-28 14:58:31 +10:00
Clark Gaebel
293969cb7d Addressed code review comments. 2014-10-27 14:19:44 -07:00
LalehB
b0d16462ff Adding back-off instead of busy-spinning
Also changed the total number of spinning similar to Cilk
2014-10-27 14:14:21 -07:00
Keegan McAllister
f508a82582 Provide safety check helpers in release builds
debug_assert! uses

    if cfg!(not(ndebug)) { ... }

so the body in a release build is dead code, but it still needs to compile.
2014-10-24 16:53:58 -07:00
Keegan McAllister
4dee8ecdf0 task_state: Generate the list of task types
Also fix warnings.
2014-10-24 16:44:34 -07:00
Keegan McAllister
49234484d6 Ignore the HTML parser's borrow flag in GC tracing
Adds some other dynamic checks in debug builds.
2014-10-24 16:27:37 -07:00
Keegan McAllister
6ec0939a22 Dynamically check DOMRefCell access from layout in debug builds 2014-10-24 16:27:37 -07:00
Josh Matthews
766c3815ab Add layers dependency to util crate. Fixes #3783. 2014-10-23 19:29:05 -04:00
bors-servo
a6f0159cb8 auto merge of #3765 : pcwalton/servo/profiler-cleanups, r=cgaebel
The only real user-visible change this effects is to trim URLs to 30 characters so they don't make huge lines on the terminal.

r? @cgaebel
2014-10-22 14:45:35 -06:00
Patrick Walton
d2d012165f util: Make some minor formatting cleanups to profiling and gfx 2014-10-22 07:49:56 -07:00
Patrick Walton
55222336b5 gfx: Paint in parallel in CPU painting mode 2014-10-22 07:47:47 -07:00
bors-servo
213178b6b9 auto merge of #3742 : saneyuki/servo/opt, r=jdm
This follows up #3711.
2014-10-22 01:27:36 -06:00
bors-servo
1fd7650de5 auto merge of #3752 : pcwalton/servo/default-cpu, r=larsbergstrom
We've discussed this some and I think there's consensus to do it as a
pragmatic decision for now. CPU painting is more stable, especially with
buggy drivers, and faster (because we aren't caching the necessary
OpenGL objects yet and possibly for other reasons), so it provides a
better "out of the box" experience for newcomers to Servo who don't know
to pass the `-c` option. This patch continues to reftest both Skia and
Skia-GL out of a desire to keep options open. Skia-GL remains a
first-class citizen.

r? @metajack
2014-10-21 21:18:33 -06:00
bors-servo
9e48010c8f auto merge of #3748 : mrobinson/servo/trimmer-flow-tree-output, r=mbrubeck
Logical geometry is complicated, so the string formatted output is
verbose. This means that flow tree dumps often go well beyond the
edge of the terminal screen. With a simple notation, we can shorten the
output and make it slightly easier to read. This notation also makes it
more similar to the formatted output of Rect, Point2D, and Size2D.
2014-10-21 19:00:37 -06:00
Tetsuharu OHZEKI
d530e8def9 Remove the help text for render backend option. follow up #3711. 2014-10-22 09:58:58 +09:00
bors-servo
f5ad89f927 auto merge of #3747 : mrobinson/servo/validate-display-list, r=pcwalton
When this option is enabled, the layout task will print an error when
display list items draw outside their owning Flow's position rect. This
will make it easier to detect layout errors before they break rendering.

This is a command-line option for the moment, because we violate this
rule quite a bit still. Once all bugs causing this are fixed, we can be
more aggressive about enabling the option.
2014-10-21 17:51:43 -06:00
bors-servo
3936d14260 auto merge of #3746 : mrobinson/servo/debug-fragment-borders, r=pcwalton
This is quite a bit cleaner than abusing the rust debug functionality.
If we start collecting too many debugging options in the servo
executable we could opt to organize them into a single option.

Fixes #2263.
2014-10-21 17:06:40 -06:00
bors-servo
4795e9cf0b auto merge of #3730 : glennw/servo/taskpool, r=pcwalton
r? @pcwalton - Is this the kind of thing you were thinking of in terms of task queue?
2014-10-21 15:15:42 -06:00
Patrick Walton
32e34663cd gfx: Switch the default to CPU painting.
We've discussed this some and I think there's consensus to do it as a
pragmatic decision for now. CPU painting is more stable, especially with
buggy drivers, and faster (because we aren't caching the necessary
OpenGL objects yet and possibly for other reasons), so it provides a
better "out of the box" experience for newcomers to Servo who don't know
to pass the `-c` option. This patch continues to reftest both Skia and
Skia-GL out of a desire to keep options open. Skia-GL remains a
first-class citizen.
2014-10-21 11:13:21 -07:00
Martin Robinson
2d5168a1e5 Add an option to show debug fragment borders
This is quite a bit cleaner than abusing the rust debug functionality.
If we start collecting too many debugging options in the servo
executable we could opt to organize them into a single option.

Fixes #2263.
2014-10-21 08:49:25 -07:00
Martin Robinson
adecdbd4cf Add an option to validate display list items
When this option is enabled, the layout task will print an error when
display list items draw outside their owning Flow's position rect. This
will make it easier to detect layout errors before they break rendering.

This is a command-line option for the moment, because we violate this
rule quite a bit still. Once all bugs causing this are fixed, we can be
more aggressive about enabling the option.
2014-10-21 08:47:40 -07:00
Patrick Walton
bb6f557276 layout: Rewrite text and inline fragment handling during flow
construction to avoid cloning and moving flows so much.

Besides amounting to a 5%-10% win on a page with a lot of text, this
simplifies and refactors the text layout code.
2014-10-20 22:05:38 -07:00
Martin Robinson
29303c0636 Improve logical geometry formatting
Logical geometry is complicated, so the string formatted output is
verbose. This means that flow tree dumps often go well beyond the
edge of the terminal screen. With a simple notation, we can shorten the
output and make it slightly easier to read. This notation also makes it
more similar to the formatted output of Rect, Point2D, and Size2D.
2014-10-20 18:04:48 -07:00
Clark Gaebel
81bd3cbd9d Fixes the table_percentage_width_a.html reftest with incremental reflow turned on. 2014-10-20 11:13:31 -07:00
Glenn Watson
26636474a9 Introduce a basic shared task pool, and use it for image decoding. 2014-10-20 13:34:14 +10:00
Glenn Watson
076495db94 Use opts as a global, to avoid cloning and passing the struct all over the code. 2014-10-20 10:48:47 +10:00
Glenn Watson
b816550a17 Remove render backend option as it doesn't work and confuses people. 2014-10-20 07:39:36 +10:00
Emanuel Rylke
62595ff448 Remove unused implementation of MonoCache 2014-10-16 08:39:51 +02:00
Clark Gaebel
481adcd654 Fix whitespace_pre with incremental reflow turned on.
This implements fragment merging, in order to incrementally reflow linebroken
text. This makes the `whitespace_pre.html` reftest pass with incremental reflow
turned on with `-i`.
2014-10-15 16:04:21 -07:00
bors-servo
56989b8dec auto merge of #3640 : cgaebel/servo/incremental-flow-construction, r=pcwalton
This also hides the not-yet-working parts of incremental reflow behind a runtime
flag. As I get the failing reftests passing, I'll send pull requests for them one
by one.
2014-10-14 16:51:30 -06:00
Patrick Walton
5f8d3f72d8 layout: Introduce support for legacy presentational attributes to selector
matching, and use it for `<input size>` and `<td width>`.

This implements a general framework for legacy presentational attributes
to the DOM and style calculation, so that adding more of them later will
be straightforward.
2014-10-14 12:44:09 -07:00
Clark Gaebel
f552e2f750 try to reset flows which need reflow, since reflow isn't yet idempotent 2014-10-14 10:33:46 -07:00
Patrick Walton
bffaad118e layout: Rewrite clipping to be per-display-item instead of having
a separate `ClipDisplayItem`.

We push down clipping areas during absolute position calculation. This
makes display items into a flat list, improving cache locality. It
dramatically simplifies the code all around.

Because we need to push down clip rects even for absolutely-positioned
children of non-absolutely-positioned flows, this patch alters the
parallel traversal to compute absolute positions for
absolutely-positioned children at the same time it computes absolute
positions for other children. This doesn't seem to break anything either
in theory (since the overall order remains correct) or in practice. It
simplifies the parallel traversal code quite a bit.

See the relevant Gecko bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=615734
2014-10-13 21:40:36 -07:00
Patrick Walton
d560d51454 layout: Refactor inline layout to remove the code that tried to avoid
splitting fragments.

I don't think it will be possible to avoid splitting fragments in the
presence of `vertical-align`, because one `ScannedTextFragment` could
potentially be split into arbitrary many fragments, each having its own
vertical position that can influence layout of other fragments.

This code also removes parts of `Range` that were no longer used.
2014-10-13 16:33:19 -07:00
Glenn Watson
eb5532c781 Expose user agent option to DOM navigator interface. 2014-10-13 19:53:41 +10:00
Patrick Walton
2a790d06dd Use Gecko's simpler Bloom filter instead of one based on hash
stretching.

This preserves the usage of the Bloom filter throughout style recalc,
but the implementation is rewritten. Provides a 15% improvement on
Guardians of the Galaxy.
2014-10-10 17:02:27 -07:00
Patrick Walton
01c90d8d6a layout: Implement z-index. 2014-10-08 22:30:44 -07:00
Robin Stocker
8a5c6a0d3b Allow to specify port with --devtools option (fixes #3597)
Note that using `servo --devtools http://example.org` doesn't work. In
that case either the port must be specified or the option moved to the
end. This is done by getopts and is the same for other such options,
e.g. `--profile`.
2014-10-09 00:39:31 +11:00
Simon Sapin
cf1785ecb1 Read user-agent.css at run time. Fix #3516 2014-10-07 21:16:54 +01:00
bors-servo
3e8aa05921 auto merge of #3565 : glennw/servo/user-agent, r=mbrubeck
Fixes #3455
2014-10-06 23:21:32 -06:00
Jack Moffitt
7f6f072b02 Fix up and run unit tests.
This adds the subpackages to `./mach test-unit`.
2014-10-02 23:14:42 -06:00
Glenn Watson
dc1d66d3ce Add cmd line option to set user agent. Improves github when used. 2014-10-03 13:57:12 +10:00
Patrick Walton
dbdfce0695 gfx: Use subpixel positioning for glyphs.
Improves text rendering significantly.
2014-10-02 08:05:24 -07:00
Keegan McAllister
d50114c41d Use string-cache's Namespace type 2014-09-29 21:40:54 -07:00
Keegan McAllister
6429750b33 Eliminate servo_util::atom
We only needed this for Encodable, and now we use JSTraceable instead.
2014-09-29 18:39:36 -07:00
Simon Sapin
b3245fa407 Upgrade to rustc d2b30f7d3 2014-09-23 2014-09-29 17:41:45 +01:00