Commit Graph

22 Commits

Author SHA1 Message Date
Patrick Walton
9df551f68e servo: Merge #3609 - layout: Rewrite intrinsic inline-size and automatic table layout to match L. David Baron's work-in-progress specification (from pcwalton:tables); r=SimonSapin
http://dbaron.org/css/intrinsic/

Column spans are not yet supported.

This effectively adds support for percentage widths, and it also fixes
many bugs, improving the layout of Google and Wikipedia.

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: e2d7777c41135b71293c195d2a9d7a1bc2afd0ca
2014-10-14 15:42:32 -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
Glenn Watson
9788edd8c1 servo: Merge #3674 - Change accidental println to debug macro (from glennw:remove-println)
Source-Repo: https://github.com/servo/servo
Source-Revision: 5351c8572f564314f760037b9bcd355b43afa3aa
2014-10-13 22:39:15 -07: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
Patrick Walton
813b44f111 servo: Merge #3631 - layout: Store containing block inline-size separately rather than writing it to a temporary location and overwriting it (from pcwalton:idempotent-inline-size); r=glennw
This makes layout more idempotent, which is important for incremental
layout.

Also converts `is_root` to a set of flags and fixes a `TODO` concerning
percentage inline heights of images.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 7902ccf8507a7ec31515bfb5824dc4727564fe4d
2014-10-13 18:03:40 -06:00
Patrick Walton
4cdf72533b servo: Merge #3604 - layout: Make content of display: inline-block; overflow: hidden visible (from pcwalton:inline-block-overflow-hidden); r=glennw
Makes lots of GitHub appear.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: a92e55597e03d6a7b71e8178cf4a7a6d760f94be
2014-10-13 15:54:41 -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
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
Patrick Walton
ea75d56860 servo: Merge #3603 - layout: white_space::pre should not yield ignorable whitespace (from pcwalton:pre-ignorable-whitespace); r=mbrubeck
Improves the Google home page.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: c628d11e6f8defbdaa4438f990b566272a3b0eff
2014-10-08 01:15:36 -06:00
Patrick Walton
9798446c46 servo: Merge #3546 - layout: Implement the correct hypothetical box behavior for absolutely-positioned elements declared with display: inline (from pcwalton:absolute-inline); r=glennw
Although the computed `display` property of elements with `position:
absolute` is `block`, `position: absolute; display: inline` can still
behave differently from `position: absolute; display: block`. This is
because the hypothetical box for `position: absolute` can be at the
position it would have been if it had `display: inline`. CSS 2.1 §
10.3.7 describes this case in a parenthetical:

"The static-position containing block is the containing block of a
hypothetical box that would have been the first box of the element if
its specified 'position' value had been 'static' and its specified
'float' had been 'none'. (Note that due to the rules in section 9.7 this
hypothetical calculation might require also assuming a different
computed value for 'display'.)"

To handle this, I had to change both style computation and layout. For
the former, I added an internal property
`-servo-display-for-hypothetical-box`, which stores the `display` value
supplied by the author, before the computed value is calculated. Flow
construction now uses this value.

As for layout, implementing the proper behavior is tricky because the
position of an inline fragment in the inline direction cannot be
determined until height assignment, which is a parallelism hazard
because in parallel layout widths are computed before heights. However,
in this particular case we can avoid the parallelism hazard because the
inline direction of a hypothetical box only affects the layout if an
absolutely-positioned element is unconstrained in the inline direction.
Therefore, we can just lay out such absolutely-positioned elements with
a bogus inline position and fix it up once the true inline position of
the hypothetical box is computed. The name for this fix-up process is
"late computation of inline position" (and the corresponding fix-up for
the block position is called "late computation of block position").

This improves the header on /r/rust.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: f7d2fb6ff86afff7a5b674f751af9370a5a6b142
2014-10-01 19:36:25 -06:00
Josh Matthews
2dfdae3733 servo: Merge #3520 - Implement basic form control support (from jdm:formcontrols); r=pcwalton
So far the changes to layout seem fairly well-contained; I think this is worth integrating to give us a browser that is easier to dogfood (and allows us to work on things like form submission much easier), especially since the long-term viability of WebComponents-as-forms is not assured.

Source-Repo: https://github.com/servo/servo
Source-Revision: f80096069592b864221abe112eaf2ecb6c444fda
2014-10-01 16:45:29 -06:00
Glenn Watson
fbe6aa4d26 servo: Merge #3523 - Add support for <super> and <sup> tags. Fixes equations on wikipedia (from glennw:wiki-equations); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: b2ff320aecab80b06aeedad440c28b23b2dc3824
2014-09-29 15:36:26 -06:00
Simon Sapin
b3423c8393 servo: Merge #3487 - Upgrade Rust and enable style crate rustdoc (from servo:rustup-20140923); r=Ms2ger
The biggest language change is that enum variants now also reserve (for future use) a name in the type namespace, which must not collide with other types. Some things were renamed, and others qualified as `module::name`.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7409685589c550ee7a9f94182f511acddab4c6fd
2014-09-29 10:45:27 -06:00
Glenn Watson
9e168f34e8 servo: Merge #3486 - Improve acid2. Fix line height calculation. Text fragments get correct enclosing element style (from glennw:inline-fixes)
Reviewed-by: pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 94b7c486b12a50298f0706fce42b70a6ca90cdcb
2014-09-26 21:57:35 -06:00
Patrick Walton
8c9531a007 servo: Merge #3458 - layout: Implement white-space: nowrap (from pcwalton:whitespace-nowrap)
Source-Repo: https://github.com/servo/servo
Source-Revision: d9f836bc75c0d6e4e813d9f74819bd8578742598
2014-09-23 20:22:33 -07:00
Simon Sapin
e245f210fb servo: Merge #3438 - Upgrade Rust (from servo:rustup)
Source-Repo: https://github.com/servo/servo
Source-Revision: 045328c8e94f5bdfcd67105c5dfa9209f4cd501c
2014-09-20 15:35:08 -07:00
Patrick Walton
8d26ada345 servo: Merge #3430 - layout: Make percentage heights propagate through inline flows (from pcwalton:inline-block-percentage-height)
Source-Repo: https://github.com/servo/servo
Source-Revision: c51b8a07acbbfa8539b9234c7717a9af53a9e2b8
2014-09-19 23:05:55 -07: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
Matt Brubeck
118121ccbe servo: Merge #3414 - Fix line splitting in white-space: pre flows. r=gw (from mbrubeck:pre-line-break)
Source-Repo: https://github.com/servo/servo
Source-Revision: b11a110e85ca5670a1d492b6deb616fe8a90cf5b
2014-09-18 19:30:37 -07:00
Glenn Watson
32b09f9347 servo: Merge #3286 - Implement basic support for display: inline-block (from glennw:inline_block)
Source-Repo: https://github.com/servo/servo
Source-Revision: b64f27b2b69996508eed0a76acc7414a791b1a9e
2014-09-12 21:11:27 -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