Commit Graph

276 Commits

Author SHA1 Message Date
Martin Robinson
1d6a185bfb servo: Merge #3618 - Include leading margin in inline block size (from mrobinson:layer-sizing); r=pcwalton
Extra size from margins should be included in block size, so that
layers are large enough to include the entire block. This is typically
hidden by large tile sizes (512x512), but fitted tiles makes the issue
a lot more common.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7f26c671377dad073da38058c75b2d3b380b6f16
2014-10-13 10:48:45 -06:00
Patrick Walton
80d30d5673 servo: Merge #3615 - layout: Make box-sizing only affect explicitly-specified or percentage sizes, not automatically computed ones (from pcwalton:box-sizing-fix); r=glennw
Improves GitHub significantly.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: c87f34f877ab4acfb19c48f924068ab1964d397c
2014-10-12 23:45:45 -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
Martin Robinson
d421b28c0e servo: Merge #3617 - Position layers using their absolute position (from mrobinson:layer-positioning); r=pcwalton
Layers are currently all children of the root layer, so instead of
using coordinates relative to the parent flow we should use coordinates
relative to the page.

Fixes #2061.

Source-Repo: https://github.com/servo/servo
Source-Revision: eff0de0ce12b20ffc4806d14c95777004003f2ae
2014-10-08 17:27:33 -06:00
Manish Goregaokar
e58df69b05 servo: Merge #3573 - Remove unused mutable variable (from Manishearth:warnings); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: ae4c9be536bcf386db5b6ad2603ecf874566f6ef
2014-10-06 11:51:32 -06:00
Patrick Walton
b47d6ac21f servo: Merge #3556 - layout: Implement box-sizing: border-box (from pcwalton:box-sizing); r=SimonSapin
Improves GitHub.

Source-Repo: https://github.com/servo/servo
Source-Revision: c7915028b498dc8426cdbb5b35f0ad270613a244
2014-10-01 23:39:26 -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
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
ef2254d096 servo: Merge #3483 - layout: Block formatting contexts should contain all their floats (from pcwalton:block-formatting-contexts-containing-floats)
Reviewed-by: glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: ab17d31bbf8c6884f858381f3d5b7e62c4de87c6
2014-09-26 01:42:27 -06:00
Patrick Walton
8dfaa4b286 servo: Merge #3467 - layout: Enhance the heuristic that guesses the inline size of block formatting contexts (from pcwalton:enhance-block-formatting-context-guess)
Reviewed-by: glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: 20f5fdd000408867ac2d3a90ad9a8b55cfb8bc9e
2014-09-25 19:24:30 -06:00
Patrick Walton
c6e166d8b3 servo: Merge #3472 - layout: Unify the block-size computation for blocks and floats (from pcwalton:unify-block-and-float-layout)
Reviewed-by: glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: 9fb47b7636ca79c64acbf73a2c55cc6bf5cd4917
2014-09-25 17:48:35 -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
Patrick Walton
e6b2857d7a servo: Merge #3475 - layout: Consider relatively positioned blocks as possible block (from pcwalton:block-formatting-context-fixes)
Reviewed-by: glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: e9a7b44f688dacd46ce4971a2a79e42d6a80a8fe
2014-09-25 00:26:42 -06:00
Patrick Walton
8e7fe02560 servo: Merge #3457 - layout: Adjust the position of block formatting contexts based on float placement (from pcwalton:block-formatting-contexts)
Source-Repo: https://github.com/servo/servo
Source-Revision: 6177a3bdcca974d5070b0ecab0973d42963946ec
2014-09-22 20:06:18 -07:00
Patrick Walton
a7ddc126e6 servo: Merge #3454 - layout: Translate floats when clearing non-floated blocks (from pcwalton:float-clear-bug)
Source-Repo: https://github.com/servo/servo
Source-Revision: a6ff0479d9b8ea6a35570765748a6fc86d0dcb47
2014-09-22 17:36:36 -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
Glenn Watson
65afbcd2f4 servo: Merge #3420 - Adds support for table layout trace and updates viewer for tables (from glennw:table-debug)
Source-Repo: https://github.com/servo/servo
Source-Revision: ccda8f204acb014387e92f1ecd47355e9e45ed89
2014-09-19 19:50:47 -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
Glenn Watson
4426bc91ca servo: Merge #3419 - Fix img with display: block. Fixes text/image overflow on wikipedia (from glennw:img-block)
Source-Repo: https://github.com/servo/servo
Source-Revision: 2652d223f50d53ee5a8a07ff4a3d6a25b510d1f1
2014-09-19 19:20:27 +10:00
Matt Brubeck
6697eaf6ae servo: Merge #3339 - Implement percentage heights for block flows. r=SimonSapin (from mbrubeck:percent-height)
Source-Repo: https://github.com/servo/servo
Source-Revision: 66a7de750c303b482572db2d71cf1f90a1c01828
2014-09-16 09:03:04 -07:00
Clark Gaebel
2ce9a1478b servo: Merge #3212 - Added a bloom filter to CSS selector matching (from cgaebel:style-resolution-bloom-filter)
Source-Repo: https://github.com/servo/servo
Source-Revision: ad02534c10d85cc011908fe6b2ba06cfcdcb226c
2014-09-15 22:27:24 -06: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
Glenn Watson
1aae4dbf9b servo: Merge #3272 - Fix layout of Create Account / Login when rendering Wikipedia (from glennw:wikipedia-layout)
Source-Repo: https://github.com/servo/servo
Source-Revision: db3217397b21cae9d1a9ab209b5718aa9c4d72aa
2014-09-10 19:18:43 +10: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