Commit graph

25052 commits

Author SHA1 Message Date
Simon Sapin
53ce714005 Fix a “Accessing content size that was not requested” panic
Percentage `width` are treated as `auto` for the purpose of
min/max-content computation, so they also need to be considered
when testing “wether width is auto”
2019-12-10 15:11:53 +01:00
Simon Sapin
a17db217a1 Struct with named fields over large tuple 2019-12-10 15:11:53 +01:00
Simon Sapin
be8df1d114 Move solve_axis function to module level 2019-12-10 15:11:53 +01:00
Simon Sapin
29067225a4 Conditionsals over closures 2019-12-10 15:11:53 +01:00
Simon Sapin
c07c980501 Delayed initialization over mutation 2019-12-10 15:11:53 +01:00
Simon Sapin
1fa20e93d0 Implement replaced abspos 2019-12-10 15:11:53 +01:00
Simon Sapin
1fcdde99cb Move two AbsoluteBoxOffsets fields into a Vec2 2019-12-10 15:11:53 +01:00
Simon Sapin
f09c14aa6b impl From<&'_ DefiniteContainingBlock> for ContainingBlock 2019-12-10 15:11:53 +01:00
Simon Sapin
14ddf39215 Rename ReplacedContent::used_size to used_size_as_if_inline_element 2019-12-10 15:11:53 +01:00
Simon Sapin
e86222d6bb Remove AbsoluteBoxOffsets’s type parameter 2019-12-10 15:11:53 +01:00
Simon Sapin
f43dc3afcb Remove inline/block_size from AbsolutelyPositionedFragment 2019-12-10 15:11:53 +01:00
Simon Sapin
80b2b5fb5e Fix min/max-content of replaced boxes 2019-12-10 15:11:53 +01:00
Simon Sapin
8996be3c5e Don’t assume replaced elements have an intrinsic size 2019-12-10 15:11:53 +01:00
bors-servo
4d5bf653f7
Auto merge of #25217 - pshaughn:fix25150, r=jdm
hidden field named _charset_ now appears in FormData as UTF-8

<!-- Please describe your changes on the following line: -->
HTMLInputElement now has special case logic for putting a hidden field named `_charset_` in an entry set. To support this, the encoding used when constructing a form dataset is now being passed further down the callchain than it was before.

---
<!-- 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 #25150

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2019-12-10 07:50:27 -05:00
Simon Sapin
b73eb49a58 Add sizing of inline replaced boxes 2019-12-10 12:36:43 +01:00
Simon Sapin
c40583b644 Move replaced box used size computation to a method of ReplacedContents 2019-12-10 12:36:43 +01:00
Simon Sapin
bf96988260 Add min/max-width/height support for inline-block
(… and other non-replaced atomic inline-level boxes.)
2019-12-10 12:36:43 +01:00
Simon Sapin
999dd72895 Account for min/max-width in outer intrinsic sizing 2019-12-10 12:36:43 +01:00
Simon Sapin
ce7e84be72 Replace percent_resolved_* functions with methods 2019-12-10 12:36:43 +01:00
Simon Sapin
a2c2b294d5 Move clamp_* functions to methods of Length 2019-12-10 12:36:43 +01:00
Kunal Mohan
d60f7d87c8
Undo changes done to change worker_id type to string 2019-12-10 13:12:54 +05:30
Kunal Mohan
d5475fbc9f
WorkerId changed to type UUID. 2019-12-10 13:12:54 +05:30
Kunal Mohan
5c56e661ca
worker_id type changed to uuid
Fixes #6631
`worker_id` is now generate as uuid and saved as string.
2019-12-10 13:12:53 +05:30
Gregory Terzian
ed88a67cca remove unnecessary thread in filereader, add stream TODO 2019-12-10 14:55:22 +08:00
bors-servo
03a47c803c
Auto merge of #25201 - xu3u4:25183-add-onformdata-to-global-event-handler, r=jdm
Add onformdata to GlobalEventHandlers

<!-- Please describe your changes on the following line: -->
1. Adding `onformdata` to GlobalEventHandlers interface and global_event_handlers macro.
2. Deleting related FAIL tests.

---
<!-- 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 #25183 (GitHub issue number if applicable)

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2019-12-10 01:30:38 -05:00
bors-servo
64c9928b2e
Auto merge of #25203 - servo:text-align, r=nox
Implement `text-align` (except `justify`)
2019-12-10 00:20:55 -05:00
bors-servo
ebe432bf58
Auto merge of #25202 - Eijebong:domtokenlist_replace, r=jdm
Return a boolean from DOMTokenList::replace to match the spec

Fixes #25129
2019-12-09 22:26:27 -05:00
bors-servo
1974c875a1
Auto merge of #24976 - Darkspirit:openssl, r=avadacatavra
Add ALPN and signature algorithms to OpenSSL config

* Updated http crate from 0.1.17 [to 0.1.20](https://github.com/hyperium/http/blob/master/CHANGELOG.md#0120-november-26-2019).
* Updated hyper from 0.12.33 [to 0.12.35](https://github.com/hyperium/hyper/compare/v0.12.33...v0.12.35).
* Updated hyper-openssl from 0.7.0 [to 0.7.1](https://github.com/sfackler/hyper-openssl/blob/master/CHANGELOG.md#v071---2019-03-01).
* Updated openssl crate from 0.10.11 [to 0.10.26](https://github.com/sfackler/rust-openssl/blob/master/openssl/CHANGELOG.md#v01026---2019-11-22).
  * Set ALPN to h2+http/1.1 for https (Enabled HTTP2) and http/1.1 for websockets.
  * Restricted signature algorithms to the same list across platforms: EdDSA at first, then ECDSA certificates, then TLS 1.3's RSA(-PSS), then classic RSA (PKCS 1.5).
Thereby we disabled the [following](https://www.ssllabs.com/ssltest/viewClient.html?name=OpenSSL&version=1.1.1c&key=165) non-web-standard signature algorithms: SHA512/ECDSA, SHA224/ECDSA, SHA1/ECDSA, SHA224/RSA, SHA224/DSA, SHA1/DSA, SHA256/DSA, SHA384/DSA, SHA512/DSA. [SHA1/RSA](https://tools.ietf.org/html/draft-ietf-tls-md5-sha1-deprecate-00) is almost dead and now only used by a few old and broken F5 load balancers: Like TLS 1.0 deprecation, we can again deprecate this some months earlier than other browsers.
  * Added Chacha20 to TLS 1.2 ciphersuite list and preferred it like Firefox and [Rustls](4b13a322c0/rustls/src/suites.rs (L377)). Removed legacy and privacy-hostile plain RSA (AES256-SHA, AES128-SHA).
Compared to [Mozilla intermediate v5](https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29) we keep ECDHE-RSA-AES256-SHA and ECDHE-RSA-AES128-SHA for now, but won't reintroduce deprecated DHE.
  * Switched server-side to [Mozilla intermediate v5](https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29) in components/net/tests/main.rs. (The new `modern` would have been TLSv1.3-only, therefore only worked with OpenSSL 1.1.1 which is unfortunately not yet used on every target.)
  * Renamed `ssl_connector_builder(certs)` to the more neutral and long-term better fitting `create_tls_config(certs, alpn)` as it was done in #24764.

---
<!-- 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
2019-12-09 19:21:43 -05:00
bors-servo
86fae5894e
Auto merge of #25188 - asajeffrey:canvas-moar-gl-error-checking, r=Manishearth
Add extra debug assertions for WebGL errors

<!-- Please describe your changes on the following line: -->

Add some extra debug assertions checking for GL errors, so we'll get a bit more help tracking down issues like #24788

---
<!-- 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 do not require tests because

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2019-12-09 13:55:10 -05:00
Patrick Shaughnessy
7f41b1b294 hidden field named _charset_ now appears in FormData as UTF-8 to fix #25150 2019-12-09 12:45:14 -05:00
bors-servo
e8d677ad26
Auto merge of #25158 - jdm:wr-spatial-panic, r=SimonSapin
Fix "Tried to use SpatialId before it was defined" layout panic

In the case where an element uses `text-overflow: ellipsis` and causes overflow, we create a TruncatedFragment that wraps the original overflowing fragment. When collecting stacking contexts for the truncated fragment, https://github.com/servo/servo/pull/18510 addressed the case where the wrapped fragment wouldn't be processed, but neglected the case where that fragment ends up creating a new stacking context. When that happens, the TruncatedFragment would be stuck with the updated scrolling/clipping information based on the new stacking context, but it would be a child of the parent stacking context. Since the new scrolling/clipping nodes do not exist in the display list until the new stacking context display item is created, this led to the observed panic.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24895 and fix #19281 and fix #22826.
- [x] There are tests for these changes
2019-12-09 08:23:10 -05:00
Josh Matthews
6dad51f570 layout: Ensure truncated fragment is updated with results of collecting inner fragment's stacking contexts. 2019-12-09 09:57:48 +01:00
bors-servo
013bb662cb
Auto merge of #25035 - szeged:wgpu-core, r=jdm
Replace wgpu-native with wgpu-core

<!-- Please describe your changes on the following line: -->
This addresses `1` form https://github.com/servo/servo/issues/24706#issuecomment-557891841.
cc @jdm @kvark @imiklos

---
<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/25035)
<!-- Reviewable:end -->
2019-12-08 14:38:40 -05:00
bors-servo
136366bf64
Auto merge of #25161 - paulrouget:cachedMsgs, r=jdm
devtools: save and send cached messages

@jdm the only real difference between your original patch and this PR is the removal of the `GetCachedMessages` messages that are not necessary anymore now that we directly send the message to the devtools.

---
<!-- 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 #13161 (GitHub issue number if applicable)
2019-12-08 12:12:40 -05:00
Anshul Jethvani
4682d9231d sorting done for Step 6 of SupportedPropertyNames 2019-12-07 21:03:28 -05:00
Simon Sapin
9f4b1a0f14 Implement text-align (except justify) 2019-12-07 14:31:45 +01:00
Simon Sapin
6d91d77fba Rename content_rect to rect in TextFragment and ImageFragment
Since they don’t have padding etc.
2019-12-07 14:25:16 +01:00
Simon Sapin
ce9fc3e651 Rename LineBoxes to Lines, since it contains fragments 2019-12-07 14:25:16 +01:00
Simon Sapin
fa1adf2ad3 Containing blocks contains styles rather than just a writing mode 2019-12-07 14:25:16 +01:00
xu3u4
7529591e8f Add onformdata to GlobalEventHandlers 2019-12-07 21:44:36 +09:00
Bastien Orivel
0bdab6bb50 Return a boolean from DOMTokenList::replace to match the spec
Fixes #25129
2019-12-07 13:22:10 +01:00
Simon Sapin
40ad9a722d Use the WritingMode bitflags from Stylo 2019-12-07 12:45:36 +01:00
Simon Sapin
b9adf8b7ac Don’t store computed values of logical properties in style structs
They are not used.
2019-12-07 12:45:36 +01:00
Anshul Jethvani
a935e00e21 sorting partially done for Step 6 of SupportedPropertyNames 2019-12-06 23:48:06 -05:00
Anshul Jethvani
575f7f5670 partially implemented SupportedPropertyNames 2019-12-06 19:52:10 -05:00
Alan Jeffrey
44db86fefd Add extra debug assertions for WebGL errors 2019-12-06 14:56:46 -06:00
Zakor Gyula
e146e6058a Replace wgpu-native with wgpu-core 2019-12-06 12:49:56 +01:00
Paul Rouget
b3b886e837 devtools: save and send cached messages 2019-12-06 10:10:43 +01:00
Anshul Jethvani
159194b0f9 run tidy check and added comments 2019-12-06 01:24:52 -05:00
Anshul Jethvani
16b9efc406 updated past_names_map to save time info 2019-12-06 00:40:43 -05:00