Commit graph

16155 commits

Author SHA1 Message Date
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
Connor Brewster
41371208a5 Check namespace during ce def lookup 2017-08-09 14:36:16 -06:00
Connor Brewster
1a9f4cad08 Fix compartment mismatch issue 2017-08-09 14:36:14 -06:00
Connor Brewster
37cbc85727 Use HTMLElement interface for possible CEs 2017-08-09 14:36:13 -06:00
Brad Werth
557ffa979d Rework MediaType to be an atom-based struct instead of an enum.
MozReview-Commit-ID: 1Tfrs9PBkhA
2017-08-09 13:25:30 -07:00
bors-servo
2b92a7e82d Auto merge of #18026 - bholley:continue_traversal_cleanup, r=emilio
Continue cleaning up the traversal entry point machinery

https://bugzilla.mozilla.org/show_bug.cgi?id=1388623

<!-- 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/18026)
<!-- Reviewable:end -->
2017-08-09 13:03:00 -05:00
Bobby Holley
49bdb5bb4e Be more careful about the flags we clear for forgetful traversals.
MozReview-Commit-ID: ETDL8KsInAn
2017-08-09 10:52:04 -07:00
Bobby Holley
c92f883d92 Unrelated: Add a comment for Gecko bug 1368291.
Bundling this in to avoid an extra servo push.
2017-08-09 10:52:01 -07:00
Connor Brewster
e83a0045f9 Add upgrade reaction 2017-08-09 11:06:44 -06:00
Connor Brewster
ec528e944a Implement element upgrade algorithm 2017-08-09 11:06:42 -06:00
Connor Brewster
8c5005fc44 Add construction stack 2017-08-09 11:06:22 -06:00
bors-servo
1457f99909 Auto merge of #18022 - emilio:text-zoom-woes, r=Manishearth
style: Only zoom absolute lengths.

As silly as it may seem to specify font-sizes using viewport units, we weren't
handling zoom for them correctly either.

Bug: 1388588
Reviewed-by: Manishearth
MozReview-Commit-ID: 3Q6phYAu5CE

<!-- 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/18022)
<!-- Reviewable:end -->
2017-08-09 11:58:12 -05:00
Emilio Cobos Álvarez
7d813d8f25
style: Only zoom absolute lengths.
As silly as it may seem to specify font-sizes using viewport units, we weren't
handling zoom for them correctly either.

Bug: 1388588
Reviewed-by: Manishearth
MozReview-Commit-ID: 3Q6phYAu5CE
2017-08-09 17:53:49 +02:00
Fernando Jiménez Moreno
9ec8575f57 Update Trusted<T> documentation 2017-08-09 16:57:32 +02:00
Fausto Núñez Alberro
14c5a1b8d3 Introduce ComputedUrl
Add web platform tests for computed URL styles

Mark url with no original or resolved unreachable

Update the WPT manifest for new url tests
2017-08-09 13:55:39 +02:00
Cameron McCormack
6cbe55206b style: Move selector/declaration counts into PerOriginCascadeData. 2017-08-09 19:27:56 +08:00
Cameron McCormack
cd5b2c9fbe style: Move revalidation selectors into PerOriginCascadeData. 2017-08-09 19:27:55 +08:00
Cameron McCormack
30de56f208 style: Move attribute and state dependencies into PerOriginCascadeData. 2017-08-09 19:27:54 +08:00
Cameron McCormack
16937ba7cd style: Move invalidation map into PerOriginCascadeData. 2017-08-09 19:27:53 +08:00
Cameron McCormack
77c4a42e5d style: Move animations table into PerOriginCascadeData. 2017-08-09 19:27:52 +08:00
Cameron McCormack
781e755f9a style: Use non-counting Bloom filters in Stylist where appropriate. 2017-08-09 19:27:51 +08:00
Cameron McCormack
b23f947d77 selectors: Add a simple Debug impl for CountingBloomFilter. 2017-08-09 19:27:49 +08:00
Cameron McCormack
df2c8b2902 selectors: Add a non-counting Bloom filter type. 2017-08-09 19:27:48 +08:00
Cameron McCormack
e294372a32 selectors: Genericize BloomFilter so we can easily define a non-counting version. 2017-08-09 19:27:47 +08:00
Emilio Cobos Álvarez
3c1645e2d8
style: Update bindings. 2017-08-09 13:06:43 +02:00
Emilio Cobos Álvarez
4e3ea45325
stylo: Devirtualize nsIAtom refcounting.
Bug: 1362338
Reviewed-by: froydnj
MozReview-Commit-ID: 3q5rz3L8quQ
2017-08-09 13:06:11 +02:00
Hiroyuki Ikezoe
d3c86e7b6a Make list-style-type animatable. 2017-08-09 17:35:10 +09:00
Hiroyuki Ikezoe
17eba0d4d6 Drop AnimatedProperty for stylo.
set_list_style_type() for gecko needs an additional argument 'Device' [1], and
making list-style-type animtable makes AnimatedProperty::update() call the
set_list_style_type(). To avoid introducing the Device argument to the setter in
servo, this patch makes simply PropertyAnimation conditional build.
(Whereas in stylo, we don't use the setter for animation, we use clone_xx()
instead.)

[1] https://hg.mozilla.org/mozilla-central/file/1d042bcb2632/servo/components/style/properties/properties.mako.rs#l2667
2017-08-09 17:34:55 +09:00
Cameron McCormack
7f47ae0730 style: Slight refactoring of TraversalStatistics::finish. 2017-08-09 16:24:50 +08:00
Cameron McCormack
68268226ea style: Tweak Stylist API for getting animations to avoid exposing the hash table. 2017-08-09 16:24:49 +08:00
Cameron McCormack
6bdb0abebf style: Make CascadeDataIter iterate from highest to lowest level. 2017-08-09 16:24:47 +08:00
bors-servo
89971910cf Auto merge of #18016 - BorisChiou:stylo/transform/rotate, r=heycam
stylo: Don't apply the rotation if it cannot be normalized.

According to the spec, the computed value of transform is as specified, but
with relative lengths converted into absolute lengths, so in Gecko, we do
nothing while computing the value of rotate3d(), and do normalization in
ProcessRotate3D(). If the direction cannot be normalized, we treat it as
an identity matrix.

However, in Servo, we do normalization in to_computed_value(), and looks
like we are trying to normalize any kind of direction vectors, so according
to the spec, let's move the normalization into Fragment::transform_matrix(),
and return an identity matrix if we cannot normalize its direction vector.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1388216](https://bugzilla.mozilla.org/show_bug.cgi?id=1388216).
- [X] These changes do not require tests because the added test is on Gecko side.

<!-- 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/18016)
<!-- Reviewable:end -->
2017-08-08 22:33:03 -05:00
bors-servo
31582a4874 Auto merge of #18002 - glennw:update-wr-linux-subpx, r=emilio
Update WR (text optimizations, Linux subpixel positioning / rasterization).

<!-- 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/18002)
<!-- Reviewable:end -->
2017-08-08 16:05:54 -05:00
Glenn Watson
f6a9f15fed Update WR.
* CPU text run optimizations.
* Linux subpixel positioning / rasterization.
* Update debug flags API.
* Update to resource transactions API.
2017-08-09 07:05:05 +10:00
bors-servo
ed3c2b9557 Auto merge of #18004 - mbrubeck:layout-cleanup, r=pcwalton
Clean up and simplify layout traversal code

Various refactorings of the code for traversing flow trees, including:

* Add a generic inorder traversal method
* Remove unused `traverse_postorder_absolute_flows` method
* Combine `compute_absolute_position` and `build_display_list` into a single traversal
* Move all generic traversal code into the `layout::traversal` module

And some changes to add documentation and more-accurate names:

* Fix spelling of `bottom_up_flow`
* Rename `compute_absolute_position` to `compute_stacking_relative_position`
* Change the mis-named `traverse_flow_tree_preorder` to `reflow`

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they are refactoring 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/18004)
<!-- Reviewable:end -->
2017-08-08 14:04:23 -05:00
Matt Brubeck
ca300d6424 Allow CalculateStackingRelativePositions to short-circuit 2017-08-08 11:20:16 -07:00
bors-servo
955b625060 Auto merge of #18003 - DarkDrek:move_percentage, r=canaltinova
Move percentage to mod.rs

<!-- Please describe your changes on the following line: -->
The tests in the issue worked for me locally.

---
<!-- 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 #18001 (github issue number if applicable).

<!-- Either: -->
- [X] These changes do not require tests because they are just 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/18003)
<!-- Reviewable:end -->
2017-08-08 13:01:00 -05:00
Matt Brubeck
832b811198 Change the mis-named 'traverse_flow_tree_preorder' to 'reflow' 2017-08-08 10:53:20 -07:00
Matt Brubeck
ee697a926d Fix spelling of bottom_up_flow 2017-08-08 10:53:20 -07:00
Matt Brubeck
d1a37f1ea3 Code organization: Move all generic traversal code to layout::traversal 2017-08-08 10:53:19 -07:00
Matt Brubeck
a08bc13df9 Rename compute_absolute_position to compute_stacking_relative_position 2017-08-08 10:53:17 -07:00
bors-servo
3c644ea616 Auto merge of #18014 - emilio:bitfields, r=SimonSapin
stylo: We've had bitfield accessors for a while now.

This will allow my work in bug 1362338 to not break stylo.

<!-- 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/18014)
<!-- Reviewable:end -->
2017-08-08 11:45:37 -05:00
Keith Yeung
0ff47c4475 Update HTTP fetch 2017-08-08 09:27:19 -07:00
Keith Yeung
b50bcdc8fc Rename basic fetch to scheme fetch 2017-08-08 09:27:17 -07:00
Keith Yeung
ed9c16575c Update main fetch 2017-08-08 09:22:29 -07:00
Emilio Cobos Álvarez
efed0ac742
stylo: We've had bitfield accessors for a while now. 2017-08-08 17:34:12 +02:00
bors-servo
dec4ba8ea6 Auto merge of #18011 - emilio:less-dumb-hash, r=nox
style: Avoid hashing hashes.

These are the last instances I can find of us hashing the atoms hash.

<!-- 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/18011)
<!-- Reviewable:end -->
2017-08-08 10:06:32 -05:00
Emilio Cobos Álvarez
de58c088b1
style: Avoid hashing hashes.
These are the last instances I can find of us hashing the atoms hash.
2017-08-08 17:06:11 +02:00
Connor Brewster
d8510baa29 Unwrap function before calling IsConstructor
IsConstructor returns true for all wrappers that are callable. Wrapped
arrow functions are callable and thus IsConstructor will return true
if given one; however, if we unwrap the arrow function, IsConstructor
will return false. The latter is the correct behavior here.
2017-08-08 08:46:35 -06:00