Commit graph

26502 commits

Author SHA1 Message Date
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
Lars Bergstrom
bf5728c750 Split out some mac builds 2017-05-26 18:50:24 -05: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
Imanol Fernandez
a3e6db115d Update offscreen_gl_context to 0.8.9 2017-05-26 20:56:13 +02: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
bors-servo
7682de499c Auto merge of #17053 - chenpighead:stylo-svg-unitless-length, r=heycam
style: Compute and store SVG unitless length as a factor number

There are 3 SVG properties that accept SVG unitless length, stroke-width, stroke-dasharray, and stroke-dashoffset. We compute and store SVG unitless length as a factor number for stroke-dasharray, but not for stroke-width and stroke-dashoffset.

Servo-side changes from [bug 1367327] https://bugzilla.mozilla.org/show_bug.cgi?id=1367327.

<!-- 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/17053)
<!-- Reviewable:end -->
2017-05-26 03:40:38 -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
bors-servo
ebb3dd8787 Auto merge of #17049 - jklepatch:fix_typo_in_browsingcontext.rs, r=jdm
Fixed typo in components/constellation/browsingcontext.rs

Changed a typo in a comment:
"Each browsing contest..." into "Each browsing context..."

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #17048
- [X] These changes do not require tests because its a typo fix

<!-- 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/17049)
<!-- Reviewable:end -->
2017-05-26 00:24:06 -05:00
Glenn Watson
bcb0e58963 Update WR (mostly optimizations).
* Correctly handle degenerate border corner radii.
* Hold glyphs and images in resource cache longer.
* Optimize the primitive instance code.
* Texture cache coalescing optimizations.
* Workarounds for a couple of driver shader parsing issues.
* Optimize vertex format sizes.
2017-05-26 15:01:22 +10: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
bors-servo
a961f6a1eb Auto merge of #17041 - Manishearth:root_font_size, r=emilio
Move root_font_size to the device

ComputedValues is heap allocated, and the number of CVs grows with the number of elements, so we should keep it small. The root_font_size is the same for the document, so we should stash it on the device and use that instead.

Gecko actually just manually walks up the tree here, but we can't do that. A simple AtomicRefcell should be enough.

Nothing else can be styled in parallel with the root so the refcell should never panic.

<!-- 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/17041)
<!-- Reviewable:end -->
2017-05-25 18:29:52 -05:00
Alan Jeffrey
79743b5358 Webdriver uses browsing context ids rather than pipeline ids. 2017-05-25 17:14:28 -05:00
Manish Goregaokar
ce2237e123 Move root_font_size to the device 2017-05-25 13:32:34 -07:00
Matt Brubeck
c58508dc52 Update dependencies 2017-05-25 12:34:36 -07:00
Eloy Coto
2151a1f459 FMT 2017-05-25 21:04:48 +02:00
UK992
0e072df8c3 Improve clean-cargo-cache 2017-05-25 20:44:16 +02:00
bors-servo
83f82cb4d3 Auto merge of #17039 - servo:jdm-patch-1, r=nox
Update openssl source download location.

The openssl.org webpage has been reorganized and the old URL no longer works.

<!-- 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/17039)
<!-- Reviewable:end -->
2017-05-25 12:20:20 -05:00
Josh Matthews
2ee5a80498 Use real URL. 2017-05-25 13:18:58 -04:00
Josh Matthews
74362ae435 Update openssl source download location. 2017-05-25 13:15:51 -04:00
SimranGujral
af124f2d89 Putting the font computation data in its own struct 2017-05-25 10:14:56 -07:00
Anthony Ramine
150c9df246 Use Rect in InsetRect 2017-05-25 17:27:19 +02:00
Anthony Ramine
6f3c46ca61 Remove uses of parse_four_sides and serialize_four_sides 2017-05-25 17:27:17 +02:00
Anthony Ramine
ca8fae91da Use generics for background-size property 2017-05-25 17:27:11 +02:00
bors-servo
3c267d7fdd Auto merge of #17031 - MortimerGoro:update_webvr, r=emilio
Update rust-webvr

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

Required for https://github.com/servo/servo/issues/16556

---
<!-- 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: -->
- [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/17031)
<!-- Reviewable:end -->
2017-05-25 07:12:11 -05:00
bors-servo
7780ef5e43 Auto merge of #17033 - heycam:default-cs, r=emilio
style: Add support for resolving default computed styles.

Servo-side changes from https://bugzilla.mozilla.org/show_bug.cgi?id=1366157.

<!-- 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/17033)
<!-- Reviewable:end -->
2017-05-25 05:50:52 -05:00
bors-servo
3016a03650 Auto merge of #17035 - upsuper:bug1188074, r=heycam
Allow text to be in background shorthand

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

<!-- 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/17035)
<!-- Reviewable:end -->
2017-05-25 04:10:43 -05:00
Xidorn Quan
3e51595f8e Allow text to be in background shorthand 2017-05-25 18:45:41 +10:00
Emilio Cobos Álvarez
deaa935f5b
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
2017-05-25 10:31:40 +02:00
Imanol Fernandez
5ac106cbbe Update rust-webvr 2017-05-25 10:05:30 +02:00
bors-servo
334d9088b8 Auto merge of #17026 - bzbarsky:mathvariant, r=Manishearth
mathvariant attributes should affect computed font style and weight in stylo

<!-- 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 https://bugzilla.mozilla.org/show_bug.cgi?id=1367301

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because this is stylo-only and Gecko tests it.

<!-- 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/17026)
<!-- Reviewable:end -->
2017-05-25 02:07:08 -05:00
Cameron McCormack
cc44f05f44 style: Add support for resolving default computed styles. 2017-05-25 14:19:59 +08:00
bors-servo
9e7f02ba77 Auto merge of #17021 - servo:grid, r=nox
Stylo: Wrap up grid

Adds the final piece for grid (`grid-template` and `grid` shorthands), fixes #15307

<!-- 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/17021)
<!-- Reviewable:end -->
2017-05-25 00:31:49 -05:00
bors-servo
0d6b0da354 Auto merge of #17028 - bradwerth:innerClone, r=heycam
Stylo: Deep clone ServoStyleSheets.

MozReview-Commit-ID: 6hYIcOa86Y

<!-- Please describe your changes on the following line: -->
https://bugzilla.mozilla.org/show_bug.cgi?id=1339629
https://reviewboard.mozilla.org/r/135314/

---
<!-- 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: -->
- [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/17028)
<!-- Reviewable:end -->
2017-05-24 23:26:23 -05:00
bors-servo
8d950bd620 Auto merge of #17006 - emilio:negative-resolution, r=upsuper
style: Reject non-positive resolution values in media queries.

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1366961
See: https://github.com/w3c/csswg-drafts/issues/1454

<!-- 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/17006)
<!-- Reviewable:end -->
2017-05-24 22:20:37 -05:00
bors-servo
1f323f8848 Auto merge of #17032 - jryans:stylo-visited, r=emilio
Stylo: visited pseudo-class support

Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1328509

<!-- 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/17032)
<!-- Reviewable:end -->
2017-05-24 19:53:48 -05:00
Gregory Terzian
71b0c10164 improve spec compliance of update the image data 2017-05-25 08:01:25 +08:00
J. Ryan Stinnett
f12af6c8d6 Filter visited cascade to only visited dependent properties
Speed up the visited cascade by only running it for the properties that are
actually visited dependent.  (These are only the properties where the separate
set of visited styles is even read at all, so running the rest is wasted work.)

MozReview-Commit-ID: 5B7wYtuH974
2017-05-24 18:08:19 -05:00
J. Ryan Stinnett
47c8574c54 Style sharing cache for visited
The style sharing cache stores the regular `ComputedValues`, so it would also
have the visited values as well for anything inserted into the cache (since they
are nested inside).  Unlike all other element states, a change in state of
unvisited vs. visited does not change the style system's output, since we have
already computed both possible outputs up front.

We change the element state checks when looking for style sharing cache hits to
ignore visitedness, since that's handled by the two separate sets of values.

MozReview-Commit-ID: Dt8uK8gSQSP
2017-05-24 18:08:09 -05:00
J. Ryan Stinnett
582ce1f6e4 Restyle hints for visited
Extend restyle hints to check additional cases for visited.

If we are sensitive to visitedness and the visited state changed, we force a
restyle here.  Matching doesn't depend on the actual visited state at all, so we
can't look at matching results to decide what to do for this case.

This also updates the snapshot version of `match_non_ts_pseudo_class` to check
the relevant link instead of the element state, just like we do when matching
with regular Gecko elements.

There's also a separate case of a visited-dependent selector when other state or
attributes change.  For this, we need to cover both types of matching we use
when cascading values.  If there is a relevant link, then we also matched in
visited mode.  Match again in this mode to ensure this also matches.  Note that
we never actually match directly against the element's true visited state at
all, since that would expose us to timing attacks.  The matching process only
considers the relevant link state and visited handling mode when deciding if
visited matches.

MozReview-Commit-ID: CVGquetQ2VW
2017-05-24 18:08:02 -05:00
J. Ryan Stinnett
2afaa4fcba Rule replacement for visited rules
Since visited rules are stored separately, we need also run `replace_rules` for
those in addition to regular rules.

MozReview-Commit-ID: 4KYhOBXm88O
2017-05-24 18:07:54 -05:00