aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
Commit message (Collapse)AuthorAgeFilesLines
* Bump cssparser to 0.13.7Manish Goregaokar2017-06-021-1/+1
|
* Auto merge of #15354 - cynicaldevil:manual-redirect, r=jdmbors-servo2017-06-022-29/+62
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Redirect document loads manually <!-- 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 - [X] These changes fix #14596 . r? @jdm I ran some tests at random from the `navigating-across-documents` folder, and they are passing. <!-- 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/15354) <!-- Reviewable:end -->
| * Redirect document loads manuallyNikhil Shagrithaya2017-05-312-29/+62
| |
* | Pull decls from Gecko for link preshintsJ. Ryan Stinnett2017-06-021-3/+7
| | | | | | | | | | | | | | Based on a link's active state and the visited handling mode, pull in link, vlink, and alink preshint declaration blocks from Gecko as needed. MozReview-Commit-ID: A6udMYbzQnK
* | Use BorderSideWidth for outline-widthAnthony Ramine2017-06-021-1/+1
| |
* | Auto merge of #17067 - est31:master, r=jdmbors-servo2017-06-011-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring back clipboard support Brings back clipboard support. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #17065 - [x] These changes fix #12805 <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ - [x] Testing these chances would require a full integration-style test suite, which servo currently lacks. <!-- 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/17067) <!-- Reviewable:end -->
| * | Bring back clipboard supportest312017-06-011-3/+3
| | |
* | | fix double borrowing of image requestGregory Terzian2017-06-011-3/+1
| |/ |/|
* | Auto merge of #16238 - gterzian:implement_update_the_image_data, r=jdmbors-servo2017-05-302-99/+390
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement "update the image data" <!-- Please describe your changes on the following line: --> Spec compliant implementation of the [update the image data algorithm](https://html.spec.whatwg.org/multipage/embedded-content.html#update-the-image-data). Currently still a work in progress, the ['async src complete test`](https://github.com/servo/servo/blob/master/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/img.complete.html#L33) is still passing as it was before, even though I switched to the new code, so I guess that's something. @jdm I will be picking this up next weekend, I left a bunch of TODO and NOTES in the code, if you or someone else have time this week I would appreciate an initial scan and feedback. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #11517 (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/16238) <!-- Reviewable:end -->
| * improve spec compliance of update the image dataGregory Terzian2017-05-252-99/+390
| |
* | EventSource: decode UTF-8 code points across network packetsSimon Sapin2017-05-273-5/+39
| |
* | Remove some usage of rust-encodingSimon Sapin2017-05-273-16/+7
| |
* | Decode UTF-8 code points across network packetsSimon Sapin2017-05-275-29/+65
| |
* | Auto merge of #16997 - asajeffrey:webdriver-browsing-contexts-not-pipelines, ↵bors-servo2017-05-264-26/+23
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r=jgraham Webdriver browsing contexts not pipelines <!-- Please describe your changes on the following line: --> At the moment, a webdriver session stores a `pipeline_id`s, which causes a mismatch with the spec, which asks a session to store a browsing context and a top-level browsing context. This PR fixes this mismatch. --- <!-- 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 we are not testing webdriver <!-- 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/16997) <!-- Reviewable:end -->
| * | Responding to review comments.Alan Jeffrey2017-05-261-1/+1
| | |
| * | Webdriver uses browsing context ids rather than pipeline ids.Alan Jeffrey2017-05-254-27/+24
| | |
* | | Auto merge of #17042 - mbrubeck:always-be-updating, r=jdmbors-servo2017-05-261-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update dependencies No Cargo.toml changes except `base64` which is updated from 0.4.2 to 0.5.2. Does not affect stylo. No new crates in the dependency graph. <!-- 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/17042) <!-- Reviewable:end -->
| * | | Update dependenciesMatt Brubeck2017-05-251-1/+1
| |/ /
* | | Auto merge of #16920 - synlestidae:servo-16705, r=asajeffreybors-servo2017-05-262-1/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement window.closed <!-- Please describe your changes on the following line: --> Implements #16705. window.closed should evaluate to true if BrowsingContext is discarded --- <!-- 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 #16705 (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/16920) <!-- Reviewable:end -->
| * | | Implement window.closedantunovicm2017-05-262-1/+8
| | | |
* | | | Auto merge of #17025 - emilio:layout-data, r=jdmbors-servo2017-05-251-7/+5
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | script/layout: Stop doing unsafe transmutes between refcell references. This commit splits the style and layout data in two separate refcells. These transmutes have been a source of trouble (for example on Android), and they feel like a hack anyway. Fixes #16982 <!-- 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/17025) <!-- Reviewable:end -->
| * | | layout: Stop doing unsafe transmutes between refcell references.Emilio Cobos Álvarez2017-05-251-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit splits the style and layout data in two separate refcells. These transmutes have been a source of trouble (for example on Android), and they feel like a hack anyway. Fixes #16982
* | | | Auto merge of #17031 - MortimerGoro:update_webvr, r=emiliobors-servo2017-05-253-2/+46
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update rust-webvr <!-- Please describe your changes on the following line: --> Required for https://github.com/servo/servo/issues/16556 --- <!-- 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/17031) <!-- Reviewable:end -->
| * | | | Update rust-webvrImanol Fernandez2017-05-253-2/+46
| |/ / /
* | | | Look for relevant links while matchingJ. Ryan Stinnett2017-05-242-26/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust the matching process to look for a "relevant link" while matching. A "relevant link" is the element being matched if it is a link or the nearest ancestor link. Matching for links now depends on the `VisitedHandlingMode`, which determines whether all links match as if they are unvisited (the default) or if the relevant link matches as visited (and all others remain unvisited). If a relevant link is ever found for any selector, track this as part of the `MatchingContext` object. This is used in the next patch to determine if an additional match and cascade should be performed to compute the styles when visited. MozReview-Commit-ID: 3xUbRo7vpuD
* | | | Rollup merge of #17017 - behnam:textinput, r=noxManish Goregaokar2017-05-241-11/+9
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [script/textinput] Fix warning: unreachable pattern The `cfg` attribute in use resulted in two match arms for two cases on `macos`. Since both arms had a main functionality in common, I merged them and conditions the extra `macos` part. ``` warning: unreachable pattern --> /Users/behnam/code/servo/servo/components/script/textinput.rs:696:13 | 696 | (None, Key::Home) => { | ^^^^^^^^^^^^^^^^^ | = note: #[warn(unreachable_patterns)] on by default warning: unreachable pattern --> /Users/behnam/code/servo/servo/components/script/textinput.rs:700:13 | 700 | (None, Key::End) => { | ^^^^^^^^^^^^^^^^ | = note: #[warn(unreachable_patterns)] on by default ``` <!-- 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). [N/A] <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because fixes compile-time warnings. <!-- 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/17017) <!-- Reviewable:end -->
| * | | [script/textinput] Fix warning: unreachable patternBehnam Esfahbod2017-05-241-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `cfg` attribute in use resulted in two match arms for two cases on `macos`. Since both arms had a main functionality in common, I merged them and conditions the extra `macos` part. ``` warning: unreachable pattern --> /Users/behnam/code/servo/servo/components/script/textinput.rs:696:13 | 696 | (None, Key::Home) => { | ^^^^^^^^^^^^^^^^^ | = note: #[warn(unreachable_patterns)] on by default warning: unreachable pattern --> /Users/behnam/code/servo/servo/components/script/textinput.rs:700:13 | 700 | (None, Key::End) => { | ^^^^^^^^^^^^^^^^ | = note: #[warn(unreachable_patterns)] on by default ```
* | | | Auto merge of #17004 - nox:rollup, r=noxbors-servo2017-05-241-2/+0
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rollup of 7 pull requests - Successful merges: #16885, #16886, #16932, #16939, #16948, #16986, #16995 - Failed merges: <!-- 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/17004) <!-- Reviewable:end -->
| * | | Rollup merge of #16885 - jonathanGB:master, r=jdmAnthony Ramine2017-05-231-2/+0
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug 1270740 - remove requestAutocomplete reference <!-- Please describe your changes on the following line: --> I was in charge of removing the `requestAutocomplete` feature in [mozilla-central](https://bugzilla.mozilla.org/show_bug.cgi?id=1270740), and needed to remove a reference to that feature in the **servo** comments. The change, therefore, is really trivial. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [X] These changes do not require tests because I simply removed a comment <!-- 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/16885) <!-- Reviewable:end -->
| | * | | Bug 1270740 - remove requestAutocomplete referenceJonathan Guillotte-Blouin2017-05-151-2/+0
| | | | |
* | | | | Auto merge of #16985 - emilio:cache, r=bholleybors-servo2017-05-231-2/+4
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | layout: Stop mutating the style data from layout. This is part of #16982. Right now we have some code that tries to cache stuff in the style data during layout. This code is extremely rarely executed, only for `<details>` and `<summary>`. I think if we really really want to cache these, we should find a place in the layout data for it. For now, let's move it away (and all the other layout code) from mutating the style data from layout. <!-- 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/16985) <!-- Reviewable:end -->
| * | | | layout: Stop mutating the style data from layout.Emilio Cobos Álvarez2017-05-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part of #16982. Right now we have some code that tries to cache stuff in the style data during layout. This code is extremely rarely executed, only for `<details>` and `<summary>`. I think if we really really want to cache these, we should find a place in the layout data for it. For now, let's move it away (and all the other layout code) from mutating the style data from layout.
* | | | | Auto merge of #16979 - manfredbrandl:patch-1, r=emiliobors-servo2017-05-231-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove unused style::restyle_hints::RestyleReplacements <!-- Please describe your changes on the following line: --> remove unused style::restyle_hints::RestyleReplacements from line 134 --- <!-- 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 #16978 (github issue number if applicable). <!-- Either: --> - [X] These changes do not require tests because removes only unused "use" <!-- 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/16979) <!-- Reviewable:end -->
| * | | | | remove unused style::restyle_hints::RestyleReplacementsManfred Brandl2017-05-211-1/+1
| |/ / / / | | | | | | | | | | solve #16978
* / / / / Added a TopLevelBrowsingContextId type.Alan Jeffrey2017-05-227-62/+164
|/ / / /
* | | | Auto merge of #16933 - MortimerGoro:mutation_children, r=jdmbors-servo2017-05-204-17/+112
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement MutationObserver childList mutations. <!-- Please describe your changes on the following line: --> Implement MutationObserver childList mutations --- <!-- 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/16933) <!-- Reviewable:end -->
| * | | | Implement MutationObserver childList mutations.Imanol Fernandez2017-05-194-17/+112
| | | | |
* | | | | style: Refactor RestyleHint to be a struct.Cameron McCormack2017-05-202-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Later PRs will add additional data to it that is not so easy to represent using bitflags.
* | | | | Auto merge of #16963 - BorisChiou:stylo/animation/omta, r=emiliobors-servo2017-05-201-1/+4
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stylo: Bug 1334036 - Enable animations running on compositor. These are interdependent patches of Bug 1334036, which enables off-main thread animations. We add one FFI to get the property id set which overriding animations, so we can make sure the cascade result is correct for off-main thread animations. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix [Bug 1334036](https://bugzilla.mozilla.org/show_bug.cgi?id=1334036) - [X] These changes do not require tests because we support off-main thread animation only on Gecko, and there are enough test cases there. <!-- 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/16963) <!-- Reviewable:end -->
| * | | | | Trigger restyle if important rules are changed.Boris Chiou2017-05-201-1/+4
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we add/remove important rules, we may need to update a list of all important rules (in Gecko) which overrides animation properties. Therefore, we need to set a flag if we update the primary rules which includes important ones. If we have animations on this element, we update its effect properties, and also send a task to update cascade results. Calling get_properties_overriding_animations() might cases some impact on performance because we need to walk the rule tree, so if possible, we could just store this set into TNode to avoid finding the properties for both old and new rules each time. This could be a future work if necessary.
* / | | | Update app_units to 0.4.1Manish Goregaokar2017-05-191-1/+1
|/ / / /
* | | | Auto merge of #16861 - gterzian:use_microtask_to_await_stable_state, r=jdmbors-servo2017-05-193-52/+47
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use microtasks to await a stable state. <!-- Please describe your changes on the following line: --> @jdm @KiChjang First pass at using microtasks to await a stable state. I ran into all sorts of problems to get it to compile, I think it's mainly related to the fact that the microtasks are stored in a `Vec`, which meant the `Runnalbe.handler(self: Box<Self>)` couldn't be called while iterating over the Vec... It compiles now although I haven't run any tests. I'm assuming I'm missing something fundamental and was hoping my changes would highlight the problems I run into, and you had a better idea of how to implement this... Perhaps we shouldn't pass a `Runnable` to `await_stable_state` at all? --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #15375 (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/16861) <!-- Reviewable:end -->
| * | | | use microtasks to await a stable stateGregory Terzian2017-05-193-52/+47
| | | | |
* | | | | Auto merge of #16954 - servo:arrayvec, r=emiliobors-servo2017-05-191-15/+14
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid returning / passing around a huge ParsedDeclaration type This enum type used to contain the result of parsing one CSS source declaration (`name: value;`) and expanding shorthands. Enum types are as big as the biggest of their variant (plus discriminant), which was quite big because some shorthands expand to many longhand properties. This type was returned through many functions and methods, wrapped and rewrapped in `Result` with different error types. This presumably caused significant `memmove` traffic. Instead, we now allocate an `ArrayVec` on the stack and pass `&mut` references to it for various functions to push into it. This type is also very big, but we never move it. We still use an intermediate data structure because we sometimes decide after shorthand expansion that a declaration is invalid after all and that we’re gonna drop it. Only later do we push to a `PropertyDeclarationBlock`, with an entire `ArrayVec` or nothing. In future work we can try to avoid a large stack-allocated array, and instead writing directly to the heap allocation of the `Vec` inside `PropertyDeclarationBlock`. However this is tricky: we need to preserve this "all or nothing" aspect of parsing one source declaration, and at the same time we want to make it as little error-prone as possible for the various call sites. `PropertyDeclarationBlock` curently does property deduplication incrementally: as each `PropertyDeclaration` is pushed, we check if an existing declaration of the same property exists and if so overwrite it. To get rid of the stack allocated array we’d need to somehow deduplicate separately after pushing multiple `PropertyDeclaration`. <!-- 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/16954) <!-- Reviewable:end -->
| * | | | | Avoid returning / passing around a huge ParsedDeclaration typeSimon Sapin2017-05-191-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enum type used to contain the result of parsing one CSS source declaration (`name: value;`) and expanding shorthands. Enum types are as big as the biggest of their variant (plus discriminant), which was quite big because some shorthands expand to many longhand properties. This type was returned through many functions and methods, wrapped and rewrapped in `Result` with different error types. This presumably caused significant `memmove` traffic. Instead, we now allocate an `ArrayVec` on the stack and pass `&mut` references to it for various functions to push into it. This type is also very big, but we never move it. We still use an intermediate data structure because we sometimes decide after shorthand expansion that a declaration is invalid after all and that we’re gonna drop it. Only later do we push to a `PropertyDeclarationBlock`, with an entire `ArrayVec` or nothing. In future work we can try to avoid a large stack-allocated array, and instead writing directly to the heap allocation of the `Vec` inside `PropertyDeclarationBlock`. However this is tricky: we need to preserve this "all or nothing" aspect of parsing one source declaration, and at the same time we want to make it as little error-prone as possible for the various call sites. `PropertyDeclarationBlock` curently does property deduplication incrementally: as each `PropertyDeclaration` is pushed, we check if an existing declaration of the same property exists and if so overwrite it. To get rid of the stack allocated array we’d need to somehow deduplicate separately after pushing multiple `PropertyDeclaration`.
* | | | | | Auto merge of #16913 - jdm:canvas2d, r=jdmbors-servo2017-05-195-22/+30
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make canvas origin clean checks use origin of image response Adapted from #15887. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #15409 - [X] There are tests for these changes <!-- 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/16913) <!-- Reviewable:end -->
| * | | | | Use the origin of the actual image response when determining if a canvas is ↵SendilKumar N2017-05-195-22/+30
| | | | | | | | | | | | | | | | | | | | | | | | origin clean.
* | | | | | Auto merge of #16893 - MortimerGoro:webgl_extensions, r=emiliobors-servo2017-05-1926-40/+1291
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement WebGL extensions <!-- Please describe your changes on the following line: --> This PR provides the base for implementing WebGL extensions. It comes with the following ones already implemented and passing all related WebGL conformance tests: - OES_texture_float - OES_texture_float_linear - OES_texture_half_float - OES_texture_half_float_linear - OES_vertex_array_object I'll submit other extensions like compressed textures in a separate PR to ease the review process. I included the 5 extensions in this PR because it's easier to show/review how the WebGL extension base works. To pass all OES_texture_float_xxx tests I had to add some missing format conversions in WebGLRenderingContext.rs --- <!-- 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/16893) <!-- Reviewable:end -->
| * | | | | | Implement WebGL extensions.Imanol Fernandez2017-05-1826-40/+1291
| | | | | | |
* | | | | | | ol[type=…] and li[type=…] preshints need to be case-sensitiveSimon Sapin2017-05-182-1/+9
| | | | | | |