Fix forced repaint on image load
After #10021, `LayoutThread::repaint` no longer forced a repaint because of the `restyle_damage` check. This patch adds the correct restyle damage and fixes#10163.
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/10197)
<!-- Reviewable:end -->
After #10021, `LayoutThread::repaint` no longer forced a repaint because of
the `restyle_damage` check. This patch adds the correct restyle damage and
fixes#10163.
geckolib: Add style structs bindings and documentation
See the description of 6c851c8 to see which incorrect bindings remain. They're just nine types.
cc @bholley @SimonSapin @pcwalton
(I don't know who should review this actually)
<!-- 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/10194)
<!-- Reviewable:end -->
Replace hsts_list, auth_cache, and cookie_jar with http_state
Reverted a few changes
Moved http_state back to factory
Removed unnecessary Arc
Removed Arc for http_state
Only 9 tests failing!
```
bindgen_test_layout_FontFamilyList
bindgen_test_layout_StyleAnimation
bindgen_test_layout_nsFont
bindgen_test_layout_nsStyleBackground
bindgen_test_layout_nsStyleDisplay
bindgen_test_layout_nsStyleFont
bindgen_test_layout_nsStyleGridTemplate
bindgen_test_layout_nsStylePosition
bindgen_test_layout_nsStyleSVG
```
The dependencies are:
* FontFamilyList makes nsFont fail which makes nsStyleFont fail.
* nsStyleGridTemplate makes nsStylePosition fail
* StyleAnimation makes nsStyleDisplay fail
nsStyleGridTemplate and nsStyleSVG failures seem to be bitfield-related.
Except the bitfield-related values and those deps, I don't know what
might cause the other failures, we'll have to check carefully C++
member alignments.
This still fails some tests (20 of 130 IIRC).
Most of them are derived from others, and those who arent I think it's
because of:
1. A vtable: Since we don't generate functions I think we don't do the
vtable calculation.
2. Premature opaque structs: It's the case for nsDataHashtable, where
we generate a 0 byte struct, since we calculate it using sizeof() and
the type is not complete without the type parameters.
3. Some other subtlety? I think we miss a case of enum-in-union or
something like that, that is explicitely disabled in bindgen since the C
standard forbids it. I think it can be enabled without too much problem.
Anyways, I'll leave it for tomorrow! \o/
We *do* generate bindings for them, and they compile fine, but the
expected size for them is not correct.
My guess is that C++ types without members have at least 1 byte to be
addressable.
I'll test that later, but for now we don't care about them...
Fix#10147: Correctly handle flag local_urls_only
In function Request::fetch_main, flag local_urls_only (if set)
should allow fetching local urls only. Before this change, the flag had
the inverse behaviour.
Fixes#10147.
Test with: `./mach test-unit -p net fetch::test_fetch_with_local_urls_only`
<!-- 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/10154)
<!-- Reviewable:end -->
Implement HTMLHyperlinkElementUtils for HTMLAnchorElement
Fixes#7857
Origin is omitted since it's still not available in rust-url, but since the previous PR also left it out, I'm assuming that's okay.
Please let me know if there are any style issues. There might be more concise ways to do the pattern matching that I don't know about, I guessed at the indentation style in one or two places.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9887)
<!-- Reviewable:end -->
Generalize the style structs
This allows geckolib to pass gecko style structs and have the style system write to them directly, provided we implement all the traits.
<!-- 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/10155)
<!-- Reviewable:end -->
add auth cache to resources + set auth header from it if url does not have creds
initial attempt of
- in resource_thread.rs, define an HTTP authorization cache storage (username, password, URL) and instantiate it like the cookie_storage member (inside an Arc<Rwlock<>> value, to enable sharing it between threads)
- in modify_request_headers in http_loader.rs, implement the remaining pieces of step 12(13?) of the appropriate specification using this new authorization cache.
for the NCSU student project Implement HTTP authorization UI and persistent sessions.
<!-- 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/10111)
<!-- Reviewable:end -->
This changes headless operation to strictly be a runtime option, rather
than a compile-time one. Note that the old headless version still relied
on a display server to support WebGL, while it now requires one all the
time.
Fixes#8573
Move `util::str::parse_length` into 'style' component.
The function is only used in the 'style' component, so we'll move it
there alongside other relevant parse functions.
<!-- 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/10171)
<!-- Reviewable:end -->