| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
| |
This was the preferred pattern between the deprecation of Vec::from_elem and
the addition of the count argument to the vec![] macro.
|
| |
|
|
|
|
|
|
| |
for items outside it.
This improves Servo's performance on large pages.
|
|
|
|
|
|
|
|
|
|
| |
absolutely-positioned elements.
This also implements a little bit of the infrastructure needed to
support for fragmentation via support for multiple positioned fragments
in one flow.
Improves Google.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Table columns should be layed out according to the 'direction' property of the
table flow, regardless of the 'direction' property of any table-row,
table-rowgroup, etc. flows.
This fixes a number of the `direction-applies-to-*` tests in the CSS2.1 test
suite.
This also simplifies `propagate_column_inline_sizes_to_child` by separating
the code used for table cells from the code for non-cell flows.
r? @pcwalton
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This was seen in Twitter and the Google SERPs (sometimes).
r? @mbrubeck
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5887)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| | |
its previous sibling.
This was seen in Twitter and the Google SERPs (sometimes).
|
|/ |
|
|
|
|
| |
Improves the Amazon home page.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Known issues:
* Collapsed borders do not correctly affect the border-box of the table
itself.
* The content widths of all cells in a column and the content height of
all cells in a row is the same in this patch, but not in Gecko and
WebKit.
* Corners are not painted well. The spec does not say what to do here.
* Column spans are not handled well. The spec does not say what to do
here either.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
flows and static positions of hypothetical boxes.
Before this change, Servo used one code path that computed the position
of flows with `position: static` or `position: relative` and another
separate code path that computed the position of flows with `position:
absolute` or `position: fixed`. The latter code attempted to duplicate
the former code to determine the static position of hypothetical boxes,
but this was both fragile and incorrect in the case of hypothetical
boxes nested inside floats. In fact, it's impossible to determine the
static position of an absolute flow relative to its containing block at
inline-size assignment time, because that static position could depend
on a float that cannot be placed until block-size assignment!
This patch changes block layout to use the same code path for static
positioning of regular flows and static positioning of absolute flows
where applicable. This both simplifies the code and improves its
efficiency, since it allows the `hypothetical_position` field and
`static_block_offsets` data structure to be removed. Moreover, it
improves correctness in the above case (which the new reftest checks).
This allows the sidebar in Facebook Timeline to be positioned properly.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a bug in finding the top left corner of an RTL block in physical
coordinates. (The old code used the `start` point of the `position` rect,
which is not always the top left.)
It also fixes the setting of `position.start.i` in certain mixed LTR/RTL
cases.
There is still a bug related to `position.size` for RTL blocks with margins.
See the FIXME comments for details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`cellspacing` attribute per HTML5 § 14.3.9.
Table layout code has been refactored to push the spacing down to
rowgroups and rows; this will aid the implementation of
`border-collapse` as well.
This commit also fixes two nasty issues in table layout:
* In fixed layout, extra space would not be divided among columns that
had auto width but had nonzero minimum width.
* In automatic layout, extra space would be distributed to constrained
columns as well even if unconstrained columns with percentage equal to
zero were present.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
§ 12.3-12.5.
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
through display list building.
The old `flow_origin` concept was ill-defined (sometimes the border box
plus the flow origin, sometimes including horizontal margins and
sometimes not, sometimes including relative position and sometimes not),
leading to brittleness and test failures. This commit reworks the logic
to always pass border box origins in during display list building.
|
|
|
|
|
| |
This was making `box-shadow` not show up in many cases, in particular,
but the effects were not limited to that.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch provides some of the groundwork for column spans greater than
1. It implements the column-span CSS property (prefixed so as not to be
exposed to content) as well as the corresponding colspan attribute;
although the former is not well-specified outside of CSS multi-column
layout, INTRINSIC refers to it. Although width is distributed to
spanning columns, they do not yet contribute minimum and preferred
widths; this will be implemented in a follow-up.
Additionally, this patch cleans up some miscellaneous formatting issues
and improves the handling of table rowgroups.
|
|
|
|
|
|
|
|
|
|
| |
I had to use a somewhat unconventional method of computing text
indentation (propagating from blocks down to inlines) because of the way
containing blocks are handled in Servo.
(As a side note, neither Gecko nor WebKit correctly handles percentages
in `text-align`, at least incrementally -- i.e. when the percentages are
relative to the viewport and the viewport is resized.)
|
|
|
|
|
|
|
|
| |
By "idempotent" I mean that later passes do not stomp on data from
earlier passes, so that we can run the passes individually for
incremental reflow. The main change here was to stop overwriting the
"minimum inline-size" field of each column with the column's computed
inline-size.
|
| |
|
|
|
|
|
|
|
|
| |
floats, and make float placement idempotent.
This moves float placement outside sequential block size computation.
Improves the maze solver.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
out-of-flow" and "reconstruct flow" damage bits.
This is needed for good performance on the maze solver.
|
|
|
|
| |
`layout::fragment` and `layout::block` were getting too big.
|
|
|
|
| |
turned on.
|
|
|
|
|
|
|
|
| |
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.
r? @pcwalton
|
|
|
|
|
|
|
|
|
|
|
| |
match L. David Baron's work-in-progress specification.
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.
|
|
|
|
|
|
|
|
| |
matching, and use it for `<input size>` and `<td width>`.
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.
|
|
|
|
|
|
|
|
|
|
| |
writing it to a temporary location and overwriting it.
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
absolutely-positioned elements declared with `display: inline`.
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.
|