| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/
|
|
| |
Fragmentation is not yet supported.
|
| |
|
| |
|
|
|
|
| |
Fixes #3624
|
|\
| |
| |
| |
| |
| | |
(Still off by default. Enable with `RUST_LOG=style`.)
r? @mbrubeck
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
| |
CSS-TEXT-3 § 7.3.
`text-justify: distribute` is not supported.
The behavior of `text-justify: none` does not seem to match what Firefox
and Chrome do, but it seems to match the spec.
Closes #213.
|
|
|
|
| |
Only the one-value syntax is supported for now.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
They are to be removed from the language in the next rust upgrade.
|
|
|
|
| |
Improves Reddit, GitHub, etc.
|
|
|
|
| |
Only the recommended, comma-separated syntax is supported.
|
|
|
|
| |
and fix remaining warnings.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit removes the "merge-fragments" pass from inline reflow,
instead merging "on the fly". This ended up being simpler, as well as
more fine grained. Additionally, this patch makes the line breaker no
longer clone every fragment (!)
This functionality will be used in the implementation of
`text-overflow`.
|
|
|
|
|
|
|
|
|
| |
This property is used by approximately 55% of page loads.
To implement the line breaking behavior, the "breaking strategy" has
been cleaned up and abstracted. This should allow us to easily support
other similar properties in the future, such as `text-overflow` and
`word-break`.
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This adds the infrastructure necessary to support stacking contexts that
are not containing blocks for absolutely-positioned elements. Our
infrastructure did not support that before. This minor revamp actually
ended up simplifying the logic around display list building and
stacking-relative position computation for absolutely-positioned flows,
which was nice.
|
|
|
|
|
|
|
|
| |
floats, and make float placement idempotent.
This moves float placement outside sequential block size computation.
Improves the maze solver.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
first-class.
This implements the scheme described here:
https://groups.google.com/forum/#!topic/mozilla.dev.servo/sZVPSfPVfkg
This commit changes Servo to generate one display list per stacking
context instead of one display list per layer. This is purely a
refactoring; there are no functional changes. Performance is essentially
the same as before. However, there should be numerous future benefits
that this is intended to allow for:
* It makes the code simpler to understand because the "new layer needed"
vs. "no new layer needed" code paths are more consolidated.
* It makes it easy to support CSS properties that did not fit into our
previous flat display list model (without unconditionally layerizing
them):
o `opacity` should be easy to support because the stacking context
provides the higher-level grouping of display items to which opacity
is to be applied.
o `transform` can be easily supported because the stacking context
provides a place to stash the transformation matrix. This has the side
benefit of nicely separating the transformation matrix from the
clipping regions.
* The `flatten` logic is now O(1) instead of O(n) and now only needs to
be invoked for pseudo-stacking contexts (right now: just floats),
instead of for every stacking context.
* Layers are now a proper tree instead of a flat list as far as layout
is concerned, bringing us closer to a production-quality
compositing/layers framework.
* This commit opens the door to incremental display list construction at
the level of stacking contexts.
Future performance improvements could come from optimizing allocation of
display list items, and, of course, incremental display list
construction.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
flags to avoid virtual calls.
These were showing up really high in the maze solver profile.
|
|
|
|
|
|
| |
in display list construction.
These were showing up in the profile.
|
| |
|
|
|
|
| |
16% performance improvement in layout (!)
|
|\
| |
| |
| |
| |
| | |
`layout::fragment` and `layout::block` were getting too big.
r? @mrobinson
|
| |
| |
| |
| | |
`layout::fragment` and `layout::block` were getting too big.
|
|/ |
|
|
|
|
|
|
|
| |
construction to avoid cloning and moving flows so much.
Besides amounting to a 5%-10% win on a page with a lot of text, this
simplifies and refactors the text layout code.
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
directly, and optimize `get_layout_font_group()` to use a small vector.
Seems to be a 38% layout win on a site I tested with a lot of text.
|
|
|
|
|
|
| |
This implements fragment merging, in order to incrementally reflow linebroken
text. This makes the `whitespace_pre.html` reftest pass with incremental reflow
turned on with `-i`.
|
|
|
|
|
| |
This patch switches FlowRefs to using the Deref and DerefMut traits, instead of
the custom `get` and `get_mut` functions.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|