Commit graph

22410 commits

Author SHA1 Message Date
bors-servo
3376922f2d Auto merge of #14439 - emilio:fix-bloom, r=bholley
style: Don't pop too much in the bloom filter.

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

This is not a problem for Servo, because we recovered it without much problem a
few lines below, and we never reached the pathological case where the filter has
one element (the root), and we restyled another element with depth 1.

Fixes [bug 1321725](https://bugzil.la/1321725).

<!-- 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/14439)
<!-- Reviewable:end -->
2016-12-02 09:59:00 -08:00
Xidorn Quan
6fec4d7645 Treat top-level number in calc() invalid
Currently, CalcLengthOrPercentage doesn't actually keep the number
value, so if we don't treat it invalid, we can end up generating empty
`calc()` value when one contains top-level numbers (e.g. `calc(1)`),
which would violate assertion elsewhere that `calc` must not be empty.
2016-12-03 00:34:43 +11:00
Valentin Fokin
92df1240f8 Remove the unused get_context() function 2016-12-02 12:50:53 +01:00
Valentin Fokin
c33d89c92c Moved the AttributeInstanceMaps from bluetooth to bluetoothDevice. 2016-12-02 12:50:53 +01:00
Emilio Cobos Álvarez
e3a9637107
style: Don't pop too much in the bloom filter.
This is not a problem for Servo, because we recovered it without much problem a
few lines below, and we never reached the pathological case where the filter has
one element (the root), and we restyled another element with depth 1.

Fixes bug 1321725.
2016-12-02 12:29:25 +01:00
bors-servo
a913815a4d Auto merge of #14394 - jcdyer:jcdyer/either-column-width, r=Wafflespeanut
Convert column-width to use Either

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

* Converted column-width to use `Either<Length, Auto>`
* Added gecko glue code
* Cleaned up old column-width glue 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 #14350 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because tests already surround the refactored code.
<!-- 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/14394)
<!-- Reviewable:end -->
2016-12-01 23:03:37 -08:00
bors-servo
290ff5c801 Auto merge of #14370 - thiagopnts:master, r=Wafflespeanut
use Either type for UrlOrNone

Use the Either type for UrlOrNone

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

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

<!-- 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/14370)
<!-- Reviewable:end -->
2016-12-01 22:03:31 -08:00
bors-servo
dc92a51199 Auto merge of #14435 - glennw:fix-wr-update, r=pcwalton
Workaround for intermittent failure in img_width_attribute_intrinsic_width_a.html

This test previously used smiling.png as the image reference.

The OSMesa rasterizer occasionally has a very small difference
(1-2 pixels off by 1/255) when rendering this reftest.

Instead, change to use green.png which doesn't suffer from this
inaccuracy during bilinear sampling and upscaling.

<!-- 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/14435)
<!-- Reviewable:end -->
2016-12-01 15:41:51 -08:00
Glenn Watson
694b68889d Workaround for intermittent failure in img_width_attribute_intrinsic_width_a.html.
This test previously used smiling.png as the image reference.

The OSMesa rasterizer occasionally has a very small difference
(1-2 pixels off by 1/255) when rendering this reftest.

Instead, change to use green.png which doesn't suffer from this
inaccuracy during bilinear sampling and upscaling.
2016-12-02 09:38:48 +10:00
bors-servo
d2d62267a1 Auto merge of #14418 - pcwalton:infinite-reflows, r=notriddle
layout: Fix some particularly bad cases of spurious reflows leading to script thread unresponsiveness.

See commits for details. This improves nytimes.com quite a bit.

r? @notriddle

<!-- 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/14418)
<!-- Reviewable:end -->
2016-12-01 10:16:38 -08:00
bors-servo
5abbc9f696 Auto merge of #14423 - nox:xml-document, r=Ms2ger
Properly mark application/xhtml+xml documents as XML

<!-- 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/14423)
<!-- Reviewable:end -->
2016-12-01 03:57:14 -08:00
bors-servo
94eefc4001 Auto merge of #14075 - MortimerGoro:webgl-resize, r=MortimerGoro
Implement WebGLContext resize

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

Related PR: https://github.com/servo/webrender/pull/519

Implement WebGLContext resize (canvas.width & canvas.height). I have tested:

- Fixes WebGL apps that initialize canvas size after calling canvas.getContext("webgl")
- Support WebGL apps that change the canvas size & viewport on window.onresize

---
<!-- 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 _____

<!-- 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/14075)
<!-- Reviewable:end -->
2016-12-01 03:04:49 -08:00
Anthony Ramine
c1bdd3d5ce Properly mark application/xhtml+xml documents as XML
For this to work, we must remove the unimplemented!() call
in Element::parse_fragment because all the tests rely on
setting innerHTML.
2016-12-01 11:55:16 +01:00
Anthony Ramine
0c64bd766a Refactor the locate a namespace algorithm 2016-12-01 11:55:14 +01:00
Anthony Ramine
fb206e2b10 Make Attr::prefix return an Option<&Prefix> 2016-12-01 11:55:13 +01:00
Anthony Ramine
a377caa7e9 Make Element::prefix return an Option<&DOMString> 2016-12-01 11:55:12 +01:00
Anthony Ramine
2fcb908daa Make Element::attrs return a Ref<[_]> 2016-12-01 11:55:10 +01:00
Anthony Ramine
03e04179ae Refactor fragment parsing 2016-12-01 11:55:06 +01:00
Anthony Ramine
ea4fbbc63a Silence a warning 2016-12-01 11:34:25 +01:00
Zakor Gyula
4132d0f521 Add end of text character to BluetoothUUID's regex string 2016-12-01 11:15:52 +01:00
Zakor Gyula
7e2a01210f BluetoothUUID refactor 2016-12-01 11:15:52 +01:00
J. Cliff Dyer
5821ff77db Convert column-width to use Either
Fixes #14350
2016-12-01 15:17:51 +05:30
bors-servo
0d896a8d82 Auto merge of #13996 - servo:about-blank, r=Ms2ger,jdm,asajeffrey,nox
Implement synchronous about:blank loading.

Based on initial work by jdm in <https://github.com/servo/servo/pull/8600>.

<!-- 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/13996)
<!-- Reviewable:end -->
2016-12-01 00:35:12 -08:00
bors-servo
9a45252a84 Auto merge of #14424 - mbrubeck:flow-column, r=notriddle
Remove unnecessary Flow::column_sizes methods

One of these methods is never called. The other is used only on TableFlow and doesn't need to be implemented for all Flow types.

<!-- 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/14424)
<!-- Reviewable:end -->
2016-11-30 23:36:46 -08:00
bors-servo
b3745d6f35 Auto merge of #14420 - 46bit:master, r=KiChjang
Made http_redirect_fetch error for non-HTTPS. #14069

Hi! I'm a newbie looking to resolve #14069.

The [existing tests](https://dxr.mozilla.org/servo/source/tests/wpt/web-platform-tests/fetch/api/redirect/redirect-schemes.html) now pass.

Cheers!

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

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

<!-- 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/14420)
<!-- Reviewable:end -->
2016-11-30 22:45:36 -08:00
bors-servo
87f5b877d8 Auto merge of #14406 - upsuper:bug1313293, r=heycam
Add insertRule/deleteRule support for stylo

<!-- Please describe your changes on the following line: -->
This is the servo part of [bug 1313293](https://bugzilla.mozilla.org/show_bug.cgi?id=1313293), reviewed by @heycam.

r? @heycam

---
<!-- 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 _____

<!-- 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/14406)
<!-- Reviewable:end -->
2016-11-30 21:54:46 -08:00
Xidorn Quan
bddd467c0e Add insertRule/deleteRule support for stylo 2016-12-01 16:20:02 +11:00
Corey Farwell
51f9671db2 Implement "list of options" concept on HTMLSelectElement.
Fixes https://github.com/servo/servo/issues/13763.
2016-12-01 00:10:16 -05:00
bors-servo
22c8df150a Auto merge of #14404 - BorisChiou:Bug1317179, r=Manishearth
Use XPCOM string bindings instead of Gecko_Utf8SliceToString

These are the servo-side changes for [bug 1317179](https://bugzilla.mozilla.org/show_bug.cgi?id=1317179). @Manishearth has already reviewed them there. I'd like to merge these patches until the gecko-side changes for [bug 1317179](https://bugzilla.mozilla.org/show_bug.cgi?id=1317179) is landed.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1317179](https://bugzilla.mozilla.org/show_bug.cgi?id=1317179).
- [X] These changes do not require tests because there are existing tests for this in mozilla-central

<!-- 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/14404)
<!-- Reviewable:end -->
2016-11-30 20:12:28 -08:00
bors-servo
7d66bd710c Auto merge of #14147 - shinglyu:test-perf-submit, r=larsbergstrom,aneeshusa
Added an option to allow submitting test-perf result to perfherder

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

This patch enables us  to run `./mach test-perf --submit` in CI to submit the result to perfherder. r? @aneeshusa

---
<!-- 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 too many manual setup required to test it

<!-- 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/14147)
<!-- Reviewable:end -->
2016-11-30 19:11:16 -08:00
Shing Lyu
ddd03229e0 Add an option to submit test-perf result to perfherder 2016-12-01 10:23:27 +08:00
bors-servo
3576178239 Auto merge of #14413 - servo:jdm-patch-1, r=mbrubeck
Remove misleading section from non-toplevel Cargo.toml.

This made me waste some time trying to figure out why my builds were no longer getting debug information after #14381.

<!-- 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/14413)
<!-- Reviewable:end -->
2016-11-30 18:19:08 -08:00
bors-servo
16199b4983 Auto merge of #14407 - szeged:annotations, r=jdm
Annotations for WebBluetooth functions

<!-- Please describe your changes on the following line: -->
1. Moved the `convert_request_device_options` function steps into `request_bluetooth_devices` function, to stay consistent with the current specification.
2. Updated the existing step annotations for the requestDevice and related methods.
3. Added step annotations for the implemented WebBluetooth methods.

---
<!-- 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  #14324, #12614

<!-- 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/14407)
<!-- Reviewable:end -->
2016-11-30 16:37:24 -08:00
Patrick Walton
ca3d802f03 layout: Minor style cleanup. 2016-11-30 16:36:02 -08:00
Patrick Walton
89dff2d77f layout: Don't restart a transition if the end value for the new
transition is the same as the end value for a running transition per
CSS-TRANSITIONS § 3.

Besides being contrary to spec, the old behavior could cause a cascade
of CSS transitions incorrectly triggering themselves when calls to
`getComputedStyle()` were intermingled with them.

Improves performance of nytimes.com.
2016-11-30 16:36:02 -08:00
Patrick Walton
f378f2807e compositing: Only make the compositor responsible for initiating reflow
for CSS transitions and animations, not `requestAnimationFrame()`
callbacks.

In the case of the latter, the script thread will kick off the reflow if
it's necessary, so there's no need for the compositor to do it.

Some pages, like nytimes.com, like to call `requestAnimationFrame()`
without actually mutating the DOM in the callback. We should avoid
reflowing in this case.
2016-11-30 16:36:02 -08:00
Patrick Walton
0e338d5b31 layout_thread: Log reflows that happen due to animation ticks if
`-Z relayout-event` is on.
2016-11-30 16:36:02 -08:00
Patrick Walton
f97d47188f layout_thread: Note in the debug message whether nodes require dirtying. 2016-11-30 16:36:02 -08:00
Imanol Fernandez
8ba75c0545 Implement WebGLContext resize, r=emilio 2016-12-01 00:56:59 +01:00
bors-servo
e315da0731 Auto merge of #14376 - nox:specialized-constructors, r=KiChjang,nox
Make WebIDL static items take a more specific global if possible

<!-- 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/14376)
<!-- Reviewable:end -->
2016-11-30 15:43:48 -08:00
bors-servo
52e2b025d2 Auto merge of #14426 - Manishearth:intermittents, r=mbrubeck
Use intermittents tracker on build.s.o

<!-- 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/14426)
<!-- Reviewable:end -->
2016-11-30 14:50:12 -08:00
Anthony Ramine
ddfb8805dc Make WebIDL static methods take a more specific global if possible 2016-11-30 23:23:42 +01:00
Rohan Prinja
973f77c006 Make WebIDL constructors take a more specific global if possible (fixes #14071) 2016-11-30 23:23:41 +01:00
Anthony Ramine
8af2327e95 Expose WebGL-related interfaces only in Window 2016-11-30 23:23:39 +01:00
Anthony Ramine
6210bede8b Expose DOMMatrix in Window and Worker 2016-11-30 23:23:38 +01:00
Manish Goregaokar
38474f8671 Use intermittents tracker on build.s.o 2016-11-30 14:03:31 -08:00
Michael Mokrysz
52194c01d5 Made http_redirect_fetch error for non-HTTPS. #14069 2016-11-30 20:46:27 +00:00
Matt Brubeck
be6ee9d1dd Remove unnecessary Flow::column_sizes methods 2016-11-30 09:38:27 -08:00
Thiago Pontes
206f4ea5b8 use Either type for UrlOrNone
fix test-tidy errors

fix style unit test

use the Parse trait instead of ParseWithContext

fix stylo test and geckolib build

move all specified url parse code to parse trait and remove refs to unused type
2016-11-30 11:43:14 -05:00
Ms2ger
6075d0eb03 Make some iframe reftests more robust. 2016-11-30 14:10:00 +01:00