Commit graph

33063 commits

Author SHA1 Message Date
Josh Matthews
88c980847b Update manifests. 2018-05-21 23:21:55 -04:00
Josh Matthews
40f04ff58e Don't suppress the result of checking the WPT manifest. 2018-05-21 23:16:42 -04:00
WPT Sync Bot
496933fbc3 Update web-platform-tests to revision 76c0092916ee8a9171396e62c472d85a0f2623fb 2018-05-21 22:52:04 -04:00
bors-servo
319556cf6a
Auto merge of #20843 - emilio:font-stretch-anim, r=emilio
style: Fix font-stretch animation.

This is a regression from #20506 which Gecko tests caught while trying to import
this.
2018-05-21 05:58:10 -04:00
Emilio Cobos Álvarez
b6a17426a0
style: Fix font-stretch animation.
This is a regression from #20506 which Gecko tests caught while trying to import
this.
2018-05-21 11:57:03 +02:00
Aneesh Agrawal
6861f9bdcf Make it easier to debug Taskcluster runs
Print out each command before it is run,
to help debug future Taskcluster issues.
2018-05-20 18:41:11 -07:00
Aneesh Agrawal
f41377f10d Increase max run time to 2 hours
Based on the Taskcluster log for
(https://taskcluster-artifacts.net/HkxDh1oKQceXH1fL9RSGow/0/public/logs/live_backing.log),
it looks like the job is running successfully but hitting the max time limit.

Our builds + tests shouldn't take this long to run normally,
but we'll need to set up sccache with cache uploading/downloading
in order to improve most build times.

For now, bump the max run time to 2 hours;
since we complete one build + som tests within an hour,
2 hours should be enough for the second build to finish as well.
2018-05-20 18:36:44 -07:00
Fabrice Desré
20266fa103 Save local storage at every change and not just on shutdown 2018-05-20 12:15:02 -07:00
bors-servo
affcf81ce6
Auto merge of #20838 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central.

See each individual commit for details.
2018-05-20 14:13:32 -04:00
Emilio Cobos Álvarez
fade636ebe
style: Fix Gecko build after #20506. 2018-05-20 20:12:30 +02:00
Mats Palmgren
34722c3de9
style: Inlinify display:list-item to display:inline for now, until we support 'display:inline list-item' properly.
Bug: 1461039
Reviewed-by: xidorn
2018-05-20 18:59:14 +02:00
Xidorn Quan
514aba51ad
style: Use RefPtr::new instead of RefPtr::from_ptr_ref + clone.
Bug: 1461858
Reviewed-by: emilio
2018-05-20 18:58:44 +02:00
Xidorn Quan
ecb2ec63de
style: Rename from_url_value_data to from_url_value and reuse URLValue passed in for ComputedUrl.
Bug: 1461858
Reviewed-by: emilio
MozReview-Commit-ID: LJGm3lUS9mD
2018-05-20 18:58:31 +02:00
Xidorn Quan
5b0903e604
style: Have from_image_request reuse ImageValue from image request directly.
And also remove ComputedImageUrl::from_url_value_data.

Bug: 1461858
Reviewed-by: emilio
MozReview-Commit-ID: 5zifQlU7tOz
2018-05-20 18:58:13 +02:00
Xidorn Quan
45a37503af
style: Make from_image_request infallible.
All callsites already assert, so moving the assertion into the method
should be fine. It is not expected to handle a null image value anyway.

Bug: 1461858
Reviewed-by: emilio
MozReview-Commit-ID: J8CA8m22eSv
2018-05-20 18:57:55 +02:00
Xidorn Quan
dc2aadd43a
style: Make creating CssUrl infallible.
There were a check in CssUrl::parse_from_string for extra data, which
was removed as part of servo/servo#16241, so it never fails now.

CssUrl::from_url_value_data doesn't seem to need Result from the very
beginning. It is unclear why it was made that way.

Bug: 1461858
Reviewed-by: emilio
MozReview-Commit-ID: LXzKlZ6wPYW
2018-05-20 18:57:35 +02:00
bors-servo
0b5720547e
Auto merge of #20669 - simartin:issue_20623, r=jdm
Issue #20623: Check the input to WebGLRenderingContext's clear().

Validate the input to this function as per specifications.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach build-geckolib` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #20623
- [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/20669)
<!-- Reviewable:end -->
2018-05-20 11:54:56 -04:00
bors-servo
b9407adb04
Auto merge of #20780 - gterzian:fix_beforeunload_test, r=cbrewster
update "navigation within beforeunload" test to match the spec

<!-- Please describe your changes on the following line: -->
 Follow up on https://github.com/servo/servo/pull/20329#issuecomment-387138449
@cbrewster

---
<!-- 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/20780)
<!-- Reviewable:end -->
2018-05-19 23:46:30 -04:00
Gregory Terzian
9467543c80 update "navigation within beforeunload" test to match the spec 2018-05-20 10:34:39 +08:00
bors-servo
a297e8f288
Auto merge of #20824 - servo-wpt-sync:wpt_update_18-05-2018, r=jdm
Sync WPT with upstream (18-05-2018)

Automated downstream sync of changes from upstream as of 18-05-2018.
[no-wpt-sync]

<!-- 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/20824)
<!-- Reviewable:end -->
2018-05-19 18:22:17 -04:00
bors-servo
9edbd2d7aa
Auto merge of #20769 - edunham:tc, r=SimonSapin
use dedicated TaskCluster workertype

The previous default of a shared github workertype had a side effect of preventing individuals from manually spinning up debug builds.

This change sets a custom workertype which is pretty much identical to the old one except that we can have the TC team do arbitrary things to permissions, so we can manually rerun failed builds to test and debug them.

<!-- 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/20769)
<!-- Reviewable:end -->
2018-05-19 14:16:11 -04:00
bors-servo
ab4b3c94ee
Auto merge of #20777 - cbrewster:constellation_msg_cleanup, r=asajeffrey
Cleanup constellation debug messages

<!-- 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 _cleanup_.

<!-- 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/20777)
<!-- Reviewable:end -->
2018-05-19 13:18:41 -04:00
bors-servo
ea214e9bc3
Auto merge of #20752 - pyfisch:backgrounds42, r=emilio
Fix crash in DL building

Fix one crash and some style changes.

This HTML crashed servo before. Key parts are `background-clip: content-box` and `direction: rtl`

```html
<!DOCTYPE html>
<html>
    <style>
        #span1 {
            background-clip: content-box;
        }
        #span2
        {
            direction: rtl;
        }
    </style>
    <span id="span1">Filler Text <span id="span2">txeT relliF</span></span>
</html>
```
Should I add this as a test? And where do I put this "does-it-crash?" test?

I find always passing rectangles by value a lot easier as it avoids many references and dereferences and I assume that the compiler will always use the faster one either way. If you don't like the change feel free to only merge the first commit.

<!-- 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/20752)
<!-- Reviewable:end -->
2018-05-19 11:02:01 -04:00
bors-servo
77dcc678fe
Auto merge of #20506 - jonleighton:font-fallback, r=emilio,mbrubeck
Font fallback

This implements more complete support for font fallback, see #17267.

r? @glennw @mbrubeck

<!-- 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/20506)
<!-- Reviewable:end -->
2018-05-19 09:53:29 -04:00
bors-servo
b536774fbf
Auto merge of #20786 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central.

See individual commits for details.

<!-- 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/20786)
<!-- Reviewable:end -->
2018-05-19 07:48:36 -04:00
bors-servo
b0cb92176a
Auto merge of #20819 - servo:fourchette, r=jdm
Remove unused build targets

<!-- 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/20819)
<!-- Reviewable:end -->
2018-05-19 06:22:21 -04:00
Emilio Cobos Álvarez
2a5007926d
Fix Servo build. 2018-05-19 10:15:17 +02:00
Emilio Cobos Álvarez
164bfbcb40
Make servo-tidy happy. 2018-05-19 10:15:17 +02:00
Emilio Cobos Álvarez
dccb8263cc
style: Don't crash when finding an unexpected default font type.
For now just return sans-serif, though as the FIXME comment indicates we should
probably just carry around the font-name instead.

Bug: 1442195
Reviewed-by: xidorn
MozReview-Commit-ID: CIPbV3R5Ul
2018-05-19 10:15:17 +02:00
Emilio Cobos Álvarez
1314f47da5
style: Distinguish between specified and computed URLs.
This is needed to serialize computed URLs correctly from getComputedStyle.

Bug: 1461288
Reviewed-by: xidorn
MozReview-Commit-ID: 9wakhqNrszb
2018-05-19 10:15:17 +02:00
Emilio Cobos Álvarez
a6328ba3ce
style: Ensure all lonhands have a working clone(), and to_css.
This removes some dubious font-family code too.

It ensures that vector longhands have a proper clone implementation
auto-generating it using `collect()`.

Bug: 1461296
Reviewed-by: xidorn
MozReview-Commit-ID: FkdnbTkeF6E
2018-05-19 10:15:17 +02:00
Emilio Cobos Álvarez
ce62cb1ba7
style: Support x as a resolution unit.
Bug: 1460655
Reviewed-by: xidorn
MozReview-Commit-ID: TjU0FLCLMN
2018-05-19 10:15:17 +02:00
Emilio Cobos Álvarez
2f18b67ce1
style: Make resolutions more like the rest of the CSS values.
Bug: 1460655
Reviewed-by: xidorn
MozReview-Commit-ID: 3Gt8VX1KhjC
2018-05-19 10:15:17 +02:00
Kristen Wright
2688588538
style: Convert NS_STYLE_IMAGELAYER_ATTACHMENT_* to enum class.
Converted NS_STYLE_IMAGELAYER_ATTATCHMENT_* vals to enum class, StyleImageLayerAttachment.

Bug: 1459367
Reviewed-by: Manishearth
2018-05-19 10:15:17 +02:00
Emilio Cobos Álvarez
06dbb6700d
style: Unprefix :-moz-selection.
Our implementation is totally not what the spec says, but totally what other
UAs do, see https://github.com/w3c/csswg-drafts/issues/2474.

So given this is causing webcompat pain, I think we should be pragmatic and just
unprefix this.

We could keep serialization and getComputedStyle with ::selection working with a
bit more effort, like we do for :-moz-placeholder, but I'd prefer not doing at
least the serialization bit, and just alias in nsCSSPseudoElements
:-moz-selection to selection too.

Bug: 509958
Reviewed-by: dbaron,xidorn
MozReview-Commit-ID: 6lxctozRDqv
2018-05-19 10:15:17 +02:00
Xidorn Quan
db0134e697
style: Rename pointing to inherited_ui.
And also merge values::*::pointing into values::*::ui.

Bug: 1460192
Reviewed-by: heycam
MozReview-Commit-ID: FM4gWEszahB
2018-05-19 10:15:17 +02:00
Xidorn Quan
4ab0e85ed5
style: Consistently use top-right-bottom-left order for physical sides.
Bug: 1454591
Reviewed-by: heycam
MozReview-Commit-ID: 6pLRSO8YNDI
2018-05-19 10:15:17 +02:00
Jon Leighton
3025a269ec FontContext: Cache data fetched from the cache thread
Before this change, if we needed to create a Font which we've already
created, but at a new size, then we'd fetch the FontTemplateInfo again.
If the bytes of the font are held in memory, then this could be
expensive as we need to pass those bytes over IPC.
2018-05-19 14:33:39 +10:00
Jon Leighton
dc683a1fc9 Linux: Don't hold onto bytes of system fonts
FontTemplateData gets passed over IPC during the communication between
FontContext and FontCacheThread. Serializing and deserializing these
bytes is expensive, so this change ensures that we only do that when the
bytes can't be read from disk. A similar strategy is already used on
macos and windows.

The performance problem was particularly noticeable after implenting
font fallback, where the content process would potentially work through
a list of fonts, trying to find one which contains a certain glyph. That
could result in lots of font bytes going over IPC.
2018-05-19 14:33:39 +10:00
Jon Leighton
4403bcddfe Don't perform font matching for control characters
We can encounter control characters here, for example when processing a
<pre> element which contains newlines. Control characters are inherently
non-printing, therefore if we try to call find_by_codepoint for these
characters we will end up triggering an unnecessary font fallback
search.
2018-05-19 14:33:38 +10:00
Jon Leighton
691c6c6f1a Implement font fallback
Prior to this change, if none of the fonts specified in CSS contained a
glyph for a codepoint, we tried only one fallback font. If that font
didn't contain the glyph, we'd give up.

With this change, we try multiple fonts in turn. The font names we try
differ across each platform, and based on the codepoint we're trying to
match. The current implementation is heavily inspired by the analogous
code in Gecko, but I've used to ucd lib to make it more readable,
whereas Gecko matches raw unicode ranges.

This fixes some of the issues reported in #17267, although colour emoji
support is not implemented.

== Notes on changes to WPT metadata ==

=== css/css-text/i18n/css3-text-line-break-opclns-* ===

A bunch of these have started failing on macos when they previously
passed.

These tests check that the browser automatically inserts line breaks
near certain characters that are classified as "opening and closing
punctuation". The idea is that if we have e.g. an opening parenthesis,
it does not make sense for it to appear at the end of a line box; it
should "stick" to the next character and go into the next line box.

Before this change, a lot of these codepoints rendered as a missing
glyph on Mac and Linux. In some cases, that meant that the test was
passing.

After this change, a bunch of these codepoints are now rendering glyphs
on Mac (but not Linux). In some cases, the test should continue to pass
where it previously did when rendering with the missing glyph.

However, it seems this has also exposed a layout bug. The "ref" div in
these tests contains a <br> element, and it seems that this, combined
with these punctuation characters, makes the spacing between glyphs ever
so slightly different to the "test" div. (Speculation: might be
something to do with shaping?)

Therefore I've had to mark a bunch of these tests failing on mac.

=== css/css-text/i18n/css3-text-line-break-baspglwj-* ===

Some of these previously passed on Mac due to a missing glyph. Now that
we're rendering the correct glyph, they are failing.

=== css/css-text/word-break/word-break-normal-bo-000.html ===

The characters now render correctly on Mac, and the test is passing. But
we do not find a suitable fallback font on Linux, so it is still failing
on that platform.

=== css/css-text/word-break/word-break-break-all-007.html ===

This was previously passing on Mac, but only because missing character
glyphs were rendered. Now that a fallback font is able to be found, it
(correctly) fails.

=== mozilla/tests/css/font_fallback_* ===

These are new tests added in this commit. 01 and 02 are marked failing
on Linux because the builders don't have the appropriate fonts installed
(that will be a follow-up).

Fix build errors from rebase

FontTemplateDescriptor can no longer just derive(Hash). We need to
implement it on each component part, because the components now
generally wrap floats, which do not impl Hash because of NaN. However in
this case we know that we won't have a NaN, so it is safe to manually
impl Hash.
2018-05-19 14:33:36 +10:00
WPT Sync Bot
24183668c4 Update web-platform-tests to revision 81962ac8802223d038b188b6f9cb88a0a9c5beee 2018-05-18 23:55:46 -04:00
bors-servo
cb764be7cd
Auto merge of #20674 - simartin:issue_20556, r=nox
Issue #20556: Implement proper checks in WebGLRenderingContext's bindBuffer()

Implement missing check, about deleted buffers.
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach build-geckolib` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #20556
- [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/20674)
<!-- Reviewable:end -->
2018-05-18 23:49:37 -04:00
bors-servo
a4b298c002
Auto merge of #20754 - anholt:webgl-fixes, r=emilio
Webgl fixes

<!-- Please describe your changes on the following line: -->
Add gl.getParameter() support for webgl unpack settings, and remove some unreachable and incorrect error-generation code

---
<!-- 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 #20372
- [x] These changes fix #20553
- [x] These changes fix #20554

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] 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/20754)
<!-- Reviewable:end -->
2018-05-18 22:26:18 -04:00
bors-servo
fe1a057bd1
Auto merge of #20740 - fabricedesre:mutation-observer-disconnect, r=jdm
Implement MutationObserver.disconnect()

<!-- Please describe your changes on the following line: -->
This implements https://dom.spec.whatwg.org/#dom-mutationobserver-disconnect
I added a `node_list` to the `MutationObserver` struct to keep track of the nodes involved in an observer because otherwise I could not find a way to unregister the observers on the node themselves without traversing the whole document tree. Let me know if there's something I missed.

---
<!-- 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/20740)
<!-- Reviewable:end -->
2018-05-18 18:27:50 -04:00
Connor Brewster
ee3c26c56c Cleanup constellation debug messages 2018-05-18 14:53:04 -06:00
bors-servo
4ff3389c90
Auto merge of #20632 - Eijebong:osmesa, r=jdm
Update osmesa-src

<!-- 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/20632)
<!-- Reviewable:end -->
2018-05-18 16:41:24 -04:00
bors-servo
67370b37d3
Auto merge of #20718 - paulrouget:res2, r=emilio
Automatically provide a resource reader for tests

Fix #20710

---
<!-- 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
- [ ] `./mach build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #20710 (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/20718)
<!-- Reviewable:end -->
2018-05-18 15:25:54 -04:00
Simon Sapin
ffcf92d843 Remove nsstring bindings 2018-05-18 12:19:04 -05:00
bors-servo
d6c26af473
Auto merge of #20820 - jdm:revertrustc, r=jdm
Revert "Upgrade to rustc 1.27.0-nightly (8a37c75a3 2018-05-02)"

This is causing us to hit a mac bug in rustc that I'm still tracking down and ruining our ability to merge PRs. This works around #20756 until the problem is fixed upstream.

<!-- 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/20820)
<!-- Reviewable:end -->
2018-05-18 12:52:18 -04:00