Commit graph

3197 commits

Author SHA1 Message Date
bors-servo
64fb09ca2d Auto merge of #9800 - Wafflespeanut:node_attrs, r=nox
fixed the last failing test in dom/nodes/attributes.html

r? @nox

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9800)
<!-- Reviewable:end -->
2016-03-05 21:32:46 +05:30
Ravi Shankar
aaf2888d0b Updated SupportedPropertyNames in NamedNodeMap to match spec 2016-03-05 17:21:01 +05:30
Jack Moffitt
2507bfb2cf Suppress reflows before RefreshTick or FirstLoad
This fixes a bug where partially loaded content is displayed to the user
before it should be, usually before stylesheets have loaded. This commit
supresses reflows until either FirstLoad or RefreshTick, whichever comes
first.

Unfortunately, hit_test and mouse_over did not do reflows if they were
necessary, and so by suppressing the initial spurious reflows, these
methods started to panic without a display list to query. This patch
also transforms these into queries similar to the other existing
queries.
2016-03-03 15:17:46 -07:00
bors-servo
056a7cf1a2 Auto merge of #9715 - ecoal95:mousemove, r=mbrubeck
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

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9715)
<!-- Reviewable:end -->
2016-03-03 22:55:35 +05:30
Bob
248e84e928 create cookie as HTTP instead of NonHttp in test
Cleanup for readability and correctness of unit test in http_loader
2016-03-03 17:16:07 +00:00
bors-servo
46256b33ef Auto merge of #9825 - creativcoder:remove-contructor-xmldoc, r=KiChjang
removed XMLDocument constructor according to spec

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9825)
<!-- Reviewable:end -->
2016-03-03 17:41:03 +05:30
Rahul Sharma
f8cddf5a22 removed XMLDocument constructor according to spec 2016-03-03 17:01:33 +05:30
Emilio Cobos Álvarez
73eff81e5d Add manual tests for mouseover/out handling 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
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
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
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
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
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
Greg Guthe
b408f840a0 test websocket origin set in worker
refs: https://github.com/servo/servo/issues/9535
2016-02-29 18:22:18 -05: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
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
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
bors-servo
dfdeabf57d Auto merge of #9799 - nox:range-extractcontents, r=KiChjang
Fix step 14.2 of Range::ExtractContents

We need the last inclusive ancestor of start node that is not an inclusive ancestor
of end node, not the first that is an inclusive ancestor of it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9799)
<!-- Reviewable:end -->
2016-02-29 05:11:28 +05:30
Anthony Ramine
c0d79062b5 Fix step 14.2 of Range::ExtractContents
We need the last inclusive ancestor of start node that is not an inclusive ancestor
of end node, not the first that is an inclusive ancestor of it.
2016-02-29 00:19:18 +01:00
bors-servo
b3964a8958 Auto merge of #9797 - nox:range-insertnode, r=KiChjang
Fix step 1 of Range::InsertNode

The method needs to throw when trying to insert start node into range.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9797)
<!-- Reviewable:end -->
2016-02-29 04:18:06 +05:30
Anthony Ramine
c713734b48 Fix step 1 of Range::InsertNode
The method needs to throw when trying to insert start node into range.
2016-02-28 22:54:08 +01:00
Emilio Cobos Álvarez
3e36739e38 script: Fix remaining bugs from Range.deleteContents 2016-02-28 19:27:42 +01:00
Anthony Ramine
0ac931a43e Fix step 6 of Range::DeleteContents 2016-02-28 04:57:10 +01:00
Michael Howell
4170f20828 Truncate long test names in WPT.
Makes the output readable on 100-character terminals.
2016-02-27 18:52:53 -07:00
bors-servo
d5ce8f308f Auto merge of #9734 - nox:finish-event-dispatch, r=Ms2ger
Fix the "get the parent" loop when dispatching event (fixes #6733)

The DOM specification says:

> A document's get the parent algorithm, given an event, returns null
> if event's type attribute value is "load" or document does not have
> a browsing context, and the document's associated Window object
> otherwise.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9734)
<!-- Reviewable:end -->
2016-02-27 23:03:25 +05:30
Anthony Ramine
e70b520c1f Fix the "get the parent" loop when dispatching event (fixes #6733)
The DOM specification says:

A document's get the parent algorithm, given an event, returns null
if event's type attribute value is "load" or document does not have
a browsing context, and the document's associated Window object
otherwise.
2016-02-27 17:41:22 +01:00
bors-servo
4a7d234510 Auto merge of #9768 - jdm:add_disallowed_prefixes, r=jdm
disallow restricted XMLHttpRequest header prefixes

Rebased from #9376.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9768)
<!-- Reviewable:end -->
2016-02-27 22:09:46 +05:30
Chandler Abraham
3a949b77b2 don't unconditionally override header 2016-02-27 10:47:13 -05:00
Bob
759099c78d correctly send secure cookies after hsts url match
Fix for #8100, where sites in the hsts list were not recieving secure
cookies if the site was originally loading using a plain http url.
2016-02-27 15:16:53 +00:00
bors-servo
4e244b16dd Auto merge of #9675 - KiChjang:fetch-attributes, r=jdm
Update fetch attributes to match the new spec

This should make fetch match the spec more closely.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9675)
<!-- Reviewable:end -->
2016-02-27 20:22:22 +05:30
bors-servo
5862675b82 Auto merge of #9766 - jdm:flexboxtests, r=Ms2ger
Enable flexbox for flexbox tests.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9766)
<!-- Reviewable:end -->
2016-02-27 19:28:57 +05:30
Keith Yeung
96971244ac Update fetch attributes to match the new spec 2016-02-27 08:40:09 -05:00
bors-servo
6c65e154f4 Auto merge of #9774 - nox:remove-attribute-node, r=nox
Implement removeAttributeNode

Supersedes #8727

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9774)
<!-- Reviewable:end -->
2016-02-27 15:23:06 +05:30
bors-servo
8bdffa25f9 Auto merge of #9755 - jdm:handlerreturn, r=jdm
use return value of invoking event handlers to cancel the event

Rebased from #8707. Fixes #8490. We can modify the code and test as necessary whenever we make a decision about https://github.com/whatwg/html/issues/423 in the future.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9755)
<!-- Reviewable:end -->
2016-02-27 07:10:50 +05:30
bors-servo
0d7a2eee2d Auto merge of #9514 - g-k:html-input-value, r=KiChjang
HTML input value

Ready for review.

Fixes #9455.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9514)
<!-- Reviewable:end -->
2016-02-27 04:36:46 +05:30
bors-servo
d424bd14e5 Auto merge of #9718 - Ms2ger:clean-sync, r=jgraham
Support syncing from a clean tree.

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