Commit graph

12532 commits

Author SHA1 Message Date
Manish Goregaokar
54c036cd66 Elide most 'a lifetimes 2015-09-04 08:55:51 +05:30
Manish Goregaokar
35dd1816a9 Improve style in properties.mako.rs 2015-09-04 08:16:32 +05:30
Patrick Walton
dba3e41a63 layout: Lay absolutely-positioned blocks with inline containing blocks out of
flow.

Removes the long space before the site-specific drop-down in the Google SERPs.
2015-09-03 15:37:40 -07:00
bors-servo
05deb3dcc8 Auto merge of #7518 - servo:custom-properties, r=pcwalton
Initial support for CSS Custom Properties

https://drafts.csswg.org/css-variables/

Missing: 

* `var()` in shorthand property declarations.
* Correct handling of EOF in custom property declarations.

r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7518)
<!-- Reviewable:end -->
2015-09-03 16:09:02 -06:00
Simon Sapin
c651c2f3db Remove obsolete FIXME comment.
See https://lists.w3.org/Archives/Public/www-style/2015Jul/0360.html
2015-09-03 23:02:25 +02:00
Simon Sapin
a9db4eef14 Factor out custom property name parsing. 2015-09-03 23:02:24 +02:00
Simon Sapin
b0aedc6f4c Enable css-variables-1 tests
```
Summary
=======

Ran 548 tests (525 parents, 23 subtests)
Expected results: 242
Unexpected results: 306 (FAIL: 304, TIMEOUT: 2)
```
2015-09-03 23:02:23 +02:00
Simon Sapin
b4fdb5d803 Substitute var() in longhand property declarations. 2015-09-03 23:02:22 +02:00
Simon Sapin
b2ee828520 [T]::position_elem is deprecated. 2015-09-03 23:02:22 +02:00
Simon Sapin
1d47857be9 Invalid at computed-value time customp properties get their inherited value. 2015-09-03 23:02:21 +02:00
Simon Sapin
a18a1a8d79 Add a FIXME comment of EOF handling in custom properties. 2015-09-03 23:02:20 +02:00
Simon Sapin
c3b8b39437 An empty <declaration-value> is invalid. 2015-09-03 23:02:19 +02:00
Simon Sapin
4bf28417b4 Make custom property substitution do less work.
When var() is substituted, record that result rather than re-compute it later.
2015-09-03 23:02:18 +02:00
Simon Sapin
1c1a9379a3 Substitute var() in custom properties at computed value time. 2015-09-03 23:02:17 +02:00
Simon Sapin
7bcf9f0c9a Use nested parsers as appropritate 2015-09-03 23:02:16 +02:00
Simon Sapin
5fb6acb753 Rename DeclaredValue::SpecifiedValue to DeclaredValue::Value 2015-09-03 23:02:15 +02:00
bors-servo
0ad284766b Auto merge of #7443 - mbrubeck:get_table, r=pcwalton
Implement get_table_for_tag on FreeType

Updates freetype to pick up servo/rust-freetype#37

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7443)
<!-- Reviewable:end -->
2015-09-03 14:37:38 -06:00
Matt Brubeck
afafb0b71c Implement get_table_for_tag on FreeType
Also fixes use-after-free of FontTable buffers.
2015-09-03 13:35:44 -07:00
bors-servo
d3efcb707c Auto merge of #7522 - thiagopnts:from-str-canvas, r=Manishearth
Make use of FromStr and Default traits in lib canvas

fixes #7517

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7522)
<!-- Reviewable:end -->
2015-09-03 12:36:23 -06:00
bors-servo
8bbace7815 Auto merge of #7207 - pcwalton:surround-whitespace-stripping, r=mbrubeck
layout: Fix several bugs relating to inline borders, padding, and margins.

* The code that attempted to strip out borders that span multiple
  fragments in the same element could go wrong if fragments were
  stripped out due to text clumping or whitespace stripping. This patch
  rewrites that code to maintain flags in the inline fragment context
  specifying whether the node is the beginning or end of the element.
  Not only is this easier to maintain, it's closer in spirit to what roc
  originally suggested two years ago: it's isomorphic to "begin element,
  end element" markers for inline layout.

* Padding and margins for spans containing inline-blocks are now
  properly handled via a division of labor between the `InlineBlock`
  fragment and the `BlockFlow` that represents the inline-block.

* Unscanned text fragments may not be joined together into a text run if
  borders, padding, or margins separate them.

Because Servo now matches the rendering of Gecko and WebKit on the
`input_button_margins_a` reftest, I had to modify it to add some
vertical alignment.

The combined effect of all of these fixes places "Advertising" on the
right place on google.com.

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7207)
<!-- Reviewable:end -->
2015-09-03 11:55:03 -06:00
Thiago Pontes
a2a9c0489d Make use of FromStr and Default traits in lib canvas
fixup! Make use of FromStr and Default traits in lib canvas
2015-09-03 14:42:53 -03:00
Patrick Walton
ee8741b7a8 layout: Fix several bugs relating to inline borders, padding, and
margins.

* The code that attempted to strip out borders that span multiple
  fragments in the same element could go wrong if fragments were
  stripped out due to text clumping or whitespace stripping. This patch
  rewrites that code to maintain flags in the inline fragment context
  specifying whether the node is the beginning or end of the element.
  Not only is this easier to maintain, it's closer in spirit to what roc
  originally suggested two years ago: it's isomorphic to "begin element,
  end element" markers for inline layout.

* Padding and margins for spans containing inline-blocks are now
  properly handled via a division of labor between the `InlineBlock`
  fragment and the `BlockFlow` that represents the inline-block.

* Unscanned text fragments may not be joined together into a text run if
  borders, padding, or margins separate them.

Because Servo now matches the rendering of Gecko and WebKit on the
`input_button_margins_a` reftest, I had to modify it to add some
vertical alignment.

The combined effect of all of these fixes places "Advertising" on the
right place on google.com.
2015-09-03 10:24:59 -07:00
bors-servo
3f9b6f8586 Auto merge of #7530 - Ms2ger:html, r=jdm
Disable html tests in __dir__.ini rather than include.ini.

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

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7530)
<!-- Reviewable:end -->
2015-09-03 09:02:50 -06:00
Ms2ger
509b050712 Disable html tests in __dir__.ini rather than include.ini.
This ensures those tests are skipped when running ./mach test-wpt html.
2015-09-03 17:02:06 +02:00
bors-servo
33063fd887 Auto merge of #7528 - jdm:updatecssfix, r=frewsxcv
Remove obsolete method call that breaks ./mach update-css.

r? @frewsxcv

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7528)
<!-- Reviewable:end -->
2015-09-02 23:29:03 -06:00
bors-servo
3a09c027e2 Auto merge of #7526 - frewsxcv:bump-no-warnings, r=jdm
Upgrade rust-block to silence warning

https://github.com/SSheldon/rust-block/pull/1

Relevant to https://github.com/servo/servo/pull/7513

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7526)
<!-- Reviewable:end -->
2015-09-02 22:57:13 -06:00
Josh Matthews
152b76b963 Remove obsolete method call that breaks ./mach update-css. 2015-09-03 00:37:44 -04:00
Corey Farwell
68e65d775a Upgrade rust-block to silence warning
https://github.com/SSheldon/rust-block/pull/1

Relevant to https://github.com/servo/servo/pull/7513
2015-09-03 00:00:48 -04:00
bors-servo
625b4938ef Auto merge of #7525 - eefriedman:ogl-version-requirement, r=glennw
Cut required desktop OpenGL version from 3.0 to 2.1.

Mesa software rendering on Ubuntu 14.04 only claims to support OpenGL 2.1,
so servo crashes on startup.  It seems to work fine if an OpenGL 2.1 context
is requested.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7525)
<!-- Reviewable:end -->
2015-09-02 21:12:34 -06:00
Eli Friedman
c82401f213 Cut required desktop OpenGL version from 3.0 to 2.1.
Mesa software rendering on Ubuntu 14.04 only claims to support OpenGL 2.1,
so servo crashes on startup.  It seems to work fine if an OpenGL 2.1 context
is requested.
2015-09-02 19:51:28 -07:00
bors-servo
0f596cdb55 Auto merge of #7521 - eefriedman:unnecessary-refcell, r=jdm
Remove unnecessary uses of DOMRefCell.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7521)
<!-- Reviewable:end -->
2015-09-02 17:28:37 -06:00
Eli Friedman
94dec69247 Fix up some unnecessary uses of unsafe. 2015-09-02 15:50:17 -07:00
Eli Friedman
57a3e1465c Remove unnecessary uses of DOMRefCell. 2015-09-02 15:21:57 -07:00
bors-servo
d01ab61734 Auto merge of #7519 - Manishearth:clippyfix, r=SimonSapin
Make style clippy-free

(except for properties.rs)

I might add more fixes to this PR later.

r? @SimonSapin

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7519)
<!-- Reviewable:end -->
2015-09-02 16:11:30 -06:00
Manish Goregaokar
97422ad252 Various fixes in style 2015-09-03 03:16:00 +05:30
Manish Goregaokar
840e4c90d5 Fix match_ref_pats issues in values.rs 2015-09-03 03:15:46 +05:30
Manish Goregaokar
768cc79146 Various fixes in stylesheets 2015-09-03 03:15:16 +05:30
bors-servo
da02dba979 Auto merge of #7511 - psdh:attrtokato, r=Ms2ger
make AttrVal tokens() and atom() return or panic

Fixes #7479

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7511)
<!-- Reviewable:end -->
2015-09-02 15:03:10 -06:00
bors-servo
ded6159d48 Auto merge of #7516 - frewsxcv:dirty-script-dir, r=metajack
Allow 'script' component to enter a 'built' state

After this pull request merged:

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

the 'script' component would never enter a 'built' state. In other
words, if one calls `mach build`, lets it complete, then calls `mach
build` again, the 'script' component would rebuild even though we
supposedly just built it. This was due to the `ParserResults.pkl`
getting placed in the `components/script` directory instead of the
output directory, causing cargo to think that there were unbuilt files.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7516)
<!-- Reviewable:end -->
2015-09-02 14:29:21 -06:00
Corey Farwell
8792aa7fc0 Allow 'script' component to enter a 'built' state
After this pull request merged:

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

the 'script' component would never enter a 'built' state. In other
words, if one calls `mach build`, lets it complete, then calls `mach
build` again, the 'script' component would rebuild even though we
supposedly just built it. This was due to the `ParserResults.pkl`
getting placed in the `components/script` directory instead of the
output directory, causing cargo to think that there were unbuilt files.
2015-09-02 16:14:04 -04:00
bors-servo
b1b8258a87 Auto merge of #7515 - Ms2ger:devtools-lint, r=jdm
Lint devtools.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7515)
<!-- Reviewable:end -->
2015-09-02 12:32:44 -06:00
bors-servo
3424e234c8 Auto merge of #7499 - nerith:style, r=metajack
Improve style nit check for space after a comma

Fixes #7345.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7499)
<!-- Reviewable:end -->
2015-09-02 12:05:58 -06:00
Ms2ger
0decdaaf99 Make devtools depend on plugins. 2015-09-02 19:51:23 +02:00
Ms2ger
1257a33394 Stop calling to_string() in devtools. 2015-09-02 19:51:22 +02:00
Ms2ger
62a98e4918 Cleanup write_json_packet. 2015-09-02 19:51:20 +02:00
wilmoz
adbc6d045b Add a mach command to upgrade wptrunner 2015-09-02 12:29:56 -05:00
Prabhjyot Singh Sodhi
105ea0d690 renaming tokens(), atom() and uint() and rewriting to return or panic 2015-09-02 22:20:33 +05:30
bors-servo
366d4a83f1 Auto merge of #7418 - jdm:httppool, r=jdm
Enable HTTP connection pooling

Rebased and adjusted version of #6948. Closes #6948.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7418)
<!-- Reviewable:end -->
2015-09-02 10:48:07 -06:00
Sean McArthur
a1a9db8ffd net: use connection pooling 2015-09-02 12:46:53 -04:00
Simon Sapin
3fcd8938f3 Support CSS-wide keywords in custom properties 2015-09-02 18:32:38 +02:00