aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/element.rs
Commit message (Collapse)AuthorAgeFilesLines
* Remove use of unstable box syntax.Simon Sapin2017-10-161-5/+5
| | | | | | | | | | | | | | | | | | | | 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-151-20/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-151-20/+8
| |/ | | | | | | | | 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.
* 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-121-7/+7
|
* Fix URL attributesAnthony Ramine2017-10-111-12/+21
| | | | | 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 #18790 - upsuper:scope, r=emiliobors-servo2017-10-091-2/+7
|\ | | | | | | | | | | | | | | | | | | | | Support :scope pseudo-class This fixes [bug 1406817](https://bugzilla.mozilla.org/show_bug.cgi?id=1406817). <!-- 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/18790) <!-- Reviewable:end -->
| * Support :scope pseudo-class in Element::{matches,closest} in ServoXidorn Quan2017-10-091-2/+7
| |
* | ChildrenOnly -> ChildrenOnly(Option<QualName>)Jyotsna Prakash2017-10-071-1/+4
|/ | | | use this updated type from html5ever
* style: Use a SharedFontList object to store font-family values for Gecko.Cameron McCormack2017-10-041-2/+3
|
* Combine ReflowGoal and ReflowQueryTypeMartin Robinson2017-09-301-8/+4
| | | | | This simplifies the logic in the layout_thread and makes it clearer which types of reflows generate display lists and cause display updates.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-66/+66
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Rename DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-261-16/+16
| | | | | | | | I don't want to do such a gratuitous rename, but with all the other types now having "Dom" as part of their name, and especially with "DomOnceCell", I feel like the other cell type that we already have should also follow the convention. That argument loses weight though when we realise there is still DOMString and other things.
* Rename LayoutJS<T> to LayoutDom<T>Anthony Ramine2017-09-261-3/+3
|
* Rename MutNullableJS<T> to MutNullableDom<T>Anthony Ramine2017-09-261-3/+3
|
* Rename JS<T> to Dom<T>Anthony Ramine2017-09-261-5/+5
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-2/+1
|
* Auto merge of #18600 - servo:promises, r=<try>bors-servo2017-09-221-19/+5
|\ | | | | | | | | | | | | | | | | | | | | Improve Promise The elephant 🐘 (not PHP's) still remains in the room: `Rc<Promise>` shouldn't require `#⁠[allow(unrooted_must_root)]`. <!-- 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/18600) <!-- Reviewable:end -->
| * Use Promise::resolve_native in fullscreen tasksAnthony Ramine2017-09-221-13/+3
| |
| * Make Promise::reject_error soundAnthony Ramine2017-09-221-6/+2
| |
* | Implement an nth-index cache.Bobby Holley2017-09-211-0/+4
|/ | | | MozReview-Commit-ID: Ee0um3QXkxl
* Introduce an NthIndexCache type and pipe it from ThreadLocalStyleContext to ↵Bobby Holley2017-09-201-2/+4
| | | | | | MatchingContext. Some future refactoring here to pass fewer things as parameters would be nice.
* Introduce TaskOnceAnthony Ramine2017-09-201-5/+5
| | | | | Having both TaskBox and TaskOnce allows us to remove the superfluous inner boxing from CancellableTask<T>.
* Rename Task to TaskBoxAnthony Ramine2017-09-201-5/+5
|
* Auto merge of #18533 - servo:TASKS, r=SimonSapinbors-servo2017-09-181-5/+6
|\ | | | | | | | | | | | | | | Rename Runnable to Task and other improvements <!-- 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/18533) <!-- Reviewable:end -->
| * Move Task to its own moduleAnthony Ramine2017-09-181-1/+2
| |
| * Rename Runnable to TaskAnthony Ramine2017-09-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | The changes are: * `*Runnable` -> `*Task`; * `RunnableMsg` -> `Task`; * `RunnableWrapper` -> `TaskCanceller`; * `MainThreadRunnable` -> `MainThreadTask`; * `wrap_runnable` -> `wrap_task`; * `get_runnable_wrapper` -> `task_canceller`; * `handler` -> `run`; * `main_thread_handler` -> `run_with_script_thread`.
* | style: Make border-spacing serialization consistent, and move it to ↵Emilio Cobos Álvarez2017-09-171-4/+6
|/ | | | precomputed_type.
* Rename VirtualMethods::attribute_is_mappedAnthony Ramine2017-09-071-2/+2
| | | | | This name doesn't convey what the method is about, it's now attribute_affects_presentational_hints.
* Handle dynamic font color changeP. Albrecht2017-09-071-0/+10
|
* Auto merge of #18361 - toidiu:ak-18354, r=emiliobors-servo2017-09-031-4/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | change function signature to get type name via intrinsics <!-- Please describe your changes on the following line: --> change function signature to get type name via intrinsics --- <!-- 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 #18354 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because stated in the PR that it was not required <!-- 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/18361) <!-- Reviewable:end -->
| * move name implementation as default implementation to the trait and remove ↵toidiu2017-09-031-4/+0
| | | | | | | | overrides.
* | Properly change the kind of the given attribute in SetAttributeNodeAnthony Ramine2017-09-031-5/+10
|/ | | | | | | | The given argument may have special meaning for the element to which we add it, and thus may have a specific representation to which we should switch the attribute current's value. Fixes #18357.
* order derivable traits listsClément DAVID2017-08-231-3/+3
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Enqueue attribute changed callback when replacing attrConnor Brewster2017-08-141-0/+9
|
* Track custom element stateConnor Brewster2017-08-091-0/+20
|
* Handle exceptions during upgradesConnor Brewster2017-08-091-6/+16
|
* Add upgrade reactionConnor Brewster2017-08-091-0/+4
|
* Bug 1374233 - Part 5: Use NonNegativeLength and NonNegativeAu for ↵Boris Chiou2017-08-041-1/+1
| | | | | | | | | | border-spacing. We already have NonNegativeLength and NonNegativeAu, so we can re-use it to define the specified value and the computed value of border-spacing. And then implement ToAnimatedValue for it. MozReview-Commit-ID: CLckpKMYVXU
* Replace all uses of the style::stylearc alias with servo_arc.Michael Partheil2017-07-191-1/+1
| | | | | | The alias is left there temporarilly and will be removed completely in a later commit where also components/style/gecko/generated/structs_{debug|release}.rs are re-generated (they still use the old alias).
* Auto merge of #17614 - cbrewster:custom_element_reactions, r=jdmbors-servo2017-07-171-5/+53
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement custom element reactions <!-- Please describe your changes on the following line: --> Initial work for implementing custom element reactions: https://html.spec.whatwg.org/multipage/custom-elements.html#custom-element-reactions --- <!-- 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 #17433 (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/17614) <!-- Reviewable:end -->
| * Support custom element callback reactionsConnor Brewster2017-07-171-5/+53
| |
* | style: Respect calc for percentages.Emilio Cobos Álvarez2017-07-141-3/+3
|/
* Allow element prefix to be setConnor Brewster2017-06-231-7/+13
| | | | | Implements step 6.1.10 of https://dom.spec.whatwg.org/#concept-create-element