Commit Graph

243 Commits

Author SHA1 Message Date
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
Martin Robinson
814dac2156 servo: Merge #3809 - Clip display list based on frame viewport (from mrobinson:display-list-optimization); r=pcwalton
Instead of creating a display list for the entire page, only create one
for an area that expands around the viewport. On my machine this makes
incremental layout of http://timecube.com 50% faster.

Source-Repo: https://github.com/servo/servo
Source-Revision: 26045d7fcbab8851fbefe2851cd904203f8fd8dd
2014-11-12 17:36:32 -07:00
Martin Robinson
30e2e70d2d 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
d73bea71dd 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
Patrick Walton
7c3e67bf72 servo: Merge #3843 - layout: Promote absolute positioning, floatedness, and clearance into flags to avoid virtual calls (from pcwalton:flagify-display-and-position); r=glennw
These were showing up really high in the maze solver profile.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 9f248378f06d4de7c0df01b64e93edcc4de208cf
2014-10-28 20:42:38 -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
Josh Matthews
10c654fd65 servo: Merge #3803 - Add an optional --debug-mozjs argument to mach build that enables a no (from jdm:mozjsdebug); r=mbrubeck
...n-optimized, debug build of mozjs and rust-mozjs. Update the Cargo snapshot to enable new feature support.

Source-Repo: https://github.com/servo/servo
Source-Revision: e100a1834f40599952a790d2537d2b1262585e82
2014-10-24 14:39:33 -06:00
Clark Gaebel
6bb11e0131 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
Patrick Walton
e8423e72fb servo: Merge #3771 - layout: Largely move display list building out to a separate file (from pcwalton:display-list-building-cleanup); r=mrobinson
`layout::fragment` and `layout::block` were getting too big.

r? @mrobinson

Source-Repo: https://github.com/servo/servo
Source-Revision: 01f6a8102dfbb7eaef564acf8891088011905b59
2014-10-22 10:54:35 -06:00
Clark Gaebel
1bacd6dd47 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
Clark Gaebel
b649ed2763 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
704f292f6a 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
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
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
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