Several issues are addressed in this commit:
* Inline flows now bubble up their absolute descendants instead of
making the inline flow the containing block for them. (In the future,
we will need to make the inline flow *sometimes* be the containing
block for them, but for now it improves sites to unconditionally
bubble up.)
* Fragments now look at their inline fragment context to determine
whether they are positioned.
* Inline flows now push the stacking-relative position of the absolute
containing block down to their inline-block fragments.
* Inline absolute hypothetical fragments can be containing blocks.
* Fixes the logic in
`containing_block_range_for_flow_surrounding_fragment_at_index`. The
condition to determine whether fragments are positioned was inverted!
* `Descendants`/`AbsDescendants` has been refactored in order to become
more friendly to inline absolute containing blocks in the future.
Improves the inline position of the green drop-down arrow in the Google
SERPs. (The block position is still wrong.)
r? @mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: d654841288ad6c7d4f8d7da3c68d04ef7df2c241
These are caused by page_root being empty.
@jdm, I think it was #6874 that introduced these. I'm seeing them all the time when starting Servo on Reddit with memory profiling enabled. With this patch applied they go away.
Source-Repo: https://github.com/servo/servo
Source-Revision: 72fa45155b93a9763967cf215e3a9e60e3883cd9
Expands on the work by @wilmoz and cleans up the existing errors. Closes#7180. Closes#7111.
Source-Repo: https://github.com/servo/servo
Source-Revision: e74825f9fde8e222f4ba9bb24b2c2a3864c73e5f
This shaves 50 seconds off the build time on my machine.
Source-Repo: https://github.com/servo/servo
Source-Revision: a1aed50b5a2686015bc3a17ec891a56eef8c1fc9
Thanks to @michaelwu for pointing out a copy-paste error.
Source-Repo: https://github.com/servo/servo
Source-Revision: 31413f4313fb96f9d17e54157d404c7633e59fc2
This is necessary for the devtools "Start Recording Performance" button to
send a message.
(This message is not yet supported, so it leads to
'unexpected message type "startRecording" found for actor "performance4"'.)
Source-Repo: https://github.com/servo/servo
Source-Revision: 0080d0de0e0ae95f2d98d81bef9f02ff995e5dd3
... for #3734, which is also one of the oldest issues. (/cc @jdm)
Source-Repo: https://github.com/servo/servo
Source-Revision: 6a52ec94840fbaf43a29d76879e2b59542a9963d
Still needs snapshot.
Snapshot probably could also work as today's nightly (I wasn't able to download the latest one due to choppy internet), there isn't any plugins churn I know of
r? @larsbergstrom
Source-Repo: https://github.com/servo/servo
Source-Revision: 13e7de482c0f58ca5af30dbca5d94e6b9cedd1cd
To handle potential overflow because mallinfo() is ancient.
Source-Repo: https://github.com/servo/servo
Source-Revision: 38c5fb80d3c6c0e08732f5bdb3f0e9f9bf192def
… character boundary" when printing display list.
This whole piece of code seems a bit fragile, but it fixes the immediate problem for now.
Source-Repo: https://github.com/servo/servo
Source-Revision: 7a9458e530a3bd7a679cb21dec8586710cf4a416
Refs: https://github.com/servo/servo/issues/7142
Ran some basic functional tests:
```
$ ./mach run -d -Z bubble-widths,disable-canvas-aa,trace-layout tests/ref/blur_ref.html
$ ./mach run -d -Z help
Usage: /Users/greg/servo/target/debug/servo debug option,[options,...]
where options include
Options:
bubble-widths Bubble intrinsic widths separately like other engines.
disable-text-aa Disable antialiasing of rendered text.
disable-canvas-aa Disable antialiasing on the HTML canvas element.
dump-flow-tree Print the flow tree after each layout.
dump-display-list Print the display list after each layout.
dump-display-list-json Print the display list in JSON form.
dump-display-list-optimized Print optimized display list (at paint time).
relayout-event Print notifications when there is a relayout.
profile-tasks Instrument each task, writing the output to a file.
show-compositor-borders Paint borders along layer and tile boundaries.
show-fragment-borders Paint borders along fragment boundaries.
show-parallel-paint Overlay tiles with colors showing which thread painted them.
show-parallel-layout Mark which thread laid each flow out with colors.
paint-flashing Overlay repainted areas with a random color.
trace-layout Write layout trace to an external file for debugging.
validate-display-list-geometry Display an error when display list geometry escapes overflow region.
disable-share-style-cache Disable the style sharing cache.
parallel-display-list-building Build display lists in parallel.
replace-surrogates Replace unpaires surrogates in DOM strings with U+FFFD. See https://github.com/servo/servo/issues/6564
gc-profile Log GC passes and their durations.
$ ./mach run -d -Z blah
error: unrecognized debug option: blah
Servo exited with return value 1
```
Didn't check that setting debug flags actually did anything.
Haven't written much Rust so this feels more verbose than necessary.
Added `disable-canvas-aa` to debug options help.
Should DebugOptions struct derive Clone like Opts does?
Source-Repo: https://github.com/servo/servo
Source-Revision: f5e97ef1b54b7f85d9c5a55712e802dd70a89f8e
`CGAbstractMethod` takes a couple boolean parameters, among others:
* `extern`: will mark the method as `unsafe` and `extern`
* `unsafe`: will wrap the method body in an `unsafe` block
Passing both as `True` should not mark it as `unsafe` twice.
Example from a generated `HTMLCollectionBinding.rs`:
Before:
```
unsafe extern fn get_length(..) -> u8 {
unsafe {
// code here
}
}
```
After
```
unsafe extern fn get_length(..) -> u8 {
// code here
}
```
Source-Repo: https://github.com/servo/servo
Source-Revision: 289decb064b44937f570fdc299de9af961296dd6
This is sufficient to make the profiler tab show up in Firefox's devtools.
Source-Repo: https://github.com/servo/servo
Source-Revision: 07716780fc805aea63285337ee15e9e56acb47c7
Also adds HeapSizeOf implementations/derive for some types. I've used "Cannot calculate Heap size" as a reason everywhere, because my imagination is rather limited. If you'd like me to change this message for specific types, please write something like this: "Trusted - Cannot calculate Heap size for Trusted" so that it would be easier for me to replace them through a script :)
Source-Repo: https://github.com/servo/servo
Source-Revision: a03616f379c255cc6c9b6e1d04dd7d98bd9926ce
Make the structure for the `stretchiness` and `boldness` methods more
similar
Source-Repo: https://github.com/servo/servo
Source-Revision: 55a9abdf358dd8f05b06849f0d39b4e8ca8f6ba3
This is handled in the 'navigate' algorithm in the specification.
Source-Repo: https://github.com/servo/servo
Source-Revision: e44ae6404fd25ed51a543141ca8f9cc2a3443817
There were two bugs here: (1) relative position applied to
scanned/unscanned text fragments independently of the container element
that applied that relative position, causing double-counting; (2)
relative position applied to inline block fragments independently of the
wrapped block itself, causing double-counting.
Closes#7067.
r? @mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 0bfde427e6a77d09d75b5a6e228c7b25f063395f
I'm not sure if I have to implement some test for a new document method. As I remember there were tests for document methods, is it changed now? Where should I add tests?
Source-Repo: https://github.com/servo/servo
Source-Revision: 0c5158587d997c69ce3c76062b369b8f0714306e
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`
r? @mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 7dc83e7820df43b1b617ae8dcf661398b0bd0842
Snapping the top-left and bottom-right corners separately can cause a rectangle to change size or even become empty when offset by a subpixel amount. Instead, this patch snaps the top-left corner, then snaps the size to a whole pixel amount, so any rectangle of a given original size will always have the same snapped size.
Fixes#7152. r? @pcwalton or @glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: 9c528c6382ee4355f42824a7caad217c4eb8a3b0