Commit graph

1529 commits

Author SHA1 Message Date
bors-servo
eaf90c0b1c Auto merge of #7452 - nox:cleanup-attributes, r=nox
Introduce VirtualMethods::attribute_mutated()



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7452)
<!-- Reviewable:end -->
2015-09-02 08:14:33 -06:00
Martin Tomasi
ccddc3c13e Fixed serialize_list to no longer append an additional space at the end of the string 2015-09-02 15:46:04 +02:00
Anthony Ramine
58e1bd0e57 Introduce VirtualMethods::attribute_mutated()
This replaces before_remove_attr(), after_remove_attr() and after_set_attr().
The virtual method takes the mutated attribute and an AttributeMutation value
to disambiguate between "attribute is changed", "attribute is added" and
"attribute is removed".

In the case of "attribute is changed", the mutation value contains a reference
to the old value of the mutated attribute, which is used to unregister outdated
named elements when the "id" attribute is changed on an element.

This greatly simplifies the handling of attributes, which in many cases don't
have any specific behaviour whether they are removed or changed or added. It
also fixes a few bugs where things were put in before_remove_attr() instead of
after_remove_attr() (e.g. when removing an href attribute from a base element).

A few helper functions in Element were also renamed and made private.
2015-09-02 15:45:38 +02:00
Corey Farwell
e38df50bbf Revert "Revert "Auto merge of #7103 - frewsxcv:python-venv, r=metajack" for breaking web-platform-tests."
This reverts commit 47d6d958f5.
2015-09-02 09:34:01 -04:00
Corey Farwell
759c52d7eb Upgrade wptrunner (tests/wpt/harness) to latest version 2015-09-02 09:33:58 -04:00
bors-servo
5478c7c24b Auto merge of #7505 - frewsxcv:bump-wpt-css-tests, r=jdm
Update CSS tests to revision c8ec30de8099360ecf6581035bfdf2180fcc9755

Necessary for:

https://github.com/servo/servo/pull/7117

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7505)
<!-- Reviewable:end -->
2015-09-02 06:56:54 -06:00
Corey Farwell
c51deb9a6e Update CSS tests to revision c8ec30de8099360ecf6581035bfdf2180fcc9755
Necessary for:

https://github.com/servo/servo/pull/7117
2015-09-02 08:18:30 -04:00
Ms2ger
538f8f0ef9 Update web-platform-tests to revision cf8340b5fae7b820788ffc31f8cc6b6b04978002 2015-09-02 11:52:24 +02:00
bors-servo
a547ae6826 Auto merge of #7496 - servo:calc_, r=SimonSapin
Implement CSS3 Calc

This is #7185 with one commit added to make it build merged with master, which got support for the `ch` unit in the meantime.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7496)
<!-- Reviewable:end -->
2015-09-02 02:33:18 -06:00
Simon Sapin
9f48dcd858 Fix font-size keywords parsing. 2015-09-02 09:54:38 +02:00
Simon Sapin
40b4348824 Upgrade to rustc 1.4.0-dev (cb9323ec0 2015-09-01) 2015-09-02 09:22:17 +02:00
bors-servo
ba2cb77c26 Auto merge of #7503 - mrobinson:iframe-issue, r=glennw
Upgrade to the latest rust-layers

This should fix a bug where hidden iframes are not properly clipped
away from the compositor scene. This commit adds a test for this
behavior.

Fixes #6849.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7503)
<!-- Reviewable:end -->
2015-09-01 22:18:52 -06:00
bors-servo
a844c0b0e8 Auto merge of #7500 - farodin91:viewport, r=jdm
Implement viewport functions for window #1718

@jdm r?
closes #6875

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7500)
<!-- Reviewable:end -->
2015-09-01 21:31:25 -06:00
Martin Robinson
bc824f117c Upgrade to the latest rust-layers
This should fix a bug where hidden iframes are not properly clipped
away from the compositor scene. This commit adds a test for this
behavior.

Fixes #6849.
2015-09-01 17:57:57 -07:00
farodin91
f0987380dd Implement viewport functions for window #1718 2015-09-02 00:40:52 +02:00
bors-servo
e46499a5df Auto merge of #7498 - pcwalton:inline-absolute-containing-blocks, r=mbrubeck
layout: Implement partial support for inline absolute containing blocks.

Improves the position of the down arrows on google.com SERPs.

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7498)
<!-- Reviewable:end -->
2015-09-01 16:36:58 -06:00
Patrick Walton
676f7014e8 layout: Implement partial support for inline absolute containing blocks.
Improves the position of the down arrows on google.com SERPs.
2015-09-01 12:18:19 -07:00
bors-servo
dcaf66397a Auto merge of #7313 - pcwalton:position-relative-percentage-overflow, r=mbrubeck
layout: Make overflow calculation take relative percentages into account.

This necessitated changing overflow to be calculated by the parent flow
if relatively positioned children are present. That is because the
overflow regions cannot be calculated without knowing relative offsets,
which themselves cannot be calculated without knowing the parent size
(because of percentages). To accomplish this without sacrificing
parallelism in the non-relative case, this patch splits overflow into
"early" and "late" computation. Late overflow computation cannot be
parallelized across children, while early overflow computation can.

Makes the "Apple Music" text show up over the full-bleed promotional
background on apple.com.

r? @SimonSapin -- would appreciate a look over the iframe test case that was changed.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7313)
<!-- Reviewable:end -->
2015-09-01 12:33:07 -06:00
Patrick Walton
ce327b8231 tests: Mark some WPT tests as passing now. 2015-09-01 11:30:15 -07:00
bors-servo
9f85370885 Auto merge of #7449 - simartin:issue_7393, r=metajack
Issue #7393: Properly sniff mislabeled feeds.

Hi,

This patch is an attempt to fix https://github.com/servo/servo/issues/7393, where the code detecting mislabeled feeds (see https://mimesniff.spec.whatwg.org/#sniffing-a-mislabeled-feed) had spurious space in the URLs we need to match.

Note that my testing (in particular rdf_rss_ko_2.xml) highlighted a flaw in "matches", that failed to check that there were more bytes in the string being checked than in the string we're checking against, which completely broke the whole step 5.2.7.

Thanks in advance for your review.

Cheers,
  Simon

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7449)
<!-- Reviewable:end -->
2015-09-01 11:22:52 -06:00
Simon Sapin
80d471d5cf Merge branch 'master' into calc 2015-09-01 18:39:16 +02:00
bors-servo
4404809e6d Auto merge of #7459 - Mylainos:Issue-#7365, r=jdm
Issue #7365 : test cursor position after clearing selection

In textinput test if the cursor is at the correct position when clearing a selection by press an arrow key.

edit_point is always at the end of the selection, should I test when it's at the beginning ?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7459)
<!-- Reviewable:end -->
2015-09-01 09:23:12 -06:00
bors-servo
15de679f11 Auto merge of #7468 - JoshTheGoldfish:Issue7460, r=jdm
Making test-tidy check that = have space after them

For issue #7460. Need to ensure compatibility with #7390.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7468)
<!-- Reviewable:end -->
2015-09-01 08:33:02 -06:00
erneyja
17663315dd make test-tidy check that = have space after them 2015-09-01 07:18:19 -04:00
bors-servo
dee6283483 Auto merge of #7474 - notriddle:master, r=pcwalton
Inline constraint resolver for absolutely positioned tables.

Fixes #7425.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7474)
<!-- Reviewable:end -->
2015-08-31 20:35:06 -06:00
Patrick Walton
b66f17a445 layout: Make overflow calculation take relative percentages into
account.

This necessitated changing overflow to be calculated by the parent flow
if relatively positioned children are present. That is because the
overflow regions cannot be calculated without knowing relative offsets,
which themselves cannot be calculated without knowing the parent size
(because of percentages). To accomplish this without sacrificing
parallelism in the non-relative case, this patch splits overflow into
"early" and "late" computation. Late overflow computation cannot be
parallelized across children, while early overflow computation can.

Makes the "Apple Music" text show up over the full-bleed promotional
background on apple.com.
2015-08-31 16:50:56 -07:00
Michael Howell
36759338c7 Inline constraint resolver for absolutely positioned tables.
Fixes #7425.
2015-08-31 16:45:17 -07:00
bors-servo
afc2c381db Auto merge of #7370 - bjwbell:bugfix-unequal-borders, r=pcwalton
gfx: Border radius support for asymmetric sized borders

When the border-top/right/bottom/left-widths are not equal, the angle on the border corner arc separating the borders isn't PI/4. 

For instance if the top border width is much larger than the left border width then most of the border corner should be drawn using the top border color.

This change adds support for calculating the correct angle in the border
corner arc for switching from one border to another e.g. the left border
to the top border.

It supports elliptical border radii for when elliptical border radii are
added.

A ref test is also included.

r? @Ms2ger 

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7370)
<!-- Reviewable:end -->
2015-08-31 14:58:33 -06:00
Bryan Bell
d539b9b2e6 gfx: Border radius support for asymmetric borders
This change adds support for calculating the correct angle in the border
corner arc when switching from one border to another e.g. the left border
to the top border.

When the border-top/right/bottom/left-widths are not the same, the angle on
the border corner arc separating the borders isn't pi/4.

For example, if the top border width is much larger than the left border
width then most of the border corner should be drawn using the top
border color.

Elliptical border radii are supported for when elliptical border radii are
added.

The common case where borders have the same width sets the angle to
pi/4 directly.

A ref test is also included.
2015-08-31 13:02:05 -07:00
wilmoz
64ac4f175f Make test-tidy check that braces have spaces before or after them 2015-08-31 12:30:55 -05:00
bors-servo
d46e4a6c4a Auto merge of #7454 - Ms2ger:worker-tests, r=nox
Disable workers tests in __dir__.ini rather than include.ini.

This ensures those tests are skipped when running ./mach test-wpt workers.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7454)
<!-- Reviewable:end -->
2015-08-31 01:34:02 -06:00
Ms2ger
14e55e3082 Disable workers tests in __dir__.ini rather than include.ini.
This ensures those tests are skipped when running ./mach test-wpt workers.
2015-08-31 09:12:52 +02:00
Hugo Thiessard
6a2ae236d4 Issue #7365 : test for cursor position after clearing selection 2015-08-31 09:10:34 +02:00
bors-servo
7dda183022 Auto merge of #7139 - samfoo:testable-net-load, r=jdm
Testable net load...

*The goal of this PR is to get early feedback on this before I go too far down the rabbit hole. This new code path is working, and there's several tests I've written as a proof of concept. There are still some regressions that I'll be fixing in the coming days.*

I've abstracted out the request/response cycle so that it's no longer dependent on the Hyper request/response structs. Since request/response @ hyper are structs, not traits, it made mocking them for tests impossible.

Current issues/concerns:

* This relies on boxing the `HttpResponse` that gets returned from the `HttpRequester` because `HttpResponse` is unsized. I don't know if there's a more idiomatic rust-y way of doing this?
* This relies on boxing the `Read` that is now returned from `load` for the same reason.
* The devtools and resource manager channels are still passed into `load`. It might be easier to inject these as trait dependencies instead of chans as well?
* Needs more tests.

🎩 

#6727

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7139)
<!-- Reviewable:end -->
2015-08-30 20:07:40 -06:00
Josh Matthews
1461188349 Revert "Allow wptrunner to enable prefs for Servo."
This reverts commit 0d6f410a3f.
2015-08-30 17:04:09 -04:00
Josh Matthews
606bad91b0 Revert "Enable experimental layout prefs for CSSWG reftests."
This reverts commit 447b5b560c.
2015-08-30 17:03:57 -04:00
bors-servo
ccb8e46557 Auto merge of #7456 - jdm:cssprefs, r=jdm
Enable experimental layout prefs for CSSWG reftests.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7456)
<!-- Reviewable:end -->
2015-08-30 14:04:10 -06:00
bors-servo
347e9b6ef4 Auto merge of #7228 - nox:urlutils-setters, r=jdm
Implement setters in URLUtils

This fixes #6145 and takes care of most of #4250.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7228)
<!-- Reviewable:end -->
2015-08-30 12:40:53 -06:00
Anthony Ramine
9c4766bb0d Implement setters in URLUtils 2015-08-30 19:47:33 +02:00
Josh Matthews
0d6f410a3f Allow wptrunner to enable prefs for Servo. 2015-08-30 12:37:34 -04:00
Josh Matthews
447b5b560c Enable experimental layout prefs for CSSWG reftests. 2015-08-30 12:37:13 -04:00
bors-servo
3062e0c7b1 Auto merge of #7445 - JoshTheGoldfish:Issue6934, r=Manishearth
Issue #6934 - Implement onerror event handler for AbstractWorker

Please review.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7445)
<!-- Reviewable:end -->
2015-08-30 10:19:15 -06:00
erneyja
8d4ed7292d Implemented onerror event handler for AbstractWorker 2015-08-30 11:37:16 -04:00
ecoal95
167885707d webgl: Add shader validation and translation
This commit adds angle-based validation and translation to WebGL
shaders.

The changes to the tex_image_2d test is neccessary (it was not valid
GLES 2.0 shader language).
2015-08-30 14:23:14 +02:00
Simon Martin
5301e59965 Issue #7393: Properly sniff mislabeled feeds. 2015-08-30 13:03:20 +02:00
Sam Gibson
f257b5fcef Adds content-length to empty-bodied non-GET/HEAD requests 2015-08-30 12:14:15 +10:00
Sam Gibson
976dbc5155 Adds a test for non-default accept-encoding headers 2015-08-30 12:14:15 +10:00
Sam Gibson
9b1f2231cb Adds a test for non-default accept headers 2015-08-30 12:14:15 +10:00
Sam Gibson
287dc7371f Extracts some dense code to a let binding 2015-08-30 12:14:14 +10:00
Sam Gibson
86df1d3d6a Renames AssertMustHaveHeadersRequest 2015-08-30 12:14:14 +10:00