Commit Graph

31 Commits

Author SHA1 Message Date
Shing Lyu
7cc92387d4 servo: Merge #13740 - Migrated -Z trace-layout to serde_json (from shinglyu:layout_serde); r=jdm
<!-- Please describe your changes on the following line: -->

Migrated the trace-layout code from old `rustc-serialize` to `serde_json`. This will help us iterate faster on the layout viewer (#13432), #13436, #12675 and fix #12936.
---

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #12936 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a relatively low risk debug tool

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 1c26f44cbb23e7da3b9d63f0223c8d5d43eec958
2016-11-07 02:15:03 -06:00
Patrick Walton
5879e5dfad servo: Merge #11125 - layout: Take margins in the inline direction into account when guessing the inline-size of block formatting contexts (from pcwalton:reddit-block-formatting-context-fix); r=mbrubeck
Fixes the layout on reddit.com.

Partially addresses #10571.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 98863746aecea688884ca5a0e3c2f6f139f6e787
2016-05-11 00:41:00 -07:00
Patrick Walton
089c9216d7 servo: Merge #10691 - layout: Fix float speculation with percentage inline sizes, rewrite vertical alignment, fix inline block ascent/descent computation, and fix absolute inline-block hypothetical boxes (from pcwalton:float-fixes); r=mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 35ba29355f40f27b2febe87aad7d7ffba20160c0
2016-05-04 13:49:23 -07:00
Patrick Walton
8d85b3151a servo: Merge #10623 - layout: Reset values appropriately for floats flowing out of blocks with nonzero inline margins (from pcwalton:reddit-float-fix); r=mbrubeck
These two commits correctly position the hamburger menu icons on http://reddit.com/r/rust.

Source-Repo: https://github.com/servo/servo
Source-Revision: fcb1352e97ece3574eb9bfe6e08d3b97d39e1eba
2016-04-28 10:24:38 -07:00
Patrick Walton
6c4407dbd2 servo: Merge #10458 - layout: Disallow margins from collapsing through block formatting contexts per CSS 2.1 § 8.3.1 (from pcwalton:block-formatting-context-margin-collapse); r=mbrubeck
Closes #10449.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 7d7404333d75cfd1aab3df07597304d5e78617b5
2016-04-15 05:30:28 +05:00
Patrick Walton
25dee06709 servo: Merge #10248 - layout: Only take nonnegative margins into account when estimating inline placement of floats (from pcwalton:float-speculation-with-negative-margins); r=mbrubeck
Otherwise, the heuristics can pass even when there are no floats,
causing block formatting contexts to be speculated to be flowing around
floats that don't exist!

Closes #10237.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 3f733217109a98f559904ebf9935e43e553bd076
2016-03-29 15:34:01 +05:00
Patrick Walton
9698fed872 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:38:41 +05:00
Patrick Walton
c05e7d10da servo: Merge #10198 - layout: Allow floats to have negative ceilings due to negative margins (from pcwalton:negative-ceiling); r=mbrubeck
This fixes `margin-collapse-104.htm`, which is currently accidentally
passing due to lack of #10085. When that PR lands, then that will become
a representative test case.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 9b2ae3a62faafceb3149dc455fc6123de2b306f7
2016-03-26 05:18:25 +05:00
Tim van der Meij
acc3cc0af6 servo: Merge #9713 - Move util::persistent_list to layout (from timvandermeij:move-persistent-list); r=nox
Fixes #9694.

Source-Repo: https://github.com/servo/servo
Source-Revision: 581aa1a14f7a24db9068a94c3fb1e7326aaa7024
2016-02-20 23:45:19 +05:00
Anthony Ramine
a1c9a0bed1 servo: Merge #9686 - Move util::logical_geometry to style (from nox:mv-logical_geometry); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: eee0d4efeba1ee77e864a495b6e1992c8ad088cc
2016-02-18 14:21:29 +05:00
Ms2ger
925f3d6d8f servo: Merge #8562 - Stop exposing the internal details of the layout crate (from Ms2ger:private-layout); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 2be0cb7827c6553b7dfa4d641bf3a1c72372ad3b
2015-11-18 19:03:36 +05:00
Glenn Watson
5c835e208c 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
Johann Tuffe
25ce9ab4be 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
Matt Brubeck
8685a7b74f servo: Merge #6130 - Fixes for layout of RTL floats (from mbrubeck:float-rtl); r=pcwalton
This fixes panics in RTL pages with floats (#6113) and partially fixes the positioning of RTL floats.  There are some remaining issues with the layout of floats in RTL flows, which I'll file follow-up issues for.

Source-Repo: https://github.com/servo/servo
Source-Revision: 360c5d8235ae6fb5c51fba391be92c6cafe88425
2015-05-19 11:29:34 -05:00
Simon Sapin
18ebfd9b8c servo: Merge #5480 - Preliminary steps for CSS Multi-column Layout (from SimonSapin:multicol); r=pcwalton
This add some properties to the style system and a new flow type, but the larger issues of dealing with fragmentation in the flow tree is still an open question.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1e150140bd12624ad357e3168fb496079fb8ec7c
2015-04-28 19:48:45 -05:00
Ms2ger
622e167a6a 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
Patrick Walton
60d1c35a15 servo: Merge #5588 - layout: During inline layout, make place_between_floats use the same line height computation logic as final block size assignment (from pcwalton:line-height-float-placement-redux); r=glennw
Basically, the easiest way to describe the effect of this change is "float placement takes line height into account". It didn't before, which could lead to lines overlapping floats or floats taking up too much vertical space.

Improves Wikipedia.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: d8507cce8c3969a08974f44a9f397e75cbe3131d
2015-04-09 16:47:03 -05:00
Ms2ger
9cc3654446 servo: Merge #5443 - Use more usize (from Ms2ger:int); r=saneyuki
Source-Repo: https://github.com/servo/servo
Source-Revision: a0a1304be08250511e20ed8b378bbf6a34c22bf4
2015-03-29 16:16:01 -06:00
Dan Fox
f81c6d46cc 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
8fbd363d52 servo: Merge #4893 - Upgrade to rustc ba2f13ef0 2015-02-04 (from servo:rustup_2015-01-31); r=Ms2ger,glennw
Ready for review.

Final link step on android fails, but we know how to fix it and will add it to this branch soon.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2cc08f289ab909de44fa09a07b2c43b70ce379b9
2015-02-11 17:24:45 -07:00
Josh Matthews
b11f7d94dc 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
b3c7f9d2ca 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
Glenn Watson
636d338cf6 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
Joseph Crail
6c02d6ca77 servo: Merge #4171 - Fix spelling mistakes in comments (from jbcrail:fix-spelling); r=jdm
I only updated comments, not strings.

Source-Repo: https://github.com/servo/servo
Source-Revision: f451005f4fe075c849de2f3766f5bf84510b8465
2014-12-12 02:12:51 -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
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
528653c1f0 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
Clark Gaebel
c0d7a56ba4 servo: Merge #3590 - Incremental Style Recalc (from cgaebel:slow-incremental-reflow-rebase); r=pcwalton
This patch puts in the initial framework for incremental reflow. Nodes' styles
are no longer recalculated unless the node has changed.

I've been hacking on the general problem of incremental reflow for the past
couple weeks, and I've yet to get a full implementation that actually passes all
the reftests + wikipedia + cnn. Therefore, I'm going to try to land the different
parts of it one by one.

This patch only does incremental style recalc, without incremental flow
construction, inline-size bubbling, reflow, or display lists. Those will be coming
in that order as I finish them.

At least with this strategy, I can land a working version of incremental reflow,
even if not yet complete.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 85b277655f07db1cb99c4d3dee93804735ed0470
2014-10-09 11:21:32 -06:00
Patrick Walton
0c6129e4c9 servo: Merge #3434 - layout: Float table wrappers directly instead of generating a block (from pcwalton:directly-floated-tables)
Reviewed-by: glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: 1fba32af9ff68db73768b4732d003ea7aad09b28
2014-09-25 10:36:33 -06:00
Simon Sapin
a9567001ca servo: Merge #3424 - Add font-size absolute size keywords. Fix #3417 (from SimonSapin:font-size-absolute)
Source-Repo: https://github.com/servo/servo
Source-Revision: 08e004d10650f36af60818fd3c57ca461a97a678
2014-09-19 15:17:55 -07:00
Jack Moffitt
132ee35633 servo: Merge #3230 - Cargoify servo (from servo:cargoify)
Source-Repo: https://github.com/servo/servo
Source-Revision: b1305bb7d051f83850c51bb0da0ccc86a5e07922
2014-09-09 08:18:18 -06:00