Commit graph

6003 commits

Author SHA1 Message Date
Simon Sapin
f70a49974a Make PropertyDeclarationBlock fields private 2017-03-07 23:37:32 +01:00
Simon Sapin
da4e5146e9 Make PropertyDeclarationBlock::important_count private. 2017-03-07 23:37:31 +01:00
Simon Sapin
9d663ea7af Make PropertyDeclaration::parse return an enum rather than push to a Vec. 2017-03-07 23:37:29 +01:00
bors-servo
b11847d86c Auto merge of #15837 - upsuper:bug1344135, r=emilio
Return true in set_property only when declaration block is changed

This is [bug 1344135](https://bugzilla.mozilla.org/show_bug.cgi?id=1344135).

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15837)
<!-- Reviewable:end -->
2017-03-07 13:51:33 -08:00
bors-servo
f85c8ef744 Auto merge of #15855 - ferjm:IframeLoadEventSteps, r=Ms2ger
s/IframeLoadEventSteps/IFrameLoadEventSteps/g

All the other IFrame* names have the capital "I" and capital "F", so I'm changing this to keep uniformity.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).
- [ ] These changes do not require tests because it's just a name change and the code is already tested.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15855)
<!-- Reviewable:end -->
2017-03-07 09:38:44 -08:00
Fernando Jiménez Moreno
9a5268d757 s/IframeLoadEventSteps/IFrameLoadEventSteps/g 2017-03-07 18:33:02 +01:00
Anthony Ramine
57291e5609 Remove obsolete step from Text::SplitText
https://github.com/whatwg/dom/pull/419
2017-03-07 13:31:22 +01:00
bors-servo
b66839367c Auto merge of #15833 - sendilkumarn:mut-js-heap, r=nox
removing mutHeapJs references

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15316

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15833)
<!-- Reviewable:end -->
2017-03-07 01:40:39 -08:00
SendilKumar N
2996d3a413 removing mutHeapJs references
changes as per comments
2017-03-07 17:37:44 +08:00
SendilKumar N
b6e6e84bcf ext. filtering for lang matching 2017-03-07 10:20:16 +08:00
Xidorn Quan
4f07826837 Return true in set_property only when declaration block is changed 2017-03-06 22:21:59 +11:00
bors-servo
72fd27bbcc Auto merge of #15816 - servo:raf-timer, r=jdm,emilio
Improve performance of layout queries and requestAnimationFrame

Part of #14442.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15816)
<!-- Reviewable:end -->
2017-03-05 05:14:45 -08:00
Patrick Walton
4e7ac19380 script: Use a timer when rAF is used for non-animation purposes
After this patch, when the page calls `requestAnimationFrame()` too many
times in the row without actually mutating the DOM, further calls to
`rAF` will actually perform the moral equivalent of `setTimeout(16)`.
This saves a lot of CPU time compared to actually waiting for the
vertical blanking interval, because waiting for that requires us to draw
the page.

Reduces CPU usage drastically on nytimes.com, which has a perpetual
`requestAnimationFrame()` loop that checks whether ads are in view.
2017-03-03 23:25:29 +01:00
crypto-universe
afd3030af3 Use more idiomatic construction
or_else in more idiomatic rust construction than
match, where Some(x) => Some(x)
2017-03-03 22:35:29 +01:00
bors-servo
1b1fadb8b8 Auto merge of #15767 - charlesvdv:blob-close, r=nox
Remove support for Blob::{close, isClosed}

<!-- Please describe your changes on the following line: -->

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15660

<!-- Either: -->
- [x] There are tests for these changes

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15767)
<!-- Reviewable:end -->
2017-03-03 02:16:51 -08:00
bors-servo
0294a474b8 Auto merge of #15455 - charlesvdv:xhr-process-event, r=KiChjang
Implement XHR progress event changes

<!-- Please describe your changes on the following line: -->

This PR implements change in the specs in XHR.

Unfortunatelly, @jdm the test are not passing. It looks like the fetch module send more bytes that we should according the ```Content-Length```. This [lines](https://github.com/servo/servo/blob/master/tests/wpt/web-platform-tests/XMLHttpRequest/progress-events-response-data-gzip.htm#L70) make the test fail.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13276  (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15455)
<!-- Reviewable:end -->
2017-03-03 01:05:11 -08:00
bors-servo
fa32d50c7a Auto merge of #15768 - ferjm:issue-15592-document-elementsFromPoint, r=emilio
Trigger reflow on document.elementsFromPoint

As [suggested](https://github.com/servo/servo/issues/15592#issuecomment-280379805) by @jdm `Document::nodes_from_point` now triggers a reflow.

I added a new reftest that panics with `ERROR:servo: Tried to hit test without a DisplayList` if this patch is not applied.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15592.
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15768)
<!-- Reviewable:end -->
2017-03-02 11:43:17 -08:00
Fernando Jiménez Moreno
31d833f32c s/nodes_from_point/nodes_from_point_response and change test from reftest to regular test checking only the fixed crash 2017-03-02 16:59:04 +01:00
Anthony Ramine
da45177d52 Switch to our own websocket fork 2017-03-02 16:40:02 +01:00
Fernando Jiménez Moreno
7426d902a3 Trigger reflow on document.elementsFromPoint 2017-03-02 10:44:38 +01:00
Anthony Ramine
f8467a26c4 Kill serde_codegen 💣 2017-02-28 19:31:25 +01:00
Charles Vandevoorde
44e05e224c Remove support for Blob::{close, isClosed} 2017-02-28 17:20:16 +01:00
Simon Sapin
288ef97055 Update cssparser for https://github.com/servo/rust-cssparser/pull/123 2017-02-28 17:16:36 +01:00
bors-servo
7ee6294922 Auto merge of #15761 - upsuper:shorthand, r=Manishearth
Have shorthand parsing functions not return Option for their longhands

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15761)
<!-- Reviewable:end -->
2017-02-27 23:08:33 -08:00
Xidorn Quan
b24614f894 Resolve color:currentcolor during computing
The keyword value "currentcolor" should be preserved rather than being
replaced by the CSS-wide keyword "inherit" during parsing.
2017-02-28 13:44:50 +11:00
bors-servo
4b39431215 Auto merge of #15464 - KiChjang:pseudo-lang, r=emilio
Support lang pseudo class

Fixes #8219.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15464)
<!-- Reviewable:end -->
2017-02-27 17:21:50 -08:00
Keith Yeung
7456bcf02b Support lang pseudo class 2017-02-27 17:21:20 -08:00
Simon Sapin
958c33a95f Remove unnecessary ref in some patterns 2017-02-26 19:02:54 +01:00
Simon Sapin
33ef6f78e5 Update to cssparser 0.11 2017-02-26 11:09:53 +01:00
Simon Sapin
0f2d000a23 Borrow input to match_ignore_ascii_case!
In cssparser version 0.11, this macro will stop implicitly borrowing its
own input.
2017-02-26 10:40:09 +01:00
bors-servo
a204c4176d Auto merge of #15715 - nox:custom-derive, r=SimonSapin
Make #[dom_struct] a proc_macro attribute

The rustup is needed for https://github.com/rust-lang/rust/pull/40039.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15715)
<!-- Reviewable:end -->
2017-02-24 05:56:30 -08:00
Anthony Ramine
b2adcfb40b Test that StorageEvent's URL is empty from document.createEvent 2017-02-24 12:22:10 +01:00
bors-servo
0e33756e8d Auto merge of #15717 - nox:cookie, r=asajeffrey
Remove rustc-serialize from cookie and url

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15717)
<!-- Reviewable:end -->
2017-02-24 00:14:03 -08:00
bors-servo
3bf81c389b Auto merge of #13561 - mathieuh:request-constructor, r=jdm
Make Request throw less often (fixes #13457)

<!-- Please describe your changes on the following line: -->

---

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #13457

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->

---

This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13561)

<!-- Reviewable:end -->
2017-02-23 17:54:40 -08:00
Anthony Ramine
3ad540853c Remove rustc-serialize from cookie 2017-02-24 02:39:57 +01:00
Anthony Ramine
31e9d81c0f Make #[dom_struct] a proc_macro attribute 2017-02-24 01:50:51 +01:00
Simon Sapin
64885c4213 Update to rustc 1.17.0-nightly (413a975e3 2017-02-23)
Fix #15704
2017-02-24 01:49:29 +01:00
bors-servo
1d13e6a2df Auto merge of #15700 - glennw:zoom-wip-2, r=mbrubeck
Introduce CSSPixel as a replacement for ViewportPx and PagePx.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15700)
<!-- Reviewable:end -->
2017-02-23 16:01:16 -08:00
Mathieu Hordesseaux
6f97ce826b Make Request throw less often (fixes #13457) 2017-02-23 18:55:52 -05:00
Glenn Watson
30ff2f8f0d Introduce CSSPixel as a replacement for ViewportPx and PagePx. 2017-02-24 06:58:10 +10:00
Glenn Watson
ffcb319324 Add support for most of the border-image properties, pass to WR.
This adds support for:
 * border-image (images, not gradients yet)
 * border-image-source
 * border-image-slice
 * border-image-repeat (stretch + repeat only for now)

Remaining work:
 * Connect border-image-outset (WR supports this).
 * border-image-width
2017-02-23 14:15:20 +10:00
Josh Matthews
646d48a2a1 Split HTMLImageElement's loading code into smaller pieces with fewer runnables. 2017-02-22 14:19:35 -05:00
Josh Matthews
b363371339 Extract layout image request into separate file. Do not block the document load event. 2017-02-22 14:19:35 -05:00
Josh Matthews
0d2ec852ac Send response for image requests progressively to image cache. 2017-02-22 14:19:35 -05:00
Josh Matthews
980eb5ac33 Avoid dropping image requests on the ground from non-script-initiated reflow. 2017-02-22 14:19:35 -05:00
Josh Matthews
541ecbfe21 Fetch complete images from the cache for canvas operations. 2017-02-22 14:19:35 -05:00
Josh Matthews
c890c9143c Make script thread initiate requests for images needed by layout.
In support of this goal, the layout thread collects information about
CSS images that are missing image data and hands it off to the script
thread after layout completes. The script thread stores a list of
nodes that will need to be reflowed after the associated network
request is complete. The script thread ensures that the nodes are
not GCed while a request is ongoing, which the layout thread is
incapable of guaranteeing.

The image cache's API has also been redesigned in support of this
work. No network requests are made by the new image cache, since it
does not possess the document-specific information necessary to
initiate them. Instead, there is now a single, synchronous
query operation that optionally reserves a slot when a cache
entry for a URL cannot be found. This reserved slot is then
the responsibility of the queryer to populate with the contents
of the network response for the URL once it is complete. Any
subsequent queries for the same URL will be informed that the
response is pending until that occurs.

The changes to layout also remove the synchronous image loading
code path, which means that reftests now test the same code
that non-test binaries execute. The decision to take a screenshot
now considers whether there are any outstanding image
requests for layout in order to avoid intermittent failures in
reftests that use CSS images.
2017-02-22 14:19:35 -05:00
Connor Brewster
bfd7b950ad Add ImmutableOrigin to allow for serializing origins 2017-02-22 11:11:59 -06:00
bors-servo
907c1ef3d2 Auto merge of #15653 - samliu:cleanup_arraybufferview_type, r=cbrewster
Cleanup arraybufferview type

<!-- Please describe your changes on the following line: -->
Replace uses of spidermonkey-specific JS_GetArrayBufferViewType with ArrayBufferView impl's method get_array_type().

Tests pass:
./mach test-wpt tests/wpt/web-platform-tests/WebCrypto
./mach test-wpt tests/wpt/web-platform-tests/webgl

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15605 (github issue number if applicable).
- [x] There are tests for these changes

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15653)
<!-- Reviewable:end -->
2017-02-21 06:54:30 -08:00
bors-servo
14bbe9d872 Auto merge of #15670 - nox:die-plugins-die, r=Manishearth
Kill the plugins crate and its clippy support

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15670)
<!-- Reviewable:end -->
2017-02-21 05:15:15 -08:00