Commit graph

4748 commits

Author SHA1 Message Date
bors-servo
aeb8dce2d9 Auto merge of #7534 - pcwalton:inline-absolute-out-of-flow, r=mbrubeck
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.

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7534)
<!-- Reviewable:end -->
2015-09-04 19:59:11 -06:00
bors-servo
5bad6b1b6e Auto merge of #7502 - bjwbell:elliptical-borders, r=pcwalton
gfx: Add elliptical border radius support

TODO: Add code for parsing shorthand border-radius e.g. "border-radius: 10px 5% / 20px".

r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7502)
<!-- Reviewable:end -->
2015-09-04 18:46:24 -06:00
Patrick Walton
ded4a5793e layout: Defend the block formatting context speculation against going wrong in
the presence of blocks that overflow in the inline direction.

Makes the Google search result links appear.

Closes #7298.
2015-09-04 17:00:15 -07:00
bors-servo
8e0b010117 Auto merge of #7487 - mrobinson:paint-layer-upgrade, r=pcwalton
Have PaintLayers own StackingContexts instead of the opposite

Previously, StackingContexts might have a PaintLayer. We switch the
ownership, for several reasons:

   * We want PaintLayers to potentially contain something other
     than a StackingContext soon.
   * We want to delay the creation of PaintLayers until the last
     minute, so that we can synthesize new layers for sandwiched
     content.

This commit also implements the second goal. Instead of creating
PaintLayers during layout itself, wait until we are sorting and
layerizing a completed DisplayList.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7487)
<!-- Reviewable:end -->
2015-09-04 17:31:54 -06:00
Martin Robinson
4ca93c39d6 Have PaintLayers own StackingContexts instead of the opposite
Previously, StackingContexts might have a PaintLayer. We switch the
ownership, for several reasons:

   * We want PaintLayers to potentially contain something other
     than a StackingContext soon.
   * We want to delay the creation of PaintLayers until the last
     minute, so that we can synthesize new layers for sandwiched
     content.

This commit also implements the second goal. Instead of creating
PaintLayers during layout itself, wait until we are sorting and
layerizing a completed DisplayList.
2015-09-04 15:07:09 -07:00
Bryan Bell
3e5fb49b6f gfx: Add elliptical border radius support 2015-09-04 14:42:44 -07:00
Connor Imes
d746835344 Combine script profiling with profile crates. Fixes #7514. 2015-09-04 16:09:44 -05:00
bors-servo
7df4ff7572 Auto merge of #7544 - pcwalton:stacking-context-relative-offset, r=mbrubeck
layout: Stop double-counting `position: relative` offsets for stacking contexts.

Fixes the location of the gear menu on the Google 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/7544)
<!-- Reviewable:end -->
2015-09-04 12:55:04 -06:00
bors-servo
9d42179900 Auto merge of #7545 - jgraham:get_pref_option, r=jdm
Update prefs API to return an Option<bool>.

This allows for situations where there is no reasonable default
to apply for the pref value e.g. when we are just listing values

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7545)
<!-- Reviewable:end -->
2015-09-04 11:02:12 -06:00
Patrick Walton
2276d642fd layout: Stop double-counting position: relative offsets for stacking
contexts.

Fixes the location of the gear menu on the Google SERPs.
2015-09-04 09:28:18 -07:00
bors-servo
f8ba9a8111 Auto merge of #7543 - mbrubeck:glutin-up, r=pcwalton
Update glutin

To servo/glutin#46

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7543)
<!-- Reviewable:end -->
2015-09-04 10:23:58 -06:00
Matt Brubeck
7d2257bdd6 Update glutin
To servo/glutin#46
2015-09-04 09:22:43 -07:00
James Graham
a208379f46 Update prefs API to return an Option<bool>.
This allows for situations where there is no reasonable default
to apply for the pref value e.g. when we are just listing values
2015-09-04 15:55:29 +01:00
bors-servo
c2c2646d37 Auto merge of #7536 - Manishearth:clippyfix, r=Ms2ger
More clippy fixes

Elided almost all the lifetimes and removed needless returns. Mostly done by sed + manual fixes.

r? @nox

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7536)
<!-- Reviewable:end -->
2015-09-04 07:59:04 -06:00
Manish Goregaokar
8e2c37a542 Fix match_refs and let_returns in layout, address review changes 2015-09-04 18:30:46 +05:30
bors-servo
cc1eb3f741 Auto merge of #7508 - jxs:master, r=SimonSapin
Add style_traits crate to improve crate separation,

closes #7353

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7508)
<!-- Reviewable:end -->
2015-09-04 06:46:11 -06:00
João Oliveira
4a305d1e62 Add style_traits crate to improve crate separation,
closes #7353
2015-09-04 12:59:37 +01:00
bors-servo
43e7cd5fae Auto merge of #7538 - saneyuki:requestAnimationFrame, r=Ms2ger
script: change requestAnimationFrame returns the unsigned long type.

By https://github.com/whatwg/html/pull/97, the returned type of`requestAnimationFrame()` and the argument type of `cancelAnimationFrame()` are changed to `unsigned long` WebIDL type.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7538)
<!-- Reviewable:end -->
2015-09-04 02:49:16 -06:00
Simon Sapin
24a6a53633 Fix or silence some warnings. 2015-09-04 10:11:57 +02:00
Tetsuharu OHZEKI
63627405d9 script: change requestAnimationFrame returns the unsigned long type. 2015-09-04 15:40:30 +09:00
Manish Goregaokar
5c24da3e2d Undo elision for trait object; trait objects are strange 2015-09-04 09:24:49 +05:30
Manish Goregaokar
e94df1ed5c Remove needless returns 2015-09-04 09:13:48 +05:30
Manish Goregaokar
2e02ea38fc Elide most 'b lifetimes 2015-09-04 09:02:12 +05:30
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
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
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
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
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