| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #11653
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fragment debug_id u16 only exists in debug, prod will format mem address
<!-- Please describe your changes on the following line: -->
Each fragment has a `u16` `debug_id` in debug mode, but no `debug_id` in production to save memory. To format a debug id in production, the address of the empty `debug_id` is displayed.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #87 (github issue number if applicable).
<!-- Either: -->
- [X] These changes do not require tests because it looks like it's not possible to mock out `cfg` options in `#[test]`s
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- 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/11442)
<!-- Reviewable:end -->
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
r=pcwalton
Do not create stacking contexts for text fragments
Without this change, each text fragment in a block that establishes a
stacking context will establish its own stacking context. This is
unnecessary and increases the amount of work done during display list
construction. This change should not change output, but should improve
performance.
<!-- 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/11035)
<!-- Reviewable:end -->
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Without this change, each text fragment in a block that establishes a
stacking context will establish its own stacking context. This is
unnecessary and increases the amount of work done during display list
construction.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
WebRender.
This happens asynchronously, just as it does in non-WebRender mode.
This functionality is a prerequisite for doing proper display-list-based
hit testing in WebRender, since it moves the scroll offsets into Servo
(and, specifically, into the script thread, enabling iframe event
forwarding) instead of keeping them private to WebRender.
Requires servo/webrender_traits#55 and servo/webrender#277.
Partially addresses #11108.
|
|/ |
|
|
|
|
|
| |
This is used as a fallback for any characters that don't have glyphs in the
specified font.
|
|
|
|
| |
This fixes #11185.
|
|
|
|
|
| |
The whitespace range was not properly shifted which caused us to adjust the fragment's inline size by the advance of a different set of characters.
This was causing justified text lines to be too long or too short.
|
| |
|
|
|
|
|
|
| |
LineBreaker calls Fragment::strip_trailing_whitespace_if_necessary and then
recalculates the fragment's inline size. But this isn't necessary because
strip_trailing_whitespace_if_necessary already recalculates the size.
|
| |
|
|
|
|
|
|
|
| |
This makes the line breaker determine the final block positions of each
line rather than doing it in a separate pass afterward. Not only does
this simplify the code, it makes `vertical-align` and float placement
interact properly.
|
|
|
|
| |
baselines when aligning inline fragments per CSS 2.1 § 10.8.1.
|
|
|
|
| |
between floats.
|
|
|
|
|
| |
Types generated by `bitflags!` are now private by default. This PR marks them
`pub` where necessary.
|
|\
| |
| |
| |
| |
| |
| |
| | |
Fix some warnings
<!-- 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/10928)
<!-- Reviewable:end -->
|
| | |
|
|/
|
|
| |
Use the SharedStyleContext instead.
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update margins when merging inline fragments
Fixes #10633. 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/10655)
<!-- Reviewable:end -->
|
| |
| |
| |
| | |
Fixes #10633.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Factor out a new `meld_with_prev_inline_fragment` method that mirrors the
existing `meld_with_next_inline_fragment`.
This also fixes a bug in `meld_with_next` that was already fixed in the
`meld_with_prev` by @notriddle in #10419. The bug is that it was traversing
the inline context nodes in the wrong order. It should start at the outermost
enclosing node, since the fragments might be at different nesting levels under
some common ancestor.
|
|/ |
|
|
|
|
| |
legibility.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some minor layout cleanups
* Prevent unnecessary copying in `strip_leading_whitespace_if_necessary`
* Remove unused argument to `adjust_clipping_region_for_children` (silences a compiler warning)
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/10469)
<!-- Reviewable:end -->
|
| | |
|
|/
|
|
|
| |
This allows text layout to generate an empty text fragment if the fragment
contains the insertion point for a text input box.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
r=SimonSapin
ComputedValues is now ServoComputedValues
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.
<!-- 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/10210)
<!-- Reviewable:end -->
|
| |/
| |
| |
| | |
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.
|
|/
|
|
| |
Fixes #10200.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
speculation code.
The old code tried to do the speculation as a single bottom-up pass
after intrinsic inline-size calculation, which was unable to handle
cases like this:
<div>
<div style="float: left">Foo</div>
</div>
<div>
<div style="overflow: hidden">Bar</div>
</div>
No single bottom-up pass could possibly handle this case, because the
inline-size of the float flowing out of the "Foo" block could never make
it down to the "Bar" block, where it is needed for speculation.
On the pages I tried, this regresses layout performance by 1%-2%.
I first noticed this breaking some pages, like the Google SERPs, several
months ago.
|