Commit graph

14337 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
10bd5636dc
style: Allow sharing style for elements with presentational hints. 2017-05-29 23:12:44 +02:00
Emilio Cobos Álvarez
03952a0c27
style: Also cache the class list in the CurrentElementInfo.
This patch also removes all notion of style sharing from matching.rs, which is
nice.
2017-05-29 22:54:17 +02:00
Emilio Cobos Álvarez
abcc9b301c
style: Add a CachedStyleSharingData to hold the candidate class list and revalidation results. 2017-05-29 21:56:21 +02:00
Emilio Cobos Álvarez
fb6339bbf9
style: rewrap some comments to 80 columns for consistency with the rest of the code. 2017-05-29 21:39:41 +02:00
Emilio Cobos Álvarez
544e0f4cd6
style: Allow ApplicableDeclarationBlocks to be compared.
We'll need this to cache pres hints, which generate these.
2017-05-29 21:38:21 +02:00
Emilio Cobos Álvarez
3ebd48039e
style: Allow StyleSource to be compared. 2017-05-29 21:31:04 +02:00
bors-servo
63533ce72a Auto merge of #17075 - dadaa:bug1367283, r=hiikezoe
Bug1367283

<!-- Please describe your changes on the following line: -->
This PR is to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1367283

---
- [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. The tests will land in dom/animation/test of m-c.  Test code is patch 9 of https://bugzilla.mozilla.org/show_bug.cgi?id=1367283

<!-- 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/17075)
<!-- Reviewable:end -->
2017-05-29 12:44:38 -05:00
bors-servo
8dc7879230 Auto merge of #16987 - tictakk:ticbranch, r=emilio
Using stack-allocated variable for font feature setting

<!-- Please describe your changes on the following line: -->
Using stack-allocated small vector instead of the previous vector<u8>.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because this is an optimization

<!-- 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/16987)
<!-- Reviewable:end -->
2017-05-29 09:58:43 -05:00
daisuke
8a5c7a50d1 Implements box related discrete animatable properties 2017-05-29 23:10:04 +09:00
daisuke
f46678cea8 Implements position related discrete animatable properties 2017-05-29 23:10:02 +09:00
daisuke
545a7420c8 Implements xul related discrete animatable properties 2017-05-29 23:10:00 +09:00
daisuke
1a915fa07c Implements svg related discrete animatable properties 2017-05-29 23:09:58 +09:00
daisuke
23e673f2a2 Implements ui related discrete animatable properties 2017-05-29 23:09:30 +09:00
Matthew
c26fb34108 Using stack-allocated variable for font feature setting 2017-05-29 08:39:39 -04:00
bors-servo
86dcd5366f Auto merge of #17074 - paulrouget:remove_viewport, r=emilio
remove no-op viewport code

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because no-op code

<!-- 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/17074)
<!-- Reviewable:end -->
2017-05-29 07:13:58 -05:00
Paul Rouget
b0afc2694c remove no-op viewport code 2017-05-29 09:49:03 +02:00
daisuke
3e37278d9e Implements pointing related discrete animatable properties 2017-05-29 16:09:57 +09:00
daisuke
d0cf7d65f0 Implements background related discrete animatable properties 2017-05-29 16:09:20 +09:00
daisuke
917dbdfdbd Implements simple discrete animatable properties 2017-05-29 16:08:09 +09:00
Nicholas Nethercote
6d5b1242db Introduce and start using the MallocSizeOf trait.
MallocSizeOf is similar to the existing HeapSizeOf trait from the
heapsize crate. The only difference is that MallocSizeOf's
malloc_size_of_children() function takes an additional MallocSizeOfFn
argument, which is used to measure heap blocks. This extra argument
makes MallocSizeOf match how Gecko's memory measurements work, and is
required for Stylo to integrate with DMD.

The patch also introduces a second trait, MallocSizeOfWithGuard, which
is much the same as MallocSizeOf, but with a |guard| argument for the
global style lock.

Finally, the patch uses the new traits to measure a small amount of
Stylo's memory usage.
2017-05-29 10:16:55 +10:00
bors-servo
369d5cf124 Auto merge of #17058 - Manishearth:stylo-randomprops, r=emilio
stylo: Support remaning longhands

r=xidorn https://bugzilla.mozilla.org/show_bug.cgi?id=1367275

<!-- 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/17058)
<!-- Reviewable:end -->
2017-05-27 13:37:59 -05:00
Manish Goregaokar
ccccfb988a stylo: Support -moz-min-font-size-ratio 2017-05-27 11:37:36 -07:00
Manish Goregaokar
de269b6b36 stylo: Support -moz-context-properties 2017-05-27 10:47:44 -07:00
Manish Goregaokar
9ed5a7a05e stylo: Support font-variation-settings 2017-05-27 10:47:43 -07:00
bors-servo
6b1f039205 Auto merge of #17060 - upsuper:bug1363596, r=heycam
Support symbols() function and string value for list-style-type for stylo

This is the Servo side change of [bug 1363596](https://bugzilla.mozilla.org/show_bug.cgi?id=1363596).

<!-- 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/17060)
<!-- Reviewable:end -->
2017-05-27 07:09:30 -05:00
Xidorn Quan
a4674554e7 Update binding files. 2017-05-27 21:52:00 +10:00
Xidorn Quan
505809528c Add string support for list-style-type. 2017-05-27 21:51:58 +10:00
Xidorn Quan
1df685dc40 Add support for symbols() function. 2017-05-27 20:45:58 +10:00
Xidorn Quan
9f4a78c2d0 Merge nsCOMPtr<nsIAtom> into CounterStylePtr. 2017-05-27 20:45:51 +10:00
bors-servo
7275f65981 Auto merge of #17036 - servo:derive-all-the-things, r=emilio
Use values::generics::rect::Rect some more

<!-- 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/17036)
<!-- Reviewable:end -->
2017-05-27 05:41:12 -05:00
Xidorn Quan
856c296304 Update binding files from autoland. 2017-05-27 20:39:54 +10:00
Simon Sapin
4e4b5ab5c8 Decode UTF-8 code points across network packets 2017-05-27 09:01:45 +02:00
Manish Goregaokar
dd1cc6bb45 stylo: Support -moz-window-shadow 2017-05-26 22:34:03 -07:00
Manish Goregaokar
fae851b995 stylo: Support column-span 2017-05-26 22:33:05 -07:00
bors-servo
6706c81837 Auto merge of #17057 - Manishearth:nonac, r=emilio
Don't set root font size when styling NAC

try at https://treeherder.mozilla.org/#/jobs?repo=try&revision=ad4acc4941dd91d10e3646ecd7fa03576fc75342

<!-- 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/17057)
<!-- Reviewable:end -->
2017-05-27 00:18:01 -05:00
Manish Goregaokar
314d7d36e2 Don't set root font size when styling NAC
MozReview-Commit-ID: 12CEdFLSJTh
2017-05-26 22:06:44 -07:00
bors-servo
0bc7e2fddf Auto merge of #16997 - asajeffrey:webdriver-browsing-contexts-not-pipelines, r=jgraham
Webdriver browsing contexts not pipelines

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

At the moment, a webdriver session stores a `pipeline_id`s, which causes a mismatch with the spec, which asks a session to store a browsing context and a top-level browsing context. This PR fixes this mismatch.

---
<!-- 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 do not require tests because we are not testing webdriver

<!-- 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/16997)
<!-- Reviewable:end -->
2017-05-26 16:38:12 -05:00
Alan Jeffrey
3f761bed53 Responding to review comments. 2017-05-26 12:42:45 -05:00
bors-servo
0f5ccdb589 Auto merge of #17042 - mbrubeck:always-be-updating, r=jdm
Update dependencies

No Cargo.toml changes except `base64` which is updated from 0.4.2 to 0.5.2.  Does not affect stylo.  No new crates in the dependency graph.

<!-- 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/17042)
<!-- Reviewable:end -->
2017-05-26 12:18:12 -05:00
bors-servo
8747ccc9e8 Auto merge of #16920 - synlestidae:servo-16705, r=asajeffrey
Implement window.closed

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

Implements #16705. window.closed should evaluate to true if BrowsingContext is discarded

---
<!-- 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 #16705 (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/16920)
<!-- Reviewable:end -->
2017-05-26 10:10:36 -05:00
bors-servo
dbadf5a8b6 Auto merge of #17046 - dbaron:bug1367577, r=Manishearth
Fix stylo bindings for Gecko changes to nsITheme constants in bug 1367577

These changes fix the stylo bindings for the changes to the Gecko nsITheme constants in [bug 1367577](https://bugzilla.mozilla.org/show_bug.cgi?id=1367577).

I believe there isn't anything in these changes that should affect the stylo build (as opposed to the servo build, which I've tested on try in that bug).

<!-- 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/17046)
<!-- Reviewable:end -->
2017-05-26 08:48:39 -05:00
bors-servo
531fd12e13 Auto merge of #17050 - birtles:fix-base-styles, r=hiro
Fix calculation of base styles to drop animation rules

It seems that changeset 97ce9ed5b0 mistakenly changed the check that a cascade level to keep is *not* an animation level to a check that it *is* an animation level.

This patch has been reviewed by @hiikezoe in [Mozilla bug 1367960](https://bugzilla.mozilla.org/show_bug.cgi?id=1367960).

<!-- 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/17050)
<!-- Reviewable:end -->
2017-05-26 07:34:16 -05:00
Jeremy Chen
800433aacb style: Compute and store SVG unitless length as a factor number.
Servo-side changes from [bug 1367327] https://bugzilla.mozilla.org/show_bug.cgi?id=1367327.
2017-05-26 16:05:36 +08:00
antunovicm
510bea7a7a Implement window.closed 2017-05-26 20:00:17 +12:00
Brian Birtles
4deab0f06a Fix calculation of base styles to drop animation rules
It seems that changeset 97ce9ed5b0
mistakenly changed the check that a cascade level to keep is *not* an
animation level to a check that it *is* an animation level.
2017-05-26 13:53:23 +09:00
jklepatch
bcdf6503fb Fixed typo in components/constellation/browsingcontext.rs 2017-05-26 12:26:43 +08:00
L. David Baron
de7411c43c
Servo changes for updated Gecko theme constants in bug 1367577.
This is a little bit odd, because I didn't want to do all the work to
convert the theme constants to an enum class (although that would be
nice to do in the future).  So this makes them a regular enum, but still
uses gecko_constant_prefix rather than gecko_enum_prefix because that
makes it possible to add the NS_THEME_ prefix that's still present.
2017-05-25 22:03:17 -04:00
L. David Baron
3332385186
Update bindings with Gecko change to nsITheme constants in bug 1367577.
This update picks up both the nsThemeConstants.h and ServoBindings.toml changes
in [bug 1367577](https://bugzilla.mozilla.org/show_bug.cgi?id=1367577).
2017-05-25 21:59:41 -04:00
bors-servo
764da7ba39 Auto merge of #17025 - emilio:layout-data, r=jdm
script/layout: Stop doing unsafe transmutes between refcell references.

This commit splits the style and layout data in two separate refcells.

These transmutes have been a source of trouble (for example on Android), and
they feel like a hack anyway.

Fixes #16982

<!-- 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/17025)
<!-- Reviewable:end -->
2017-05-25 19:58:47 -05:00
Alan Jeffrey
79743b5358 Webdriver uses browsing context ids rather than pipeline ids. 2017-05-25 17:14:28 -05:00