Commit graph

38 commits

Author SHA1 Message Date
Martin Robinson
2b99437a80 servo: Merge #10810 - Merge DisplayListEntry into DisplayItem (from mrobinson:displayitem); r=pcwalton
We don't really need two levels of abstraction for every element in the
DisplayList. This simplifies the complexity of the data structure in
preparation for providing documentation and properly handling scrolling
roots.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1fee7185a77424915d517a64685d6f7be40fbd3c
2016-04-26 10:13:00 -07:00
Michael Howell
c0999c0262 servo: Merge #10637 - layout: Do not propagate floats in or out of absolutely positioned flows (from notriddle:absolute_float_line_height); r=pcwalton
Fixes #10625

Source-Repo: https://github.com/servo/servo
Source-Revision: 812c4ad69916e29fe2743cee02ab71b000050987
2016-04-16 04:56:12 +05:01
malayaleecoder
643c9837e8 servo: Merge #10320 - Rename imm_child_iter() and child_iter() (from malayaleecoder:master); r=KiChjang
Fixes #10286

Source-Repo: https://github.com/servo/servo
Source-Revision: 0a1efe4578e43c4ffc2f90ff0118660899a83ac4
2016-04-09 03:25:40 +05:01
Patrick Walton
818acd332f servo: Merge #10085 - layout: Rewrite the block formatting context/float inline-size speculation code (from pcwalton:floats-inout-revamp); r=mbrubeck
The old code tried to do the speculation as a single bottom-up pass
after intrinsic inline-size calculation, which was unable to handle
cases like this:

    <div>
        <div style="float: left">Foo</div>
    </div>
    <div>
        <div style="overflow: hidden">Bar</div>
    </div>

No single bottom-up pass could possibly handle this case, because the
inline-size of the float flowing out of the "Foo" block could never make
it down to the "Bar" block, where it is needed for speculation.

On the pages I tried, this regresses layout performance by 1%-2%.

I first noticed this breaking some pages, like the Google SERPs, several
months ago.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 1554331f06900e69f246ed9986a08aae91a0a71e
2016-03-26 06:39:41 +05:01
Patrick Walton
10e665f8d9 servo: Merge #10064 - layout: Move overflow calculation to be a separate, sequential, bottom-up pass (from pcwalton:overflow-bottom-up); r=mbrubeck
Right now, the only reason that overflow calculation works is that we
rely on script inducing extra reflows that are sent for display. This
was preventing #10021 from landing.

This change regresses layout performance by about 1% in my tests.

Fixes #7797 properly.

r? @mbrubeck
cc @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 8120fb5c2d170d5d9838696a7a5b871a43f57bb2
2016-03-20 00:24:27 +05:01
David Bonet
e6f7b187b0 servo: Merge #10061 - Remove overflow references on AssignBSizesAndStoreOverflow code (from DavidBM:clean_code_removing_overflow_in_assign_bsizes); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: ce2da28a00036e614cee211f4b279dc8e7eac9c1
2016-03-18 01:45:22 +05:01
Patrick Walton
73f8220db0 servo: Merge #9843 - Optimize flat display lists (from pcwalton:optimize-flat-display-lists); r=mrobinson
Flat display lists were a 2x regression on the spheres demo. This patch series fixes that.

See the individual commits for more details.

r? @mrobinson

Source-Repo: https://github.com/servo/servo
Source-Revision: 55fc48e4c46917a0f036d0054fac296bb5719434
2016-03-04 02:20:04 +05:01
Martin Robinson
36406cdba8 servo: Merge #9756 - Flatten display list structure (from mrobinson:flat-display-lists-webrender); r=pcwalton
Instead of producing a tree of stacking contexts, display list
generation now produces a flat list of display items and a tree of
stacking contexts. This will eventually allow display list construction
to produce and modify WebRender vertex buffers directly, removing the
overhead of display list conversion.  This change also moves
layerization of the display list to the paint thread, since it isn't
currently useful for WebRender.

To accomplish this, display list generation now takes three passes of
the flow tree:

        1. Calculation of absolute positions.
        2. Collection of a tree of stacking contexts.
        3. Creation of a list of display items.

After collection of display items, they are sorted based upon the index
of their parent stacking contexts and their position in CSS 2.1
Appendeix E stacking order.

This is a big change, but it actually simplifies display list generation.

Source-Repo: https://github.com/servo/servo
Source-Revision: 62814f7cb486bc267a796b7ce58c51d59240fad0
2016-03-02 05:52:08 +05:01
Bobby Holley
fe09e0f6e2 servo: Merge #9176 - Hoist traversal code into style/ (from bholley:hoist_traversal); r=SimonSapin
This should be the last major hoisting necessary to use the style system standalone. \o/

Source-Repo: https://github.com/servo/servo
Source-Revision: ddc3b7942eea8328e9eb22d864d34fce572d5535
2016-01-08 13:28:39 +05:01
Bobby Holley
9f58567604 servo: Merge #9110 - Hoist the rest of css/matching.rs (and its dependencies) into style/ (from bholley:hoist_matching_and_animation); r=SimonSapin
Slowly but surely.

This goes on top of #9103.

Fixes #9103.

Source-Repo: https://github.com/servo/servo
Source-Revision: f3075d13191df9b9c7858b324122872d057fbe4d
2016-01-04 23:05:35 +05:01
Alexander Mankuta
e779396565 servo: Merge #8796 - Replaced ZERO_POINT with Point2D::zero() (from pointlessone:zero-point); r=SimonSapin
This is a proposed in servo/servo#8792 clean up.

Fixes #8792.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2dbc314e2dec39b8798d4e922dd5220d32083b56
2015-12-04 10:40:59 +05:01
Bobby Holley
4a9f5d05c0 servo: Merge #8669 - Generalize layout to operate on arbitrary DOMs (from bholley:generalize_layout); r=pcwalton
This gets us to where we need to be in order to write a Gecko implementation of the layout wrapper and have things Just Work.

Note that this is somewhat more than we need for just running the style system. But there wasn't a clean place to cut, and I thought it was a good idea to just do a complete job on it now, which may save us effort and mismatches in the long run.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1f732cfbb404bfd96c3ed3f71c4b9900b7ffbba2
2015-11-29 07:18:33 +05:01
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
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
Glenn Watson
40d2827806 servo: Merge #7795 - Split Au type into separate crate, with minimal dependencies (from glennw:app-units-crate); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 35888e5a1d48511ec54ddf8c58f1c7b0c47c5d3c
2015-09-30 15:19:33 -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
3574beaa4c servo: Merge #7600 - layout: Allow the overflow area of the <body> to be scrolled (from pcwalton:body-overflow-scroll); r=mbrubeck
Fixes scrolling on Twitter.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 8d7ba12f28a873880c1f51b122d4fc185294c849

--HG--
rename : servo/tests/html/lipsum.html => servo/tests/html/percentage-body-height.html
2015-09-11 11:20:13 -06:00
Simon Sapin
a0656c9a6b servo: Merge #7237 - Replace FlowRef with Arc<Flow>, now that Arc supports DST (from servo:arc-flow); r=pcwalton
… and `WeakFlowRef` with `Weak<Flow>`.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 1f9778fad90e41ec70e8f54d61e168172635d925
2015-08-21 15:29:35 -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
Josh Matthews
6a81d499fc servo: Merge #7203 - Add automated style nit checks to test-tidy (from jdm:style); r=Ms2ger
Expands on the work by @wilmoz and cleans up the existing errors. Closes #7180. Closes #7111.

Source-Repo: https://github.com/servo/servo
Source-Revision: e74825f9fde8e222f4ba9bb24b2c2a3864c73e5f
2015-08-16 08:37:40 -06:00
Glenn Watson
b4bfd1bd03 servo: Merge #6784 - Implement offsetParent/Top/Left/Width/Height (from glennw:offset-ext); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: d66c59a15213dec17f38af0653e9e7e1bf579a95
2015-08-03 18:39:43 -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
ecoal95
b32a9cd993 servo: Merge #6423 - Use euclid from crates.io (from emilio:euclid); r=glennw
Sorry for not doing it yesterday, I couldn't.

cc @metajack @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 4ebb95ccd8e034007eacb447a054919ef4af2bf7
2015-06-18 20:50:22 -06:00
Simon Sapin
95c8716656 servo: Merge #5935 - Upgrade Rust (from servo:rustup_2015-04-25); r=Ms2ger
r? everybody

Source-Repo: https://github.com/servo/servo
Source-Revision: 49aed6555dbc008c1a378c5cbb303f5467232b6b
2015-05-05 09:11:30 -05: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
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
Manish Goregaokar
0baa68ddf8 servo: Merge #4739 - Fix some warnings (from Manishearth:warning-patrol); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: d373f8dc26239310dec8d2fd66ed72385548cf6f
2015-01-28 02:27:50 -07:00
Ms2ger
7363fc6372 servo: Merge #4708 - Prepare for the rust upgrade (from Ms2ger:rustup-prepare); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 55fbf1f2b6924c50cff6e4ddf359289654f4858a
2015-01-22 08:06:50 -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
Martin Robinson
1628fc65f1 servo: Merge #3857 - Have ContentBox(es)Queries consult the flow tree (from mrobinson:queries); r=pcwalton
Instead of looking at the display tree, have ContentBox(es)Query consult
the flow tree. This allow optimizing away parts of the display tree
later. To do this we need to be more careful about how we send reflow
requests, only querying the flow tree when possible.

Fixes #3790.

Source-Repo: https://github.com/servo/servo
Source-Revision: c9089c45c4b7d40419233b48a192d85a8ad71c99
2014-11-03 12:03:37 -07:00
Patrick Walton
05f1388463 servo: Merge #3837 - layout: Make some formatting cleanups (from pcwalton:layout-formatting-cleanups); r=metajack
These should have no effect on functionality.

r? @metajack

Source-Repo: https://github.com/servo/servo
Source-Revision: 4bdd9a5ec02526b9a407b23dcbf95cc570e6fa56
2014-10-28 17:21:48 -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
39c7ff714e servo: Merge #3686 - Use the Deref traits for FlowRefs (from cgaebel:deref-flows); r=pcwalton
This patch switches FlowRefs to using the Deref and DerefMut traits, instead of
the custom `get` and `get_mut` functions.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6a11ee89de82abae9d6607a6c2890692df5259eb
2014-10-15 16:18: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