Commit graph

6015 commits

Author SHA1 Message Date
bors-servo
c584f3967c Auto merge of #15892 - hgallagher1993:local_branch, r=emilio
Change while loop in HTMLImageElement::handle_event to for loop

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because @Ms2ger said none were needed

<!-- 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/15892)
<!-- Reviewable:end -->
2017-03-10 05:51:45 -08:00
Hugh Gallagher
97e7c6be29 Change while loop in HTMLImageElement::handle_event to for loop
Remove trailing whitespace
2017-03-10 13:48:35 +00:00
Hiroyuki Ikezoe
c32ba98031 Skip update_animations if we have no running animations and the element becomes display:none. 2017-03-10 11:37:05 +09:00
Hiroyuki Ikezoe
9ff99d4608 Update CSS animations in a SequentialTask.
We create the SequentialTask only if:

* We have no old computed values and we have animation name style in the new
  computed values.
* Any animation properties is changed.
* display property is changed from 'none' and we have animation name style.
* display property is changed to 'none'.

In a subsequent patch we skip the SequentialTask if we have no running
animations and the display propery is changed to 'none'.
2017-03-10 11:36:58 +09:00
bors-servo
dc3b32c853 Auto merge of #15861 - projektir:make-text-decoration-testable, r=Wafflespeanut
Make text decoration testable and do not serialize initial text-decoration-style

Servo now uses the same name for the text-decoration-line longhand property as Gecko. This was done to enable testing of the text-decoration shorthand.

The text-decoration shorthand has been fixed to not serialize initial text-decoration-style.

---

- [x ] `./mach build -d` does not report any errors
- [x ] `./mach test-tidy` does not report any errors
- [x ] These changes fix #15790

---

- [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/15861)
<!-- Reviewable:end -->
2017-03-08 21:39:30 -08:00
projektir
b4c50de31e Don't serialize initial text-decoration-style #15790 2017-03-09 00:33:17 -05:00
bors-servo
f90fc2fa88 Auto merge of #15771 - jdm:img-panic, r=nox
Improve behaviour of image elements that perform multiple requests

This addresses cases where image elements end up making multiple requests, as well as makes the element respond to additional relevant mutations that trigger updating the image data.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15709 (github issue number if applicable).
- [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/15771)
<!-- Reviewable:end -->
2017-03-08 04:28:58 -08:00
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
Josh Matthews
f79850754d Avoid marking image element as complete before its image data is available. 2017-03-07 14:02:46 +05:30
Josh Matthews
dc5335a21e Move checks for document completion to the end of the event loop.
This better reflects the text of the specification - rather than
queuing a task to dispatch the load evnet as soon as the document
loader is unblocked, we want to "spin the event loop until there
is nothing that delays the load event in the Document." Spinning
the event loop is a concept that requires running tasks
completely, hence we check the condition before returning to the
start of the event loop.
2017-03-07 14:02:42 +05:30
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
Josh Matthews
2bd02fe423 Initiate a new image request when an image element's adopting steps are run.
Remove the redundant tracked loads for the underlying image request; the
load blockers present in the ImageRequest structure perform the same
duty with better accuracy.
2017-03-01 06:00:42 -05: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
Josh Matthews
208f97420a Ignore image cache updates for image requests that have been aborted. 2017-02-28 10:25:09 -05:00
Josh Matthews
f0f43ad9b0 Remove mutability requirement from fetch_async_background. 2017-02-28 10:23:23 -05: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