aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
Commit message (Collapse)AuthorAgeFilesLines
* Move util::str to styleAnthony Ramine2016-07-0511-11/+11
|
* Auto merge of #12241 - jdm:multiple-stylesheets, r=notriddlebors-servo2016-07-041-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't load stylesheets in documents without browsing contexts Per https://github.com/whatwg/html/issues/1495, this fixes the most commonly reported panic in nightlies by making us match what other browsers do. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12047 (github issue number if applicable). - [X] There are tests for these changes OR <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12241) <!-- Reviewable:end -->
| * Avoid loading stylesheets in inactive documents.Josh Matthews2016-07-041-0/+4
| |
* | Auto merge of #12243 - TravisDean:else-brace-check, r=ConnorGBrewsterbors-servo2016-07-042-8/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add style check and test for else braces <!-- Please describe your changes on the following line: --> Added a regex check to enforce project style guidelines. Added unit check. Catches: ``` } else { ``` when it should be `} else {` --- <!-- 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 (no core files changed) - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12234 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12243) <!-- Reviewable:end -->
| * | Add style check, test, and code fixes for an else brace check.Travis Dean2016-07-042-8/+5
| | |
* | | Auto merge of #12224 - nox:die-util-die, r=Ms2gerbors-servo2016-07-043-8/+7
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | Remove some stuff from util <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12224) <!-- Reviewable:end -->
| * | Move util::vec::byte_swap to canvas_traitsAnthony Ramine2016-07-042-5/+4
| | |
| * | Move util::vec::ForgetfulSink to style::sink and simplify itAnthony Ramine2016-07-041-3/+3
| | |
* | | Auto merge of #11872 - eddyb:back-to-roots, r=Ms2gerbors-servo2016-07-0426-279/+286
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace return_address usage for rooting with stack guards and convenience macros. The existing `Rooted` and `RootedVec` users were migrated the the following two macros: ```rust let x = Rooted::new(cx, value); // Was changed to: rooted!(in(cx) let x = value); // Which expands to: let mut __root = Rooted::new_unrooted(value); let x = RootedGuard::new(cx, &mut __root); ``` ```rust let mut v = RootedVec::new(); v.extend(iterator); // Was changed to: rooted_vec!(let v <- iterator); // Which expands to: let mut __root = RootableVec::new(); let v = RootedVec::new(&mut __root, iterator); ``` The `rooted!` macro depends on servo/rust-mozjs#272. These APIs based on two types, a container to be rooted and a rooting guard, allow implementing both `Rooted`-style rooting and `Traceable`-based rooting in stable Rust, without abusing `return_address`. Such macros may have been tried before, but in 1.9 their hygiene is broken, they work only since 1.10. Sadly, `Rooted` is a FFI type and completely exposed, so I cannot prevent anyone from creating their own, although all fields but the value get overwritten by `RootedGuard::new` anyway. `RootableVec` OTOH is *guaranteed* to be empty when not rooted, which makes it harmless AFAICT. By fixing rust-lang/rust#34227, this PR enables Servo to build with `-Zorbit`. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix rust-lang/rust#34227 - [x] These changes do not require tests because they are not functional changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11872) <!-- Reviewable:end -->
| * | | Use a stack guard and a macro for RootedVec instead of return_address.Eduard Burtescu2016-07-047-63/+69
| | | |
| * | | Switch to using the new rooted!/RootedGuard API for rooting.Eduard Burtescu2016-07-0421-216/+217
| | | |
* | | | Auto merge of #11875 - izgzhen:file-manager-backend, r=Manishearthbors-servo2016-07-045-83/+173
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integration and improvements of File API backends Basically three major changes: 1. More complete origin check in `FileManagerThreadMsg` 2. Add reference counting logic to file manage store and script API 3. Integrate the support of slicing r? @Manishearth --- <!-- 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 - [ ] These changes do not require tests because _____ <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11875) <!-- Reviewable:end -->
| * | | | Integration and improvements of File API backendsZhen Zhang2016-07-045-83/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. More complete origin check in FileManagerThreadMsg 2. Add reference counting logic to file manage store and script API 3. Integrate the support of slicing
* | | | | Skip the root node in querySelectorAllAnthony Ramine2016-07-041-1/+4
| |_|/ / |/| | | | | | | | | | | This accounts for https://github.com/whatwg/dom/issues/263.
* | | | Auto merge of #12196 - izgzhen:emit-change-file-select, r=Manishearthbors-servo2016-07-031-1/+19
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emit change event when files are selected <!-- Please describe your changes on the following line: --> r? @Manishearth As specified in step 6 of [activation behaviour](https://html.spec.whatwg.org/multipage/forms.html#file-upload-state-(type=file)). --- <!-- 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 <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12196) <!-- Reviewable:end -->
| * | | Emit change event when files are selectedZhen Zhang2016-07-031-1/+19
| |/ /
* | | Auto merge of #12195 - izgzhen:fix-url-blob, r=Manishearthbors-servo2016-07-031-1/+14
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Blob URL origin when scheme is file <!-- Please describe your changes on the following line: --> r? @Manishearth --- <!-- 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 <!-- Either: --> - [x] These changes do not require tests because it needs future integration <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12195) <!-- Reviewable:end -->
| * | | Fix Blob URL origin when scheme is fileZhen Zhang2016-07-031-1/+14
| |/ /
* / / Refactor `util::prefs` operations to be methods on static struct.Corey Farwell2016-07-0211-25/+23
|/ /
* | Auto merge of #12136 - ConnorGBrewster:servo_version_reporter, r=asajeffreybors-servo2016-07-022-0/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Send servo version in mozbrowser error. <!-- Please describe your changes on the following line: --> Adds support for sending a version string to b.html so we can put the servo version in the auto generated issue reports. r? @asajeffrey --- <!-- 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 #12083 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because sending servo version on mozbrwosererror for issue reporter. <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12136) <!-- Reviewable:end -->
| * | Send servo version in mozbrowser error.Connor Brewster2016-07-012-0/+3
| |/ | | | | | | | | Also moved servo version to util for usage by the --version flag and for sending the version to browser.html with mozbrowsererror
* / Removing u8 from HTMLIframeElementPatrick Trottier2016-07-011-19/+21
|/ | | | | | | | | | | | | | | | Remove u8 in HTMLIframeElement.rs Remove u8 from IframeElement.rs u8 removal trying to pass test - uri Update htmliframeelement.rs u8 removal removing u8 from Rust HTMLIFrameElement
* Auto merge of #11931 - izgzhen:fix-html-input-element, r=Manishearthbors-servo2016-06-302-1/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix file-type input element A simple fix to put `inputElem.files` online --- <!-- 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 <!-- Either: --> - [x] There are tests for these changes <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11931) <!-- Reviewable:end -->
| * Fix file-type input elementZhen Zhang2016-06-302-1/+15
| |
* | Auto merge of #11934 - jdm:navigatefragment, r=emiliobors-servo2016-06-291-1/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Special-case setting location.hash to the empty string This avoids endless redirect loops on facebook and makes us compliant with https://github.com/whatwg/html/pull/1318. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #10952 - [X] There are tests for these changes OR <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11934) <!-- Reviewable:end -->
| * | Ensure that a navigation to the same URL is aborted. Fixes #10952.Josh Matthews2016-06-291-1/+4
| | |
* | | Auto merge of #11932 - jdm:servoorg-cert, r=asajeffreybors-servo2016-06-291-4/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print out useful SSL-related information on SSL error page. Make certificate error pages more useful. Attempt to identify known cases where upgrading OpenSSL would be useful. <img width="553" alt="screen shot 2016-06-29 at 12 29 30 pm" src="https://cloud.githubusercontent.com/assets/27658/16460435/4d07d5e2-3df5-11e6-94ab-cf061c0e64cc.png"> --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11932) <!-- Reviewable:end -->
| * | | Print out useful SSL-related information on SSL error page.Josh Matthews2016-06-291-4/+5
| |/ /
* | | Auto merge of #11913 - jdm:stylesheet-error, r=Ms2gerbors-servo2016-06-291-30/+33
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid stalled pages containing unreachable stylesheets This hits some of the pages in the performance testsuite, and leads to a poor user experience since the document load event is never dispatched and the page never finishes parsing. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11535 (github issue number if applicable). - [X] There are tests for these changes OR <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11913) <!-- Reviewable:end -->
| * | Allow pages to finish loading when external stylesheets have network errors.Josh Matthews2016-06-291-30/+33
| |/
* | style: parse the remaining animation longhands.Emilio Cobos Álvarez2016-06-281-0/+8
| |
* | style: Add animation-iteration-count parsing under experimental flagEmilio Cobos Álvarez2016-06-281-0/+2
| |
* | style: Add animation-timing-function parsing as experimental.Emilio Cobos Álvarez2016-06-281-0/+2
| |
* | style: Add animation-duration parsing under experimental flagEmilio Cobos Álvarez2016-06-281-0/+2
| |
* | style: Refactor to pass animations cleanly, land animation-name parsing as ↵Emilio Cobos Álvarez2016-06-281-0/+3
| | | | | | | | experimental
* | Auto merge of #11824 - DarinM223:master, r=KiChjangbors-servo2016-06-281-5/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use get_mut instead of get-remove-set in XHR send() <!-- Please describe your changes on the following line: --> Mutates the header directly with get_mut instead of using get(), remove(), and set(). --- <!-- 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 #11811 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because there are existing web tests <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11824) <!-- Reviewable:end -->
| * | Use get_mut instead of get-remove-set in XHR send()Darin Minamoto2016-06-271-5/+1
| |/
* / Use wrappers for GL IDsAnthony Ramine2016-06-289-57/+113
|/ | | | See https://github.com/servo/webrender_traits/pull/62.
* Use ObjectOpResult::succeed.Ms2ger2016-06-271-6/+3
|
* Remove a useless local variable.Ms2ger2016-06-271-3/+1
|
* Auto merge of #10826 - danlrobertson:cookies, r=asajeffreybors-servo2016-06-261-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Add webdriver commands for (Get|Add)Cookie Add the webdriver commands for GetCookie and AddCookie. In addition the basic messages for sending cookie data back and forth from the resource thread needed to be created and the handlers for those messages were created as well. Do we plan to have some sort of test suite for the webdriver at some point? At this point I primarily test my PRs with basic shell scripts with a lot of `curl` and `jq`. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10826) <!-- Reviewable:end -->
| * Use common cookie struct add cookie webdriver cmdsDan Robertson2016-06-251-1/+1
| | | | | | | | | | One cookie struct to rule them all. One struct to represent them. One cookie struct to bind them all, and through the IPC carry them.
* | Auto merge of #11724 - emilio:webgl-refactor, r=jdmbors-servo2016-06-256-415/+706
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | webgl: Refactor texture validations to take advantage of rust type system <!-- 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 <!-- Either: --> - [x] These changes do not require tests because refactoring. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> This commit introduces the `WebGLValidator` trait, and uses it for multiple validations in the texture-related WebGL code, to move that logic out of the already bloated `webglrenderingcontext.rs` file. It also creates a type-safe wrapper for some WebGL types, removing all the `unreachable!`s there, and introduces a macro for generating them conveniently. This partially addresses #10693, pending refactor more code to use this infrastructure, and (possibly?) introducing an `AsGLError` trait for the errors to make the error handling happen in `WebGLContext`. r? @jdm <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11724) <!-- Reviewable:end -->
| * webgl: Refactor texture validations to take advantage of rust type systemEmilio Cobos Álvarez2016-06-256-415/+706
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces the `WebGLValidator` trait, and uses it for multiple validations in the texture-related WebGL code, to move that logic out of the already bloated `webglrenderingcontext.rs` file. It also creates a type-safe wrapper for some WebGL types, removing all the `unreachable!`s there, and introduces a macro for generating them conveniently. This partially addresses #10693, pending refactor more code to use this infrastructure, and (possibly?) introducing an `AsGLError` trait for the errors to make the error handling happen in `WebGLContext`.
* | Auto merge of #11665 - davideGiovannini:master, r=KiChjangbors-servo2016-06-241-0/+3
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed issue #11651 (Do not fire a blur event when calling .focus() on… <!-- Please describe your changes on the following line: --> Added check in `HTMLElement.Focus` to avoid requesting focus when the element already has it. Added check in `Document.commit_focus_transaction` to avoid sending `blur` and `focus` events when clicking on an already focused element. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11651 <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11665) <!-- Reviewable:end -->
| * fixup! Fixed issue #11651 (Do not fire a blur event when calling .focus() on ↵Davide Giovannini2016-06-102-24/+22
| | | | | | | | a focused element)
| * Fixed issue #11651 (Do not fire a blur event when calling .focus() on a ↵Davide Giovannini2016-06-072-19/+24
| | | | | | | | focused element)
* | Fix insert-adjacent errorGuillaume Gomez2016-06-231-2/+2
| |
* | Wrap executions of Rust code called from JS in catch_unwind. Propagate the ↵Josh Matthews2016-06-223-10/+41
| | | | | | | | interrupted panic to the origin of the JS execution via TLS before resuming. Fix #6462.
* | Avoid an unnecessary panic when the script task deals with a GC after the ↵Josh Matthews2016-06-221-1/+3
| | | | | | | | layout thread is unreachable.