Commit graph

1358 commits

Author SHA1 Message Date
Adenilson Cavalcanti
05dd176186 Implementing Blur filter. 2015-04-15 16:15:21 -07:00
Ms2ger
48ac95c171 Move content tests into the Servo wpt tree (fixes #5686). 2015-04-15 22:08:38 +02:00
bors-servo
bdcf606f48 Auto merge of #5691 - pcwalton:hypothetical-box-reform, r=glennw
Before this change, Servo used one code path that computed the position
of flows with `position: static` or `position: relative` and another
separate code path that computed the position of flows with `position:
absolute` or `position: fixed`. The latter code attempted to duplicate
the former code to determine the static position of hypothetical boxes,
but this was both fragile and incorrect in the case of hypothetical
boxes nested inside floats. In fact, it's impossible to determine the
static position of an absolute flow relative to its containing block at
inline-size assignment time, because that static position could depend
on a float that cannot be placed until block-size assignment!

This patch changes block layout to use the same code path for static
positioning of regular flows and static positioning of absolute flows
where applicable. This both simplifies the code and improves its
efficiency, since it allows the `hypothetical_position` field and
`static_block_offsets` data structure to be removed. Moreover, it
improves correctness in the above case (which the new reftest checks).
This allows the sidebar in Facebook Timeline to be positioned properly.

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5691)
<!-- Reviewable:end -->
2015-04-14 18:14:11 -05:00
Bogdan Cuza
3dd48d214b Fix content type unit test 2015-04-14 23:08:00 +03:00
Patrick Walton
acd08c67c6 layout: Use the same code path for computing static positions of regular
flows and static positions of hypothetical boxes.

Before this change, Servo used one code path that computed the position
of flows with `position: static` or `position: relative` and another
separate code path that computed the position of flows with `position:
absolute` or `position: fixed`. The latter code attempted to duplicate
the former code to determine the static position of hypothetical boxes,
but this was both fragile and incorrect in the case of hypothetical
boxes nested inside floats. In fact, it's impossible to determine the
static position of an absolute flow relative to its containing block at
inline-size assignment time, because that static position could depend
on a float that cannot be placed until block-size assignment!

This patch changes block layout to use the same code path for static
positioning of regular flows and static positioning of absolute flows
where applicable. This both simplifies the code and improves its
efficiency, since it allows the `hypothetical_position` field and
`static_block_offsets` data structure to be removed. Moreover, it
improves correctness in the above case (which the new reftest checks).
This allows the sidebar in Facebook Timeline to be positioned properly.
2015-04-14 13:00:10 -07:00
Mátyás Mustoha
ccfff159e7 Canvas: added lineCap and lineJoin support. 2015-04-14 18:26:41 +02:00
bors-servo
f7c3544d75 Auto merge of #5659 - aneeshusa:add-range-errors-use-for-textencoder-textdecoder, r=jdm
Fixes #5620, and adds a few extra test cases.

Currently waiting on a few upstream PRs in rust-encoding to land.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5659)
<!-- Reviewable:end -->
2015-04-14 09:44:21 -05:00
Ms2ger
a471704107 Introduce a Servo-only tree under web-platform-tests. 2015-04-14 15:45:04 +02:00
Ms2ger
8edd4e5ec5 Add some missing colons to wpt's readme. 2015-04-14 15:45:00 +02:00
Aneesh Agrawal
97301400a5 Throw RangeErrors in TextEncoder/TextDecoder constructors.
Fixes #5620.
Fix the TODOs and FIXMEs to comply with the spec.
Add test case for passing invalid invalid labels.
Update test metadata; three test cases have been resolved upstream and
will be fixed whenever the rust-encoding dependency is sufficiently upgraded.
2015-04-14 09:41:57 -04:00
bors-servo
4fac8b6810 Auto merge of #5593 - shinglyu:ismap, r=jdm
This implements issue 4873
2015-04-14 00:10:08 -05:00
Shing Lyu
7a65b95ae5 4873 - Support the image map processing for <img ismap/> inside an <a/> 2015-04-14 10:09:23 +08:00
bors-servo
b9b4389628 Auto merge of #5672 - ChrisParis:nodefilter, r=jdm 2015-04-13 17:18:40 -05:00
Edward Cho
d0469dfaf3 move mime classifier unit tests into unit test crate 2015-04-13 15:40:30 -05:00
Chris Paris
98e2dc5df7 Uncomment NodeFilter constants 2015-04-13 10:13:06 -10:00
josiahdaniels
c54c7ccd7f Enable getElementsByClassName-31.htm test 2015-04-12 00:47:09 -04:00
bors-servo
9754c4c255 Auto merge of #5576 - jagtalon:jag/slashdot-storage, r=jdm
Use `and_then` and remove `unwrap` instead of using a `map` as described in https://github.com/servo/servo/issues/5548#issuecomment-90254644.

Fixes #5548
2015-04-11 18:13:16 -05:00
Jag Talon
6d4afaa5cc tests/content/test_storage.html: Add harness.js 2015-04-11 17:16:16 -04:00
Jag Talon
33d28aa969 Add tests/content/test_storage.html 2015-04-11 17:12:38 -04:00
bors-servo
22e570a06e Auto merge of #5553 - luniv:css-rule-iterators, r=SimonSapin 2015-04-10 19:17:49 -05:00
James Gilbertson
f9b5de75f2 fixup! Use iterators for iterating through CSS rules
Update the media queries unit tests to use iterators
2015-04-10 16:36:44 -06:00
Patrick Walton
2f3b3eb4c4 layout: Include padding in the content block-size when computing the
block-size value when `height: auto` is specified for
absolutely-positioned elements.

Improves "Edit links" on the Wikipedia sidebar.
2015-04-10 15:33:07 -07:00
Matt Brubeck
4e63a5063e Don't allow disabled fields to be focused 2015-04-10 10:16:06 -07:00
bors-servo
6903955b98 Auto merge of #5558 - aneeshusa:remove-compositor-dependency-on-net, r=jdm
Move the ImageCacheTaskClient trait and impl to net_traits. Fixes #5551.
2015-04-10 07:41:54 -05:00
Aneesh Agrawal
d3dacd0816 Update dependency for image_cache_task.rs unit tests. 2015-04-10 06:11:31 -04:00
Anthony Ramine
890d902d6a Implement Text::wholeText 2015-04-10 11:46:30 +02:00
Ms2ger
839830d1d8 Fix typo in the substringData implementation. 2015-04-10 09:21:55 +02:00
bors-servo
d7b6961104 Auto merge of #5623 - pcwalton:nested-inline-vertical-align, r=glennw
This allows things like `<sup><span>Foo</span></sup>` to work and
improves Wikipedia.

r? @glennw
2015-04-09 17:20:23 -05:00
Patrick Walton
18074bf908 layout: Lay out nested inline elements with different vertical-align
values properly in simple cases.

This allows things like `<sup><span>Foo</span></sup>` to work and
improves Wikipedia.
2015-04-09 14:55:05 -07:00
Patrick Walton
00a2685cbe layout: During inline layout, make place_between_floats use the same
line height computation logic as final block size assignment.

Improves Wikipedia.
2015-04-09 14:23:08 -07:00
bors-servo
325899bfad Auto merge of #5613 - mmatyas:canvas_miterlimit, r=jdm
This exposes some other canvas tests which were marked as PASS before. Two strokeRect related tests are fixed by #5612, and lineCap/lineJoin will have an implementation soon.
2015-04-09 09:37:44 -05:00
Anthony Ramine
3d68a46fee Implement NonDocumentTypeChildNode::*ElementSibling() 2015-04-09 15:43:05 +02:00
Ms2ger
71008d816d Update web-platform-tests. 2015-04-09 14:38:04 +02:00
Mátyás Mustoha
93fa9e607a Canvas: added miterLimit support. 2015-04-09 13:00:05 +02:00
bors-servo
223a5c4972 Auto merge of #5560 - gfxmonk:wpt-instructions, r=jdm
The current wpt instructions tell users to run `./serve.py`, which doesn't do anything. I've updated the instructions to use `./serve`, which works as advertised (and matches the instructions from web-platform-tests/README.md).
2015-04-08 21:37:50 -05:00
bors-servo
1c09557398 Auto merge of #5606 - Ms2ger:errors, r=jdm 2015-04-08 21:07:18 -05:00
bors-servo
254f2a3b5f Auto merge of #5599 - servo:textdecoder, r=jdm 2015-04-08 20:00:40 -05:00
bors-servo
9b7bf415d7 Auto merge of #5590 - nox:document-createattributens, r=Ms2ger 2015-04-08 18:55:19 -05:00
bors-servo
1c884dc76b Auto merge of #5583 - pcwalton:float-ceiling-top-margin-redux, r=mbrubeck
As the float ceiling is relative to the border box, not the margin box,
of the parent flow, top margin must not be included.

This exposed a pre-existing bug whereby margins are discarded if a block
contains only floats and no content, affecting the tests
`float_intrinsic_height.html` and `margins_inside_floats_a.html`. As a
workaround, some invisible content has been added to the bodies of both
tests.

r? @mbrubeck
2015-04-08 18:04:14 -05:00
Patrick Walton
6d61468160 layout: Simplify and improve the correctness of whitespace stripping in
text layout, and unify the inline layout paths for pre- and
normally-formatted text.

This fixes a lot of "jumpiness" and removes the `new_line_pos` stuff.

Closes #2260.
2015-04-08 14:29:23 -07:00
bors-servo
88aa07b7e0 Auto merge of #5605 - servo:shadows, r=mbrubeck
CC #5207.
2015-04-08 14:13:32 -05:00
Ms2ger
f8dec0fe58 Adjust the assertions in throw_dom_exception. 2015-04-08 20:44:49 +02:00
Ms2ger
211d40c596 Disable canvas_shadows_002.htm.
CC #5207.
2015-04-08 20:30:53 +02:00
bors-servo
0f0dd02daa Auto merge of #5575 - nox:namednodemap-remove, r=Ms2ger 2015-04-08 13:22:29 -05:00
bors-servo
ee7d762213 Auto merge of #5563 - mmatyas:canvas_globalalpha, r=jdm
A patch somewhat similar to #5562
2015-04-08 11:58:04 -05:00
Keith Yeung
e2929403ef Implement TextDecoder#decode. 2015-04-08 16:55:50 +02:00
Keith Yeung
4e5ab24654 Implement TextDecoder (fixes #4769). 2015-04-08 16:52:59 +02:00
bors-servo
3445017e43 Auto merge of #5598 - jdm:intermittentreftest, r=larsbergstrom 2015-04-08 09:45:21 -05:00
Josh Matthews
efc8db9a51 Disable canvas_shadows_002.htm until we have more time to investigate. 2015-04-08 10:03:01 -04:00
bors-servo
188a0e7b94 Auto merge of #5573 - nox:parentnode-attributes, r=Ms2ger 2015-04-08 07:54:13 -05:00