aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/document.rs
Commit message (Collapse)AuthorAgeFilesLines
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+0
|
* Stop embedder calls and fake rAF when window not visiblePaul Rouget2020-03-061-3/+2
|
* Auto merge of #25428 - pshaughn:livebyname, r=jdmbors-servo2020-02-281-14/+47
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make Document.getElementsByName a live collection Another new case for NodeList; this and the labels live collection in #25424 are in the pipeline simultaneously, so one of them will need a merge resolution when the other one lands. Iterating over many same-named elements is potentially slower than it has to be, since getting the nth element from the live view always starts from the start of the tree. --- <!-- 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 #25147 <!-- Either: --> - [X] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * make Document.getElementsByName a live collectionPatrick Shaughnessy2020-02-151-14/+47
| |
* | Remove unnecessary Option.Josh Matthews2020-02-241-2/+2
| |
* | Add profiling for WebXRManish Goregaokar2020-02-221-1/+7
|/
* Auto merge of #25674 - pshaughn:selection, r=jdmbors-servo2020-02-141-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Selection DOM interface (but not actual UI selections) This is work towards #7492. I put new tests in the mozilla-specific directory rather than the main tree because I'm not sure how upstreamable they are; I'd like opinions on that point. This adds a new exposed interface, which I understand from tests/mozilla/interfaces.html is something requiring specific approval from someone allowed to give that approval. Things that aren't done here: - The spec doesn't describe what selection/script-and-style-elements.html wants, and what it wants seems to require some sort of layout query. - Actual UI interactions are not present at all; selection.rs has a few TODOs saying which methods I believe the eventual UI code should call for what actions, but there are a lot of fine points here that I don't know about. - I haven't touched Node; you can ask if a node's in the Selection's Range the same way you'd ask about any other Range, but there's not a faster path just for selection layout.
| * Selection interface working for synthetic operationsPatrick Shaughnessy2020-02-131-0/+18
| |
* | Auto merge of #25548 - pshaughn:docnamedgetter, r=jdmbors-servo2020-02-131-71/+208
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add SupportedPropertyNames to Document (also fix iframe getting) Existing test of named-getting an iframe now succeeds. I added a new test for Object.getOwnPropertyNames(document) based on my understanding of the spec; that test could use a second opinion. UPDATE: This was trying to do too many things in one PR as originally submitted. It is now using #25572 as a base, and I suggest reviewing that PR before this one to avoid duplicating review effort. --- <!-- 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 #7273 for all implemented named getters, fix #25146, and fix the iframe case only of #25145. <!-- Either: --> - [X] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Doc named getter improvementsPatrick Shaughnessy2020-02-131-71/+208
| |
* | Auto merge of #25488 - pshaughn:clickactivate, r=jdmbors-servo2020-02-131-26/+14
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Event dispatch rewritten to align to spec, activate on clicks better I went over the changes to the event dispatch spec that had accumulated over the past few years, rewriting dispatch/invoke/inner-invoke almost completely and modifying other code where it was relevant. Most of the remaining obvious deviations from spec are things that will only come up when we start handling events in shadow DOM. I am pushing now because I want to see CI test results, but please do not approve this PR just if automated test improvements look good. I may have broken some actual UI interactions in the course of fixing synthetic events, and some manual testing is needed, including checking that manual interactions with interactive content continue to fire the events they're supposed to. --- <!-- 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 #25384 and fix #22783 and fix #25199 <!-- Either: --> - [ ] There are automated tests for the synthetic-click parts of these changes, BUT the effects on real UI events need some manual testing before merging <!-- 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. -->
| * Event dispatch rewritten to resemble spec more often, activate on clicks betterPatrick Shaughnessy2020-02-121-26/+14
| |
* | Names should now be consistently atomsPatrick Shaughnessy2020-02-131-3/+3
|/
* rename compartment to realmKunal Mohan2020-01-241-11/+6
|
* Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-0/+2
|
* Add accountable-refcell as optional build time featureKunal Mohan2020-01-081-3/+2
|
* Auto merge of #25310 - pshaughn:attr_node, r=Manishearthbors-servo2020-01-071-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attr is a Node, with consequences for many Node methods <!-- Please describe your changes on the following line: --> Attr is now a Node, as current WHATWG specs require. I think I did some unidiomatic things to make compareDocumentPosition work and it could use a look by someone more familiar with how to write concise Rust code. I also think the new cases in compareDocumentPosition lack tests; it is possible to compare the position of two attributes, or of an attribute and an element, and I don't think any tests are exercising that functionality. --- <!-- 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 #25124 <!-- Either: --> - [ ] There are tests for these changes (existing cases of Node methods are well-tested, and there is a WPT test specifically for whether Attr is Node, but I'm not sure about new Node method cases) <!-- 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. -->
| * Attr is a Node, with consequences for many Node methodsPatrick Shaughnessy2019-12-231-2/+2
| |
* | Just the code, no metadata for nowPatrick Shaughnessy2020-01-021-14/+25
| |
* | createElement can now take an ignored string for optionsPatrick Shaughnessy2019-12-231-6/+15
|/
* Auto merge of #24123 - gterzian:redo_blob, r=jdmbors-servo2019-12-191-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restructure Blob, structured serialization <!-- Please describe your changes on the following line: --> FIX #24052 and also address the "cloning" half of FIX #23917 --- <!-- 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: --> - [ ] 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/24123) <!-- Reviewable:end -->
| * re-structure blob, structured serializationGregory Terzian2019-12-111-0/+3
| |
* | Removed createEvent cases, removed now-unused new_uninitializedsPatrick Shaughnessy2019-12-121-23/+2
| |
* | implement composition event creation in Document.createEventtakumi2019-12-121-0/+3
|/
* dom: Unindent Document::set_activity.Josh Matthews2019-11-211-54/+61
|
* Use `#![register_tool]` instead of `#![register_attr]`Simon Sapin2019-11-151-2/+2
| | | | CC https://github.com/rust-lang/rust/issues/66079
* Auto merge of #24624 - garasubo:fix-keypress-trigger, r=paulrougetbors-servo2019-11-141-1/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix keypress trigger condition Fix #22346 keypress event should be triggered for keys representing character values. So, we should trigger this event for enter key. This event should not trigger for IME inputs. TODO: - It seems we don't handle composition events correctly. To implement this keypress condition correctly, we should fix that first. In my current implementation, onkeypress event will be trigger when the user press Enter key to send inputs in IME (onCompotionEnd). - I don't update any tests, and I couldn't find any tests related to this change in WPT. It might be better to add some tests for it, but I don't know what is the appropriate way. <!-- 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 #___ (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. -->
| * Solve #22346takumi2019-11-031-1/+9
| | | | | | | | | | | | keypress event should be triggered for keys representing character values. So, we should trigger this event for enter key. This event should not trigger for IME inputs.
* | Use surfman for managing GL surfacesPatrick Walton2019-11-011-6/+18
|/ | | | | | Co-authored-by: Alan Jeffrey <ajeffrey@mozilla.com> Co-authored-by: Zakor Gyula <gyula.zakor@h-lab.eu> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* Fix the condition to keep original logictakumi2019-10-251-2/+2
| | | | | | | Address this PR comment: https://github.com/servo/servo/pull/24489/files#diff-30a18e04d7e0b66aafdf192e416cad44R1472 This commit was failed to add in PR #24489. Issue: #22782
* Auto merge of #24489 - garasubo:refactor-submission, r=noxbors-servo2019-10-221-29/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor submission This is my first contribution, so please correct me if I'm wrong I refactored the code as described #22782. --- <!-- 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 #22782 (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. -->
| * [WIP] solve #22782takumi2019-10-181-29/+14
| | | | | | | | TODO: write tests for my change
* | continue messageport, transferable, postmessage optionsGregory Terzian2019-10-191-2/+3
|/
* Add simple implementation of content-security-policy on scripts / stylesMichael Howell2019-10-161-2/+38
| | | | | | | | This needs a lot more hooks before it'll actually be a good implementation, but for a start it can help get some feedback on if this is the right way to go about it. Part of servo/servo#4577
* webgl: Lazily clear the canvas right before the first webgl command of the ↵Josh Matthews2019-10-101-0/+22
| | | | next frame.
* Change setBody to be less strict when getting the immediate childKris Tokarz2019-09-291-1/+1
| | | | | | | | Step four of the dom document body calls for throwing an exception if no document element was found. The current setBody implementation was looking for a document element that is also an html element. It has been updated to use GetDocumentElement which returns any document element.
* Suspend/resume media activity based on document activityFernando Jiménez Moreno2019-09-191-0/+7
|
* Update Window::open and document::open parameters to match the specBastien Orivel2019-08-241-1/+1
| | | | Fixes #24012
* Update to url 2.0Simon Sapin2019-08-171-1/+1
|
* Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30)Simon Sapin2019-07-311-9/+9
|
* Convert CGTraitInterface to use safe JSContext instead of raw JSContextmarmeladema2019-07-241-10/+9
|
* Update euclid.Emilio Cobos Álvarez2019-07-231-1/+1
| | | | | | | | There are a few canvas2d-related dependencies that haven't updated, but they only use euclid internally so that's not blocking landing the rest of the changes. Given the size of this patch, I think it's useful to get this landed as-is.
* More detach shadow changesFernando Jiménez Moreno2019-07-221-3/+0
|
* Remove extra hash-map lookup unregistering media controlsFernando Jiménez Moreno2019-07-221-2/+2
|
* Only allow UA widgets as children of media elementsFernando Jiménez Moreno2019-07-221-0/+1
| | | | Do not allow pseudo-elements for replaced elements
* Implement method to remove media controlsFernando Jiménez Moreno2019-07-221-0/+9
|
* Barebones media UIFernando Jiménez Moreno2019-07-221-0/+29
|
* Implement WheelEvent InterfaceRobert Snakard2019-06-091-1/+51
| | | | | | | | | | | Note: The WheelEvent interface supports rotation in all 3 spatial dimensions. This implementation only supports two due to limitations in the Glutin compositor. The wheelevent interface is a dom interface that triggers for any attached device that can rotate in one or more spatial dimensions. Traditionally this is the mouse wheel though other devices could be used as well. E.g. the trackball on a trackball mouse.
* Remove unused code from script* cratesest312019-06-021-4/+0
|
* Implement MouseEvent buttons attributeGeorge Roman2019-05-161-5/+31
|