Commit graph

620 commits

Author SHA1 Message Date
Clément DAVID
c5fe235112 order derivable traits lists
Ignoring :
 - **generated**.rs
 - python/tidy/servo_tidy_tests/rust_tidy.rs
2017-08-23 21:38:44 +02:00
Emilio Cobos Álvarez
f6bfd44ad6
script: Add a function to check whether a node is before another one in DOM order.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-17 10:31:04 +02:00
Emilio Cobos Álvarez
4304a1d054
script: Optimize CompareDocumentPosition.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-17 10:31:02 +02:00
Emilio Cobos Álvarez
ccd469ce61
script: Early return in CompareDocumentPosition to deindent most of the function.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-17 10:23:02 +02:00
Connor Brewster
e700006fb2 Handle exceptions during upgrades 2017-08-09 14:36:20 -06:00
Connor Brewster
6d9d4add61 Enqueue upgrades 2017-08-09 14:36:18 -06:00
Michael Partheil
b07ebbae6b Replace all uses of the style::stylearc alias with servo_arc.
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).
2017-07-19 09:29:05 +02:00
Connor Brewster
9ecb931c5e Fix adopted and connected callback reactions 2017-07-18 13:36:55 -06:00
bors-servo
7b134440fc Auto merge of #17614 - cbrewster:custom_element_reactions, r=jdm
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 -->
2017-07-17 22:58:53 -07:00
Connor Brewster
4665991503 Support custom element callback reactions 2017-07-17 22:23:45 -06:00
Jonathan Chan
4142665282 Have CharacterData call children_changed on its parent when data is set.
Have CharacterData.SetData call children_changed on its parent when
data is set (if it is a Text node) so that HTMLStyleElement parents can
re-parse. Add variant ChildrenMutation::Text for it to use as the
mutation.

This fixes an issue where an empty <style> element's data is set but the
style is not updated. An HTMLStyleElement parent re-parses in its
children_changed implementation.
2017-07-13 13:02:27 -07:00
bors-servo
f740366c61 Auto merge of #17515 - frewsxcv:frewsxcv-simple-node-iterator, r=KiChjang
Merge explicit node iterator structures into single generic structure.

<!-- 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/17515)
<!-- Reviewable:end -->
2017-06-25 00:38:23 -07:00
Corey Farwell
011ff28aee Merge explicit node iterator structures into single generic structure. 2017-06-25 00:29:08 -04:00
Connor Brewster
37e8b89377 Allow element prefix to be set
Implements step 6.1.10 of
https://dom.spec.whatwg.org/#concept-create-element
2017-06-23 21:10:01 -06:00
Connor Brewster
062b128688 Add flag for sync/async CE creation 2017-06-23 21:09:57 -06:00
Connor Brewster
2f36d3544f Support is option when creating elements 2017-06-23 21:09:55 -06:00
Connor Brewster
6697f5469d Hook CE registry into element creation 2017-06-23 21:09:53 -06:00
Simon Sapin
7af5a7fd54 Untry script 2017-06-18 13:21:49 +02:00
Nicolas Silva
8617320500 Bump euclid to 0.14. 2017-06-14 16:00:59 +02:00
Nazım Can Altınova
15fe48f3f6
stylo: Support :hover and :active quirk 2017-06-10 22:18:32 +03:00
Josh Matthews
27ae1ef2e7 Thread ParseError return values through CSS parsing. 2017-06-09 16:46:25 -04:00
Bobby Holley
713c9a63f6 Move the ancestor hashes out of Selector.
MozReview-Commit-ID: 5mipXnjgSED
2017-06-05 19:43:58 -07:00
Alan Jeffrey
42577365b7 Added a TopLevelBrowsingContextId type. 2017-05-22 09:27:07 -05:00
Imanol Fernandez
0290e405ce Implement MutationObserver childList mutations. 2017-05-19 13:22:06 +02:00
bors-servo
d8b7013fcd Auto merge of #16900 - emilio:pseudos, r=bholley
Bug 1364850: Move PseudoElement to be just another combinator in selectors. r=bholley

On top of https://github.com/servo/servo/pull/16890.

<!-- 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/16900)
<!-- Reviewable:end -->
2017-05-17 05:40:14 -05:00
Emilio Cobos Álvarez
522f8489d6
Bug 1364850: Move PseudoElement to be just another combinator in selectors. r=bholley
MozReview-Commit-ID: 8OoOIodkKJ5
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-17 10:58:24 +02:00
bors-servo
5da0aa9f11 Auto merge of #16883 - jdm:mutationobserver, r=jdm
Mutation Observer API

Rebased from #16668.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix (partially) #6633
- [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/16883)
<!-- Reviewable:end -->
2017-05-17 01:21:40 -05:00
Alan Jeffrey
607e011b05 Renamed constellation::Frame to constellation::BrowsingContext. 2017-05-15 21:03:11 -05:00
Sumit
3ca89204ff Mutation Observer API 2017-05-15 18:15:38 -04:00
Josh Matthews
b0bf2b4bad Make methods storing layout-originating nodes unsafe. 2017-05-15 14:12:08 -04:00
Connor Brewster
d004db95cf Make non-initial about:blank loads asynchronous
Don't update iframe pipeline until load completes

To preserve the previous functionality of delaying load events when a
new navigation is triggered, pending pipeline id represents the
current pending load. The load event is only fired if the load message's
pipeline id matches the pending pipeline id.

Track frame size on Frame instead of Pipeline

Disabled matchMedia test

Track creator pipeline id
2017-05-12 11:53:43 -06:00
Emilio Cobos Álvarez
46bf5d61f0
Bug 1355343: Take all the snapshots into account. r=bholley
I've chosen this approach mainly because there's no other good way to guarantee
the model is correct than holding the snapshots alive until a style refresh.

What I tried before this (storing them in a sort of "immutable element data") is
a pain, since we call into style from the frame constructor and other content
notifications, which makes keeping track of which snapshots should be cleared an
which shouldn't an insane task.

Ideally we'd have a single entry-point for style, but that's not the case right
now, and changing that requires pretty non-trivial changes to the frame
constructor.

MozReview-Commit-ID: FF1KWZv2iBM
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-10 12:05:39 +02:00
bors-servo
8b41c7c137 Auto merge of #16689 - servo:m5e, r=nox
Upgrade to html5ever 0.16

<!-- 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/16689)
<!-- Reviewable:end -->
2017-05-03 08:42:41 -05:00
Bobby Holley
7b0679848b Fix up script and layout. 2017-05-02 17:35:45 -07:00
Simon Sapin
6c518c89b9 Upgrade to html5ever 0.16 2017-05-02 19:24:28 +02:00
bors-servo
195100f3ca Auto merge of #16495 - coalman:tidy-brace-alignment, r=emilio
Make tidy check that opening and closing braces that begin a line do …

…so with proper alignment.

---
<!-- 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 #16486 (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/16495)
<!-- Reviewable:end -->
2017-04-19 03:06:31 -05:00
Bobby Holley
9524c5cb57 Introduce SelectorInner and use it for top-level matching.
MozReview-Commit-ID: DxG6USsPIkh
2017-04-18 20:07:53 -07:00
coalman
fc34b9a14d Fix indentation errors in servo rust code that tidy now finds. 2017-04-18 14:56:13 -04:00
Mukilan Thiyagarajan
38a61712e4 Implement the form owner concept 2017-03-15 16:39:55 +01:00
Anthony Ramine
31e9d81c0f Make #[dom_struct] a proc_macro attribute 2017-02-24 01:50:51 +01:00
Connor Brewster
bfd7b950ad Add ImmutableOrigin to allow for serializing origins 2017-02-22 11:11:59 -06:00
Bobby Holley
9e860df9df Bug 1336646 - Apply selector flags during traversal. r=emilio 2017-02-08 19:21:05 -08:00
Alan Jeffrey
403499a9d5 Allow windows to share browsing contexts. 2017-01-28 21:57:03 -06:00
Alan Jeffrey
a43c842099 The constellation notifies the script thread about documents becoming inactive, active and fully active. 2017-01-27 12:39:43 -06:00
Emilio Cobos Álvarez
bdd7cb9753
script: Rename bounding_content_box to bounding_content_box_or_zero.
And make bounding_content_box preserve whether the element is rendered.
2017-01-18 16:49:52 +01:00
Emilio Cobos Álvarez
485fe874e8
layout: Expose whether the element was rendered in content_box_query to script.
But don't change the API yet.
2017-01-17 13:55:08 +01:00
bors-servo
885d152e92 Auto merge of #14647 - servo:current-global, r=jdm
Support the 'current' global object.

<!-- 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/14647)
<!-- Reviewable:end -->
2016-12-29 01:38:19 -08:00
Emilio Cobos Álvarez
2bbde04ccd
script: Simplify Node::collect_text_contents. 2016-12-25 19:18:28 +01:00
Ms2ger
ec5d08c887 Pass the Document's origin to its constructor.
CC #10963.
2016-12-23 11:15:46 +01:00
Emilio Cobos Álvarez
544c2d993a
script: Remove unused function. 2016-12-22 13:31:39 +01:00