aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #26083 - servo:layout-2020-more-cleanups, r=jdmbors-servo2020-04-0120-536/+480
|\ | | | | | | | | | | More layout cleanups from the introduction of a lifetime in LayoutDom<T> What can I say, the follow-up fixes just kept coming to my door one by one, I couldn't just tell them to go away.
| * Add some comments and remove obsolete allow attributesAnthony Ramine2020-04-012-3/+9
| |
| * Introduce more layout helpers to make selection_for_layout be safeAnthony Ramine2020-04-013-18/+30
| |
| * Introduce <LayoutDom<Element>>::focus_stateAnthony Ramine2020-04-013-2/+14
| |
| * Make LayoutShadowRootHelpers::get_style_data_for_layout return a &CascadeDataAnthony Ramine2020-04-011-3/+6
| | | | | | | | That return type is Sync, which thus means that the method can be safe.
| * Make synthesize_presentational_hints_for_legacy_attributes be safeAnthony Ramine2020-04-011-4/+2
| |
| * Make LayoutDocumentHelpers::style_shared_lock be safeAnthony Ramine2020-04-011-3/+3
| | | | | | | | StyleSharedRwLock is Sync.
| * Move unsafe code out of <LayoutDom<HTMLTextAreaElement>>::value_for_layoutAnthony Ramine2020-04-011-10/+19
| |
| * Introduce a bunch of LayoutDom<HTMLInputElement> private helpersAnthony Ramine2020-04-011-30/+31
| | | | | | | | Those help contain the unsafety in most of the actual helpers used by layout.
| * Introduce <LayoutDom<HTMLImageElement>>::current_requestAnthony Ramine2020-04-012-43/+26
| | | | | | | | | | This safe helper contains the only source of unsafety from the actual image layout helpers methods, making them completely safe.
| * Make LayoutNodeHelpers::composed_parent_node_ref be safeAnthony Ramine2020-04-012-28/+30
| | | | | | | | | | | | For clarity, I introduce <LayoutDom<Element>>::parent_node_ref to contain the remaining unsafety bits out of composed_parent_node_ref which is more complex than just a field access.
| * Make LayoutShadowRootHelpers::get_host_for_layout be safeAnthony Ramine2020-03-311-6/+8
| |
| * Make a bunch of LayoutNodeHelpers be safeAnthony Ramine2020-03-311-24/+21
| |
| * Introduce LayoutDom::isAnthony Ramine2020-03-312-4/+12
| | | | | | | | Just like Castable::is.
| * Make layout methods accessing rare data be safeAnthony Ramine2020-03-312-19/+22
| | | | | | | | | | | | They don't do anything fancy so there is no additional unsafety calling them compared to using LayoutDom in the first place, the usual story of all those changes.
| * Don't generate rare_data_for_layout methods anymoreAnthony Ramine2020-03-313-9/+6
| | | | | | | | It is only used twice.
| * Introduce LayoutDom::to_layout_sliceAnthony Ramine2020-03-312-8/+10
| | | | | | | | It generalises <LayoutDom<Element>>::attrs.
| * Make a bunch of LayoutDocumentHelpers be safeAnthony Ramine2020-03-311-17/+23
| | | | | | | | The other methods are actually unsafe.
| * Make LayoutCanvasRenderingContext2DHelpers::get_canvas_id be safeAnthony Ramine2020-03-311-7/+11
| |
| * Make a bunch or trivial LayoutElementHelpers safeAnthony Ramine2020-03-311-13/+7
| |
| * Reduce scope of unsafe block in LayoutHTMLCanvasElementHelpers::dataAnthony Ramine2020-03-311-15/+15
| |
| * Introduce <LayoutDom<Element>>::attrs()Anthony Ramine2020-03-3114-238/+150
| | | | | | | | | | | | This safe method is the basic block to access element attributes from layout. We reuse it in the other attr-related layout methods to remove a pretty big source of rampant unsafe code between script and layout.
| * Merge RawLayoutElementHelpers into LayoutElementHelpersAnthony Ramine2020-03-3114-76/+69
| |
| * Move around some code in the elementAnthony Ramine2020-03-311-52/+52
| | | | | | | | | | The intent is to merge the two layout helper traits together so I'm moving them around to make later diffs more readable.
* | Auto merge of #26077 - jdm:xr-canvas-dirty, r=asajeffreybors-servo2020-03-313-0/+18
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | webgl: Don't dirty canvas element while in immersive mode. There are various WebGL APIs that are supposed to trigger a frame composite at the end of the event loop when they're used. We enforce this via dirtying the canvas element and ensuring that reflow occurs for normal content. This is redundant when we're using immersive mode and incurs extra work by the layout thread and compositor that inhibits the immersive rendering performance. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix (part of) #26019 - [x] These changes do not require tests because we do not have infrastructure to test immersive mode on CI.
| * | webgl: Don't dirty canvas element while in immersive mode.Josh Matthews2020-03-313-0/+18
| | |
* | | Cache the result of retrieving an element's client rectangle from layout.Josh Matthews2020-03-314-21/+124
|/ /
* | Auto merge of #26070 - servo:layout-2020-more-cleanups, r=SimonSapinbors-servo2020-03-316-66/+73
|\| | | | | | | | | | | Make LayoutNodeHelpers::text_content return a cow What does it mean? It means that layout can process `Text` nodes' contents by just borrowing them, potentially saving us from a lot of unnecessary tempoorary allocations, which is nice.
| * Remove an obsolete commentAnthony Ramine2020-03-311-1/+0
| |
| * Make LayoutNodeHelpers::text_content return a cowAnthony Ramine2020-03-311-6/+6
| |
| * Make LayoutCharacterDataHelpers::data_for_layout be safeAnthony Ramine2020-03-312-7/+5
| |
| * Make LayoutHTMLTextAreaElementHelpers::value_for_layout safeAnthony Ramine2020-03-312-14/+13
| |
| * Make LayoutHTMLInputElementHelpers::value_for_layout return a cowAnthony Ramine2020-03-312-26/+31
| |
| * Introduce AttrHelpersForLayout::namespaceAnthony Ramine2020-03-312-1/+7
| |
| * Don't clone the result of AttrHelpersForLayout::local_nameAnthony Ramine2020-03-312-5/+5
| | | | | | | | There is no need to do that. Embrace returning borrows from the DOM, it good.
| * Rename AttrHelpersForLayout methodsAnthony Ramine2020-03-312-11/+11
| |
| * Make AttrHelpersForLayout methods be safeAnthony Ramine2020-03-311-10/+10
| | | | | | | | The unsafety isn't there, it's in the creation of the LayoutDom<T> values.
* | Use mozjs exposed function to generate SourceTextCYBAI2020-03-312-16/+6
|/
* Auto merge of #26054 - shnmorimoto:fix_tojson_unconditionally_serializes, r=jdmbors-servo2020-03-312-11/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix tojson unconditionally serializes <!-- 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 #25281 <!-- 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. -->
| * fixed CGCollectJSONAttributesMethodShinichi Morimoto2020-03-311-5/+3
| |
| * fixed is_satisfied conditionShinichi Morimoto2020-03-301-12/+14
| |
| * remove unnecessary conditionShinichi Morimoto2020-03-301-3/+0
| |
| * fixed fmtShinichi Morimoto2020-03-282-3/+7
| |
| * fixed #25281Shinichi Morimoto2020-03-283-3/+13
| |
* | Auto merge of #26009 - SasiDharKM:master, r=jdmbors-servo2020-03-303-0/+95
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementation for ImageBitmap <!-- Please describe your changes on the following line: --> Created the boilerplate code for the image bitmap implementation. --- <!-- 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 #20650 <!-- 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. -->
| * | Implement ImageBitmap interfacesantoshpavan2020-03-303-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementation of ImageBitmap ImageBitMap webidl file added Implementation of ImageBitmap mentioned the correct origin link basic new and new_inherited updated the mod.rs file to include imagebitmap imagebitmap implemented changed according to Serialization implemented serializable get methods for width and height basic imagebitmap added missing crates added Vec and missing crates Syntax fixes Reformatting and minor error fixes Implementation of ImageBitmap tidy-test runs Took out extra parameters in reflect_dom_object call added comments with specification links for webidl functions changing the code based on review comments adding resolved changes form the pull request Changes based on pr review Changes based on pr review ran test-tidy and fmt removed the duplicate crate removed unnecessary crates Kept only the relevant crate import Updated test expectations, exposed interface list, and manifest
* | | Auto merge of #26025 - szeged:webgl_draw_range_elements, r=jdmbors-servo2020-03-304-2/+79
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for DrawRangeElements in WebGL2 Adds initial support for the WebGL2 `DrawRangeElements` call. <!-- Please describe your changes on the following line: --> I have started working on this function, but not sure how could I check for the Uniform Block Backing (https://www.khronos.org/registry/webgl/specs/latest/2.0/#ACTIVE_UNIFORM_BLOCK_BACKING). I am looking for some advice. --- <!-- 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] There are tests for these changes cc @mmatyas @zakorgy @jdm <!-- 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. -->
| * | Add support for DrawRangeElements in WebGL2Istvan2020-03-304-2/+79
| | | | | | | | | | | | Adds initial support for the WebGL2 `DrawRangeElements` call.
* | | Remove a bunch of _forever suffixes in Attr methodsAnthony Ramine2020-03-302-14/+14
| | | | | | | | | | | | They don't return &'static references anymore.
* | | Make LayoutDom<'dom, T> be a mere reference wrapperAnthony Ramine2020-03-301-28/+10
| | |