Commit graph

3197 commits

Author SHA1 Message Date
bors-servo
4d1be2f56c Auto merge of #7703 - bjwbell:bugfix-0px-and-non-0px-border-widths, r=pcwalton
gfx: Fix border-radius panic when a corner has 0px and >0px borders

When one border is 0px and the other is >0px then the border corner
drawing code panics when computing the values to use in drawing the
border corner arcs.

This fixes that bug and makes the `draw_corner` function more robust
by explicitly passing an enum, `BorderCorner`, naming which corner is
being drawn e.g. `BorderCorner::TL`.

Add a ref test,
`border_radius_zero_sizes_a.html/border_radius_zero_sizes_ref.html`.

Fixes https://github.com/servo/servo/issues/7700.

r? @pcwalton or @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7703)
<!-- Reviewable:end -->
2015-09-24 18:18:07 -06:00
James Graham
8d9ab50a96 Add a pref for a default homepage. 2015-09-25 00:58:51 +01:00
James Graham
79e548905e Enable resetable and String prefs.
This allows both boolean and string-type preferences. It
also implements a system where prefs that are read from a
configuration file can be reset back to their initial value,
which is useful in a number of cases e.g. when running tests
to ensure that each test starts with the same values for
the prefs.
2015-09-25 00:58:48 +01:00
Anthony Ramine
e72b77b1e3 Properly consider radio button groups
Radio button groups with missing or empty names are always the only element
of their respective radio button group.
2015-09-25 00:29:03 +02:00
Ms2ger
67f12639ab Remove the now-stable append and result_expect feature gates from reftest. 2015-09-24 18:42:02 +02:00
Manish Goregaokar
b677f0f4ae Add form getter for input/button elements; update test expectations 2015-09-24 11:58:24 +05:30
Manish Goregaokar
ed30923156 Add test for preserveWrapperCallback 2015-09-24 11:58:05 +05:30
Philipp Hartwig
7d3a712b3a Add ref tests for #7558 2015-09-23 22:44:49 +02:00
Manish Goregaokar
3c969b346a Upgrade rust to f93ab64d4a1a7ee91759a1594ab2a426b6cc657e/rustc-1.5.0-dev. 2015-09-23 14:44:59 +02:00
Bryan Bell
3e25284ff3 Replace twitter fail whale with redirect to archive.org version
Also add link to archive.org page of twitter fail whale
2015-09-22 11:26:00 -07:00
Ms2ger
43a50e298a Update web-platform-tests to revision 0159b3ec9ba5355a3340621226e02ae026effd7f 2015-09-22 19:58:47 +02:00
Bryan Bell
071acf476b gfx: Fix border-radius panic when a corner has 0px and >0px borders
When one border is 0px and the other is >0px then the border corner
drawing code panics when computing the values to use in drawing the
border corner arcs.

This fixes that bug and makes the `draw_corner` function more robust
by explicitly passing an enum, `BorderCorner`, naming which corner is
being drawn e.g. `BorderCorner::TL`.

Add a ref test,
`border_radius_zero_sizes_a.html/border_radius_zero_sizes_ref.html`.

Fixes https://github.com/servo/servo/issues/7700.
2015-09-21 17:26:47 -07:00
bors-servo
4dc986bca3 Auto merge of #7064 - paulrouget:reload, r=Ms2ger
Implement location.reload()

This is a naive implementation of `window.location.reload()`.
I'd appreciate any feedback.

I was wondering if it'd be better to implement `ConstellationMsg::Reload` instead of using  `load_url`.

Also, what kind of test should I write?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7064)
<!-- Reviewable:end -->
2015-09-21 09:03:42 -06:00
bors-servo
611ceabcd1 Auto merge of #7694 - ddrmanxbxfr:HTMLMetaFixesWPT, r=nox
HTML Meta keyword nits in wpt webstorage files

Hi guys,

This PR is a small cleanup over Webstorage WPT tests.

Meta charset keywords were declared as <mete charset=utf-8 > instead of <meta charset=utf-8>

Thanks for looking into it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7694)
<!-- Reviewable:end -->
2015-09-21 01:09:06 -06:00
Paul Rouget
e742e7e9bc wpt test for location.reload() 2015-09-21 08:04:24 +02:00
Mathieu Rheaume
5f1b0e6a49 HTML Meta keyword nits in wpt webstorage files 2015-09-20 22:39:04 -04:00
bors-servo
b737bd322e Auto merge of #7674 - Ms2ger:update-css, r=Ms2ger
Update CSS tests to revision 135b269a1d9f5ce7862ab7426578bd56e2add740



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7674)
<!-- Reviewable:end -->
2015-09-20 10:58:13 -06:00
bors-servo
d1269294e6 Auto merge of #7611 - nox:cache-element-id, r=frewsxcv
Cache the `id` attribute on Element

Thanks to @asabil for the original work, I only rebased it.

Fixes #6359 and #7040.


<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7611)
<!-- Reviewable:end -->
2015-09-20 09:23:20 -06:00
Michael Howell
554a4cf9f2 Add transitions for CSS calc().
Closes #7284
2015-09-19 19:39:55 -07:00
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Ms2ger
bff545d198 Update CSS tests to revision 135b269a1d9f5ce7862ab7426578bd56e2add740 2015-09-19 18:02:54 +02:00
Sam Gibson
641119206e Remove superfluous clone 2015-09-19 19:13:51 +12:00
Sam Gibson
6d20b388f6 General cleanup for HSTS/Cookie Arc 2015-09-19 18:30:38 +12:00
Sam Gibson
6f573d5d44 Move HSTS/CookieStorage to Arc<RwLock> from Ipc
servo/servo#7421
2015-09-19 18:30:37 +12:00
Bryan Bell
f4a04614ff Add css twitter fail whale test & update ellipse_to_bezier comment 2015-09-18 20:55:10 -07:00
bors-servo
8a8204ffc8 Auto merge of #7447 - ddrmanxbxfr:master, r=jdm
Issue #7382 Use descriptive enums instead of booleans for MIMEClassifier::classifer

Hi guys i've done a small pass of refactor in the MIMEClassifier implementation. (See issue #7382 )
   - Moved the predicates to separate functions
   - Added a mimetype enum so we can compare them easily after calling MIMEClassifier::get_media_type

I hope it follows rust good pratices (care it's my first time doing rust).

Improvements and tips are welcome :).

Thanks for looking at it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7447)
<!-- Reviewable:end -->
2015-09-18 07:22:59 -06:00
Matt Brubeck
9333f028e8 Snap to screen pixels instead of px
Fixes #7665.
2015-09-18 03:06:06 -07:00
Matt Brubeck
186ab5aa24 Allow setting device-pixel-ratio for reftests 2015-09-18 02:48:59 -07:00
bors-servo
acde10f005 Auto merge of #7656 - mbrubeck:incremental-text-6501, r=pcwalton
Reconstruct flows when text/font styles change

These styles are used during text shaping.  When they change, we need to re-run shaping and construct new flows.

Fixes #6501. r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7656)
<!-- Reviewable:end -->
2015-09-18 01:32:40 -06:00
Matt Brubeck
0c77705f52 Reconstruct flows when text/font/list styles change
Fixes #6501.
2015-09-17 11:59:00 -07:00
bors-servo
83b364189c Auto merge of #7657 - Ms2ger:update-wpt, r=Ms2ger
Update wpt



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7657)
<!-- Reviewable:end -->
2015-09-17 10:32:43 -06:00
Ms2ger
163009575a Update web-platform-tests to revision 71a0d51d14d8b0f1b53cda3a7d39ef8765164485 2015-09-17 18:32:13 +02:00
Ms2ger
d504015496 Update CheckoutBranch to the wptrunner changes.
This is a port of <https://hg.mozilla.org/mozilla-central/rev/c0b8fea5aef4>.
2015-09-17 17:39:44 +02:00
Martin Robinson
1e6f797268 Ensure unique LayerIds for pseudo-elements
Currently pseudo-elements, like the fragments created for ::before and
::after, with layers will have the same LayerId as the body of their
owning fragments. Instead all LayerIds should be unique.

Fixes #2010.
2015-09-17 06:42:29 -07:00
Simon Sapin
feaf6f4c3f Initial support for custom properties in CSSStyleDeclaration 2015-09-17 14:48:56 +02:00
Simon Sapin
d56ea10770 var() substitution: insert /**/ between tokens that would be parse as one token. 2015-09-17 14:48:20 +02:00
Simon Sapin
b8fd51e940 Add a copy of a test that uses a style attribute instead of a stylesheet.
`tests/wpt/css-tests/css-variables-1_dev/html/test_variable_legal_values.htm`
relies on setting `.data` on a text node inside a `<style>` element
to update a stylesheet, but this doesn’t work on Servo yet.

Add a copy of this file that uses a style attribute instead.
2015-09-17 14:48:18 +02:00
Simon Sapin
389d537451 Look for var() in a non-custom property declaration after a parse error. 2015-09-17 14:48:17 +02:00
Simon Sapin
70ea5f61a2 Don’t ignore input at the end of a declaration with var(). 2015-09-17 14:48:16 +02:00
Simon Sapin
54ef8055ec The function name var() is case-insensitive. 2015-09-17 14:48:15 +02:00
Simon Sapin
ab9e1af206 Allow whitespace-only custom property values. 2015-09-17 14:48:14 +02:00
Simon Sapin
c7622bf22f Fix !important in custom properties.
Test changes are also in https://github.com/w3c/csswg-test/pull/847/files
2015-09-17 14:48:13 +02:00
Simon Sapin
4abe7cdf97 Support var() in shorthands. 2015-09-17 14:48:12 +02:00
bors-servo
9e914ca0db Auto merge of #7588 - notriddle:master, r=pcwalton
Actually store the overflow for inline-block elements.

Fixes #7571

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7588)
<!-- Reviewable:end -->
2015-09-17 00:53:04 -06:00
bors-servo
8f0b702018 Auto merge of #7642 - bjwbell:shorthand-parse-elliptical-border-radius, r=jdm
gfx: Add elliptical border-radius shorthand parsing

Adds support for parsing shorthand border-radius values such as:

    /* The syntax of the second radius allows one to four values */
    /* (first radius values) / radius */
    border-radius: 10px 5% / 20px;

    /* (first radius values) / top-left-and-bottom-right | top-right-and-bottom-left */
    border-radius: 10px 5% / 20px 30px;

    /* (first radius values) / top-left | top-right-and-bottom-left | bottom-right */
    border-radius: 10px 5px 2em / 20px 25px 30%;

    /* (first radius values) / top-left | top-right | bottom-right | bottom-left */
    border-radius: 10px 5% / 20px 25em 30px 35em;

r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7642)
<!-- Reviewable:end -->
2015-09-16 10:13:52 -06:00
bors-servo
df083ccb52 Auto merge of #7628 - Ms2ger:events-markers, r=jdm
Emit markers for all events, not just UI events.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7628)
<!-- Reviewable:end -->
2015-09-16 08:34:32 -06:00
Ms2ger
a5925020ce Avoid calling any listeners for events whose stop propagation flag is set prior to dispatching. 2015-09-16 16:28:31 +02:00
bors-servo
6a12f00d6d Auto merge of #7605 - nox:skew, r=mbrubeck
Implement "transform: skew()"

Thanks to @Jinwoo-Song for the original commit, which I just rebased and cleaned up. Fixes #6237.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7605)
<!-- Reviewable:end -->
2015-09-16 06:31:48 -06:00
Bryan Bell
48f1159845 gfx: Add elliptical border-radius shorthand parsing
Adds elliptical border-radius shorthand parsing, e.g.:

    /* The syntax of the second radius allows one to four values */
    /* (first radius values) / radius */
    border-radius: 10px 5% / 20px;

    /* (first radius values) / top-left-and-bottom-right | top-right-and-bottom-left */
    border-radius: 10px 5% / 20px 30px;

    /* (first radius values) / top-left | top-right-and-bottom-left | bottom-right */
    border-radius: 10px 5px 2em / 20px 25px 30%;

    /* (first radius values) / top-left | top-right | bottom-right | bottom-left */
    border-radius: 10px 5% / 20px 25em 30px 35em;
2015-09-15 16:51:17 -07:00
bors-servo
25abe646f8 Auto merge of #7619 - frewsxcv:font-face, r=nox
Implement <font> 'face' attribute



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7619)
<!-- Reviewable:end -->
2015-09-14 18:32:17 -06:00