Commit graph

483 commits

Author SHA1 Message Date
bors-servo
5f439e7eaa auto merge of #5204 : ehegnes/servo/squelch_contenttest, r=jdm
This actually fixes 5159.
2015-03-12 20:48:47 -06:00
Eric Hegnes
6208eaa628 Further squelch warnings from contenttest.rs
This actually fixes 5159
2015-03-12 20:38:49 -04:00
Peter Reid
8c5f9bb806 Fix warnings in tests/reftest.rs 2015-03-12 19:06:12 -04:00
bors-servo
8e811229ba auto merge of #4417 : pcwalton/servo/border-spacing, r=larsbergstrom
Table layout code has been refactored to push the spacing down to
rowgroups and rows; this will aid the implementation of
`border-collapse` as well.

r? @SimonSapin
2015-03-12 13:03:49 -06:00
Patrick Walton
586c12ccc4 layout: Implement border-spacing per CSS 2.1 § 17.6.1 and the legacy
`cellspacing` attribute per HTML5 § 14.3.9.

Table layout code has been refactored to push the spacing down to
rowgroups and rows; this will aid the implementation of
`border-collapse` as well.

This commit also fixes two nasty issues in table layout:

* In fixed layout, extra space would not be divided among columns that
  had auto width but had nonzero minimum width.

* In automatic layout, extra space would be distributed to constrained
  columns as well even if unconstrained columns with percentage equal to
  zero were present.
2015-03-12 12:00:40 -07:00
hirschenberger
2a91c317c0 Add reftest for issue #5176 2015-03-12 11:02:29 +01:00
bors-servo
e8f1a046c6 auto merge of #5185 : mmatyas/servo/canvas_arc, r=pcwalton
This patch enables the use of `arc()` on the canvas.
I couldn't add reftest this time, as it involves some antialiasing issues, and so the reference doesn't match.
2015-03-10 09:45:49 -06:00
Patrick Walton
8703cd9747 Update WPT expectations 2015-03-09 20:54:13 -07:00
Patrick Walton
64abea5780 Add a Japanese Web font 2015-03-09 20:50:39 -07:00
Patrick Walton
f9cdd05d58 layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1
§ 12.3-12.5.

Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.
2015-03-09 17:13:45 -07:00
Matt Brubeck
8221bfc3ef Layout fixes for RTL child flows in LTR parents
...and vice-versa.  This is not a complete fix for all mixed-direction layout
cases, but it fixes enough problems to make some simple test cases pass, like
tha attached reftest.

There are FIXME comments for many of the remaining issues.  In particular,
this does not yet handle RTL layout of fixed/absolute elements.
2015-03-09 14:21:26 -07:00
Mátyás Mustoha
c98bca6130 Canvas: added arc(). 2015-03-09 21:55:40 +01:00
Ms2ger
8343eb0b8a Disable intermittently failing canvas_transformations_scale_001.htm. 2015-03-09 18:16:08 +01:00
Eric Hegnes
20cb2c395d Fixes #5159
Fix warnings and introduce usage of `std::env` over deprecated `std::os`
functions.
2015-03-08 01:37:48 -05:00
Simon Sapin
f770dbabd7 Warn about sorting alphabetically in the reftest list file. 2015-03-07 17:58:00 +01:00
Gilles Leblanc
54dfb659ec Organize reftest list alphabetically and make the tidy script check it
Reftest list check is checked using Python's default string comparison.
Also added a notice in the tidy script when there are no errors.

Fixes #5092
2015-03-07 17:51:17 +01:00
bors-servo
a557b51c28 auto merge of #5154 : luniv/servo/viewpoint-percent-lengths, r=SimonSapin
Spec: http://dev.w3.org/csswg/css-values-3/#viewport-relative-lengths
2015-03-05 18:55:02 -07:00
Glenn Watson
14e438391a Disable flaky reftests until a proper solution is found.
A race condition exists where pipelines that are removed from a document
may not ever trigger a paint for that pipeline. The compositor relies
on a paint occurring for each pipeline before outputting the image when
in reftest mode.
2015-03-06 10:24:20 +10:00
Simon Sapin
c066377fc5 Add support for changing the viewport size in reftests.
Usage example, in `*.list` files:

    resolution=200x300 == something.html something_ref.html
2015-03-05 16:52:16 +01:00
bors-servo
9d58c086e7 auto merge of #5128 : bjwbell/servo/inline-block_fix_min-width, r=jdm
With inline-block elements set the width to max(min width,
specified width) instead of only using the specified width.

Fixes https://github.com/servo/servo/issues/4945
2015-03-03 22:24:44 -07:00
Bryan Bell
a35ffe1c6e For inline-block correctly use min-width
With inline-block elements set the width to max(min width,
specified width) instead of only using the specified width.
2015-03-03 21:06:57 -08:00
bors-servo
07a3ce2ce1 auto merge of #5130 : bjwbell/servo/inline_block_overflow_ref_test, r=glennw
For https://github.com/servo/servo/issues/3725
2015-03-03 21:48:43 -07:00
Bryan Bell
3b32178962 Add inline-block overflow ref test
For https://github.com/servo/servo/issues/3725
2015-03-03 20:44:49 -08:00
bors-servo
72f8898990 auto merge of #5118 : jdm/servo/pageload, r=Ms2ger
Rebased and improved version of #4967.
2015-03-03 16:03:45 -07:00
bors-servo
e19fbc686c auto merge of #5125 : glennw/servo/remove-iframe-layers, r=larsbergstrom 2015-03-03 15:12:45 -07:00
Glenn Watson
86baef2cc0 Remove compositor layers when iframes are removed from doc or display:none. 2015-03-04 07:51:46 +10:00
Josh Matthews
9a3d58032d Update WPT expectations. 2015-03-03 16:25:40 -05:00
Dan Fox
522b0ea3b9 uint -> usize 2015-03-03 20:27:19 +00:00
Simon Sapin
4c1d778ced Revert "layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1"
This reverts commit 30fd28d107.
2015-03-03 21:16:24 +01:00
Simon Sapin
e1b5acb56c Revert "Remove expected failure markers on a couple of WPT reftests that now pass."
This reverts commit 4c8bde5736.
2015-03-03 21:15:49 +01:00
bors-servo
e1a50c7719 auto merge of #5133 : servo/servo/background-size, r=SimonSapin
`background-size` per CSS-BACKGROUNDS § 3.9.

Nearest neighbor interpolation is used for `crisp-edges`, like Firefox.
A note has been added that we could do better if we wanted to.

Multiple backgrounds are not yet supported.

Rebase of #4368. Fixes #4368.
2015-03-03 11:48:54 -07:00
bors-servo
5cd6316add auto merge of #5067 : servo/servo/counters, r=SimonSapin
Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.

Moved from #4544, because Critic.

Fixes #4544.
2015-03-03 10:42:52 -07:00
Simon Sapin
4c8bde5736 Remove expected failure markers on a couple of WPT reftests that now pass. 2015-03-03 18:24:33 +01:00
Patrick Walton
09c53f461d layout: Implement image-rendering per CSS-IMAGES-3 § 5.3 and
`background-size` per CSS-BACKGROUNDS § 3.9.

Nearest neighbor interpolation is used for `crisp-edges`, like Firefox.
A note has been added that we could do better if we wanted to.

Multiple backgrounds are not yet supported.
2015-03-03 17:54:12 +01:00
Patrick Walton
30fd28d107 layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1
§ 12.3-12.5.

Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.
2015-03-03 17:31:19 +01:00
Patrick Walton
a82fc00806 layout: Implement overflow-x and overflow-y per CSS-OVERFLOW § 3.
Fragmentation is not yet supported.
2015-03-03 17:03:27 +01:00
bors-servo
891dd496e3 auto merge of #5065 : glennw/servo/iframe-vis-fix, r=pcwalton
When an iframe is created with display:none it sets the root layer to be zero width and height. When updating the rect of the iframe from layout send the entire rect rather than just the new origin, which handles the case where the iframe has been made visible and now has a non-zero rect.
2015-03-02 15:30:52 -07:00
bors-servo
93d1f40a96 auto merge of #4475 : pcwalton/servo/text-shadow, r=mbrubeck
r? @mbrubeck 

Depends on servo/rust-geom#64.
2015-03-02 14:54:52 -07:00
Glenn Watson
f68386f0fa Fix making an iframe visible when it was initially set to display:none.
When an iframe is created with display:none it sets the root layer to be
zero width and height. When updating the rect of the iframe from layout
send the entire rect rather than just the new origin, which handles the case
where the iframe has been made visible and now has a non-zero rect.
2015-03-03 07:46:26 +10:00
Patrick Walton
09358b908d layout: Implement text-shadow per CSS-TEXT-DECORATION-3 § 4. 2015-03-02 13:28:51 -08:00
Mátyás Mustoha
774cc4a93a Canvas: added lineTo(). 2015-03-02 21:00:50 +01:00
bors-servo
55f7636549 auto merge of #4928 : yodalee/servo/issue4906-fix-characterdata-substringdata, r=jdm
issue #4906
Fix substringData function, and add a test case for all function in characterdata.
2015-02-27 19:39:58 -07:00
yodalee
0e29eabb87 fix function on utf8 string, pass two tests
dom/nodes/Node-properties.html
detachedForeignComment.length]
detachedXmlComment.length]
2015-02-28 10:21:36 +08:00
yodalee
e45b104721 add test case of dom characterdata 2015-02-28 10:21:35 +08:00
bors-servo
b2f099026a auto merge of #4952 : bjwbell/servo/borders-txt-nodes, r=pcwalton
Inline fragments that are part of a text run don't have interior borders.
So don't draw interior borders or include them when calculating positioning.

Fixes https://github.com/servo/servo/issues/4658, where multiple text nodes that are adjacent have distinct borders.

r? @Ms2ger, @pcwalton
2015-02-27 16:57:53 -07:00
Bryan Bell
ec2fa2558c Remove interior borders during flow construction
Instead of looking at the boundaries of the text run, set the border
width to zero and the border style to none on border sides that are not
the outermost for a node container that is display: inline.
2015-02-27 15:52:12 -08:00
bors-servo
26567ef2e6 auto merge of #5066 : luniv/servo/document-currentscript, r=jdm
Implements https://github.com/servo/servo/issues/5057 (Document.currentScript)
2015-02-27 11:30:57 -07:00
James Gilbertson
5f5d1246ef Implement Document.currentScript 2015-02-27 11:11:02 -07:00
Bryan Bell
0f407804fe Remove WA for borders ref test
The borders_a.html ref test had a WA to avoid displaying a spurious
black pixel at (0,0). Details are at
https://github.com/servo/servo/issues/2879

The WA can be removed since the bug is no longer reproducible.
2015-02-27 00:40:53 -08:00
bors-servo
8ad3c5aeb6 auto merge of #5064 : glennw/servo/hide-after-layout, r=pcwalton
Prior to incremental layout, the code would remove the existing
construction result. However, with incremental layout the construction result
is cloned rather than removed. This change ensures that the previous
construction result is cleared when an element's display type
changes to none.
2015-02-26 14:46:10 -07:00