Commit graph

16025 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
48dee6413d script/layout: Refactor mouse_over since it now basically uses hit_test 2016-03-02 20:14:15 +01:00
bors-servo
3ff5082798 Auto merge of #9841 - glennw:extra-overflow, r=pcwalton
Fix unexpected overflow with overflow: hidden set.

Fixes #9719.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9841)
<!-- Reviewable:end -->
2016-03-03 00:35:50 +05:30
Glenn Watson
ff831bb478 Fix unexpected overflow with overflow: hidden set.
Fixes #9719.
2016-03-03 05:02:37 +10:00
Emilio Cobos Álvarez
c3786437a3 script: Fix mouseover/mouseout dispatching. 2016-03-02 20:01:41 +01:00
Emilio Cobos Álvarez
b1f0581637 script: Fix MouseOver handling
Now we only query for the topmost node, and apply the hover state to all
of the parent elements.

This fixes things like #9705, where the hover state was applied only to
the children.

This also makes us more conformant with other browsers in the case of
taking in account margins and paddings.

For example, prior to this PR, when your mouse was over the inner
element, in the bottom part, `hover` styles didn't apply to the parent.

```html
<style>
div {
  padding: 10px;
  margin: 10px;
  height: 15px;
  background: blue;
}

div:hover {
  background: red;
}
</style>

<div>
  <div></div>
</div>
```

Fixes #9705
2016-03-02 20:01:41 +01:00
bors-servo
9ceda7de50 Auto merge of #9837 - nox:deterministic-raf, r=mbrubeck
Use a BTreeMap for Document::animation_frame_list (fixes #9834)

The callbacks must stay ordered.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9837)
<!-- Reviewable:end -->
2016-03-02 21:24:38 +05:30
Anthony Ramine
1d87f61350 Use a BTreeMap for Document::animation_frame_list (fixes #9834)
The callbacks must stay ordered.
2016-03-02 16:53:06 +01:00
bors-servo
de7c67575e Auto merge of #9836 - Ms2ger:print, r=nox
Remove a stray println in table layout.

It was introduced in 4dc9d8b1c5.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9836)
<!-- Reviewable:end -->
2016-03-02 16:20:19 +05:30
Ms2ger
0a9b62d7c7 Remove a stray println in table layout.
It was introduced in 4dc9d8b1c5.
2016-03-02 10:57:06 +01:00
bors-servo
a8c321a7e0 Auto merge of #9790 - kaksmet:piston-jpeg, r=metajack
Use piston_image instead of stb_image for decoding JPEGs

The main reason stb_image was used for decoding JPEGs was the lack of progressive support in piston_image.
With version 0.7, piston_image gained support for decoding progressive JPEGs through use of the [jpeg-decoder](https://crates.io/crates/jpeg-decoder) crate.

This PR removes the dependency on stb_image and instead uses piston_image 0.7 for decoding JPEGs.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9790)
<!-- Reviewable:end -->
2016-03-02 14:17:50 +05:30
Ulf Nilsson
8c07a1a3af Use piston_image instead of stb_image for decoding JPEGs
Bump image to 0.7
2016-03-02 09:13:49 +01:00
bors-servo
62814f7cb4 Auto merge of #9756 - mrobinson:flat-display-lists-webrender, r=pcwalton
Flatten display list structure

Instead of producing a tree of stacking contexts, display list
generation now produces a flat list of display items and a tree of
stacking contexts. This will eventually allow display list construction
to produce and modify WebRender vertex buffers directly, removing the
overhead of display list conversion.  This change also moves
layerization of the display list to the paint thread, since it isn't
currently useful for WebRender.

To accomplish this, display list generation now takes three passes of
the flow tree:

        1. Calculation of absolute positions.
        2. Collection of a tree of stacking contexts.
        3. Creation of a list of display items.

After collection of display items, they are sorted based upon the index
of their parent stacking contexts and their position in CSS 2.1
Appendeix E stacking order.

This is a big change, but it actually simplifies display list generation.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9756)
<!-- Reviewable:end -->
2016-03-02 06:21:08 +05:30
bors-servo
70941e3806 Auto merge of #9827 - glennw:update-wr, r=KiChjang
Update webrender_traits, webrender, num.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9827)
<!-- Reviewable:end -->
2016-03-02 05:26:29 +05:30
bors-servo
f895f87197 Auto merge of #9823 - gmalecha:canvas-rendering-context-2d-update-idl, r=jdm
updating the CanvasRenderingContext2D to match the spec

- fixes #9443

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9823)
<!-- Reviewable:end -->
2016-03-02 04:32:26 +05:30
Martin Robinson
e7019f2721 Flatten display list structure
Instead of producing a tree of stacking contexts, display list
generation now produces a flat list of display items and a tree of
stacking contexts. This will eventually allow display list construction
to produce and modify WebRender vertex buffers directly, removing the
overhead of display list conversion.  This change also moves
layerization of the display list to the paint thread, since it isn't
currently useful for WebRender.

To accomplish this, display list generation now takes three passes of
the flow tree:

        1. Calculation of absolute positions.
        2. Collection of a tree of stacking contexts.
        3. Creation of a list of display items.

After collection of display items, they are sorted based upon the index
of their parent stacking contexts and their position in CSS 2.1
Appendeix E stacking order.

This is a big change, but it actually simplifies display list generation.
2016-03-01 14:50:07 -08:00
bors-servo
1d6aece589 Auto merge of #9826 - mbrubeck:table-row-iter, r=pcwalton
Table border-collapse fixes

Two related fixes for border-collapse:

* Fix border collapsing across table-row-group flows

  This fixes the border-end calculation for table rows whose borders are collapsed with rows in different rowgroups.  The border collapsing code now uses an iterator that yields all the rows as a flat sequence, regardless of how they are grouped in rowgroups.  It gets rid of `TableRowGroupFlow::preliminary_collapsed_borders` which was never correct.  (It was read but never written.)

  This may fix #8120 but I'm not 100% certain. (I haven't managed to reproduce the intermittent failure locally, and my reduced test case still fails but in a different way.)

* Fix confusing `push_or_mutate` API

  This fixes a bug when recalculating border collapsing for an existing table row. The bug was caused by using `push_or_mutate` which has no effect if there is already a value at the specified index.

  The fix switches incorrect `push_or_mutate` calls to use `push_or_set` instead. It also renames `push_or_mutate` to `get_mut_or_push` which I think is a less-confusing name for this method.

r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9826)
<!-- Reviewable:end -->
2016-03-02 03:38:12 +05:30
bors-servo
22ce878edc Auto merge of #9753 - nikkisquared:async_fetch, r=jdm
Make Fetch Protocol Asynchronous

I'm working on making it possible to run Fetch Asynchronously, as required for some steps, such as Main Fetch. It looks like somebody has already laid some groundwork for that, with a AsyncFetchListener trait and two async fetch functions defined, which I'm building on top of.

So far, as a sort of proof of concept, I've written a test to asynchronously retrieve a fetch response, which uses a simple function to check if the fetch response is complete or not. I'd like to be checked if I'm on the right path, to see if I need to rework anything so far, and what my next step can be.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9753)
<!-- Reviewable:end -->
2016-03-02 01:49:29 +05:30
Nikki
3f79667050 implementing working demonstration of calling Fetch asynchronously 2016-03-01 13:02:38 -07:00
bors-servo
b355c0dbcb Auto merge of #9817 - Ms2ger:yacc-log, r=nox
Stop generating a parser.out file in the source.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9817)
<!-- Reviewable:end -->
2016-03-02 00:55:02 +05:30
bors-servo
ae67ae9cdb Auto merge of #9822 - Ms2ger:css-20160301, r=Ms2ger
Update CSS tests to revision 7d0ff6117ee51720c307ea24d413d13eb5abf3e6

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9822)
<!-- Reviewable:end -->
2016-03-02 00:00:42 +05:30
Bob
06ffdd68e8 refactor http_loader hostname/htst order
Changed hostname rewrite to happen inside obtain response after any htst
changes.  Removed  url from load leaving just doc_url to avoid confusion
2016-03-01 18:10:58 +00:00
Ms2ger
fd77ab5c5b Disable the manifest check for css tests. 2016-03-01 19:09:18 +01:00
Ms2ger
ffbf48c57b Re-enable CaretPosition-001.htm (fixes #9805). 2016-03-01 19:09:17 +01:00
Ms2ger
52a15f7338 Disable text-transform tests for now (see #9821). 2016-03-01 19:09:16 +01:00
Ms2ger
349c75536d Update CSS tests to revision 7d0ff6117ee51720c307ea24d413d13eb5abf3e6 2016-03-01 19:09:10 +01:00
Glenn Watson
1c899a35a5 Update webrender_traits, webrender, num. 2016-03-02 03:38:31 +10:00
Matt Brubeck
6c684a5ac7 Fix border collapsing at the end of a table-row-group
This fixes the border-end calculation for table rows whose borders are
collapsed with rows in different rowgroups.  The border collapsing code now
uses an iterator that yields all the rows as a flat sequence, regardless of
how they are grouped in rowgroups.  It gets rid of
`TableRowGroupFlow::preliminary_collapsed_borders` which was never correct.
(It was read but never written.)

This may fix #8120 but I'm not 100% certain. (I haven't managed to reproduce
the intermittent failure locally, and my reduced test case still fails but in
a different way.)
2016-03-01 09:02:35 -08:00
Gregory Malecha
2c6636129d updating the CanvasRenderingContext2D to match the spec
- fixes #9443
2016-03-01 08:13:50 -08:00
Ms2ger
549f2669f0 Stop generating a parser.out file in the source. 2016-03-01 15:02:50 +01:00
bors-servo
40c52d55e2 Auto merge of #9792 - GuillaumeGomez:remove_comparator, r=nox
Remove util::vec::Comparator

r? @nox

Fixes #9696

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9792)
<!-- Reviewable:end -->
2016-03-01 19:10:45 +05:30
Guillaume Gomez
02095cf550 Remove util::vec::Comparator 2016-03-01 14:28:16 +01:00
bors-servo
f7db68eff7 Auto merge of #9816 - nox:node-replacechild, r=Ms2ger
Fix the Node.replaceChild tests

That method first does "if node is a host-including inclusive ancestor of parent,
throw a HierarchyRequestError" and only then "if child’s parent is not parent,
throw a NotFoundError exception".

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9816)
<!-- Reviewable:end -->
2016-03-01 14:01:18 +05:30
bors-servo
00628704ca Auto merge of #9763 - Tangresh:i9725, r=nox
Implement value for DOMTokenList

Fixes #9725

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9763)
<!-- Reviewable:end -->
2016-03-01 08:34:21 +05:30
Anthony Ramine
186218b265 Fix the Node.replaceChild tests
That method first does "if node is a host-including inclusive ancestor of parent,
throw a HierarchyRequestError" and only then "if child’s parent is not parent,
throw a NotFoundError exception".
2016-03-01 03:14:15 +01:00
bors-servo
cd274a4a11 Auto merge of #9815 - antrik:update-ipc_channel-2, r=KiChjang
Update ipc-channel again for working deadlock fix

Pull in ce7c296a3717b054060889b780f8638eb66ce970 , fixing concurrent
large transfers on Linux.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9815)
<!-- Reviewable:end -->
2016-03-01 07:40:26 +05:30
bors-servo
4035f7ae2c Auto merge of #9813 - glennw:iframe-sizing, r=pcwalton
With WebRender, only send resize events when window size is valid.

Fixes WR 112.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9813)
<!-- Reviewable:end -->
2016-03-01 06:46:01 +05:30
bors-servo
eba9f4b629 Auto merge of #9814 - glennw:update-gleam, r=metajack
Update gleam to get UBO bindings.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9814)
<!-- Reviewable:end -->
2016-03-01 05:48:26 +05:30
Glenn Watson
d031319434 Update gleam to get UBO bindings. 2016-03-01 10:01:19 +10:00
Glenn Watson
78b284cefe With WebRender, only send resize events when window size is valid.
Fixes WR 116.
2016-03-01 09:29:16 +10:00
Matt Brubeck
4dc9d8b1c5 Fix confusing push_or_mutate API
This fixes a bug when recalculating border collapsing for an existing table
now. The bug was caused by using `push_or_mutate` which has no effect if there
is already a value at the specified index.

The fix switches incorrect `push_or_mutate` calls to use `push_or_set`
instead. It also renames `push_or_mutate` to `get_mut_or_push` which I think
is a less-confusing name for this method.
2016-02-29 15:18:19 -08:00
bors-servo
802abf4247 Auto merge of #9809 - pcwalton:transparency, r=metajack
Use transparency in the window if we have rounded border corners.

r? @metajack

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9809)
<!-- Reviewable:end -->
2016-03-01 04:06:12 +05:30
Patrick Walton
c9a45fb4c0 Use transparency in the window if we have rounded border corners. 2016-02-29 14:29:37 -08:00
bors-servo
4bcdbe6d56 Auto merge of #8932 - rilut:add-elementfrompoint, r=nox
Implement Document#elementFromPoint

Related to #8666. I haven't implemented elementsFromPoint, because from my past discussion with jdm, [it's not good yet](dbfa25214b (commitcomment-14668959)) to implement elementsFromPoint because it may cause GC hazards.

By the way, I also have to include the test for this, right? I've found this [1]. So, is all I have to do is just to put this into `tests/wpt/web-platform-tests/cssom-view/elementFromPoint.html`?

[1] http://test.csswg.org/suites/cssom-view-1_dev/nightly-unstable/html/elementFromPosition.htm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8932)
<!-- Reviewable:end -->
2016-03-01 03:01:50 +05:30
Olaf Buddenhagen
9c7b531c37 Update ipc-channel again for working deadlock fix
Pull in ce7c296a3717b054060889b780f8638eb66ce970 , fixing concurrent
large transfers on Linux.
2016-02-29 22:06:34 +01:00
bors-servo
2ba1709181 Auto merge of #9804 - nox:vengeful-disabling, r=KiChjang
Vindictively disable all intermittent tests that failed #9787

This disables the tests mentioned in #8120, #9014, #9033, #9092, #9148, #9205, #9772 and #9803.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9804)
<!-- Reviewable:end -->
2016-03-01 01:32:48 +05:30
Rizky Luthfianto
76678bbdae Implement Document#elementFromPoint 2016-03-01 02:23:07 +07:00
Anthony Ramine
ea1c169894 Vindictively disable all intermittent tests that failed #9787
This disables the tests mentioned in #8120, #9014, #9033, #9092, #9148, #9205, #9772 and #9803.
2016-02-29 20:07:07 +01:00
Dominik Menzi
b29b2d6d73 Implement value for DOMTokenList 2016-02-29 16:07:03 +01:00
bors-servo
7d4276b393 Auto merge of #9787 - nox:event-invoke, r=Ms2ger
Refactor dispatch_event according to the spec (fixes #9178)

Two new functions invoke and invoke_inner are introduced and some invariants documented.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9787)
<!-- Reviewable:end -->
2016-02-29 20:13:11 +05:30
bors-servo
872ee19534 Auto merge of #9773 - notriddle:wpt_line_width, r=nox
Truncate long test names in WPT.

Makes the output readable on 100-character terminals.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9773)
<!-- Reviewable:end -->
2016-02-29 19:19:49 +05:30