Fixes#10904
Note that the related web-platform-tests failed both before and after this commit
Source-Repo: https://github.com/servo/servo
Source-Revision: 3128a71ac703bf7579f0fcac9d03655756e8b6c7
This is a work-in-progress that:
* Adds support for some pseudo-elements to skip the cascade entirely, in an analogous way to Gecko's anonymous box pseudo-elements.
* Takes rid of `StylistWrapper`, and uses `Arc::get_mut` instead.
* Uses the first bullet to precompute the `-servo-details-content` pseudo's style.
I'd like @bholley to take a look before following, do you think that the aproach is the correct?
Also, @SimonSapin could want to put some eyes on it.
Depends on https://github.com/servo/rust-selectors/pull/81
Source-Repo: https://github.com/servo/servo
Source-Revision: 407f991c8aba5dcf5312bb2c34a3dd4fe12e5471
Replace character indices with UTF-8 byte offsets throughout all code dealing with text runs. This eliminates a lot of complexity when converting from one to the other, and interoperates better with the rest of the Rust ecosystem.
For most code this is just a simple replacement of char indices with byte indices. In a few places like glyph storage and text fragment scanning, it also lets us get rid of code that existed only to map between bytes and chars.
Also includes some related fixes to text shaping, discovered while working on this conversion. See the commit messages for details.
r? @pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: cf121ad8dff90b8fa55558ca9bdcbfe29512a617
The current logic for a cors cache match does not consider "credentials is false and request's credentials mode is not "include" or credentials is true."
I could have missed something, but `CacheRequestDetails::credentials` is set to true if credentials mode is "include", and false otherwise. So `(!cors_cache.credentials && !cors_req.credentials) || cors_cache.credentials` would be directly following the spec, but unless I'm mistaken `cors_cache.credentials || !cors_req.credentials` is logically the same.
Fixes: #10525
Source-Repo: https://github.com/servo/servo
Source-Revision: 3d38a60cee8a2e19ae8f04df7c2374fc9d97999c
This commit adds the `--profiler-trace-path` flag. When combined with `-p` to
enable profiling, it dumps a profile as a self-contained HTML file to the given
path. The profile visualizes the traced operations as a Gantt-chart style
timeline.
Example output HTML file: http://media.fitzgeraldnick.com/dumping-grounds/trace-reddit.html
Mostly I made this because I wanted to see what kind of data the profiler has, and thought that this might be useful for others as well. I'm happy to add tests if we can figure out how to integrate them into CI, but I'm not sure how that would work.
Thoughts?
Source-Repo: https://github.com/servo/servo
Source-Revision: b8e2fa58d61a4d77b67efa09a437ba6beb68e30e
* Sections like `[dependencies.foo]` can be entries in a `[dependencies]` section with the `{key = value}` syntax.
* Per-target dependencies can be expressed with more general `cfg(…)` conditions instead of exact target triples: https://github.com/rust-lang/cargo/pull/2328
Source-Repo: https://github.com/servo/servo
Source-Revision: 2729864af73d62719ea0fd55cef417c43bdd951e
Some of the `LoadErrorType` like `LoadCancelled` don't need a `String`
associated with the type since the variant is self-explanatory.
There are some variants that don't need an associated `String`, but that
can be cleaned up in a later refactor. Also, `net_traits::NetworkError`
currently requires a `String`, but that can potentially also be
refactored away too.
Source-Repo: https://github.com/servo/servo
Source-Revision: 81f6e70a623a6f11535322ed2ef954eafaf8c70c
PR1 for https://github.com/servo/servo/issues/10311
This puts the code and data structures in place to set the Referer header based on the Referrer Policy for a given document. Note that document:: get_referrer_policy() always returns the 'No Referrer' option, so for now, this should have no impact on production code, and that policy requires that the Referer header is not added.
Later PRs will determine the policy and edit that get_referrer_policy() accordingly.
Source-Repo: https://github.com/servo/servo
Source-Revision: 34900814fca3b21fbb27bed58d4f4af8a8e307e9
This commit adds a test crate for the time profiler to `tests/unit/profile`. The
only unit test contained in this crate is a smoke test that the time profiler
thread can be created and destroyed. It serves as a place for adding new tests
in the future.
Source-Repo: https://github.com/servo/servo
Source-Revision: 340a25e68c6b03f6acb0b7ccbf77dc68266395c0
For Persistent sessions student project
"if the profile directory command-line option is present when the ResourceThread is instructed to exit, serialize the data contained in cookie_storage, hsts_list, and the new HTTP authorization cache, and write the serialized data in separate files inside the profile directory."
and
"perform the same serialization on shutdown for local_data in storage_thread.rs, which represents the LocalStorage API."
Source-Repo: https://github.com/servo/servo
Source-Revision: 75d99eec0ff02718f1ec8d1b6fd58fff7c2d6fb3
This is a work in progress to solve https://github.com/servo/servo/issues/9650. Thanks a lot for helping the review.
- [x] scroll
- [x] scrollTo
- [x] scrollBy
- [x] scrollTop (setter and getter)
- [x] scrollLeft (setter and getter)
The setters will be implemented in another PR after this is merged.
Source-Repo: https://github.com/servo/servo
Source-Revision: 8d988f20c12e0a5267e79650a90310951c66ca77
Tests on `tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html` all pass and the other tests don't panic due to double borrows anymore.
cc: @KiChjang
Fixes#9994.
Source-Repo: https://github.com/servo/servo
Source-Revision: b00c2740e300fd7b8c18276d8d416a9f78c42674
Many of the HTTP unit tests use a custom request factory as well as a custom request that contained test logic. This is unnecessarily convoluted, and exists solely because the complete set of headers was unavailable until the request body was sent. These patches restructure the header manipulations so that the headers are available when the request object is created, allowing the test logic to move into the test factories, and enabling the deletion of almost all of the test request types.
Source-Repo: https://github.com/servo/servo
Source-Revision: eb78e21fbe05215a798af954bbe82bd41071a94b
Step 7 of the NCSU student project Implement HTTP authorization UI
> make an authorization UI appear when a 401 HTTP response is received (StatusCode::Unauthorized) - in load in http_loader.rs, right before trying to process an HTTP redirection, use the new tinyfiledialogs library to make two prompts appear (username and password), then restart the request with the new authorization value present applied. If an authorization value was present and the response is successful, add the credentials to the authorization cache.
Source-Repo: https://github.com/servo/servo
Source-Revision: 7bd23815184bfa675bde040231199722c703d2f0
In rust-url 1.0 the `Url` struct is going to have private fields, and there is no way to to create an aribitrary one without going through the parser.
The plugin never had a clear demonstrated performance benefit, it was made mostly because it was possible and relatively easy at the time.
This commit was originally part of #9840, but it’s taking a while to land and I keep removing new uses of `url!` when rebasing.
r? @nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 3368565b3c6c76e5ce2d170d5c5cfb2f52a56956
These pave the way for implementing other parts of specifications more thoroughly.
Source-Repo: https://github.com/servo/servo
Source-Revision: 9b57d8d686d361c0dfba1056523cbea12abd148b
Improves YouTube.
Improves the Washington Post.
Closes#10526.
r? @glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: 150338503dce8f2ba7f2a6850dca253733a636a1
Makes Twitter pages show up when scrolling, if WebRender is not in use.
WebRender does not yet support overflow:scroll.
r? @mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 269eeeddd204cd13ed5a0bf80deefcb46a259b3c
--HG--
rename : servo/tests/html/percentage-body-height.html => servo/tests/html/overflow_scroll_with_nested_fixed_height.html
Adds support for terminating DOM workers. A closing flag was added to
WorkerGlobalScope per the spec.
Rebased #6652, with some comments addressed.
Fixes#4427.
Source-Repo: https://github.com/servo/servo
Source-Revision: c0aa049b0aaf39df979234dff1ed01ff5d9aa5c5
This makes them establish stacking contexts, which is a CSS 2.1 spec
violation. However, we were already violating the spec here for
absolutely-positioned elements with `overflow: scroll`. It will probably
be easier to fix this spec violation once we either switch entirely to
WebRender or we have multiple layers per stacking context.
r? @mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: e66e437ae66346883cb2cc700f84d06c44962be1
In response to #10098
Tries to load `prefs.json` from the profile-dir and merge them into the preferences if `--profile-dir` is specified at launch. The profile-dir preferences take precedence over the default preferences, but command line preferences still take precedence over everything.
Also adds some tests for `prefs.rs`. These rely on the contents of `resources/prefs.json` (at least `test_get_set_reset_extend()` does), so they may need to be re-worked a bit.
Source-Repo: https://github.com/servo/servo
Source-Revision: ea24389b85980e7099036abe33dc4837c191d141
Fixes#10165
jdm mentioned of decoupling the, payload loading mechanism to data_loader.rs. So accordingly a `decoder` method has been added to data_loader.
Source-Repo: https://github.com/servo/servo
Source-Revision: 9f892edd87441393e5de00790a5abb7fc93a09de
It only supports `color` and `background`, for now, but it shouldn't be hard to add more properties (like text-shadow).
r? @mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 723989b9dddeb9bcdc28dc7d640fd6fd7247a27f
This reduces the size of the SpecificFragmentInfo enum from 48 to 24.
r? @pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 44b2ba25471e77b89b417161beb312a2985791a1
This adds a new HttpState object which holds common http state(#10175). This reduces the amount of work that is required to add extra things to the Http state.
The HttpState object currently holds:
```
hsts_list: Arc::new(RwLock::new(HSTSList::new())),
cookie_jar: Arc::new(RwLock::new(CookieStorage::new())),
auth_cache: Arc::new(RwLock::new(HashMap::new())),
```
Source-Repo: https://github.com/servo/servo
Source-Revision: d82f97a9cd9f208a4f331d5991486ae7f0108c08
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`
Source-Repo: https://github.com/servo/servo
Source-Revision: 38e8c923b519f488cd0614ff9409997998418cc7
This allows geckolib to pass gecko style structs and have the style system write to them directly, provided we implement all the traits.
Source-Repo: https://github.com/servo/servo
Source-Revision: 605842f193aedc1151ab38a99c49f693c76e5cf3
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.
Source-Repo: https://github.com/servo/servo
Source-Revision: 7f944afee88bb2ab13de4f37118af14d40328f7f
The function is only used in the 'style' component, so we'll move it
there alongside other relevant parse functions.
Source-Repo: https://github.com/servo/servo
Source-Revision: f2f05869d6ccd445df9b73e2e8d038c6cfa9e687
When fetching about:blank, response body should be the empty byte
sequence.
Spec: https://fetch.spec.whatwg.org/#concept-basic-fetch
Before this change, response body would be set to `ResponseBody::Empty`,
and then fetching would result in an infinite loop at step 19 in fn
`main_fetch` (methods.rs).
r? @KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: 446783f7b6f0b55164b3b3c3e8be90c2b392cf97
This might change behaviour if the file is changed between Servo startup and
the moment HOST_TABLE is first accessed. I don't think we care.
Source-Repo: https://github.com/servo/servo
Source-Revision: 183772583fcbb1f8103e8d6542a620134ba9182e
Heartbeats now on crates.io.
Updates to energymon interface for energy profiling.
Profiling script for Android.
Source-Repo: https://github.com/servo/servo
Source-Revision: 396812b6d9c43a886d32d6d0910c1c685f333baf
I've added two tests using async_fetch intended to create filtered responses. I caught and fixed a bug where waiting for response.body to be completed would never pass for Opaque or OpaqueRedirect, since their response.body is always `Empty`.
As always, I'd appreciate review and feedback! I don't plan to write new tests, but I will gladly patch up any gaps in the current tests.
Source-Repo: https://github.com/servo/servo
Source-Revision: 95883dcbcfe10104c7a78ac532cb9aeb4bda855f
We need to bump webrender before being able to bump Serde, but we also needs these bumps, so let's include them ASAP first because bumping a lot of things is always a pain.
Source-Repo: https://github.com/servo/servo
Source-Revision: 0f526054ebfa164ca2545d881b8392a744af7870
Fixes#8100, where sites in the hsts list were not recieving secure
cookies if the site was originally loading using a plain http url.
Source-Repo: https://github.com/servo/servo
Source-Revision: 162e89d8c6f19204e653b8d1fa83663ee710be15
There is no real reason to put this in an extension trait.
Source-Repo: https://github.com/servo/servo
Source-Revision: ebe7d9ebfb28d484ff0cce4e70cb8809f5867af5
Following having finished making Fetch asynchronous, response.body should be set asynchronously, since it's the major goal of calling Fetch. So far, I've made the body wrapped in Arc<Mutex<>>, and I've wrapped a new thread around the part where it's set. I've also discovered that the fetch_async function makes step 8 of Main Fetch obsolete, and I've commented it appropriately.
I'm currently having a hard time with the thread for setting response.body, though. @jdm suggested I have the body set continually, block by block, but my implementation for that runs so slow that I can't finish running my fetch test suite in reasonable time. @KiChjang pointed out that a lot of the lag is due to how response.body currently stores everything inside a Vec. Changing the storage container seems to be both necessary and beyond the scope of the time I have to work on this.
Source-Repo: https://github.com/servo/servo
Source-Revision: fee7cb179ee7ba2f159d87af07afaf0cd99a2161
I'm working on making it possible to run Fetch Asynchronously, as required for some steps, such as Main Fetch. It looks like somebody has already laid some groundwork for that, with a AsyncFetchListener trait and two async fetch functions defined, which I'm building on top of.
So far, as a sort of proof of concept, I've written a test to asynchronously retrieve a fetch response, which uses a simple function to check if the fetch response is complete or not. I'd like to be checked if I'm on the right path, to see if I need to rework anything so far, and what my next step can be.
Source-Repo: https://github.com/servo/servo
Source-Revision: 22ce878edc22360af7391694efc9e5668116d3fb
This should make fetch match the spec more closely.
Source-Repo: https://github.com/servo/servo
Source-Revision: 4e244b16dd3c050a8d6b24ee9209caf116462317
The MIME detector for a HTML file contains an additional byte in the mask. While it doesn't hurt, it is not used in the byte matching code (since it is zipped with the `pattern` iterator).
I'm not clear how to test this within the `servo` code. The fix doesn't change any externally visible behavior. A test to validate the `ByteMatcher` structures would require the private ByteMatcher structures to be visible to the test. I could use a sub-module, as described at https://doc.rust-lang.org/book/testing.html#the-tests-module but this pattern doesn't appear anywhere else in the `servo` code.
Source-Repo: https://github.com/servo/servo
Source-Revision: 32c97b6c8d69a284a0f5a30bd68c9b8a8d00b204
This fixes incremental layout of nodes that match pseudo-class selectors such as :first-child, :nth-child, :last-child, :first-of-type, etc. Fixes#8191 and other intermittent layout bugs.
This code is based on the following flags from Gecko:
https://hg.mozilla.org/mozilla-central/file/e1cf617a1f28/dom/base/nsINode.h#l134
Depends on servo/rust-selectors#71. r? @SimonSapin
There are a couple of TODO items in this commit, but I'd appreciate feedback on the general approach before I finish it up. (Also, if someone who knows more than I do could give some advice about atomic orderings...)
Source-Repo: https://github.com/servo/servo
Source-Revision: 438b3a444b40ea85e53be0bd1c4689680d577727
Closes#9548.
Alternative implementation of #9595.
cc @timvandermeij
I'm not sure if a utility method on `ByteString` is the best place for this functionality, maybe a free function in XHR module would be more suitable.
Also where would be the correct place to add a test for this functionality (if required)?
Source-Repo: https://github.com/servo/servo
Source-Revision: 433232a7fffc3bd6bb830b4e1580e24801618fc1
Add methods to move the underlying `Vec<u8>` for `ByteString`.
I saw this as at least two methods. One to "move and replace with and empty Vec<u8> (`bytes`), and one to take ownership of the whole object (`own_bytes`). I typically also don't like adding methods with out unit tests. If you think they're unnecessary, just let me know.
As always, please let me know if you have any comments, critiques, or nits!
Fixes#9655
Source-Repo: https://github.com/servo/servo
Source-Revision: aae6525f7d23e0a1b2af0e77e7c9a91402e1f9e7
WebRender is an experimental GPU accelerated rendering backend for Servo.
The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used).
WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!
Source-Repo: https://github.com/servo/servo
Source-Revision: ab07b06823ea9748a6091aee2281495f86f00bce
--HG--
rename : servo/tests/unit/net_traits/lib.rs => servo/resources/shaders/clear.fs.glsl
rename : servo/tests/unit/net_traits/lib.rs => servo/resources/shaders/debug_color.fs.glsl
rename : servo/tests/unit/net_traits/lib.rs => servo/resources/shaders/mask.fs.glsl
I've made a first draft of a complete implementation of HTTP Redirect Fetch, most of which is just refactored out of HTTP Fetch. I've also made some minor changes in a few other steps, all collected in the second commit, based on recent changes to the Fetch Standard. Since HTTP Redirect Fetch is so new, I figured now would be a fine time to make those other changes.
The biggest thing on my mind right now is how the spec says[1] "This algorithm will be used by HTML's "navigate" algorithm in addition to HTTP fetch above." This makes me think that this function, as well as HTTP Fetch, need to public, or at least have a public-facing function- since each Fetch function takes an Rc<Request>, which might be weird to require callers to supply.
[1] https://fetch.spec.whatwg.org/#http-redirect-fetch
Source-Repo: https://github.com/servo/servo
Source-Revision: 88afe38092b9bb6320d01c94a9a239e8be284933
This allows, among other things, having different implementations for parsing pseudo{elements, classes} in both `ports/geckolib` and in servo.
Source-Repo: https://github.com/servo/servo
Source-Revision: c11844cbf28054784c8d65781cff20045d8ee48b
The calculation of MP4 frame length is incorrect, shifting values by 1 bit instead of 8 bits. It works for the test MP4 file because the length of the frame is less than 256 bytes, so the shifted values are all zero.
This PR changes the code to calculate the length correctly. It adds a test to check a fake long stream. Still not long enough to test completely, but at least detects the problem with the original code.
Source-Repo: https://github.com/servo/servo
Source-Revision: 520ca258d4f979500f839e13a278bee35bfcc00a
I've been writing tests for creating filtered responses. So far I have three of the four types being made (namely, Basic, CORS, and Opaque), and just need to figure out how to make an OpaqueRedirect filtered response, since it's handled separately from the others. I will also add more tests to ensure the content of the filtered responses matches the limitations placed by the specification.
Along the way I implemented Cors Check, since it's required for the CORS filtered response. @jdm suggested I handle it in here, since it's such a small step, compared to other parts of Fetch.
Since all the tests currently pass, and I've spent a while adding the Cors Check and other pieces, I figured now would be a good time to start having it reviewed.
Source-Repo: https://github.com/servo/servo
Source-Revision: f1018b84a838ec8505f6a0bcb6e13286ce80a95c
The interface in #8210 allows us to create custom instances of CSS parse error reporters. We should write a test in tests/unit/style/stylesheets.rs that tries to parse invalid CSS and have a custom reporter that asserts the errors that are reported.
Code: tests/unit/style/stylesheets.rs, http://doc.servo.org/style_traits/trait.ParseErrorReporter.htmlFixes#8842
Source-Repo: https://github.com/servo/servo
Source-Revision: 4c4df37a128d2848f13fc2e5ebd4d69a4db8c483
This PR integrates `compiletest_rs` as suggested in #5646. I created a new `tests/compiletest` directory which contains separate crates for the tests.
Currently this PR includes `compile-fail` tests for some lints (acutally all except inheritance_integrity, beacuse I'm not sure how to include the dom stuff in a way the `#[dom_struct]` works).
I gathered that there should be more crates for which compiletests make sense and would appreciate any pointers to relevant crates.
Source-Repo: https://github.com/servo/servo
Source-Revision: d574b78313be75f3388123d11354b897598877a3
This commits updates rust-selectors to use the generic parser, and as
such it moves the element state into the style crate.
Source-Repo: https://github.com/servo/servo
Source-Revision: ae20f2556bc7807b39b6649ac1f738644abcc26a
I started out with Step 11 of Main Fetch so I could test creating filtered responses, which broke my tests that compare the Fetch result to a message on a server. I realized that if I got the tests to work, I'd likely end up breaking them again with the next step of Main Fetch I added, so I went ahead and did as much of Main Fetch as I could figure out.
Some steps I'm sure I could implement, I just don't know how. Such as when the spec says to "wait for response", or how to implement a Runnable object (which iirc is what I need to use) to run everything after Step 8 in parallel.
The fetch tests are still not running correctly, but I sure it's because they're getting a filtered response which doesn't have the body of response. I'm not sure how to handle that, whether it means a change needed in the tests or in the Fetch code. Like always, I look forward to feedback on my work!
Source-Repo: https://github.com/servo/servo
Source-Revision: f0122efcec30594014c5db9a9647098701195532
I noticed the following output at https://travis-ci.org/servo/servo/jobs/104733377#L1146:
<pre>
/home/travis/build/servo/servo/tests/unit/net/data_loader.rs:23:9: 23:33 warning: unused import, #[warn(unused_imports)] on by default
/home/travis/build/servo/servo/tests/unit/net/data_loader.rs:23 use std::sync::mpsc::channel;`
</pre>
Manual inspection also tells me that this import is not used. It seems to have become obsolete by 2aa5174246 (diff-46fd738c30b50dc2950348f1563f99b9R7).
Source-Repo: https://github.com/servo/servo
Source-Revision: ea147cbd8269458ccc56e104792b69a21fbc74ce
This code dates back to the time when absolutely positioned flows were
ignored by all of their ancestors up to the containing block. This
hasn't been true for at least a year.
Closes#9306.
Closes#9309.
Is a partial fix for #9308.
r? @glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: 4755cc5c6211e845fc8081cb3c8a67b4bdbea5cc
I've written two new tests for Fetch: one to test the highest possible number of redirects succeeds; and another to ensure a failure in Fetch by requesting too many redirects. I also wrote a helper function to be used by each test, since the main difference is how many times they try to redirect.
I've also changed the check against redirect_count in http_network fetch to compare it as greater than or equal to 20, as opposed to being only equal to 20. That's outside of the spec, but in my experience testing for pure equality can easily create errors. Even though it's technically not possible for redirect_count be above 20, bizarre bugs during runtime certainly happen.
Source-Repo: https://github.com/servo/servo
Source-Revision: c80fa3386459efd27b64c8b6cab33794e66d082b
I've updated http_fetch to now set response.body, as well as written a test to ensure that fetch can retrieve a message on a server. I've also looked into partially implementing some more of http_fetch while trying to figure out where response.body gets written to.
As always I'd like feedback on my logic, I'm confident there are more steps for handling response.body I need but I find the specification difficult to parse on this.
Source-Repo: https://github.com/servo/servo
Source-Revision: 175b3c2d271cdfdfcac4c3daf5cde3060748b0b8
…to net_traits.
Also updated unit tests to correctly reference and use Request and Fetch methods.
This is in preparation for XHR and EventSource (possibly WebSocket as well), which rely on using Request, but we cannot make the script crate depend upon the net crate.
cc @nikkisquared @jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: ce0b89d310212aaaa66b759c7c2548fb2f9a2738
--HG--
rename : servo/components/net/fetch/request.rs => servo/components/net/fetch/methods.rs
As per @jdm's suggestion that I start minimally testing the Fetch protocol to catch any errors, I wrote a very simple test that just calls Fetch and checks that the response isn't a network error. I've made changes as necessary for every failure I encountered, although this doesn't mean the implementation is faultless yet.
As always, I look forward to any feedback for improvements regarding the test itself, the changes to the fetch files I've made, and anything that I missed and should update.
Source-Repo: https://github.com/servo/servo
Source-Revision: 9c713cb4688f1a1729ada64846fac2d8426b1ef4
This is part of slimming down the dependencies of geckolib.
Source-Repo: https://github.com/servo/servo
Source-Revision: 3680e82cab766a412a969a21c0cdff0c7f97d7bc
- Currently the cursor sticks around if you click elsewhere. Now the text inputs are relayout-ed on blur.
- Currently whitespace gets collapsed in text input (https://github.com/servo/servo/issues/8772). Not anymore.
Source-Repo: https://github.com/servo/servo
Source-Revision: 099beee85c02d391b854dc5e06da34f89df8b760
Also aligns the heartbeats profiling script with current ProfilerCategory values.
Source-Repo: https://github.com/servo/servo
Source-Revision: 663ac945c1b09caa4d6c4576e7ab1bc2eb1b771a
Currently, servo panics for me when loading something like this:
```
@font-face {
font-family: "test family";
src: local(test font face);
}
```
That's due to a bug in `FontCacheTask`. `FontCacheTask` tries to get the value for the key
"test font face" from `self.web_families`, but previously initialized a value for the key "test family".
These two commits add an awkward test and fix the bug by not shadowing the variable `family_name`. Since the argument to `local()` should explicitly not be the name of a font family, the previous variable name was wrong and misleading anyways.
Source-Repo: https://github.com/servo/servo
Source-Revision: 8e75a05e6bea78d388e6409020f3279a090c9168
currently they show dots instead of the placeholder text
Source-Repo: https://github.com/servo/servo
Source-Revision: 7f156b8c12833e9134d29c4c309963eaa48c4ce1
Improve correctness of AssertRequestMustNotHaveHeaders tests
- Changed AssertRequestsMustNotHaveHeaders to AssertRequestMustNotIncudeHeaders
- Added an assertion that headers_not_expected is not empty
tested by command
./mach test unit
and all passed.
resolves#9098
Source-Repo: https://github.com/servo/servo
Source-Revision: 61314f5253ec4ef53fce2bb6846c1592bcff86a3
This is a rebase of #7842 that also adds a test.
Fixes#4183.
@Yoric, how's this look to you?
Source-Repo: https://github.com/servo/servo
Source-Revision: af1690f3036bc329101bbd6f4e877672d58ca5e0
This is a step towards removing the dependency of stylo on layout/.
This PR depends on #9004.
Source-Repo: https://github.com/servo/servo
Source-Revision: 0f5c614609fd8867a9e7c27b8a398ea7d877c714
Does the same thing as #6817, but storing Range instances directly in their start and end containers.
Cc @dzbarsky
Source-Repo: https://github.com/servo/servo
Source-Revision: 89ab368258eb827b0dcc8d6e6deecd3ed3c1de71
This makes the initial download for skia go from a 300 MB git repository to a 5 MB tarball. This should help with issues like #6132 and #7687.
Fix https://github.com/servo/skia/issues/70
This builds, but the at the moment causes a number of tidy errors for duplicated crates.
Source-Repo: https://github.com/servo/servo
Source-Revision: 8b95d7b8d860ec4c0834192083361a9fb78ddbeb
Updated string_cache to 0.2, and updated the dependencies that depend on string_cache.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.
r? @SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 188fa9378c103093f1f8dac24bff0d9d237fd2bc
This reduces the amount of code using unstable features that we depend on.
The hand-written IP address parser is probably just as fast.
Source-Repo: https://github.com/servo/servo
Source-Revision: 6f35b867c9c3bb7a345e2ac34e5970b93a1d3ea1
This patch makes DOMString an opaque wrapper round String (currently it's a transparent wrapper).
The changes are:
* Replacing DOMString(foo) by DOMString::from(foo).
* Replacing foo.0 by String::from(foo).
* Adding functions clear, push_str and extend for in-place mutation of DOMStrings.
* Replacing DOMString by String in other threads (devtools, storage and filereader).
* Making DOMString implement !Send.
* Removing the pub attribute from the contents of DOMString.
This enables experimenting with other string representations in the DOM.
Source-Repo: https://github.com/servo/servo
Source-Revision: 62acdd303b78951885c2c90747b31f318907d6c9
Stylesheets for `HTMLLinkElement`s are now loaded by the resource task, triggered by the element in question. Stylesheets are owned by the elements they're associated with, which can be `HTMLStyleElement`, `HTMLLinkElement`, and `HTMLMetaElement` (for `<meta name="viewport">).
Additionally, the quirks mode stylesheet (just as the user and user agent stylesheets a couple of commits ago), is implemented as a lazy static, loaded once per process and shared between all documents.
This all has various nice consequences:
- Stylesheet loading becomes a non-blocking operation.
- Stylesheets are removed when the element they're associated with is removed from the document.
- It'll be possible to implement the CSSOM APIs that require direct access to the stylesheets (i.e., ~ all of them).
- Various subtle correctness issues are fixed.
One piece of interesting follow-up work would be to move parsing of external stylesheets to the resource task, too. Right now, it happens in the link element once loading is complete, so blocks the script task. Moving it to the resource task would probably be fairly straight-forward as it doesn't require access to any external state.
Depends on #7979 because without that loading stylesheets asynchronously breaks lots of content.
Source-Repo: https://github.com/servo/servo
Source-Revision: 7ff3a17524e0e703e3ac279441729c185444be24
This adds the input caret for textareas. Although, it does not handle multiline textareas correctly. The caret gets displayed for each line.
I'll look into that but that will take more time. Some feedback on this small patch would be appreciated though.
Source-Repo: https://github.com/servo/servo
Source-Revision: af6a64e176ec66a9c066e9e7bf40b6ce3ac77b2e
Just getting my feet wet with Rust here. Please feel free to nit the hell out of it stylistically and idiomatically. :-)
Source-Repo: https://github.com/servo/servo
Source-Revision: ff2151b8bbc62fa29c90a429b7a4f12520420b6e
When reference tests crash it is difficult to debug the issue, because
the stacktrace and any other output is discarded by the test harness.
Instead of discarding it, write the output to text files in the test
results directory which will make it easier to debug crashing tests.
Source-Repo: https://github.com/servo/servo
Source-Revision: d15ea83938059a5ba754796545834930a9c0df1a
Fixes#7803. As @eefriedman pointed out, RFC 2397 says:
> If <mediatype> is omitted, it defaults to text/plain;charset=US-ASCII. As a shorthand, "text/plain" can be omitted but the charset parameter supplied.
Source-Repo: https://github.com/servo/servo
Source-Revision: f30f40b12d2910f52e2274659e3762d9cd991649
r? @SimonSapin
* Allow reftest harness to take 0 or more testname arguments.
* Change `mach test-ref` parameter from `--name` to `--include`. This is consistent with other test suites, and also fixes a bug in `mach test` caused by a conflicting keyword parameter in `Registrar.dispatch`.
* Allow `mach test-ref` to take any number of `include` arguments.
Source-Repo: https://github.com/servo/servo
Source-Revision: 9488013b59e54f9a39cc89362ee6b84f89cc8ed0
Translate <meta name=viewport> as according to [CSS Device Adaption § 9](http://dev.w3.org/csswg/css-device-adapt/#viewport-meta)
Note: as the PR currently stands, handling `<meta name=viewport>` elements always occurs. This is probably not desired for some contexts (e.g. desktop), but I'm unsure of how to conditionally handle elements based on that.
Source-Repo: https://github.com/servo/servo
Source-Revision: a7743052cad0387733c90940fa91733ede32772c
Thanks to @asabil for the original work, I only rebased it.
Fixes#6359 and #7040.
Source-Repo: https://github.com/servo/servo
Source-Revision: d1269294e6c602c91012397c7584e3c2077e21ac
cgaebel had a TODO for a css twitter fail whale reftest, which depended on elliptical border-radius support.
I didn't see any feasible way other than a reference image for border_twitter_fail_whale_b.html.
r? @pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: c91c0188f279b9d7edf706fc7ad3111948156ed6
Hi guys i've done a small pass of refactor in the MIMEClassifier implementation. (See issue #7382 )
- Moved the predicates to separate functions
- Added a mimetype enum so we can compare them easily after calling MIMEClassifier::get_media_type
I hope it follows rust good pratices (care it's my first time doing rust).
Improvements and tips are welcome :).
Thanks for looking at it.
Source-Repo: https://github.com/servo/servo
Source-Revision: 8a8204ffc8fa287dde2321c40d12b191b51960da
Thanks to @Jinwoo-Song for the original commit, which I just rebased and cleaned up. Fixes#6237.
Source-Repo: https://github.com/servo/servo
Source-Revision: 6a12f00d6d392651bae10365b4c806f36d704b21
Fix#7609, "error: unable to create file tests/ref/hello_a?foo#bar.html (Invalid argument)" during git checkout on Windows.
Behavior change: passing an nonexistent file name on the command line now shows a blank page (like network errors) rather than exit with an error message.
Source-Repo: https://github.com/servo/servo
Source-Revision: 815e981c69f6fe09bcbf3c1937ed817f2cd38813
Add the energy-profiling feature. Users can compile the proper (or their own) version of energymon libraries to capture power/energy data at runtime. The results are accessed through heartbeats.
Additionally, there are a couple of python scripts to enable heartbeats for profiler categories and process the results into some visualizations to help understand how time and energy is being spent in Servo.
Source-Repo: https://github.com/servo/servo
Source-Revision: 7b6c341900a66d1177fdc3f46705e9fb07a5b1dc
Hi,
This patch is an attempt to fix https://github.com/servo/servo/issues/7393, where the code detecting mislabeled feeds (see https://mimesniff.spec.whatwg.org/#sniffing-a-mislabeled-feed) had spurious space in the URLs we need to match.
Note that my testing (in particular rdf_rss_ko_2.xml) highlighted a flaw in "matches", that failed to check that there were more bytes in the string being checked than in the string we're checking against, which completely broke the whole step 5.2.7.
Thanks in advance for your review.
Cheers,
Simon
Source-Repo: https://github.com/servo/servo
Source-Revision: 9f85370885c84ebb58cd7f4a72a6e78948f468dc
In textinput test if the cursor is at the correct position when clearing a selection by press an arrow key.
edit_point is always at the end of the selection, should I test when it's at the beginning ?
Source-Repo: https://github.com/servo/servo
Source-Revision: 4404809e6d591ca7903e43deb693745300560d13
*The goal of this PR is to get early feedback on this before I go too far down the rabbit hole. This new code path is working, and there's several tests I've written as a proof of concept. There are still some regressions that I'll be fixing in the coming days.*
I've abstracted out the request/response cycle so that it's no longer dependent on the Hyper request/response structs. Since request/response @ hyper are structs, not traits, it made mocking them for tests impossible.
Current issues/concerns:
* This relies on boxing the `HttpResponse` that gets returned from the `HttpRequester` because `HttpResponse` is unsized. I don't know if there's a more idiomatic rust-y way of doing this?
* This relies on boxing the `Read` that is now returned from `load` for the same reason.
* The devtools and resource manager channels are still passed into `load`. It might be easier to inject these as trait dependencies instead of chans as well?
* Needs more tests.
🎩#6727
Source-Repo: https://github.com/servo/servo
Source-Revision: 7dda183022f9bee8b4bdffe8b4cf31e09b885d94
It’s deprecated in the #6850 rustup.
The first commit changes some behavior which was previously incorrect: the spec says indices in DOM strings are UTF-16 code units, not `char` code points.
The second commit should not change behavior, unless I made a mistake.
r? @jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 2ca48ca4047e83e69abf1fad6978de46ef11c3a7
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
Known issues:
* Display list optimization can sometimes optimize out elements that
should be shown. This affects the Enyo demo.
* The `overflow: scroll` container doesn't clip the inner layer properly
when borders, border radius, etc. are present.
* `overflow-x: scroll` and `overflow-y: scroll` don't work individually;
elements are scrolled all at once.
Note that multiple layers per stacking context aren't needed for the Enyo demo; rather the issue is that the height of the main area is being calculated incorrectly. (It looks like JS is measuring the height and poking in an explicit value that is too tall.)
r? @glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: b05b02e11fb849e1f0153d009d8fcf0501ace8dc
This reverts commit c315404db80c92a695531b0aa4bcf61c125a3bff, reversing
changes made to b00583bd4e7169a6b952633df718268904f2bd0c.
Source-Repo: https://github.com/servo/servo
Source-Revision: 47d6d958f58f5011742a18abcdd5a76bf4390966
Add support for user stylesheets, and provide one to tests with an `@font-face` rule for it.
Fix#6195.
Many previously-failing tests now pass, and a few previously-passing now fail.
Among the latter, `font-family-013.htm` and `fonts-013.htm` are testing that the Ahem font is not used for characters it doesn’t have a glyph for. They were passing because Ahem was not available at all, and now fail because we don’t implement font fallback correctly.
The others also use Ahem, but I don’t understand yet what’s going on exactly.
Source-Repo: https://github.com/servo/servo
Source-Revision: 08987e3eda370e3eb00876c7f5efdebf3ba0265a
This change makes Servo use serialized messages over IPC channels for resource loading. The goal is to make it easier to make Servo multiprocess in the future. This patch does not make Servo multiprocess now; there are many other channels that need to be changed to IPC before that can happen. It does introduce a dependency on https://github.com/serde-rs/serde and https://github.com/pcwalton/ipc-channel for the first time.
At the moment, `ipc-channel` uses JSON for serialization. This is because serde does not yet have official support for bincode. When serde gains support for bincode, I'll switch to that. For now, however, the JSON encoding and decoding will constitute a significant performance regression in resource loading.
To avoid having to send boxed `AsyncResponseTarget` trait objects across process boundaries, this series of commits changes `AsyncResponseTarget` to wrap a sender only. It is then the client's responsibility to spawn a thread to proxy calls from that sender to the consumer of the resource data. This only had to be done in a few places. In the future, we may want to collapse those threads into one per process to reduce overhead. (It is impossible to continue to use `AsyncResponseTarget` as a boxed trait object across processes, regardless of how much work is done on `ipc-channel`. Vtables are fundamentally incompatible with IPC across mutually untrusting processes.)
In general, I was pretty pleased with how this turned out. The main changes are adding serialization functionality to various objects that `serde` does not know how to serialize natively—the most complicated being Hyper objects—and reworking `AsyncResponseTarget`. The overall structure of the code is unchanged, and other than `AsyncResponseTarget` no functionality was lost in moving to serialization and IPC.
r? @jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 2eb122f394651232abd683fc576a5c4288bf277f
The main work is in the the rust-clipboard library, this PR updates Cargo.lock and adds plumbing.
0337e48b3f
Source-Repo: https://github.com/servo/servo
Source-Revision: 28e163d6c44f1d85fbaea7f236da40972b6a63b1
Implement HSTS (preload-only) servo/servo#6105
* Downloads the HSTS preload list from the chromium repo (same as gecko), then convert it to a list appropriate for servo.
* Reads the preload list when creating a resource task, and implements STS for those domains.
Still todo:
* Read Strict-Transport-Security headers from servers and add details to the in-memory HSTS list. (note: this requires hyper or servo to implement an STS header struct. Hyper seems like the appropriate location, so I will create an issue/PR there soon). The work for this is nearly done with the exception of adding a new ControlMsg and the new header.
* Persist HSTS list to disk with known hosts (perhaps a different issue should be raised for this?)
Source-Repo: https://github.com/servo/servo
Source-Revision: ab3d6c472d409c1602c873dcdcb495a7fec9d4b0
This checks every .toml file for an asterisk and prints an error if found.
Source-Repo: https://github.com/servo/servo
Source-Revision: 58e9bc6583b6ebbeb27e3b28a6b271ee48cd695a
I was concerned for a little bit that passing just whitespace to the
split_html_space_chars function would result in len > 0, so I wrote this
small unit test to make sure it does the right thing. Even though it
does do the right thing, I think there's still value in committing the
unit test.
Source-Repo: https://github.com/servo/servo
Source-Revision: d3d4976d8ed7cd7e92a1246513e125d1a6093d2a
Sorry for not doing it yesterday, I couldn't.
cc @metajack @SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 4ebb95ccd8e034007eacb447a054919ef4af2bf7
This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.
Source-Repo: https://github.com/servo/servo
Source-Revision: d6263c9b6e969fde4c644034e684a39d68667ad9
Fixes#6236
Also included in this commit are the changes need to make flake8 pass
for the existing python file
Source-Repo: https://github.com/servo/servo
Source-Revision: ccfe29d8f284dedc0101045d574a98fb1f69aa62
Fixes#5914
r? @nnethercote for the gfx changes
r? @kmcallister or @jdm for the plugin
Source-Repo: https://github.com/servo/servo
Source-Revision: 2ca606aaba432741ce4e8274835f26db3a3581fc
This implements the `canvas`, `drawingBufferHeight` and `drawingBufferWidth` getters to `WebGLRenderingContext`, and an initial version of `getParameter`.
r? @jdm or @nox?
Source-Repo: https://github.com/servo/servo
Source-Revision: 042737793b1995ad93dc093ea12ec986b99e64b8
r? @jdm
I couldn't add the `getContextAttributes` method since `CodegenRust`
doesn't know how to return a dictionary value, I'll take a look at it ASAP.
I think the helper functions can return directly the renderer, since they're used just for that, but I wanted to hear your opinions about this.
By the way I'm interested in adding more serious tests for WebGL, and I think the [khronos conformance suit](https://github.com/KhronosGroup/WebGL/tree/master/conformance-suites/1.0.3) should be the best option.
Should I try to integrate it in wpt, or making a `tests/webgl` directory (or similar) inside the servo tree? (Maybe this question should be for @Ms2ger)
Source-Repo: https://github.com/servo/servo
Source-Revision: 0de09b936e5e37c15b7865157a98ad78b1077659
r? @metajack @mbrubeck @glennw
(or anybody, really)
This is just a simple version of summit3.html that has only the spinning rust logo and matrix multiplication calculator. Longcat currently has regressed and has both some rendering issues (margins have reappeared between the segments) and it only works as a standalone page and no longer within an iframe. I'll look into those enough to fix or at least log bugs when I get back.
Source-Repo: https://github.com/servo/servo
Source-Revision: c63fc4dc13a23cf5b9f8c0972111b3f9436d2143
--HG--
rename : servo/tests/html/summit3.html => servo/tests/html/linuxcon.html
This patch turns on antialiasing for the canvas, and updates the painting code to use the updated Azure DrawOptions defined in servo/rust-azure#158.
Source-Repo: https://github.com/servo/servo
Source-Revision: c97c0a9f94208828c617cbd99efd8e3e410c69ee
This improves Servo's performance on large pages.
Please double-check the logic when it comes to nested layers—I'm sure I've messed up some of the geometry calculations :)
r? @glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: 0880e54f987bac7c34c934ef6ee36f46475b06e3
--HG--
rename : servo/tests/html/lipsum.html => servo/tests/html/lipsum-large.html
This property determines the background positioning area, that is the position of
the origin of an image specified using the 'background-image' CSS property.
'background-origin' is ignored when background-attachment is fixed.
Spec: http://dev.w3.org/csswg/css-backgrounds-3/#background-originFixes#6045.
r? @pcwalton
cc @yichoi
Source-Repo: https://github.com/servo/servo
Source-Revision: 8c402728247c73268df9389948ee9a9d9e4063b2
...ed test_clipboard_paste to the "test-unit" suite.
Source-Repo: https://github.com/servo/servo
Source-Revision: 5cb1356e9e3dbde9fd841c9aa2d21ea39c5eda18
Spec: http://dev.w3.org/csswg/css-device-adapt/
Currently, the actual viewport is used by the layout task as part of the reflow, and the compositor uses the zoom constraints. I'm not sure if anywhere else currently needs access to the constraints (i.e. there's no CSSOM as far as I can tell).
I did not implement sections 9 (viewport <META>) or 10 (handling 'auto' for 'zoom').
Source-Repo: https://github.com/servo/servo
Source-Revision: ccf1e6b9a701cf4ff010fa1f1b4ba9d656d962af
A rebuild after touching components/profile/mem.rs now takes 48 seconds (and
only rebuilds `profile` and `servo`) which is much lower than it used to be.
In comparison, a rebuild after touching components/profile_traits/mem.rs takes
294 seconds and rebuilds many more crates.
This change also removes some unnecessary crate dependencies in `net` and
`net_traits`.
Source-Repo: https://github.com/servo/servo
Source-Revision: 77f653da2c4120ea7ac1a946d97fc70059d513d4
--HG--
rename : servo/tests/unit/gfx/lib.rs => servo/components/profile_traits/lib.rs
Fixes#5300, which it is a rebase of.
Known issues:
* Collapsed borders do not correctly affect the border-box of the table
itself.
* The content widths of all cells in a column and the content height of
all cells in a row is the same in this patch, but not in Gecko and
WebKit.
* Corners are not painted well. The spec does not say what to do here.
* Column spans are not handled well. The spec does not say what to do
here either.
Source-Repo: https://github.com/servo/servo
Source-Revision: 8a4555cc53bc1bbb21a08eb6f010cb1215034419
Fixes the "jumpiness" seen on the Google home page, Wikipedia, and many
other places.
r? @mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 211ee668fae7f619ac7e09abd776a6f45fc40052
* Simpler image cache API for clients to use.
* Significantly fewer threads.
* One thread for image cache task (multiplexes commands, decoder threads and async resource requests).
* 4 threads for decoder worker tasks.
* Removed ReflowEvent hacks in script and layout tasks.
* Image elements pass a Trusted<T> to image cache, which is used to dirty nodes via script task. Previous use of Untrusted addresses was unsafe.
* Image requests such as background-image on layout / paint threads trigger repaint only rather than full reflow.
* Add reflow batching for when multiple images load quickly.
* Reduces the number of paints loading wikipedia from ~95 to ~35.
* Reasonably simple to add proper prefetch support in a follow up PR.
* Async loaded images always construct Image fragments now, instead of generic.
* Image fragments support the image not being present.
* Simpler implementation of synchronous image loading for reftests.
* Removed image holder.
* image.onload support.
* image NaturalWidth and NaturalHeight support.
* Updated WPT expectations.
Source-Repo: https://github.com/servo/servo
Source-Revision: ac0645c2363b5a6ea3930b0857b3a27f1b6d033f
Manual re-opening of #5479 (since it seems that GitHub disables re-opening with the same number after a rebase).
Source-Repo: https://github.com/servo/servo
Source-Revision: 9974ebb2f969d2de8959fe74844b7410a5acd54e
Tracking issue #1826 - implemented one of the three methods.
This is follow up of #5402. Rebased and squashed and made the method iterative.
Source-Repo: https://github.com/servo/servo
Source-Revision: e3756f9e3fe8c042f5e6a02b9d4d6a2310aeda04
This implements a framework for opting in to receiving network events asynchronously. It also converts XMLHttpRequest to use them, and paves the way for better support for synchronous XHR using on-demand, targeted event loops instead of spinning the global event loop. This gives us complete feature parity with the existing XHR implementation, using fewer threads than before in the async case.
Source-Repo: https://github.com/servo/servo
Source-Revision: 3151497d498b001b4a783dce0595615c6fc40936
Move the ImageCacheTaskClient trait and impl to net_traits. Fixes#5551.
Source-Repo: https://github.com/servo/servo
Source-Revision: 6903955b9835b7cfdff6378e4a547cdad1589443
This fixes a lot of "jumpiness" and removes the `new_line_pos` stuff.
Closes#2260.
r? @mbrubeck
cc @metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: d3478954fd8e3a8374104984efb91a918b5dbb7e
On my laptop, running `./mach test-unit` goes from about 11 minutes to 22 seconds, when run after `./mach build`.
Fix#5291.
Source-Repo: https://github.com/servo/servo
Source-Revision: 017d1053617f6769d7f355e4a97d52ae67e53d1c
--HG--
rename : servo/components/net/test.jpeg => servo/tests/unit/net/test.jpeg
rename : servo/components/script/tests.rs => servo/tests/unit/script/size_of.rs
This rebases and integrates #4209, removing the sniffer task (turns out it wasn't a great idea), and adds a `--sniff-mime-types` command line flag to enable sniffing for file:// and http:// resources. Tested against a random picture file on my harddrive. The actual MIME sniffing implementation can be extracted into a separate library separately.
Source-Repo: https://github.com/servo/servo
Source-Revision: c7e210f24c97be1057a652b3644332e7043bfeac
Fixes#5460. This supports for simple focusable elements that are their own DOM anchors, like text `input` fields.
Requires servo/rust-selectors#20. r? @SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: b63fb0c0a7e9cd9208d66319c910750aaaac844c
This is a series of already-reviewed changes by @yodalee from #5025, rebased onto current servo master, with some fixups applied:
* Fixed build errors/warnings from the latest rust upgrade.
* Marked `tests/wpt/web-platform-tests/encoding/single-byte-decoder.html` as expecting CRASH.
I could not verify locally that the new test annotation is correct, since the test appears to hang rather than crash on my Linux box. (Or maybe I just didn't wait long enough.) If this crash isn't consistent, or if it takes a long time, maybe we should skip this test instead?
r? @jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 4846607e189a65baf8d9ac6566594b7893d07f12
In my mistake, I close PR for this commit.
I'm sorry for inconvenience.
@jdm 's comment
The test expectations for /tests/wpt/web-platform-tests/html/dom/interfaces.html and /tests/wpt/web-platform-tests/workers/interfaces.workers.js will need to be updated - http://mxr.mozilla.org/servo/search?string=appversion
According to your guide, I revised commit. Is this your intention?
r? @jdm
cc @yichoi
Source-Repo: https://github.com/servo/servo
Source-Revision: 225d7d2ece418d5ecefd7ce9047c4754ffb68c73
Transition events are not yet supported, and the only animatable
properties are `top`, `right`, `bottom`, and `left`. However, all other
features of transitions are supported. There are no automated tests at
present because I'm not sure how best to test it, but three manual tests
are included.
r? @glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: ebdf1d494b6c986e6dfcb7d8fd3f0ffa126523ed
In these cases for `format!`, we're just constructing a String of the
single argument with no special format.
Source-Repo: https://github.com/servo/servo
Source-Revision: dfb8929b001c8d0fb6d5e63f5a9d6dcc17cb388a
The new `Vec::append` method is clearer and potentially faster.
Source-Repo: https://github.com/servo/servo
Source-Revision: 646f82147946c3221a6de0e575b4750dc61d5610
Fixes#5158
Part of this involved switching to OsStrings for process arguments. Those now interface awkwardly with some remaining use old_io, but that will only be needed until rustc is newer.
Source-Repo: https://github.com/servo/servo
Source-Revision: 1a9679857a324f08337215bddad16f4667770997
Fix warnings and introduce usage of `std::env` over deprecated `std::os`
functions.
Source-Repo: https://github.com/servo/servo
Source-Revision: e404cf37633d809a696f3defddd8c871fdc951bf
issue #4906
Fix substringData function, and add a test case for all function in characterdata.
Source-Repo: https://github.com/servo/servo
Source-Revision: 55f763654910bb3110a8853d74481290a4e591af
Ready for review.
Final link step on android fails, but we know how to fix it and will add it to this branch soon.
Source-Repo: https://github.com/servo/servo
Source-Revision: 2cc08f289ab909de44fa09a07b2c43b70ce379b9
--HG--
rename : servo/ports/gonk/build.rs => servo/support/rust-task_info/build.rs
The majority of this change is simply re-arranging the code in the glutin port so that the windowed/headless code is configured at build time rather than runtime. There shouldn't be any functional difference as a result of this change.
Source-Repo: https://github.com/servo/servo
Source-Revision: 1b496d80dec4f202e0f318ee60ac156ad74256ff
This change makes glutin the default windowing system on mac/linux.
If you run into any issues with the glutin system, you can temporarily
build the GLFW system with the following command:
cd components/servo
../../mach cargo build --no-default-features --features=glfw
Once any glutin related issues have been sorted out, the GLFW
port will be removed.
Source-Repo: https://github.com/servo/servo
Source-Revision: ccf5f96fa91540ca73cfb24dd130d5124975fc6e
After this patch somebody just needs to implement the new IndexedGetter (and probably frames/length) on window to fix#4589.
Source-Repo: https://github.com/servo/servo
Source-Revision: a227faa41610cdc826da4ec8d25839c2ec3061db
Like Gecko, we treat `geometricprecision` the same as
`optimizelegibility` for now.
r? @mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 1a021f66354d9b6c14f76178d803185e50ad87d3
This was making `box-shadow` not show up in many cases, in particular,
but the effects were not limited to that.
r? @glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: 499d17f564d699e5e290e8a3859f64e7536827a7
This prepares for the rust upgrade currently being conducted.
Source-Repo: https://github.com/servo/servo
Source-Revision: e8fac3681b690adb0796b2a807ac95bd9c13597a
A follow-up for issue #1820, adds the optional "type" support.
Source-Repo: https://github.com/servo/servo
Source-Revision: 111a196e9d300164391d12ab292c1d4c0ef2b44a
Implementation of #4432 adding `getPropertyPriority` to CSSStyleDeclaration. This is my first attempt at a Servo PR so I'm sure I've done something wrong. Let me know, and I'll fix it up.
As stated in #4432 tests for this are in #4085. If there are additional tests I can write now I would love to do that, I'm just not sure where or what those would be.
Source-Repo: https://github.com/servo/servo
Source-Revision: 7b7fe964d328362126a8a56ff463d48f3285391f
This does not implement any notion of CSSStyleDeclaration objects that do not have an owning element; there's no actual CSS object model in play here. This does support setting and getting properties of the style attribute for HTMLElement, and tries to implement the ambiguous CSS value serialization spec.
Source-Repo: https://github.com/servo/servo
Source-Revision: 824788649cd338c044d9396166af5b0f378d6685
We can reset `<input type=text>` fields! I wish I could've done something with checkboxes, but unfortunately, that's it for now.
In addition to that, this PR implements `HTMLInputAttribute.defaultValue`, updates wpt-test to expect passing tests as a result of that implementation, and fixes an index error crash with text inputs.
edit: also includes an html example where one may lazily watch form resets in action: ` tests/html/form_reset_handsfree.html`
Source-Repo: https://github.com/servo/servo
Source-Revision: 5951056973fc0e08e70224214740a274ca8ef20f
This fixes race conditions whereby layout and script could be running
simultaneously.
r? @jdm
cc @cgaebel
Source-Repo: https://github.com/servo/servo
Source-Revision: 5f2684d2f81046abd7548fb22d996d1e506a104a
Let's build this incrementally. I implemented a `Blob` that can hold a `DOMString`, and has `size` attribute and `slice(...)` method. I'll finish the rest in later PRs.
Source-Repo: https://github.com/servo/servo
Source-Revision: d2a67abea9f6acd7b0ea29a852bf5029aef3f405
Still need to impl `Activatable` on all activatable elements. I'll probably push those changes to this PR, however they can be made separately as well.
Source-Repo: https://github.com/servo/servo
Source-Revision: 19c69b1625dda46d3c5501292e7e2d0328e400b4
Fixes#3918
Can be tested in `tests/html/textarea.html`. Also implemented some content reflecting IDL attributes for HTMLTextAreaElement while I was in there.
There are some major problems with TextInput when Multiple is enabled that I haven't addressed here, but I'm prepared to open up a follow-up issue.
Source-Repo: https://github.com/servo/servo
Source-Revision: a369dcfa01f5ad7634469f3a3b652d7f650129a0
Because of #2122 I cannot write test for this right now because it will be failing randomly due to that iframe issue. However, if it doesn't fail due to that issue a test like this:
```html
<html>
<head>
<meta charset="utf8" />
<script src="harness.js"></script>
<title>Iframe contentDocument test.</title>
</head>
<body>
<iframe src="test_iframe_contentDocument_inner.html" id="iframe"></iframe>
<script>
waitForExplicitFinish();
var timeout = 100;
var iframe = document.getElementById('iframe');
function test_contentWindow() {
if (!iframe.contentWindow) {
// Iframe not loaded yet, try again.
// No load event for iframe, insert bug number here.
setTimeout(test_contentWindow, timeout);
return;
}
is(iframe.contentDocument.getElementById('test').textContent, 'value');
finish();
}
test_contentWindow();
</script>
</body>
</html>
```
where inner is simply:
```html
<html><body><div id="test">value</div></body></html>
```
passes.
I have added `SameOrigin` method to the `UrlHelper`. I wanted to reuse it in [`constellation.rs` same_script check](f0184a2d01/components/compositing/constellation.rs (L625)) but I it didn't want to compile saying
```
error: unresolved import `dom::urlhelper::UrlHelper`. Maybe a missing `extern crate dom`?
```
So I didn't include it in this PR for now.
There is more discussion about the cross origin iframes in [another issue](https://github.com/servo/servo/issues/3939). In this PR I just added same origin check.
Source-Repo: https://github.com/servo/servo
Source-Revision: 85a2f0b66a32cfd6022b3e6cec6ec06f3b59baf1
This attempts to implement a bunch of the DOM Level 3 Events spec by implementing the KeyboardEvent interface, the document focus context, and dispatching keyup/keydown/keypress events appropriately. There's also some support for multiline text input that's untested.
Source-Repo: https://github.com/servo/servo
Source-Revision: 2ffa845cf463b14b19322d477a77ffd20efa89a9
We have completed the initial step for "Implement Window.sessionStorage and Window.localStorage"
- Create and stub the Storage WebIDL interface
Source-Repo: https://github.com/servo/servo
Source-Revision: c828e8360416e61deaaf6870ebdf9ee2f0abc19b
This should make help output a lot cleaner and simplify the way that
uncommon debug options are passed.
Source-Repo: https://github.com/servo/servo
Source-Revision: e483a189a3c24d0fe475cf2a8dedb11821f7ee21
Fixes#3356. This makes script elements fetch their source synchronously and execute immediately by default. It also lays some groundwork for future deferred or async script loading.
(Depends on #3716 to fix a content test failure caused by running script during parsing.)
Source-Repo: https://github.com/servo/servo
Source-Revision: 272ae0cc1beb83c839d5fbd746e67f4ae746db99
...itor after the initial parse. Fixes#1720. Fixes#3738.
r? @Ms2ger or @Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 2df236376a443d8d031ee7a72379f336f2cd8cc4
We've discussed this some and I think there's consensus to do it as a
pragmatic decision for now. CPU painting is more stable, especially with
buggy drivers, and faster (because we aren't caching the necessary
OpenGL objects yet and possibly for other reasons), so it provides a
better "out of the box" experience for newcomers to Servo who don't know
to pass the `-c` option. This patch continues to reftest both Skia and
Skia-GL out of a desire to keep options open. Skia-GL remains a
first-class citizen.
r? @metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: 1fd7650de504611016d1ce10a5af2c1a4e0f6b9c
This corrects and improves the dom/bindings/DESIGN.md document and also
corrects a grammatical error in a tests/reftest.rs message.
Source-Repo: https://github.com/servo/servo
Source-Revision: 65856dd00a7da07ece8d3e1e63bc495943266a24
r? @Ms2ger, @jdm
The parser is now a JS-managed object and we use hooks in html5ever to trace its internal state. This should be memory-safe even if arbitrary JavaScript can run during a parse. Please let me know if you think of a reason it wouldn't be!
I think the likely outcome of a garbage collection during parsing is a dynamic `RefCell` borrow failure, but I'm going to look into that after this lands. It should be safe to trace the parser while it's mutably borrowed, as long as it's not shared between threads, so we can probably switch to `UnsafeCell`.
Source-Repo: https://github.com/servo/servo
Source-Revision: 8d3b107568ab965b518b8003b702a5db993fa7d0
--HG--
rename : servo/tests/content/test_document_characterSet_long.html => servo/tests/content/test_document_characterSet_long.html.disabled
rename : servo/tests/content/test_document_characterSet_short.html => servo/tests/content/test_document_characterSet_short.html.disabled
This also hides the not-yet-working parts of incremental reflow behind a runtime
flag. As I get the failing reftests passing, I'll send pull requests for them one
by one.
Source-Repo: https://github.com/servo/servo
Source-Revision: 56989b8dec4aa95a3b484d45f15b23f9b3daaf13
In the test harness, assert that the two images aren't all white.
Fixes#3481
Source-Repo: https://github.com/servo/servo
Source-Revision: c9ce56a85d6c0591f71e28c9596c19fef13b91c0
This is missing a lot of parts, so it doesn't really make any real-world form submission work yet. It provides a skeleton on which the missing bits can be filled in.
What works:
- `<input>` elements except for `type=file`
- GET/POST methods
- URLencoded `enctype`s (default)
- Submission via `<form>.submit()` only
Stuff that needs to be done for most simple real-world cases to work:
- [Working text input](https://github.com/servo/servo/pull/3585)
- Click handlers for `<submit>`
- Possibly `<textarea>` support
- Support for the other two enctypes (#3649)
Todo:
- Correctly implement [planned navigation](https://html.spec.whatwg.org/multipage/forms.html#planned-navigation) using `TrustedFormAddress` (#3648)
- [Correctly implement form owners.](https://github.com/servo/servo/issues/3553) Requires html5ever and some discussion of the spec.
- `<input type=file>` support
- Image submit support
- Browsing contexts/targets
- Support for non-`<input>` controls
- Validation (?)
- Dirname (?)
Source-Repo: https://github.com/servo/servo
Source-Revision: 9dfd5e7fcd2011a411b219e8c45aadc0ecb270bd
When we want to use Servo binaries outside of their `target` build directory, `./resources` is what we’ll need to ship with them.
r? @jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 8312fde154768c4a5ce133a1aaaf1293529a5558
--HG--
rename : servo/tests/html/failure.html => servo/resources/failure.html
rename : servo/components/style/user-agent.css => servo/resources/user-agent.css
So far the changes to layout seem fairly well-contained; I think this is worth integrating to give us a browser that is easier to dogfood (and allows us to work on things like form submission much easier), especially since the long-term viability of WebComponents-as-forms is not assured.
Source-Repo: https://github.com/servo/servo
Source-Revision: f80096069592b864221abe112eaf2ecb6c444fda
The biggest language change is that enum variants now also reserve (for future use) a name in the type namespace, which must not collide with other types. Some things were renamed, and others qualified as `module::name`.
Source-Repo: https://github.com/servo/servo
Source-Revision: 7409685589c550ee7a9f94182f511acddab4c6fd