aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #18809 - Eijebong:bitflags, r=noxbors-servo2017-10-1935-192/+194
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update bitflags to 1.0 in every servo crate It still needs dependencies update to remove all the other bitflags versions. - [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 it's a dependency update <!-- 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/18809) <!-- Reviewable:end -->
| * Update bitflags to 1.0 in every servo crateBastien Orivel2017-10-1935-192/+194
| | | | | | | | | | It still needs dependencies update to remove all the other bitflags versions.
* | Auto merge of #18944 - servo:jemallocator2, r=noxbors-servo2017-10-193-3/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop relying on linking details of std’s default allocator We’ve been bitten before by symbol names changing: https://github.com/servo/heapsize/pull/46, and upstream is planning to stop using jemalloc by default: https://github.com/rust-lang/rust/issues/33082#issuecomment-309781465 So use the (relatively) new `#[global_allocator]` attribute to explicitly select the system allocator on Windows and jemalloc (now in an external crate) on other platforms. This choice matches current defaults. <!-- 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/18944) <!-- Reviewable:end -->
| * | Stop relying on linking details of std’s default allocatorSimon Sapin2017-10-193-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We’ve been bitten before by symbol names changing: https://github.com/servo/heapsize/pull/46 and upstream is planning to stop using jemalloc by default: https://github.com/rust-lang/rust/issues/33082#issuecomment-309781465 So use the (relatively) new `#[global_allocator]` attribute to explicitly select the system allocator on Windows and jemalloc (now in an external crate) on other platforms. This choice matches current defaults.
* | | style: Make MatchingContext generic over SelectorImpl.Emilio Cobos Álvarez2017-10-191-12/+14
| |/ |/| | | | | | | This will help Xidorn implement tree pseudos, and in general makes sense, allowing to put specific matching data in a selectors implementation.
* | Auto merge of #18933 - mrobinson:wr-text-index, r=jdmbors-servo2017-10-196-120/+155
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use WebRender to compute text index on click events This is the second half of switching over to WebRender for hit testing. Now that WebRender gives us the location of the hit tested point in the display item, we can use that to calculate text index. <!-- Please describe your changes on the following line: --> --- <!-- 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). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they shouldn't change behavior. <!-- 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/18933) <!-- Reviewable:end -->
| * Use WebRender to compute text index on click eventsMartin Robinson2017-10-186-120/+155
| | | | | | | | | | | | This is the second half of switching over to WebRender for hit testing. Now that WebRender gives us the location of the hit tested point in the display item, we can use that to calculate text index.
* | Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-18119-421/+428
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Auto merge of #18704 - mrobinson:wr-hit-testing, r=jdm,glennw,mbrubeckbors-servo2017-10-173-201/+137
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to using WebRender hit testing This trades quite a bit of complicated code in Servo for few more messages and a significant performance improvement. In particular, WebRender can search the entire display list at once instead of ping-ponging down the pipeline tree. This allows us to send mouse events to the correct pipeline immediately. <!-- Please describe your changes on the following line: --> --- <!-- 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). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they should not change behavior. <!-- 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/18704) <!-- Reviewable:end -->
| * Switch to using WebRender hit testingMartin Robinson2017-10-173-201/+137
| | | | | | | | | | | | | | | | This trades quite a bit of complicated code in Servo for few more messages and a significant performance improvement. In particular, WebRender can search the entire display list at once instead of ping-ponging down the pipeline tree. This allows us to send mouse events to the correct pipeline immediately.
* | Fix commonmark Markdown warnings in docs, part 1Matt Brubeck2017-10-1761-261/+262
|/ | | | | | | | Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is passed to rustdoc. This is mostly a global find-and-replace for bare URIs on lines by themselves in doc comments.
* fix unused warningtigercosmos2017-10-171-1/+1
|
* Auto merge of #18875 - servo:stable-js, r=nox,jdmbors-servo2017-10-1632-118/+148
|\ | | | | | | | | | | | | | | Remove the need for rust-mozjs to use unstable Rust features <!-- 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/18875) <!-- Reviewable:end -->
| * Update rust-mozjsSimon Sapin2017-10-161-11/+12
| |
| * Make usage of core_intrinsics optionalSimon Sapin2017-10-164-9/+10
| |
| * Make usage of unstable feature on_unimplemented optional.Simon Sapin2017-10-163-2/+4
| |
| * Remove usage of unstable features const_ptr_null and const_ptr_null_mutSimon Sapin2017-10-163-7/+4
| |
| * Don’t rely on unstable 'const fn's in rust-mozjs, so we can remove them.Simon Sapin2017-10-161-12/+10
| |
| * Replace uses of libcore with libstd in components/scriptSimon Sapin2017-10-168-14/+9
| |
| * Move remaining uses of NonZero to our nonzero crateSimon Sapin2017-10-164-4/+2
| |
| * Replace NonZero<*mut JSObject> with a wrapper to enable local trait impls.Simon Sapin2017-10-1621-69/+107
| |
* | Auto merge of #18592 - MortimerGoro:dom_texture, r=jdmbors-servo2017-10-166-2/+75
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement DOM to texture <!-- Please describe your changes on the following line: --> This is a prototype of the WebGL DOMToTexture feature. The API should be fine as a privileged extension for now due to security concerns. The working group has been investigating the viability of unprivileged usage but the spec is not ready yet. Demo video: https://www.youtube.com/watch?v=hpZqEM5hPao --- <!-- 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). <!-- 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. --> <!-- 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/18592) <!-- Reviewable:end -->
| * | Implement DOM to textureImanol Fernandez2017-10-166-2/+75
| |/
* | Auto merge of #18890 - glennw:update-wr-clip-text-aa, r=jdmbors-servo2017-10-161-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update WR (details below): * Add support for clip masks on text runs. * Fix atomic ordering of items with multiple shadows. * Update to bincode + ipc-channel with optimizations. * Fix some plane splitting precision errors. * Improve the anti-aliasing quality significantly. * Add internal ClipChain support. * Fix diacritic glyphs on Linux. <!-- 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/18890) <!-- Reviewable:end -->
| * Update WR (details below):Glenn Watson2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | * Add support for clip masks on text runs. * Fix atomic ordering of items with multiple shadows. * Update to bincode + ipc-channel with optimizations. * Fix some plane splitting precision errors. * Improve the anti-aliasing quality significantly. * Add internal ClipChain support. * Fix diacritic glyphs on Linux.
* | Remove use of unstable box syntax.Simon Sapin2017-10-16270-514/+580
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax.
* | Auto merge of #18888 - tigercosmos:xml, r=jdmbors-servo2017-10-161-3/+28
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix #18776: use XML fragment serialization for innerHTML in XML documents <!-- Please describe your changes on the following line: --> I am not sure whether my solution is in the right way. @jdm Can you give some advises? --- <!-- 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 - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #18776 (github issue number if applicable). <!-- Either: --> - [ ] 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. --> <!-- 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/18888) <!-- Reviewable:end -->
| * use XML fragment serialization for outerHTML in XML documentstigercosmos2017-10-161-1/+6
| |
| * use XML fragment serialization for innerHTML in XML documentstigercosmos2017-10-161-2/+22
| |
* | Auto merge of #18886 - servo:urls, r=SimonSapinbors-servo2017-10-158-56/+27
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change AttrValue::Url to AttrValue::ResolvedUrl Things make more sense like this. <!-- 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/18886) <!-- Reviewable:end -->
| * | Change AttrValue::Url to AttrValue::ResolvedUrlAnthony Ramine2017-10-158-56/+27
| | | | | | | | | | | | | | | There is actually only one attribute that can use that, the one for <body background>.
* | | style: Hide LocalMatchingContext.Emilio Cobos Álvarez2017-10-141-2/+2
| |/ |/| | | | | | | | | | | | | | | | | | | This type is a lot of complexity related to a very specific thing such as the hover and active quirk. Instead of that, move `nesting_level` to `MatchingContext`, and simplify all this computing whether the quirk applies upfront, for each complex selector we test. This is less error-prone, and also allows simplifying more stuff in a bit.
* | Auto merge of #18838 - svanburen:remove_cssText, r=emiliobors-servo2017-10-142-12/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove cssText from CSSStyleValue Removed from associated .rs and .webidl <!-- Please describe your changes on the following line: --> Not much more to add - let me know if it needs additional changes. --- <!-- 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 #17379 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because they remove a property that previously had no tests associated with it. <!-- 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/18838) <!-- Reviewable:end -->
| * | Remove cssText from CSSStyleValueStefan VanBuren2017-10-112-12/+0
| | | | | | | | | | | | Removed from associated .rs and .webidl
* | | Auto merge of #18867 - emilio:parse-hack, r=heycambors-servo2017-10-141-2/+6
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | style: Dishonor display: -moz-box if -webkit-box was specified before This is a compatibility hack that Gecko supports that is apparently important for android. I want to remove it, but let's see... See https://bugzilla.mozilla.org/show_bug.cgi?id=1407701 for reference. <!-- 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/18867) <!-- Reviewable:end -->
| * | style: Be clearer about whether a declaration comes from parsing or not.Emilio Cobos Álvarez2017-10-141-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces DeclarationSource, to see if a declaration has been parsed or set from CSSOM in a declaration block. The Servo_DeclarationBlock_SetFoo and similar callers are changed to DeclarationSource::CssOm because their semantics are more CSSOM-y, but it shouldn't matter since they should all be checked before hand with Servo_DeclarationBlock_PropertyIsSet.
* | | Remove an unused import, fix a warning.Simon Sapin2017-10-131-2/+1
| | |
* | | style: Share code for Element::Closest.Emilio Cobos Álvarez2017-10-131-20/+12
| | |
* | | style: Share code for Element::Matches.Emilio Cobos Álvarez2017-10-131-12/+11
|/ /
* | Remove usage of unstable feature try_fromSimon Sapin2017-10-122-8/+7
| |
* | Remove usage of unstable feature ascii_ctypesSimon Sapin2017-10-112-4/+11
|/
* Auto merge of #18825 - servo:urls, r=emiliobors-servo2017-10-1112-73/+90
|\ | | | | | | | | | | | | | | Fix a bunch of URL-reflecting IDL attributes <!-- 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/18825) <!-- Reviewable:end -->
| * Fix the form action IDL attributesAnthony Ramine2017-10-114-30/+14
| | | | | | | | | | The returned string, if the attribute is present and non-empty, should be a URL resolved against the element's document's base URL.
| * Fix URL attributesAnthony Ramine2017-10-1110-43/+76
| | | | | | | | | | URL attributes should always use AttrValue::Url, and the input should be resolved against the document's base URL at setting time always.
* | Auto merge of #18820 - asajeffrey:update-swapper, r=wafflespeanutbors-servo2017-10-101-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updated swapper to version 0.1 <!-- Please describe your changes on the following line: --> Update swapper to v0.1, which removes the skeptic dependency. --- <!-- 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 updating dependencies <!-- 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/18820) <!-- Reviewable:end -->
| * | Updated swapper to version 0.1Alan Jeffrey2017-10-101-1/+1
| | |
* | | Auto merge of #18808 - servo:error-location_, r=emiliobors-servo2017-10-101-1/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the current parser location for CSS error … rather than the start location of the current construct. This likely places the error just *after* of the unexpected token whereas before would be best, but that’s likely a much bigger change. See https://bugzilla.mozilla.org/show_bug.cgi?id=1378861 <!-- 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/18808) <!-- Reviewable:end -->
| * | Update to cssparser 0.22 (source location in error types)Simon Sapin2017-10-101-1/+1
| | |
* | | Implement a bit more of the "object" path when loading mediaAnthony Ramine2017-10-102-5/+21
| | |
* | | Properly abort any ongoing resource selection on loading a new mediaAnthony Ramine2017-10-101-8/+10
| | |