Commit graph

30032 commits

Author SHA1 Message Date
bors-servo
b6475cf433 Auto merge of #19057 - mrobinson:update-wr-sticky-api, r=glennw
Update WR to use the new sticky positioning API

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they do not change behavior.

<!-- 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/19057)
<!-- Reviewable:end -->
2017-10-30 15:58:07 -05:00
bors-servo
10227e3cd2 Auto merge of #19051 - CYBAI:moz-script-min-size-no-mako, r=emilio,canaltinova
style: Move font -moz-script-min-size outside of mako

This is a sub-PR for #19015
r? emilio

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #19034 (github issue number if applicable).
- [X] These changes do not require tests because _____

<!-- 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/19051)
<!-- Reviewable:end -->
2017-10-30 15:00:05 -05:00
bors-servo
7f8842f7a9 Auto merge of #19044 - cbrewster:text_overflow_nomako, r=emilio
style: Move text-overflow outside of mako

<!-- 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 are apart of #19015 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because refactoring.

<!-- 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/19044)
<!-- Reviewable:end -->
2017-10-30 14:04:52 -05:00
bors-servo
f18099118a Auto merge of #19061 - servo:ft-alloc, r=mbrubeck
FreeType: don’t use usable_size() as deallocation size

Instead use C-level malloc()/free() so that the size doesn’t need to be known during deallocation, since FreeType doesn’t provide it.

Hopefully fixes https://github.com/servo/servo/issues/19058

Depends on https://github.com/alexcrichton/jemallocator/pull/21

<!-- 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/19061)
<!-- Reviewable:end -->
2017-10-30 12:40:34 -05:00
Simon Sapin
6319ad0124 FreeType: don’t use usable_size() as deallocation size
Instead use C-level malloc()/free() so that the size doesn’t need
to be known during deallocation, since FreeType doesn’t provide it.

Hopefully fixes https://github.com/servo/servo/issues/19058
2017-10-30 18:22:30 +01:00
CYBAI
63cd930fd0 style: Move font -moz-script-min-size outside of mako 2017-10-31 00:44:55 +08:00
bors-servo
26279064eb Auto merge of #19060 - emilio:invalidation-fishy, r=nox
style: Fix some fishiness in the invalidation code.

See individual commits for details, I think this is not observable.

<!-- 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/19060)
<!-- Reviewable:end -->
2017-10-30 07:39:00 -05:00
bors-servo
1b73cf3352 Auto merge of #19059 - emilio:selector-map-nicer, r=nox
style: Make the SelectorMap API slightly nicer.

<!-- 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/19059)
<!-- Reviewable:end -->
2017-10-30 06:42:14 -05:00
Emilio Cobos Álvarez
f060cbb38c
style: Properly forward ElementWrapper::blocks_ancestor_combinators.
Not doing it is buggy. I think the only outcome of it is that we may
over-invalidate, so it's probably not a huge deal, but worth doing it.
2017-10-30 12:40:25 +01:00
Emilio Cobos Álvarez
bea79aabff
style: Implement ElementWrapper::pseudo_element_originating_element in terms of its TElement implementation.
This matches right now, but it may not in the future.
2017-10-30 12:40:24 +01:00
Emilio Cobos Álvarez
7861ec1d5b
style: Make the SelectorMap API slightly nicer. 2017-10-30 12:33:44 +01:00
Martin Robinson
f37fa0cf6d Update WR to use the new sticky positioning API 2017-10-30 10:15:30 +01:00
bors-servo
17bfe5c120 Auto merge of #19055 - upsuper:window-opacity, r=Manishearth
Add support for -moz-window-opacity to stylo

Fixes [bug 1374177](https://bugzilla.mozilla.org/show_bug.cgi?id=1374177).

<!-- 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/19055)
<!-- Reviewable:end -->
2017-10-30 00:42:45 -05:00
Xidorn Quan
c7172052f9 Add support for -moz-window-opacity to stylo 2017-10-30 16:33:51 +11:00
bors-servo
f4cf5dceee Auto merge of #19054 - glennw:update-wr-drivers, r=jdm
Update WR (driver bug fix, optimize DL writer).

<!-- 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/19054)
<!-- Reviewable:end -->
2017-10-29 20:28:16 -05:00
Glenn Watson
a9acb2466a Update WR (driver bug fix, optimize DL writer). 2017-10-30 07:02:29 +10:00
bors-servo
98a90d25cf Auto merge of #19041 - jmaher:mozbuild, r=jdm
Bug 1411583 - servo directory in-tree has no BUGZILLA_COMPONENTS info…

…rmation

<!-- Please describe your changes on the following line: -->
this is a new file which doesn't affect anything in servo, instead this is used for when servo is vendored into mozilla-central to build Firefox we expect all files in the tree to have a mapping to a bugzilla component.

---
<!-- 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
    - NOTE: I pushed to try to get this, running locally was taking a long time
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1411583

<!-- Either: -->
- [X] These changes do not require tests because this is a meta data file for when this code is added to mozilla-central

<!-- 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/19041)
<!-- Reviewable:end -->
2017-10-28 14:13:25 -05:00
Joel Maher
861746e307 Bug 1411583 - servo directory in-tree has no BUGZILLA_COMPONENTS information 2017-10-28 13:23:36 -04:00
bors-servo
52f962c387 Auto merge of #19048 - emilio:shadow-style-sharing, r=bzbarsky
style: Make style sharing look at XBL / Shadow DOM rules.

Reland of #19045, because it was backed out for an unexpected pass.

Bug: 1412251
Reviewed-by: bz
MozReview-Commit-ID: II6lk6OmSZU

<!-- 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/19048)
<!-- Reviewable:end -->
2017-10-28 06:06:56 -05:00
Emilio Cobos Álvarez
0df912be93
style: Make style sharing look at XBL / Shadow DOM rules.
Bug: 1412251
Reviewed-by: bz
MozReview-Commit-ID: II6lk6OmSZU
2017-10-28 12:43:43 +02:00
bors-servo
76a71996f4 Auto merge of #19047 - moz-servo-sync:gecko-backout, r=moz-servo-sync
Backed out changeset fc813bf68348 for failing reftest layout/reftests/bugs/272646-1.xul on OS X. r=backout

Backed out changeset fc813bf68348 for failing reftest layout/reftests/bugs/272646-1.xul on OS X. r=backout

Backs out https://github.com/servo/servo/pull/19045

<!-- 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/19047)
<!-- Reviewable:end -->
2017-10-28 04:23:28 -05:00
Gecko Backout
cda9d186c1 Backed out changeset fc813bf68348 for failing reftest layout/reftests/bugs/272646-1.xul on OS X. r=backout
Backs out https://github.com/servo/servo/pull/19045
2017-10-28 08:08:47 +00:00
Connor Brewster
deb932784e style: Move text-overflow outside of mako 2017-10-27 23:09:05 -05:00
bors-servo
592c513c28 Auto merge of #19045 - emilio:shadow-style-sharing, r=bzbarsky
style: Make style sharing look at XBL / Shadow DOM rules.

Bug: 1412251
Reviewed-by: bz
MozReview-Commit-ID: II6lk6OmSZU

<!-- 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/19045)
<!-- Reviewable:end -->
2017-10-27 19:14:20 -05:00
Emilio Cobos Álvarez
4b43b7c7f8
style: Make style sharing look at XBL / Shadow DOM rules.
Bug: 1412251
Reviewed-by: bz
MozReview-Commit-ID: II6lk6OmSZU
2017-10-28 02:13:59 +02:00
bors-servo
4e2c0e3277 Auto merge of #19042 - BorisChiou:stylo/animation/compositor, r=<try>
stylo: Switch to Servo style backend for compositor animations

These are inter-dependent patches for bug 1340005. We add two FFIs to create the
AnimationValues of Opacity and Transform because we support these two properties
on the compositor. Besides, we factor out some common function in glue.rs, so we
can use the same code path for both main-thread and compositor-thread animations.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1340005](https://bugzilla.mozilla.org/show_bug.cgi?id=1340005).
- [X] These changes do not require tests because we have automatic test coverage on Gecko already, and Servo doesn't support compositor animation for now.

<!-- 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/19042)
<!-- Reviewable:end -->
2017-10-27 14:38:43 -05:00
Boris Chiou
3a29c63250 Handle rotate, rotate{x|y|z}, and skew{x|y} properly when cloning transforms. 2017-10-27 21:18:31 +02:00
Boris Chiou
52c81a0a84 Add Servo_ComposeAnimationSegment which composes an animation segment. 2017-10-27 21:18:21 +02:00
Boris Chiou
1f5551c397 Add Servo_AnimationValue_Transform which creates an AnimationValue of transform. 2017-10-27 21:18:11 +02:00
Boris Chiou
f02bd01add Add Servo_AnimationValue_Opacity which creates an AnimationValue of opacity. 2017-10-27 21:18:01 +02:00
bors-servo
d0213b2111 Auto merge of #19039 - sylvestre:master, r=emilio
Support multi lines declarations in the parsing of the Fx header files

For example, in dom/base/nsGkAtomList.h, we currently have:

`GK_ATOM(mouseWheel, "mouseWheel")  // For discrete wheel events (e.g. not OSX magic mouse)`

but if we change to
```
GK_ATOM(mouseWheel,
        "mouseWheel")  // For discrete wheel events (e.g. not OSX magic mouse)
```
The parser didn't handle the declaration

<!-- 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: -->
- [ ] `./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/19039)
<!-- Reviewable:end -->
2017-10-27 10:16:03 -05:00
Sylvestre Ledru
6d6a68b5b1 Support multi lines declarations in the parsing of the Fx header files
For example, in dom/base/nsGkAtomList.h, we currently have:
GK_ATOM(mouseWheel, "mouseWheel")  // For discrete wheel events (e.g. not OSX magic mouse)
but if we change to
GK_ATOM(mouseWheel,
        "mouseWheel")  // For discrete wheel events (e.g. not OSX magic mouse)
The parser didn't handle the declaration
2017-10-27 17:10:42 +02:00
bors-servo
d21657a9e5 Auto merge of #19028 - MortimerGoro:webgl2, r=emilio
Kick off WebGL 2.0 implementation

<!-- Please describe your changes on the following line: -->

This PR kicks off the WebGL 2.0 implementation:

- Include WebGL2RenderingContext.webidl and comment unimplemented methods
- Create WebGL2 struct hierarchy with WebGL 1.0 backwards compatibility
- Add WebGL 2.0 entry points to canvas
- Select the correct GL Version on GLContext backends (related PR https://github.com/emilio/rust-offscreen-rendering-context/pull/108)
- Add WebGL version selection in shader compilations
- Create a WebGL 2.0 preference

I tried a complex three.js demo using canvas.getContext("webgl2") and the backwards compatibility worked great.

Next steps:

- I'll add WebGLVersion selection/filtering to WebGLExtensions and move some extensions to core in WebGL 2.0 (e.g. VAOs)
- I'll add the WebGL 2.0 conformance WPT
- I'll create a mega-issue with a the list of all TODO methods for a complete WebGL 2.0 implementation (as @emilio did with WebGL 1.0), so we can start start getting community involvement.

---
<!-- 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
- [x] These changes do not require tests because I will add the entire webgl 2.0 WPT in a different PR

<!-- 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/19028)
<!-- Reviewable:end -->
2017-10-27 05:56:12 -05:00
Imanol Fernandez
ddd6c86e99 Kick off WebGL 2.0 implementation 2017-10-27 12:53:11 +02:00
bors-servo
8f171058f8 Auto merge of #19035 - nnethercote:bug-1411893, r=emilio
Introduce nsStaticAtom.

It's a sub-class of nsAtom, useful for cases where you know you are dealing
exclusively with static atoms. The nice thing about it is that you can use
raw nsStaticAtom pointers instead of RefPtr<>. (In fact, the AddRef/Release
implementations ensure that we'll crash if we use RefPtr<nsStaticAtom>.)

<!-- 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
- [ ] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1411893

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because tested on the Gecko side.

<!-- 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/19035)
<!-- Reviewable:end -->
2017-10-27 04:34:17 -05:00
Nicholas Nethercote
5866b820e0 Introduce nsStaticAtom.
It's a sub-class of nsAtom, useful for cases where you know you are dealing
exclusively with static atoms. The nice thing about it is that you can use
raw nsStaticAtom pointers instead of RefPtr<>. (In fact, the AddRef/Release
implementations ensure that we'll crash if we use RefPtr<nsStaticAtom>.)
2017-10-27 20:33:40 +11:00
bors-servo
ecff7945d9 Auto merge of #19036 - cbrewster:table_xspan_outside_mako, r=emilio
style: Move table -x-span outisde of mako

<!-- 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 are apart of #19015 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because refactoring.

<!-- 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/19036)
<!-- Reviewable:end -->
2017-10-27 01:10:33 -05:00
Connor Brewster
122626e46b Move table -x-span outisde of mako 2017-10-27 01:09:57 -05:00
bors-servo
cce9a24202 Auto merge of #19032 - glennw:update-wr-blur, r=jdm
Update WR (improved blur filter, color emoji blending).

<!-- 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/19032)
<!-- Reviewable:end -->
2017-10-26 21:11:32 -05:00
bors-servo
de7595f16f Auto merge of #19027 - emilio:svg-use-bug, r=upsuper
selectors: Be consistent about how we get a parent element for selector matching

This fixes bug 1412011.

<!-- 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/19027)
<!-- Reviewable:end -->
2017-10-26 19:54:09 -05:00
Glenn Watson
5cc9a57d7e Update WR (improved blur filter, color emoji blending). 2017-10-27 06:49:40 +10:00
bors-servo
dff1d99307 Auto merge of #19030 - CYBAI:move-properties-out-of-mako, r=emilio
style: Move -x-text-zoom outside of mako

Sub-PR for #19015

r? emilio

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #19020 .

<!-- 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/19030)
<!-- Reviewable:end -->
2017-10-26 13:58:00 -05:00
CYBAI
cefc622e9b style: Move -x-text-zoom outside of mako 2017-10-27 02:32:59 +08:00
bors-servo
fd4843a40e Auto merge of #18979 - sgift:patch-1, r=mbrubeck
Windows Build: Install Visual Studio at default location

Visual Studio 2017 has to be installed at the default location or mach.bat will show an error that Visual Studio 2017 is not installed when trying to build servo.

[X] These changes do not require tests because no code is changed, documentation only.

<!-- 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/18979)
<!-- Reviewable:end -->
2017-10-26 12:37:31 -05:00
Emilio Cobos Álvarez
2b94c79d5a
style: inline a local-variable which is no longer used more than once. 2017-10-26 18:31:03 +02:00
Emilio Cobos Álvarez
529f33eb6f
selectors: Be consistent about how we get next elements for selector-matching.
This fixes bug 1412011.

MozReview-Commit-ID: JgLoBNjA3m8
2017-10-26 18:24:07 +02:00
Emilio Cobos Álvarez
22dc480272
selectors: Deindent some selector-matching code.
MozReview-Commit-ID: B0ixSTcRS4S
2017-10-26 18:23:06 +02:00
bors-servo
d94cd4fa9b Auto merge of #19025 - atouchet:woff-fix, r=jdm
Update Browser.html again

Update Browser.html again to latest version to pick up fontawseome woff file change that got lost in the process. Should fix the missing interface icons on Windows.

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [x] These changes fix #15255 (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/19025)
<!-- Reviewable:end -->
2017-10-26 10:46:24 -05:00
Alex Touchet
d147b1fb28 Update Browser.html again 2017-10-26 07:57:03 -07:00
bors-servo
ee4e371c73 Auto merge of #19024 - emilio:document, r=KiChjang
Introduce style::dom::TDocument.

The secret plan is introducing a `get_elements_with_id` for use by `querySelector` / `querySelectorAll`.

But this allows also to make some code look a bit nicer.

<!-- 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/19024)
<!-- Reviewable:end -->
2017-10-26 07:51:21 -05:00