Commit graph

54 commits

Author SHA1 Message Date
Bobby Holley
c5e27f41ed servo: Merge #8595 - Generalize the layout wrapper layer (from bholley:generalize_wrappers); r=pcwalton
There's still more refactoring to do, but this is the core stuff that's most likely to bitrot.

Source-Repo: https://github.com/servo/servo
Source-Revision: a5babb89a02b9b84a8cd62554a5ceef9efb0d481
2015-11-19 06:43:40 +05:01
Ms2ger
a2f2801118 servo: Merge #8382 - Remove the unsafe Sync implementation for SharedLayoutContext (from Ms2ger:SharedLayoutContext-sync); r=eefriedman
Source-Repo: https://github.com/servo/servo
Source-Revision: 36cd1866086c97d6612289c9fd10f559d23304cf
2015-11-07 15:50:43 +05:01
Glenn Watson
11639f24e6 servo: Merge #8306 - Change overflow calculation to be calculated after compute_absolute_position (from glennw:fix-abd-overflow); r=pcwalton
Also include absolutely positioned elements in the overflow rect calculation.

Fixes #7797.

Source-Repo: https://github.com/servo/servo
Source-Revision: ca56ebbb09f3c258d10e7a7fa276d42fe258d893
2015-11-04 07:46:58 +05:01
Ms2ger
fad7f9bff1 servo: Merge #8212 - Remove SharedLayoutContext::reflow_root (from Ms2ger:reflow-root); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: b6bcccb204f710665482fa8098084a30126a3bac
2015-10-30 04:53:54 +05:01
Bobby Holley
80d425c0ca servo: Merge #8042 - Remove HAS_DIRTY_SIBLINGS (from bholley:dirty_siblings); r=pcwalton
This isn't doing anything right now, and we're not even setting it properly
in dirty_impl the |dirty_subtree(self)| was causing us to hit the skip case
for step 3.

Source-Repo: https://github.com/servo/servo
Source-Revision: 50ec2353845bf2a3971d5b01db37d2c3741d3912
2015-10-21 12:18:02 -06:00
Ms2ger
8be0065221 servo: Merge #8029 - Some cleanup in layout (from Ms2ger:cleanup-layout); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: e0c8a88410277843714a20d5fced73a392fad861
2015-10-19 11:36:58 -06:00
Matt Brubeck
90a8e44bac servo: Merge #7817 - Remove unused PostorderDomTraversal::should_prune (from mbrubeck:prune); r=nox
r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: e616f4a74c0475cc0f8b33f46b724eb0e6b41b5a
2015-10-05 05:23:20 -06:00
Eli Friedman
2910439f5d servo: Merge #7746 - Delete dead code (from eefriedman:debug-dead-code); r=nox
(#[cfg(debug)] is false in every normal servo configuration, and the
code in question doesn't compile.)

Source-Repo: https://github.com/servo/servo
Source-Revision: d4f5948294545860a88d6a266acaa4cf9b9ea1c6
2015-09-26 10:45:51 -06:00
Ravi Shankar
7d512d50d1 servo: Merge #7698 - sorted the declarations in various files (from Wafflespeanut:sorting); r=frewsxcv
This is a direct extract from my abandoned PR for a lint (#7546), along with some rather clumsy modifications (only on `components/script/dom/mod.rs` and `components/style/lib.rs`), because I had to sort some of the files again to make peace with tidy, which hasn't been educated about sorting yet!

Source-Repo: https://github.com/servo/servo
Source-Revision: a7208869f2903e36f9b2f540b55b50283d7df466
2015-09-23 15:02:56 -06:00
Brandon Fairchild
f7fb1e4b4a servo: Merge #7662 - Check for multiple import blocks separated by whitespace (from nerith:import); r=frewsxcv
Fixes #7381.

Source-Repo: https://github.com/servo/servo
Source-Revision: a0d3c9223f09757124b1520c4f17e94fa8bbe249
2015-09-19 13:34:51 -06:00
Patrick Walton
1c17f3c07c servo: Merge #7313 - layout: Make overflow calculation take relative percentages into account (from pcwalton:position-relative-percentage-overflow); r=mbrubeck
This necessitated changing overflow to be calculated by the parent flow
if relatively positioned children are present. That is because the
overflow regions cannot be calculated without knowing relative offsets,
which themselves cannot be calculated without knowing the parent size
(because of percentages). To accomplish this without sacrificing
parallelism in the non-relative case, this patch splits overflow into
"early" and "late" computation. Late overflow computation cannot be
parallelized across children, while early overflow computation can.

Makes the "Apple Music" text show up over the full-bleed promotional
background on apple.com.

r? @SimonSapin -- would appreciate a look over the iframe test case that was changed.

Source-Repo: https://github.com/servo/servo
Source-Revision: dcaf66397a06246b9b4fdca3a10af1508a11f1e8
2015-09-01 12:33:07 -06:00
Johann Tuffe
5c3a5a67f5 servo: Merge #7265 - Add alphabetical order check for use statements (from tafia:tidy-use); r=Ms2ger
close #7112

Source-Repo: https://github.com/servo/servo
Source-Revision: a5fbb2f2a6fa79755f975feff2435abb6a5dd0e9
2015-08-20 07:43:56 -06:00
Ms2ger
487f354031 servo: Merge #6794 - Remove StyledNode (from Ms2ger:StyledNode); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 0b447651e4e5309c057f2cf2af58b3aa733bb4c4
2015-07-28 17:26:42 -06:00
Simon Sapin
7b6c4c937e servo: Merge #6700 - Update rust-selectors (from servo:selectors); r=Ms2ger
Update for https://github.com/servo/rust-selectors/pull/37

Source-Repo: https://github.com/servo/servo
Source-Revision: 5d857c5d0cac67337ea01895b7cf309359c89cce
2015-07-23 10:55:37 -06:00
Ms2ger
b552054f96 servo: Merge #6650 - Various layout cleanup (from Ms2ger:layout-cleanup); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: e6538c0f2d887bfb244313009490ca67bc1c2298
2015-07-17 09:17:41 -06:00
Michael Wu
fac8c79199 servo: Merge #6546 - Remove LayoutChan from LayoutDataWrapper (from michaelwu:slim-layoutdatawrapper); r=Ms2ger
Saves 32 bytes in Node.

Source-Repo: https://github.com/servo/servo
Source-Revision: cc73aad447f0455606a5a6005d31aa55334668a8
2015-07-05 21:39:12 -06:00
Simon Sapin
112f9f7675 servo: Merge #6468 - Update rust-selectors (from servo:update-selectors); r=Ms2ger
r? @Ms2ger

https://github.com/servo/rust-selectors/pull/33

Source-Repo: https://github.com/servo/servo
Source-Revision: c331db1623719774c3ead554bcdca0b9c02d90fe
2015-06-26 14:50:01 -06:00
Nicholas Nethercote
2b915bbedc servo: Merge #6289 - Make LOCAL_CONTEXT_KEY safe and non-leaky (from nnethercote:unleak-LOCAL_CONTEXT_KEY); r=pcwalton
`LOCAL_CONTEXT_KEY` is currently a `Cell<*mut LocalLayoutContext>`. The use
of the raw pointer means that the `LocalLayoutContext` is not dropped when
the thread dies; this leaks FreeType instances and probably other
things. There are also some unsafe getter functions in `LayoutContext`
(`font_context`, `applicable_declarations_cache` and
`style_sharing_candidate_cache`) that @eddyb says involve undefined
behaviour.

This changeset changes `LOCAL_CONTEXT_KEY` to
`RefCell<Option<Rc<LocalLayoutContext>>>`. This fixes the leak and also
results in safe getters.

(Fixes #6282.)

Source-Repo: https://github.com/servo/servo
Source-Revision: 0dec64caf01c98d10e72b73e35b994127c23e81f
2015-06-09 15:52:45 -06:00
Corey Farwell
333cc6c59d servo: Merge #6174 - Reduce max line length from 150 to 120 characters (from frewsxcv:cleanup-long-lines); r=SimonSapin
Part of https://github.com/servo/servo/issues/6041

Source-Repo: https://github.com/servo/servo
Source-Revision: 542519ebfd073662bc9421ac5fa0aa01ebc0d6fe
2015-05-24 18:27:26 -05:00
Patrick Walton
b776a7f734 servo: Merge #6053 - compositing: Implement display ports and avoid creating display lists for items outside it (from pcwalton:displayports); r=glennw
This improves Servo's performance on large pages.

Please double-check the logic when it comes to nested layers—I'm sure I've messed up some of the geometry calculations :)

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 0880e54f987bac7c34c934ef6ee36f46475b06e3

--HG--
rename : servo/tests/html/lipsum.html => servo/tests/html/lipsum-large.html
2015-05-19 19:40:36 -05:00
Patrick Walton
5d9538d101 servo: Merge #6124 - layout: Support inline incremental reflow, and stop reconstructing all flows when mousing over the document (from pcwalton:inline-incremental-reflow); r=mbrubeck
r?

Source-Repo: https://github.com/servo/servo
Source-Revision: 16793d0e24ed49245e5777bc282839e4c157a091
2015-05-19 13:51:30 -05:00
Patrick Walton
7e998ce40e servo: Merge #5991 - layout: Store overflow for flows impacted by floats (from pcwalton:float-overflow-area); r=glennw
Makes qz.com visible.

In order to work around a compiler bug involving Sized, this patch moves
`store_overflow` to be a virtual method.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 5a13cae064c4418923fe35bb7e07c71f5bfd851e
2015-05-11 16:08:46 -05:00
Glenn Watson
44de6bcde1 servo: Merge #5913 - Various fixes to getClientBoundingRect() (from glennw:bounding-rect); r=pcwalton
* Fix queries involving stacking contexts
 * The code was double accumulating stacking context origins.
* Handle queries of inline elements.
 * The node addresses being compared were incorrect (CharacterData vs. Span)
* Handle ScriptQuery reflows correctly.
 * The layout task was skipping the compute absolute positions traversal, so failed before window.onload.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5f6a740190e1e5912d84162c92c6b79365df165a
2015-05-01 13:15:23 -05:00
Ms2ger
33e1b9c8ab servo: Merge #5888 - Prepare for the rustup (from Ms2ger:prepare-rustup); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: ab2d07db1fabd7ad9590aa7296038bbc91806c3f
2015-04-28 17:52:49 -05:00
Ms2ger
c64ea30626 servo: Merge #5486 - Stop using int/uint in layout (from Ms2ger:int); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: d999fb9db0d572f63165fa8aa2e24023903b6332
2015-04-02 08:06:41 -06:00
Patrick Walton
c9e2901806 servo: Merge #5400 - layout: Implement CSS transitions per CSS-TRANSITIONS § 2 (from pcwalton:transitions-redux); r=glennw
Transition events are not yet supported, and the only animatable
properties are `top`, `right`, `bottom`, and `left`. However, all other
features of transitions are supported. There are no automated tests at
present because I'm not sure how best to test it, but three manual tests
are included.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: ebdf1d494b6c986e6dfcb7d8fd3f0ffa126523ed
2015-03-31 10:39:56 -06:00
Ms2ger
6e049e2b87 servo: Merge #5437 - Remove some int/uints (from Ms2ger:int); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 7d0d8514565d898123411ece56bfb09e578dbe1c
2015-03-29 03:49:01 -06:00
Manish Goregaokar
5dbe6eb389 servo: Merge #5296 - Replace unsafe_blocks by unsafe_code (from servo:unsafe_code); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 29a36adbe7d87fb38ba9bef3a718c6c823fb5977
2015-03-21 05:12:45 -06:00
Patrick Walton
c4615436ae servo: Merge #5160 - layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1 § 12.3-12.5 (from pcwalton:counters-redux); r=SimonSapin
Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.

Reconstructed from #5138 via raw diffing.

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: fd1bb49a65dd998c8ef9890a1576aaf62ddfdba1
2015-03-09 23:24:47 -06:00
James Gilbertson
9b5d597d38 servo: Merge #5154 - Implement 'vw', 'vw', 'vmin', 'vmax' CSS length units (from luniv:viewpoint-percent-lengths); r=SimonSapin
Spec: http://dev.w3.org/csswg/css-values-3/#viewport-relative-lengths
Source-Repo: https://github.com/servo/servo
Source-Revision: a557b51c28aaba398fd85f86af909ec623e2350f
2015-03-05 18:55:02 -07:00
Dan Fox
f6711c6464 servo: Merge #5135 - Fix 5120 rename layout util (from iamdanfox:fix-5120-rename-layout-util); r=jdm
A simple rename/refactor (https://github.com/servo/servo/issues/5120)

My first servo contribution!

Source-Repo: https://github.com/servo/servo
Source-Revision: 7fc37dfaa76c9265e6d2145fe5ef2fba5f6bd013
2015-03-05 11:09:58 -07:00
Simon Sapin
9d0586a22d servo: Revert "layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1"
This reverts commit 30fd28d1077fbb3f47140f6ab1252c0d24f44d23.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4c1d778ced267eeef790d4166e361d9348b933d3
2015-03-03 21:16:24 +01:00
Simon Sapin
73082d1626 servo: Merge #5067 - layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1 § 12.3-12.5 (from servo:counters); r=SimonSapin
Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.

Moved from #4544, because Critic.

Fixes #4544.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5cd6316addc1acf145ed3220719387ef6ef08d2f
2015-03-03 10:42:52 -07:00
Simon Sapin
40036d9f8a servo: Merge #5010 - Move selector matching to an external library, for use outside Servo (from SimonSapin:external-selectors); r=larsberg
The new library is https://github.com/servo/rust-selectors. It’s not quite ready for other users (the API needs work), but this is a first step.

https://github.com/servo/rust-selectors/pull/2 should also be reviewed.

Fixes #3669.

Source-Repo: https://github.com/servo/servo
Source-Revision: 91abf5557b1a324d6568ce08cfb92cdffca10e41
2015-02-23 08:39:47 -07:00
Nicholas Nethercote
60061c31b2 servo: Merge #4938 - Avoid bloom filter churn (from nnethercote:dont-clone-bloom-filter); r=Ms2ger
When a cached bloom filter is found during traversal, there are two
cases, both of which currently do unnecessary allocations. This patch
avoids these allocations. In the process, it renders correct two
previously-incorrect comments, and moves one of those comments into a
better spot.

While scrolling moderately fast all the way through the "Guardians of
the Galaxy" Wikipedia page, this patch (a) avoids 1.2 million calls to
`clone()` and (b) replaces 111,000 `BloomFilter::new()` calls with
`clear()` calls.

Source-Repo: https://github.com/servo/servo
Source-Revision: a45265231797355d08e891be360b2e10bd8df37b
2015-02-16 15:54:48 -07:00
Ms2ger
f6f1990ef0 servo: Merge #4869 - Various layout cleanup (from Ms2ger:layout-unsafe); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1a47f176ffb059a7a3f29f94485859163cb1284b
2015-02-08 21:00:43 -07:00
Simon Sapin
f19ec826ce servo: Merge #4757 - Bring CSS parse error reporting back (from servo:newnewnewcss); r=mbrubeck
(Still off by default. Enable with `RUST_LOG=style`.)

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 172aed535be3c34775824dac64ad2b91fc379ad5

--HG--
rename : servo/components/style/properties/mod.rs.mako => servo/components/style/properties.mako.rs
2015-01-30 15:27:53 -07:00
Josh Matthews
78741af324 servo: Merge #4719 - Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev (from servo:rustup_20150109); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 3f9012864a2cd927cf17a8e11dfa6922add1b7df
2015-01-27 18:15:50 -07:00
Ms2ger
e5578c14fd servo: Merge #4554 - Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19 (from servo:rustup_20141221); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1d7148c79f9124779a910fd5291c5fa0543b2dae
2015-01-08 08:00:57 -07:00
Patrick Walton
707d7cd93e servo: Merge #4460 - layout: Paint stacking contexts' overflow areas properly (from pcwalton:stacking-context-overflow); r=glennw
This was making `box-shadow` not show up in many cases, in particular,
but the effects were not limited to that.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 499d17f564d699e5e290e8a3859f64e7536827a7
2015-01-04 18:51:48 -07:00
Glenn Watson
b185394a0f servo: Merge #4405 - Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d (from servo:rustup_20141124); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: fbf42c951b2f53d91e2f32f8035484a07ea83493
2014-12-17 18:45:49 -07:00
Glenn Watson
22c4035692 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
Patrick Walton
c0e4f093a6 servo: Merge #3860 - layout: Make incremental reflow more fine-grained by introducing "reflow out-of-flow" and "reconstruct flow" damage bits (from pcwalton:reflow-out-of-flow); r=glennw
This is the last PR and most of the work for the maze solver and RoboHornet.

r? @glennw
cc @cgaebel

Source-Repo: https://github.com/servo/servo
Source-Revision: 035ff19e4a5995989c5fd34928af2a6690bb8062
2014-10-31 14:39:34 -06:00
Clark Gaebel
02d8a36841 servo: Merge #3828 - layout: Implement flow tree dumping with RUST_LOG=debug is on (from cgaebel:layout-node-dumping); r=pcwalton
r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 2d8bd10abefe5cee9b60900911d41bb47323d248
2014-10-28 13:12:52 -06:00
Clark Gaebel
5dbbd0fd44 servo: Merge #3741 - Clear reflow flags after reflow (from cgaebel:clear-reflow-flags); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: a07b80bd569608f10318bd3569450eb27e01603e
2014-10-22 18:48:31 -06:00
Clark Gaebel
81a95caa86 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
feabe3b678 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
Clark Gaebel
aaa4f1720f servo: Merge #3706 - Fix image_dynamic_remove reftest with incremental layout turned out (from cgaebel:fix-image-dynamic-remove); r=pcwalton
This also adds some extra debugging infrastructure which I found useful tracking
this bug down. A regression in the br reftests is also uncovered by this patch,
which I'll work on fixing next.

EDIT: nevermind. no regression, I just tested that before a rebase.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: b86344b697f814b982e52f4a72c26d58c915c37b
2014-10-17 12:15:23 -06:00
Clark Gaebel
f081b5599e servo: Merge #3668 - Removes duplicate CSS selector matching logic (from cgaebel:sequential-reflow); r=pcwalton
Now that DOM/Flow traversals have been refactored out, the `recalc_style_for_subtree`
function in `css/matching.rs` can be removed, in lieu of just running the standard
`recalc_style_for_node` and `construct_flows` traversals sequentially. Now we
no longer have the maintenance headache of duplicating selector matching logic
in two places! \o/

This passes reftests with both default arguments, and with `-y 1`.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 7eaeaeeb217e7cbd083fe318863e7de4b9f38e2b
2014-10-14 19:33:28 -06:00
Clark Gaebel
3443a24780 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