Commit Graph

4890 Commits

Author SHA1 Message Date
Bryan Bell
754f4baf13 servo: Merge #7577 - gfx: Fix bug with 1px width borders disappearing (from bjwbell:borders_pixel_rounding_bug); r=mbrubeck
In to_nearest_azure_rect when rounding to pixel coordinates, maintain
the invariant of rect non-overlap (if before rounding two rects don't overlap).

The previous code rounded the rect top left corner to the nearest pixel with
the size rounded to the nearest pixel multiple which can violate the
non-overlap condition, e.g.
10px×9.60px at (0px,6.6px) & 10px×9.60px at (0px,16.2px)
would round to
10px×10.0px at (0px,7.0px) & 10px×10.0px at (0px,16.0px), which overlap.

Instead round each corner to the nearest pixel.

For rects that dont need to satify the non-overlap condition and with
width or height between 0.5px and 1px, rounding each rect corner to the
nearest pixel can yield an empty rect e.g.
10px×0.6px at 0px,28.56px -> 10px×0px at 0px,29px.

For this scenario a new function to_nearest_non_empty_azure_rect
rounds the rect top left corner to the nearest pixel and the rect size
to the nearest pixel multiple. It's possible for non-overlapping rects
after this rounding to overlap.

This should fix https://github.com/servo/servo/issues/7184 "rounding ...borders not to be visible", without breaking https://github.com/servo/servo/issues/7152 "Underlines less than 1px high sometimes invisible".

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: f29ddb4b5d5eed595df37fa989511d2cb3aa8dfd
2015-09-09 13:30:41 -06:00
Jack Moffitt
b137d4f8c3 servo: Merge #7583 - Fix some build warnings (from metajack:warning-police); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 50f5ae1d358cd5472ad3f7f72d05568e44ec8932
2015-09-09 12:53:21 -06:00
Martin Robinson
9546305f71 servo: Merge #7563 - Layerize StackingContexts that are on top of layers (from mrobinson:layerize-stacking-contexts); r=pcwalton
StackingContexts that should be painted on top of StackingContexts that
are already layerized should automatically get their own layer. This
will ensure proper painting order.

Source-Repo: https://github.com/servo/servo
Source-Revision: c0381c732569b9abe6282c6c750533bc271a2019
2015-09-09 10:52:56 -06:00
Akos Kiss
c05804b21a servo: Merge #7576 - Bump up skia and js packages to follow recent fixes (from akosthekiss:bump-skia-js); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 0d37e8f96b7f40d14bf4fbb0b66e42a01302a336
2015-09-09 04:37:08 -06:00
Eli Friedman
4875f833cb servo: Merge #7523 - Fix up some unnecessary uses of unsafe (from eefriedman:unnecessary-unsafe); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: be9a9ffda10fa2c50b13f79dabd49255f29f12f6
2015-09-09 00:05:17 -06:00
Corey Farwell
22eaaf37cf servo: Merge #7568 - Use OS-agnostic filesystem paths in Python (from frewsxcv:os-agnostic-paths); r=jdm
This will eventually need to be done for #1908

Source-Repo: https://github.com/servo/servo
Source-Revision: 83972196600f04e817ddb53fda18142778905307
2015-09-08 22:29:04 -06:00
Connor Imes
e0cb1601d6 servo: Merge #7567 - Add heartbeats for new script profiler categories (from connorimes:script-heartbeats); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 2c77776428105b68c1b7c86f4d6b4e0223db3185
2015-09-08 21:59:54 -06:00
Glenn Watson
05adb33d2b servo: Merge #7557 - Handle cases where the layout root is None. Fixes #6375 (from glennw:fix-layout-panic); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 4221b354cfc05e4857ba4c1a160298965e243330
2015-09-08 20:39:09 -06:00
Akos Kiss
6924f44968 servo: Merge #7565 - Make the use of gold linker configurable (from akosthekiss:config-gold); r=SimonSapin
Currently, ld.gold is always used for linking if found on the
system. There are some cases however when one may want to opt out
from using it. This patch adds the boolean field `rustc-with-gold`
to the `[tools]` section of `.servobuild`, which if set false,
disables the use of ld.gold.

Source-Repo: https://github.com/servo/servo
Source-Revision: 273306056428e0378ebf27a1573a783aad866b5f
2015-09-08 13:57:13 -06:00
Connor Imes
2ef2604ce5 servo: Merge #7547 - Combine script profiling with profile crates. Fixes #7514 (from connorimes:move_script_profiling); r=jdm
The script crate had its own built-in profiling which was basically doing the same thing as the profile crate.  This wraps the internal profiling around the main profile functionality.  Script-related tasks are now added to the ProfilerCategory enum.

Source-Repo: https://github.com/servo/servo
Source-Revision: ca36779a7e8298918b21ae243a43a71b1520119b
2015-09-08 09:32:56 -06:00
wilmoz
094717dc16 servo: Merge #7494 - Add a mach command to upgrade wptrunner (from wilcus:upgradeWptRunner); r=jdm
https://github.com/servo/servo/issues/7491

Source-Repo: https://github.com/servo/servo
Source-Revision: c44213219668d054ed267ac29a2513309b342e5f
2015-09-08 08:41:05 -06:00
Anthony Ramine
d078f1011a servo: Merge #7531 - Implement <template> (from nox:template); r=Ms2ger
All tests using iframes can't currently pass, same for innerHTML-related tests with <template> elements. The latter contradicts the spec, see the links below.

Apart from this, they work, AFAICT.

https://github.com/servo/html5ever/issues/164
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27314

Source-Repo: https://github.com/servo/servo
Source-Revision: 5a0be12e43f92fc64b1d8f5d35f9dadaa4b53521
2015-09-08 02:29:00 -06:00
Mathieu Rheaume
ba172810f7 servo: Merge #7556 - Remove unnecessary mut on variables declared in components/layout/block.rs (from ddrmanxbxfr:MutabilityCleanup); r=Ms2ger
Small cleanup over mutable variables in components/layout/block.rs.

Thanks for looking into it!

Source-Repo: https://github.com/servo/servo
Source-Revision: 282f9ade931342e9cd1ae72fde9dd9f88cb5b34a
2015-09-08 00:28:42 -06:00
Michael Howell
baaf4b8258 servo: Merge #7560 - Include the overflow of the inline block itself (from notriddle:master); r=pcwalton
Closes #7372.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3fa5c9185cd699a5cad000923cd1ac8826dc819a
2015-09-07 21:40:03 -06:00
Patrick Walton
f6a4b6cc8c servo: Merge #7533 - layout: Use a special path that treats margin: auto as zero for inline-block inline size computation (from pcwalton:inline-block-margin-auto); r=mbrubeck
Places the search icon in the right place on the Google SERPs.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 0bc7ad9b08d3ae978be4a95687025f00cfcff312
2015-09-04 21:53:17 -06:00
wilmoz
b05007f610 servo: Merge #7337 - Documentation of inheritance in type ids (from wilcus:InheritanceDocumentation); r=mbrubeck
Aditional documentation about this issue https://github.com/servo/servo/issues/7205

Source-Repo: https://github.com/servo/servo
Source-Revision: da0b9d7c0185f0898fd47f5326e8e084d08a2fc0
2015-09-04 21:18:52 -06:00
Patrick Walton
710921416c servo: Merge #7534 - layout: Lay absolutely-positioned blocks with inline containing blocks out of flow (from pcwalton:inline-absolute-out-of-flow); r=mbrubeck
Removes the long space before the site-specific drop-down in the Google SERPs.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: aeb8dce2d914808e4cdb8589d19ee9968897ed94
2015-09-04 19:59:11 -06:00
Bryan Bell
26e99fe98c servo: Merge #7502 - gfx: Add elliptical border radius support (from bjwbell:elliptical-borders); r=pcwalton
TODO: Add code for parsing shorthand border-radius e.g. "border-radius: 10px 5% / 20px".

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 5bad6b1b6e149246e8949fd42059e777d1cbd9e3
2015-09-04 18:46:24 -06:00
Martin Robinson
f2bbff72b6 servo: Merge #7487 - Have PaintLayers own StackingContexts instead of the opposite (from mrobinson:paint-layer-upgrade); r=pcwalton
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8e0b010117889550effa3ad793e7ee8f9b692b40
2015-09-04 17:31:54 -06:00
Patrick Walton
be44947a8d servo: Merge #7544 - layout: Stop double-counting position: relative offsets for stacking contexts (from pcwalton:stacking-context-relative-offset); r=mbrubeck
Fixes the location of the gear menu on the Google SERPs.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 7df4ff7572bf131aca3643d078dfe7823b3fc347
2015-09-04 12:55:04 -06:00
James Graham
fbe716c4c1 servo: Merge #7545 - Update prefs API to return an Option<bool> (from jgraham:get_pref_option); r=jdm
This allows for situations where there is no reasonable default
to apply for the pref value e.g. when we are just listing values

Source-Repo: https://github.com/servo/servo
Source-Revision: 9d4217990060b3d2c93a4b39fe391985f01a5979
2015-09-04 11:02:12 -06:00
Matt Brubeck
e9926732de servo: Merge #7543 - Update glutin (from mbrubeck:glutin-up); r=pcwalton
To servo/glutin#46

Source-Repo: https://github.com/servo/servo
Source-Revision: f8ba9a81116e11249845189c6af8978df1693c4b
2015-09-04 10:23:58 -06:00
Manish Goregaokar
cf0446c9f9 servo: Merge #7536 - More clippy fixes (from Manishearth:clippyfix); r=Ms2ger
Elided almost all the lifetimes and removed needless returns. Mostly done by sed + manual fixes.

r? @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: c2c2646d37614ece5869af861993c3d619f6e003
2015-09-04 07:59:04 -06:00
João Oliveira
360ac1d5bf servo: Merge #7508 - Add style_traits crate to improve crate separation, (from jxs:master); r=SimonSapin
closes #7353

Source-Repo: https://github.com/servo/servo
Source-Revision: cc1eb3f741554b3f1711cd1938d1c16b6b7d2879
2015-09-04 06:46:11 -06:00
Tetsuharu OHZEKI
7a67b445e9 servo: Merge #7538 - script: change requestAnimationFrame returns the unsigned long type (from saneyuki:requestAnimationFrame); r=Ms2ger
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 43e7cd5faed53802a9c2ffcac2c171f29f460cff
2015-09-04 02:49:16 -06:00
Simon Sapin
5d9da13fa8 servo: Merge #7539 - Fix or silence some warnings (from servo:warnings); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 8d21a7924676454d954a3e649bb649d46968b5d3
2015-09-04 02:15:10 -06:00
Simon Sapin
1b93452113 servo: Merge #7518 - Initial support for CSS Custom Properties (from servo:custom-properties); r=pcwalton
https://drafts.csswg.org/css-variables/

Missing:

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

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 05deb3dcc8be9a0a623536467628aa68ae754918
2015-09-03 16:09:02 -06:00
Matt Brubeck
2393e84084 servo: Merge #7443 - Implement get_table_for_tag on FreeType (from mbrubeck:get_table); r=pcwalton
Updates freetype to pick up servo/rust-freetype#37

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 0ad284766b3f12097dce1e5858b5d07e870478eb
2015-09-03 14:37:38 -06:00
Thiago Pontes
cfdc5c2426 servo: Merge #7522 - Make use of FromStr and Default traits in lib canvas (from thiagopnts:from-str-canvas); r=Manishearth
fixes #7517

Source-Repo: https://github.com/servo/servo
Source-Revision: d3efcb707c6dc26b171ffada2e1ca48d5abbb4b6
2015-09-03 12:36:23 -06:00
Patrick Walton
0238af05da servo: Merge #7207 - layout: Fix several bugs relating to inline borders, padding, and margins (from pcwalton:surround-whitespace-stripping); r=mbrubeck
* 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

Source-Repo: https://github.com/servo/servo
Source-Revision: 8bbace7815b489e1b87df2ec496e65e78721d929
2015-09-03 11:55:03 -06:00
Josh Matthews
63971b3b27 servo: Merge #7528 - Remove obsolete method call that breaks ./mach update-css (from jdm:updatecssfix); r=frewsxcv
r? @frewsxcv

Source-Repo: https://github.com/servo/servo
Source-Revision: 33063fd887d8f663f11ce08bea50e446c8d50f44
2015-09-02 23:29:03 -06:00
Corey Farwell
08effb93a3 servo: Merge #7526 - Upgrade rust-block to silence warning (from frewsxcv:bump-no-warnings); r=jdm
https://github.com/SSheldon/rust-block/pull/1

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 3a09c027e2f19b3b0fdf0b55730532b942103411
2015-09-02 22:57:13 -06:00
Eli Friedman
dc0d48fb63 servo: Merge #7525 - Cut required desktop OpenGL version from 3.0 to 2.1 (from eefriedman:ogl-version-requirement); r=glennw
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 625b4938efbaf45cb4a9802796bd3e29bb9be376
2015-09-02 21:12:34 -06:00
Eli Friedman
5a8f5125e3 servo: Merge #7521 - Remove unnecessary uses of DOMRefCell (from eefriedman:unnecessary-refcell); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 0f596cdb55ed5123ad5f9b095e22214fab8c82b7
2015-09-02 17:28:37 -06:00
Manish Goregaokar
f3aaf0f5c3 servo: Merge #7519 - Make style clippy-free (from Manishearth:clippyfix); r=SimonSapin
(except for properties.rs)

I might add more fixes to this PR later.

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: d01ab617341891bf0c91f1fba0ebcf13df9150a6
2015-09-02 16:11:30 -06:00
Prabhjyot Singh Sodhi
3406659245 servo: Merge #7511 - make AttrVal tokens() and atom() return or panic (from psdh:attrtokato); r=Ms2ger
Fixes #7479

Source-Repo: https://github.com/servo/servo
Source-Revision: da02dba9793f373c6c9cdc1e0bd1c3411cfcc4ba
2015-09-02 15:03:10 -06:00
Corey Farwell
116fee3cab servo: Merge #7516 - Allow 'script' component to enter a 'built' state (from frewsxcv:dirty-script-dir); r=metajack
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: ded6159d48901fc814d4b4395102fdbe0d9e5817
2015-09-02 14:29:21 -06:00
Ms2ger
5fc94f81ad servo: Merge #7515 - Lint devtools (from Ms2ger:devtools-lint); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: b1b8258a87cf4db69039057124057b0906186d43
2015-09-02 12:32:44 -06:00
Brandon Fairchild
506a0fb2e2 servo: Merge #7499 - Improve style nit check for space after a comma (from nerith:style); r=metajack
Fixes #7345.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3424e234c8c86e787edfce6dc63ed155617e0e85
2015-09-02 12:05:58 -06:00
Sean McArthur
0316cdde51 servo: Merge #7418 - Enable HTTP connection pooling (from jdm:httppool); r=jdm
Rebased and adjusted version of #6948. Closes #6948.

Source-Repo: https://github.com/servo/servo
Source-Revision: 366d4a83f1448e115cf998cc6c4e8c564773da65
2015-09-02 10:48:07 -06:00
Corey Farwell
0b7018a49c servo: Merge #7513 - Upgrade some dependencies to silence warnings (from frewsxcv:bump-no-warnings); r=Ms2ger
In order to pick up these changes:

* servo/euclid#101
* netvl/xml-rs#102
* jgraham/webdriver-rust#17
* ecoal95/rust-offscreen-rendering-context#27

Source-Repo: https://github.com/servo/servo
Source-Revision: b7c88dd547c01d99c77c90329cc09f13a90a53b7
2015-09-02 09:42:29 -06:00
Martin Tomasi
c318b0ac00 servo: Merge #7429 - Fixed serialize_list to no longer append an additional space at the e… (from GyrosOfWar:serialize_list_space_fix); r=jdm
…nd of the string.

Fixes #7404

Source-Repo: https://github.com/servo/servo
Source-Revision: e1ede2074d2ceb74c0d9f38b23697f17dc3a8fc9
2015-09-02 09:15:16 -06:00
Corey Farwell
89cf6e9dfe servo: Merge #7117 - Reenable "Use one Python virtual environment for all mach commands" (from frewsxcv:python-venv); r=jdm
Address the issues brought up by https://github.com/servo/servo/pull/7103

The revert requires an upgrade to wptrunner (for the mozlog 3.0 compatibility) because the latest wptrunner depends on [this](https://github.com/w3c/wpt-tools/pull/27))

/cc @Ms2ger @metajack

Source-Repo: https://github.com/servo/servo
Source-Revision: 4e6bbe227299b3b8a08cba7e613952806ada4402
2015-09-02 08:44:27 -06:00
Anthony Ramine
719d3d7bcc servo: Merge #7452 - Introduce VirtualMethods::attribute_mutated() (from nox:cleanup-attributes); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: eaf90c0b1c14717fb580bb0bdb8f6c4db363ace6
2015-09-02 08:14:33 -06:00
Simon Sapin
2c2c527fd4 servo: Merge #7496 - Implement CSS3 Calc (from servo:calc_); r=SimonSapin
This is #7185 with one commit added to make it build merged with master, which got support for the `ch` unit in the meantime.

Source-Repo: https://github.com/servo/servo
Source-Revision: a547ae6826cf171c42b090408a4c20d58d1829d9
2015-09-02 02:33:18 -06:00
Simon Sapin
ea7357b400 servo: Merge #7509 - Upgrade to rustc 1.4.0-dev (cb9323ec0 2015-09-01) (from servo:rustup_2015-09-01); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: f49615ca7b5d98ee603cf42f705073fbe4d414fb
2015-09-02 01:31:23 -06:00
Xiao Chuan Yu
721367b664 servo: Merge #7506 - Add note on Ubuntu 14.04 dependencies error (from xiaochuanyu:patch-2); r=metajack
Update README with note about possible problem installing dependencies on Ubuntu 14.04.
See #6158 for details.

Source-Repo: https://github.com/servo/servo
Source-Revision: dbf549ea32d23cf96b7f49e3333c068aaf050bc3
2015-09-01 23:31:34 -06:00
Martin Robinson
401bdcb59c servo: Merge #7503 - Upgrade to the latest rust-layers (from mrobinson:iframe-issue); r=glennw
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: ba2cb77c26006dc378553d757e88de8ab86c4d5b
2015-09-01 22:18:52 -06:00
farodin91
d45cce0ef0 servo: Merge #7500 - Implement viewport functions for window #1718 (from farodin91:viewport); r=jdm
@jdm r?
closes #6875

Source-Repo: https://github.com/servo/servo
Source-Revision: a844c0b0e8ca26e3bd76a42616e406fad8f7e5a5
2015-09-01 21:31:25 -06:00
Mathieu Rheaume
d6113b8219 servo: Merge #7504 - Issue #7501 emove unused time function in time module of profile (from ddrmanxbxfr:RemoveUnusedTimeFunction); r=jdm
Title sums it up. Time function in the time module of profile crate was unused.

Unless we plan to use it soon, we should clean it up

See issue #7501 related to it.

Thanks.

Source-Repo: https://github.com/servo/servo
Source-Revision: a58f71c38eb64a723cfa6f69c75c03e0d46c805e
2015-09-01 19:57:42 -06:00