| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
REQUIRES_LINE_BREAK_AFTERWARD_IF_WRAPPING_ON_NEWLINES if the fragment can wrap text.
This was making us fall in a loop where the start split was empty, but we didn't
ignore it because the current fragment had this flag, but then we treated it
differently depending on the white_space property.
Not totally sure this is the proper fix, but it makes sense to me. In case it
is:
Fixes #12369.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This is used as a fallback for any characters that don't have glyphs in the
specified font.
|
|
|
|
| |
This fixes #11185.
|
| |
|
|
|
|
|
|
|
| |
Replace character indices with UTF-8 byte offsets throughout the code dealing
with text shaping and breaking. This eliminates a lot of complexity when
converting from one to the other, and interoperates better with the rest of
the Rust ecosystem.
|
|
|
|
|
|
|
|
|
|
| |
Empty fragments may need to be layed out to draw borders, padding/background,
and insertion points. (Fragments that consist of discardable whitespace and
control characters, on the other hand, can still be discarded.)
This ends up preserving some useless empty fragments. It's possible we could
avoid this by storing some sort of flag on "important" empty fragments, so we
can discard the rest.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes two problems that could cause scanned text fragments to end up with
incorrect LAST_FRAGMENT_OF_ELEMENT or FIRST_FRAGMENT_OF_ELEMENT flags:
1. If a single unscanned fragment was split into multiple scanned fragments,
then all of them would inherit its flags. We need to clear these flags,
except for the first and last scanned fragment.
2. When an unscanned fragment generated zero scanned fragments, we correctly
called `meld_with_next_inline_fragment` to transfer LAST_FRAGMENT flags to
the preceding fragment, but we didn't do anything to transfer
FIRST_FRAGMENT flags to the following fragment. We can fix this by calling
`meld_with_prev_inline_fragment` on the following fragment.
|
|
|
|
| |
The idea is to rename all style structs from Foo to ServoFoo, as described out in #10185.
|
|
|
|
|
| |
This allows text layout to generate an empty text fragment if the fragment
contains the insertion point for a text input box.
|
|
|
|
|
|
|
|
| |
Before this fix, if a TextRun containing an insertion point was split into
multiple ScannedText fragments, text layout would draw an insertion point
inside of each of the fragments. This patch records the insertion point
position at most once per TextRun, and copies it only into the appropriate
ScannedText fragment.
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
r=SimonSapin
Renamed TComputedValues to ComputedValues
This is a followup to #10210, and a continuation of #10185.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10277)
<!-- Reviewable:end -->
|
| |
| |
| |
| | |
This is a followup to #10210, and a continuation of #10185.
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Reduce size of layout::fragment::Fragment struct
This reduces the size of the SpecificFragmentInfo enum from 48 to 24.
r? @pcwalton
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10255)
<!-- Reviewable:end -->
|
| |
| |
| |
| | |
This reduces the size of the SpecificFragmentInfo enum from 48 to 24.
|
|/
|
|
| |
This is the first part of #10185. More to follow. I have built this locally with both servo and geckolib without errors; let's see if it succeeds on all platforms as well.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Highlight selected text in input fields
Fixes #9993. This does not yet allow stylesheets to set the selection colors; instead it uses a hard-coded orange background and white foreground.
r? @pcwalton
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10176)
<!-- Reviewable:end -->
|
| | |
|
| |
| |
| |
| |
| | |
Fixes #9993. This does not yet allow stylesheets to set the selection colors;
instead it uses a hard-coded orange background and white foreground.
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This is mostly straightforward. I had to modify a couple of places
which were accidentally discarding whitespace.
Fixes #1513.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This merges import blocks that were reported by tidy as unmerged.
|
|
|
|
| |
throughout layout for input elements.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
margins.
* The code that attempted to strip out borders that span multiple
fragments in the same element could go wrong if fragments were
stripped out due to text clumping or whitespace stripping. This patch
rewrites that code to maintain flags in the inline fragment context
specifying whether the node is the beginning or end of the element.
Not only is this easier to maintain, it's closer in spirit to what roc
originally suggested two years ago: it's isomorphic to "begin element,
end element" markers for inline layout.
* Padding and margins for spans containing inline-blocks are now
properly handled via a division of labor between the `InlineBlock`
fragment and the `BlockFlow` that represents the inline-block.
* Unscanned text fragments may not be joined together into a text run if
borders, padding, or margins separate them.
Because Servo now matches the rendering of Gecko and WebKit on the
`input_button_margins_a` reftest, I had to modify it to add some
vertical alignment.
The combined effect of all of these fixes places "Advertising" on the
right place on google.com.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes Servo unconditionally strip whitespace before text run
scanning (assuming that the `white-space` property allows it). Whitespace
stripping during reflow is now only used for handling whitespace at the ends of
lines; reflow now never attempts to handle ignorable whitespace.
Many CSS tests pass now. There are some new failures, however.
The following reference tests now fail due to a pre-existing bug whereby
whitespace is used to calculate the position of inline hypothetical boxes for
elements with `display: inline; position: absolute`:
* `absolute-replaced-height-036.htm`
* `vertical-align-sub-001.htm`
* `vertical-align-super-001.htm`
The following reference tests fail due to a pre-existing bug whereby we don't
handle `font-size: 0` properly in inline reflow:
* `font-size-zero-1.htm`
* `font-size-zero-2.htm`
The following reference test fails due to the fact that it relied on our
incorrect insertion of whitespace to make room for the black background:
* `inline-formatting-context-007.htm`
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replace Arc<Box<TextRun>> with Arc<TextRun>
Removes an extraneous level of indirection.
r? @pcwalton
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7015)
<!-- Reviewable:end -->
|