Commit Graph

221 Commits

Author SHA1 Message Date
Simon Sapin
d266298e25 servo: Merge #4140 - Move the root Cargo.toml to components/servo, and warn when Cargo is run directly (from SimonSapin:no-root-cargo-toml); r=SimonSapin
This fixes #3957, and allow #4115 not to regress #4099.

Source-Repo: https://github.com/servo/servo
Source-Revision: 873ca6cadddc1a40bead1f5dd0128bb16cfaa11b
2014-12-02 19:27:51 -07:00
Mike Blumenkrantz
49bd7dfc6c servo: Merge #4049 - Embedding callbacks (from zmike:embedding-callbacks); r=jdm
begin implementing CEF COM, add more types (stupid rust-bindgen taking forever to figure out...)

@jdm @larsbergstrom

Source-Repo: https://github.com/servo/servo
Source-Revision: 2bba42ad19a792565b653cdd5551933ab2d41c2b
2014-11-21 20:00:36 -07:00
Glenn Watson
e954fbdb1e servo: Merge #4051 - Remove unused exit after load option (from glennw:remove-exit-load); r=mbrubeck
This simplifies some upcoming changes to how event handling works.

Source-Repo: https://github.com/servo/servo
Source-Revision: 32d765fb049318f2ff22f39fdeb9fa258ec8a174
2014-11-20 16:54:31 -07:00
Glenn Watson
b802e5744d servo: Merge #4028 - Add glutin port (supported on Linux only currently) (from glennw:glutin); r=larsbergstrom
Default build uses glfw, but glutin can be enabled via:

./mach cargo build --no-default-features --features=glutin

Remaining work:
 * Mac
 * Android
 * hi-dpi
 * nested event loop

This PR also enables true headless (without X) rendering on Linux by specifying the rendering API as Mesa.

Source-Repo: https://github.com/servo/servo
Source-Revision: f5c6146de0b3bfda97edff6662033f4a981df3f6
2014-11-18 15:48:29 -07:00
Glenn Watson
637c437b35 servo: Merge #4013 - Redirect android resource folder (user-agent.css and friends) to /sdcard/servo (from glennw:android-resources); r=larsbergstrom
This is a temporary solution, until they are packaged properly.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1fd94adb3ddaa56c2e5fb41422960a8a433a6389
2014-11-16 18:12:28 -07:00
Patrick Walton
43e9d79efa servo: Merge #3990 - gfx: Rewrite display list construction to make stacking-contexts more first-class (from pcwalton:stacking-contexts); r=glennw
This implements the scheme described here:

    https://groups.google.com/forum/#!topic/mozilla.dev.servo/sZVPSfPVfkg

This commit changes Servo to generate one display list per stacking
context instead of one display list per layer. This is purely a
refactoring; there are no functional changes. Performance is essentially
the same as before. However, there should be numerous future benefits
that this is intended to allow for:

* It makes the code simpler to understand because the "new layer needed"
  vs. "no new layer needed" code paths are more consolidated.

* It makes it easy to support CSS properties that did not fit into our
  previous flat display list model (without unconditionally layerizing
  them):

  o `opacity` should be easy to support because the stacking context
    provides the higher-level grouping of display items to which opacity
    is to be applied.

  o `transform` can be easily supported because the stacking context
    provides a place to stash the transformation matrix. This has the side
    benefit of nicely separating the transformation matrix from the
    clipping regions.

* The `flatten` logic is now O(1) instead of O(n) and now only needs to
  be invoked for pseudo-stacking contexts (right now: just floats),
  instead of for every stacking context.

* Layers are now a proper tree instead of a flat list as far as layout
  is concerned, bringing us closer to a production-quality
  compositing/layers framework.

* This commit opens the door to incremental display list construction at
  the level of stacking contexts.

Future performance improvements could come from optimizing allocation of
display list items, and, of course, incremental display list
construction.

r? @glennw
f? @mrobinson @cgaebel

Source-Repo: https://github.com/servo/servo
Source-Revision: 397d8138e7b27541faf03d9635d7648416da4a75
2014-11-16 16:39:27 -07:00
Glenn Watson
71f726977a servo: Merge #3948 - Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a (from servo:rustup-20141105_2); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: c5e1b0d32e17fad29799023c85e2e73ac89c3af7
2014-11-12 20:48:31 -07:00
Ms2ger
5769e5ae2d servo: Merge #3949 - Fix the documentation comment for logical_geometry.rs (from Ms2ger:logical_geometry); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: f0184a2d011e12845258a242d2d2f6b8b504a28d
2014-11-10 05:33:35 -07:00
Patrick Walton
9e23057919 servo: Merge #3890 - gfx: Micro-optimize DList and StackingContext a bit (from pcwalton:microoptimize-dlist); r=glennw
I'm sad to say that this improved performance significantly. A lot of
this win is due to the Rust compiler not being smart about not zeroing
objects out if it doesn't need to.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 5e71087ae96a4dcff7f09ab2b9b56df9f3eba595
2014-11-05 10:00:54 -07:00
Patrick Walton
e4fe54ce48 servo: Merge #3761 - Invert control flow, fix resizing, and improve checkerboarding significantly (from pcwalton:smooth-scrolling); r=larsbergstrom
r? @glennw @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: ffae1104989c0177b483d591a482e5cd877183c2
2014-11-04 18:12:32 -07:00
Martin Robinson
076c833809 servo: Merge #3879 - Corral debug command-line options into a --debug/-Z flag (from mrobinson:debug-options); r=cgaebel
This should make help output a lot cleaner and simplify the way that
uncommon debug options are passed.

Source-Repo: https://github.com/servo/servo
Source-Revision: e483a189a3c24d0fe475cf2a8dedb11821f7ee21
2014-11-04 11:36:30 -07:00
Clark Gaebel
3330aff809 servo: Merge #3880 - Implements case insensitive font family names (from cgaebel:case-insensitive-font-family-matching); r=glennw,glennw
One part (of 8!) of css font family disambiguation is that font families should
be matched case-insensitively.

This patch implements that. Once it lands, a bug needs to be filed to do lowercasing
properly (as a string, instead of char-by-char -- it's a unicode thing).

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 2a88a3242cf85c807875883aeb14d113a1a27212
2014-11-03 18:30:35 -07:00
Clark Gaebel
332d298902 servo: Merge #3875 - Removes the useless 'static constraint on SmallVec (from cgaebel:remove-static-constraint-on-smallvec); r=jdm
It was likely added accidentally after a rustc upgrade.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 97d57689e96e3ec904916cc703bc7878675cfe5d
2014-11-03 13:18:33 -07:00
Patrick Walton
e3cf03f334 servo: Merge #3830 - layout: Employ a persistent list data structure to avoid copying floats all the time (from pcwalton:persistent-list-floats); r=kmcallister
r? @kmcallister

Source-Repo: https://github.com/servo/servo
Source-Revision: 4418a28e7a67ade0f976405ad889b005f9d291b5
2014-10-31 14:00:39 -06:00
Patrick Walton
236472a5db servo: Merge #3834 - util: Add a Show implementation to SmallVec (from pcwalton:smallvec-debugging); r=pcwalton
r? @cgaebel

Source-Repo: https://github.com/servo/servo
Source-Revision: 72f6e14f0b8c42267b55227213060358f7cb2278
2014-10-31 11:48:36 -06:00
Clark Gaebel
e3fe9a53aa servo: Merge #3829 - util: Primarily fixes a bug where SmallVec.into_iter just doesn't work (from cgaebel:fix-into_iter); r=pcwalton
into_iter used to use `inline_size` as the capacity insetad of the actual
capacity. This patch fixes that, adds some utility methods to `SmallVec`
to bring it closer in functionality to `Vec`, and removes the obsolete
`owns_managed` calls.

Source-Repo: https://github.com/servo/servo
Source-Revision: 59fc7950259496b6dd9bf5452e09ae615cb79a51
2014-10-28 16:36:47 -06:00
Glenn Watson
f2ce2863bf servo: Merge #3708 - Add task profiler, which works by instrumenting each task runtime when enabled (from glennw:thread_profiler); r=pcwalton
@pcwalton - I'm not sure if there's any gotchas or downsides to profiling using this technique to instrument the runtime. Happy to close this if it doesn't seem like a good idea to you. r?

Source-Repo: https://github.com/servo/servo
Source-Revision: 82f314d2c475cf712b42a7817f98e6fe422e76f6
2014-10-28 15:36:51 -06:00
Patrick Walton
f9cc7eb563 servo: Merge #3831 - util: Add a method to push all elements from another doubly-linked list without any moves (from pcwalton:append-from); r=mbrubeck
This is tracked upstream as Rust bug #18402.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: c109f6ff772c75cc79b10cfdf8ebccdec9b8465e
2014-10-28 13:48:58 -06:00
Glenn Watson
b0f705541f servo: Merge #3823 - If opts is retrieved, but not set by platform layer, return a default set (from glennw: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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5bd0a578fd395a6fdf59d3c0767e74309f9b3048
2014-10-28 12:36:51 -06:00
Clark Gaebel
73be3aed6e servo: Merge #3827 - Run all task spawning through util, to allow for easy hooking (from cgaebel:use-custom-spawn); r=pcwalton
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)

Source-Repo: https://github.com/servo/servo
Source-Revision: ff06be91ebe770290ba912ee71a303810aa62cea
2014-10-28 11:24:43 -06:00
Clark Gaebel
24cc26cb03 servo: Merge #3820 - Rebase Laleh's #3505 (from cgaebel:rebase-lalehs-patch); r=pcwalton
I addressed all but one of the code review comments, which was a request
for documentation on where a number came from (which I'm not qualified to
answer), and rebased this on to latest master.

xref: #3505 cc: @LalehB @larsbergstrom

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 9e94ecf99cff7c57275ab39c7b11870e55756d63
2014-10-27 18:06:43 -06:00
Keegan McAllister
8321c9c421 servo: Merge #3797 - Debug-only dynamic checks for layout and GC use of DOMRefCell (from kmcallister:domrefcell); r=jdm
r? @mbrubeck, @jdm

Alternative to #3770 and #3716.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0c12f630e6352fc2aa00b638d014b2505f68af1f
2014-10-24 18:09:27 -06:00
Josh Matthews
0d0b39a142 servo: Merge #3795 - Add layers dependency to util crate. Fixes #3783 (from jdm:utildeps); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: 5d78d018cedcca2fe7df90d2c97783c0bf08bdf3
2014-10-23 22:00:34 -06:00
Patrick Walton
8ef2ea6253 servo: Merge #3765 - util: Make some minor formatting cleanups to profiling and gfx (from pcwalton: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

Source-Repo: https://github.com/servo/servo
Source-Revision: a6f0159cb85e3b84a826c41ae5ad1b6aea09d7cc
2014-10-22 14:45:35 -06:00
Patrick Walton
b1af1ceca1 servo: Merge #3762 - gfx: Paint in parallel in CPU rendering mode (from pcwalton:parallel-painting); r=zwarich
r? @larsbergstrom @mrobinson

Source-Repo: https://github.com/servo/servo
Source-Revision: 22d6aaf36980cdcb0202acc2576dfe742aafe885
2014-10-22 08:51:34 -06:00
Tetsuharu OHZEKI
1dff69c69f servo: Merge #3742 - Remove the help text for render backend option (from saneyuki:opt); r=jdm
This follows up #3711.

Source-Repo: https://github.com/servo/servo
Source-Revision: 213178b6b9413cd461b45c1b3275562fa4b604c1
2014-10-22 01:27:36 -06:00
Patrick Walton
9c073ff912 servo: Merge #3752 - gfx: Switch the default to CPU painting (from pcwalton: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

Source-Repo: https://github.com/servo/servo
Source-Revision: 1fd7650de504611016d1ce10a5af2c1a4e0f6b9c
2014-10-21 21:18:33 -06:00
Martin Robinson
cda0288c07 servo: Merge #3748 - Improve logical geometry formatting (from mrobinson: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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9e48010c8ff8fb2c70f45ee721a1039ff634af2f
2014-10-21 19:00:37 -06:00
Martin Robinson
cf92401134 servo: Merge #3747 - Add an option to validate display list items (from mrobinson: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.

Source-Repo: https://github.com/servo/servo
Source-Revision: f5ad89f927864ba4f1cbb409b8b0e3b38febef76
2014-10-21 17:51:43 -06:00
Martin Robinson
dc9442df7c servo: Merge #3746 - Add an option to show debug fragment borders (from mrobinson: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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3936d142607ef5a9b4a49d48e207daf4975cc7d5
2014-10-21 17:06:40 -06:00
Glenn Watson
98d14f171b servo: Merge #3730 - Introduce a basic shared task pool, and use it for image decoding (from glennw:taskpool); r=pcwalton
r? @pcwalton - Is this the kind of thing you were thinking of in terms of task queue?

Source-Repo: https://github.com/servo/servo
Source-Revision: 4795e9cf0ba8a9712e81c281e31ffd4cf34240f0
2014-10-21 15:15:42 -06:00
Patrick Walton
19177725a9 servo: Merge #3722 - Overhaul flow construction with several performance improvements (from pcwalton:flow-construction-overhaul); r=glennw
This is a grab bag of performance improvements that significantly improve style recalculation, layout, and painting on a few static pages.

Let me know if you'd like me to split this PR up.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 156ca98236a57ee52ff5b68741bc7783ba073612
2014-10-21 10:06:37 -06:00
Clark Gaebel
1bacd6dd47 servo: Merge #3715 - Fixes the table_percentage_width_a.html reftest with incremental reflow turned on (from cgaebel:fix-table-percentage-width); r=pcwalton
This also enables incremental reflow by default. \o/

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: f6941b35e3b945f4a6dcd2cf03daa345ad2bcaed
2014-10-20 12:54:34 -06:00
Glenn Watson
bb1641acab servo: Merge #3729 - Use opts as a global, to avoid cloning and passing the struct all over the code base (from glennw:opts-cleanup); r=mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 852378209badb936e8929c31501cb8cabeea6bc5
2014-10-19 21:33:25 -06:00
Glenn Watson
e4537dd960 servo: Merge #3711 - Remove render backend option as it doesn't work and confuses people (from glennw:cleanup-opts); r=pcwalton
r? @pcwalton @metajack

Source-Repo: https://github.com/servo/servo
Source-Revision: a983debaf16d788d500ce12262dc0b9b511b1e8e
2014-10-19 18:00:30 -06:00
Emanuel Rylke
0e9e3ed6a4 servo: Merge #3698 - Remove unused implementation of MonoCache (from ema-fox:remove-monocache); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: b80b18f1cb95966dabb7b1ce9fa8c643a798c4ba
2014-10-16 07:33:21 -06:00
Clark Gaebel
6599b0028b servo: Merge #3689 - Fix whitespace_pre with incremental reflow turned on (from cgaebel:working-incremental-flow-construction); r=pcwalton
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`.

Source-Repo: https://github.com/servo/servo
Source-Revision: f3066c70da80306f68833814025deb589d6eeb2a
2014-10-15 21:27:20 -06:00
Clark Gaebel
be2f0cc040 servo: Merge #3640 - Try to reset flows which need reflow, since reflow isn't yet idempotent (from cgaebel: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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 56989b8dec4aa95a3b484d45f15b23f9b3daaf13
2014-10-14 16:51:30 -06:00
Patrick Walton
07c968075f servo: Merge #3622 - layout: Introduce support for legacy presentational attributes to selector matching, and use it for <input size> and <td width> (from pcwalton:html4ever); r=jdm
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0aeecfc41d5f0c637960fcddf87cc2db3e5efeea
2014-10-14 14:06:36 -06:00
Patrick Walton
58bfe948cb servo: Merge #3654 - layout: Rewrite clipping to be per-display-item instead of having a separate ClipDisplayItem (from pcwalton:clip-reform); r=mrobinson
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

r? @mrobinson

Source-Repo: https://github.com/servo/servo
Source-Revision: fd70b366aeada7f8cb4b2457c04fd07f0ea9b143
2014-10-14 00:42:35 -06:00
Patrick Walton
4a4e34f077 servo: Merge #3650 - layout: Refactor inline layout to remove the code that tried to avoid splitting fragments (from pcwalton:give-up-on-not-splitting); r=glennw
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.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 799d0de0c09420a9657a6a7b5fb814374da31163
2014-10-13 18:36:40 -06:00
Glenn Watson
396ac1d4e4 servo: Merge #3608 - Expose user agent option to DOM navigator interface (from glennw:user-agent-navigator); r=Ms2ger
This also makes command line options available as a global. If we're happy with that change I will go through the rest of the code and update it to avoid passing and cloning the Opts structure.

Source-Repo: https://github.com/servo/servo
Source-Revision: 81620d6bce12819db5b97330e48be52674b39ffb
2014-10-13 15:21:44 -06:00
Patrick Walton
47c280c684 servo: Merge #3639 - Use Gecko's simpler Bloom filter instead of one based on hash (from pcwalton:rewrite-bloom-filter); r=zwarich
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: e048f3f940e124d45b43a53a850177c45907822d
2014-10-10 20:27:39 -06:00
Patrick Walton
4bd9850e8c servo: Merge #3599 - layout: Implement z-index (from pcwalton:z-index); r=glennw
r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: c4ac93b315f058d9a061b20ce64cacbead339f86
2014-10-08 23:33:33 -06:00
Robin Stocker
5468419110 servo: Merge #3612 - Allow to specify port with --devtools option (fixes #3597) (from robinst:devtools-port-option); r=jdm
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. But this is the same for other such options, e.g. `--profile`.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9be266270b2e8d00f4cec0f1b262efce85913640
2014-10-08 08:24:36 -06:00
Simon Sapin
a08ac37856 servo: Merge #3601 - Read user-agent.css at run time. Fix #3516 (from SimonSapin:runtime-ua-stylesheet); r=jdm
When we want to use Servo binaries outside of their `target` build directory, `./resources` is what we’ll need to ship with them.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 8312fde154768c4a5ce133a1aaaf1293529a5558
2014-10-08 00:42:36 -06:00
Glenn Watson
f26bb699bf servo: Merge #3565 - Add cmd line option to set user agent. Improves github when used (from glennw:user-agent); r=mbrubeck
Fixes #3455

Source-Repo: https://github.com/servo/servo
Source-Revision: 3e8aa0592154a3ec5cc8e1167e17bd70b8c7144b
2014-10-06 23:21:32 -06:00
Jack Moffitt
dd31d555a9 servo: Merge #3566 - Fix up and run unit tests (from metajack:fixup-unit-tests); r=mbrubeck
This adds the subpackages to `./mach test-unit`.

Source-Repo: https://github.com/servo/servo
Source-Revision: d4e977a2be1f1fea81c32d1f7024b228cb161966
2014-10-03 09:57:26 -06:00
Patrick Walton
9d4a5b6ac1 servo: Merge #3560 - gfx: Use subpixel positioning for glyphs (from pcwalton:subpixel-glyph-positioning); r=mbrubeck
Improves text rendering significantly.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: adb428a725293fd639a0f188a32f3111ffca4d5b
2014-10-02 09:27:26 -06:00
Keegan McAllister
8578d570cb servo: Merge #3530 - Use string-cache's Namespace type, backed by Atom (from kmcallister:namespace-atom); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 698b916c097ae0272a31a680cba7fc6dbd03ca3d
2014-09-30 02:42:23 -06:00