Commit graph

5238 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
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
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
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
Fernando Jiménez Moreno
7426d902a3 Trigger reflow on document.elementsFromPoint 2017-03-02 10:44:38 +01:00
Charles Vandevoorde
44e05e224c Remove support for Blob::{close, isClosed} 2017-02-28 17:20:16 +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
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
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
31e9d81c0f Make #[dom_struct] a proc_macro attribute 2017-02-24 01:50:51 +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
af6353df87 Auto merge of #15659 - gregkatz:eliminate_transmute_find_enum, r=Ms2ger
Eliminate a mem::transmute in CodeGen

<!-- Please describe your changes on the following line: -->
Eliminate a mem::transmute in CodeGen by changing the find_enum_string_index function to take a slice of pairs and return an enum value.

---
<!-- 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 #15587 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] 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/15659)
<!-- Reviewable:end -->
2017-02-21 04:28:32 -08:00
Sam Liu
4fc3e7e75d Replace uses of spidermonkey-specific JS_GetArrayBufferViewType with ArrayBufferView impl's method get_array_type() 2017-02-20 23:13:47 -08:00
Gregory Katz
214db8d9f0 Eliminate a mem::transmute in CodeGen 2017-02-20 12:24:45 -05:00
bors-servo
e52eb2a5e3 Auto merge of #15585 - servo:CGConstant, r=nox
Simplify CGConstant.

<!-- 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/15585)
<!-- Reviewable:end -->
2017-02-20 04:12:08 -08:00
bors-servo
82d05a046d Auto merge of #15650 - Greeene:rm_array_buffer_contents_trait, r=SimonSapin
Remove ArrayBufferViewContents trait

<!-- Please describe your changes on the following line: -->
Removed ArrayBufferViewContents trait and dependent uses.

---
<!-- 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 #15551

<!-- Either: -->
- [ x ] These changes do not require tests because it's just unused trait and @jdm said, "No need for automated tests; if the build succeeds, it's good enough for a PR."

<!-- 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/15650)
<!-- Reviewable:end -->
2017-02-19 20:26:31 -08:00
Ian
cb3f8c9e86 The ArrayBufferViewContents trait was removed 2017-02-19 21:01:56 +03:00
bors-servo
28698dc8ba Auto merge of #15589 - servo:RootedTraceable-union, r=nox
Use RootedTraceableBox for unions.

<!-- 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/15589)
<!-- Reviewable:end -->
2017-02-19 05:56:01 -08:00
bors-servo
debdebe8de Auto merge of #15495 - prampey:mql-borrow-error, r=jdm
Calling matchMedia during a MQL change event will not panic

<!-- Please describe your changes on the following line: -->
Calling matchMedia now leads to a new copy of MQL objects to prevent errors when borrowing references from MQL during an MQL change event.

---
<!-- 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 #14967  (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [x] 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/15495)
<!-- Reviewable:end -->
2017-02-19 04:10:04 -08:00
bors-servo
5f813233c9 Auto merge of #15520 - frewsxcv:html-options-collection-selected-index, r=nox
Implement `selectedIndex` IDL attribute on `HTMLOptionsCollection`.

<!-- 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/15520)
<!-- Reviewable:end -->
2017-02-19 03:08:12 -08:00
Prudhvi Rampey
0c21333777 Calling matchMedia during a MQL change event will not panic 2017-02-18 20:12:19 +05:30
Charles Vandevoorde
f938c955a3 Implement XHR progress event changes 2017-02-18 09:26:55 +01:00