Commit graph

5418 commits

Author SHA1 Message Date
Anthony Ramine
2221203359 Expose HashChangeEvent only in Window 2017-01-21 15:15:50 +01:00
Anthony Ramine
e3980e6235 Expose BeforeUnloadEvent only in Window 2017-01-21 14:32:32 +01:00
Roman Zaynetdinov
9760ea2953 Test changing style tag elements 2017-01-21 09:24:28 +02:00
bors-servo
15c542d3a1 Auto merge of #14646 - canaltinova:origin-clean, r=jdm
Support origins in CSSOM stylesheets

<!-- Please describe your changes on the following line: -->
I still need to pass the origin clean flag to constructors. `style::stylesheets::Stylesheet` has an origin field but I don't think that's relevant.
I can get href in htmllinkelement.rs like this:
```rust
let element = self.upcast::<Element>();
let href = element.get_string_attribute(&local_name!("href"));
```
But I'm not sure how to proceed after here.
@Manishearth any opinions?

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

<!-- 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/14646)
<!-- Reviewable:end -->
2017-01-20 11:12:59 -08:00
Nazım Can Altınova
fd950a7309 Support origins in CSSOM stylesheets 2017-01-20 22:00:49 +03:00
Josh Matthews
e5eaab3523 Use Heap in DOM object reflector implementation to ensure GC barriers are used. 2017-01-20 11:32:19 -05:00
bors-servo
e6f661c984 Auto merge of #15117 - servo:fileapi, r=nox
Fix and annotate some FileAPI test failures.

<!-- 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/15117)
<!-- Reviewable:end -->
2017-01-20 08:03:41 -08:00
Aneesh Agrawal
b94b58f7ae Remove -w flag now that WebRender is always used
Also remove the obsolete `--cpu` and `--gpu` renderer flags,
which also are no longer used.

Update tests and wptrunner to not pass these flags.
wptrunner changes have been upstreamed in:
  - w3c/wptrunner#224
  - w3c/wptrunner#226
2017-01-20 02:05:50 -05:00
bors-servo
29d4f7d467 Auto merge of #15083 - potocpav:issue-14497, r=KiChjang
Fix #14497: WeakMediaQueryListVec assumes its contents are still alive

<!-- Please describe your changes on the following line: -->
First time contributor here. Noticed this issue is easily solved, so I did it. I am very unsure about how things work here: Is a test needed? What should it look like? Should the "unwrap" be avoided (making bigger changes to the code)?

---
<!-- 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 #14497  (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/15083)
<!-- Reviewable:end -->
2017-01-19 14:10:33 -08:00
bors-servo
6272cb5a51 Auto merge of #15098 - nox:load-fixes, r=jdm
Mark the page source as loaded only after parsing is done

<!-- 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/15098)
<!-- Reviewable:end -->
2017-01-19 07:32:45 -08:00
Anthony Ramine
0f244d6948 Mark the page source as loaded only after parsing is done 2017-01-19 16:17:14 +01:00
Ms2ger
38c19d21d8 Remove some references to no-longer-existing tests. 2017-01-19 15:53:02 +01:00
Ms2ger
9ba04e0687 Annotate some failures with bug numbers. 2017-01-19 15:43:23 +01:00
Ms2ger
4700df4311 Correct the pass condition in FileReader-multiple-reads.html. 2017-01-19 15:42:55 +01:00
Ms2ger
2c7c8fd2be Use an ArrayBuffer to implement readAsArrayBuffer. 2017-01-19 15:41:16 +01:00
bors-servo
b08d4a7d39 Auto merge of #14839 - Permutatrix:iss-12939, r=emilio
Make offset parent queries less buggy.

<!-- Please describe your changes on the following line: -->
Offset parent queries, which are used in the getters for HTMLElement's `offsetParent`, `offsetTop`, `offsetLeft`, `offsetWidth`, and `offsetHeight`, are pretty busted. The most egregious bug is that, as reported in #12939, inline elements are treated as if they're not present in the document. This PR fixes that and all of the other bugs I could trace directly to the offset parent query code, but `offsetTop` and `offsetLeft` are still unreliable in certain circumstances for reasons I haven't looked into (#13708). Inline elements with no content are still treated as not present due to #13982, so #13944 isn't fixed with this PR, either.

---
<!-- 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 #12939 and fix #12595

<!-- 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/14839)
<!-- Reviewable:end -->
2017-01-18 10:03:37 -08:00
Permutator
400a267cf0
/css-text-3_dev/html/word-break-normal-zh-000.htm fails on Mac 2017-01-18 08:44:11 -08:00
bors-servo
ba59ee6627 Auto merge of #15053 - emilio:image-width, r=jdm
Return the intrinsic image dimension when the image is not rendered

See individual commits for details.

r? @jdm

<!-- 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/15053)
<!-- Reviewable:end -->
2017-01-18 08:43:19 -08:00
Emilio Cobos Álvarez
127da41a2a
script: Add tests for image intrinsic width when the element is not rendered. 2017-01-18 16:49:54 +01:00
Anthony Ramine
d5442b87fc Reindent /old-tests/submission/Opera/script_scheduling/078.html 2017-01-18 14:27:21 +01:00
Anthony Ramine
fad6a3a65c Fix and reindent /old-tests/submission/Opera/script_scheduling/119.html 2017-01-18 14:04:11 +01:00
bors-servo
83a99f0ea5 Auto merge of #15081 - servo:interfaces.worker, r=jdm
Enable interfaces.worker.html.

I ran it 250 times, and it passed every time.

Fixes #12654.

<!-- 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/15081)
<!-- Reviewable:end -->
2017-01-17 23:58:38 -08:00
Pavel Potocek
8ae9bcd472 Add a test 2017-01-17 22:45:22 +01:00
bors-servo
f010fb58fd Auto merge of #15065 - Manishearth:box-calclop, r=heycam
Use Box<CalcLengthOrPercentage> in specified values to avoid bloating inline sizes

For #15061

CalcLOP is a large struct, and gets used quite often. While #15063 reduces its size a bit,
it will still be much larger than any of the other variants in the `specified::Length*` types,
so it will still bloat sizes, especially for specified values that contain many lengths.

This change boxes it in the length types, so that it just takes one word.

r? @heycam

<!-- 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/15065)
<!-- Reviewable:end -->
2017-01-17 11:49:52 -08:00
Manish Goregaokar
f59557d2f2 Box CalcLengthOrPercentage to reduce inline size of PropertyDeclaration(s) 2017-01-17 08:09:54 -08:00
bors-servo
3ab514302f Auto merge of #14979 - mrobinson:scroll-roots-when-necessary, r=emilio
Only create scrolling overflow regions when necessary

Only create scroll roots for overflow regions when the overflow region
is actually larger than the container size. This prevents creating
scrolling roots for elements that do not have overflow scroll as a
side-effect of the way their height and width is defined. For example,
tables should never respect overflow:scroll since their height and
width should always be large enough to prevent overflow. This also
decreases the size and complexity of the display list in many other
circumstances.

As part of this change, transformed overflow calculation is moved from
display list construction to layout. This should mean that overflow is
handled more accurately earlier.

Fixes #14574.

<!-- 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 #14574 (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/14979)
<!-- Reviewable:end -->
2017-01-17 07:18:42 -08:00
Martin Robinson
44b24de60f Only create scrolling overflow regions when necessary
Only create scroll roots for overflow regions when the overflow region
is actually larger than the container size. This prevents creating
scrolling roots for elements that do not have overflow scroll as a
side-effect of the way their height and width is defined. For example,
tables should never respect overflow:scroll since their height and
width should always be large enough to prevent overflow. This also
decreases the size and complexity of the display list in many other
circumstances.

As part of this change, transformed overflow calculation is moved from
display list construction to layout. This should mean that overflow is
handled more accurately earlier.

Fixes #14574.
2017-01-17 09:47:43 -05:00
Ms2ger
1c8fcfba51 Enable interfaces.worker.html.
I ran it 250 times, and it passed every time.

Fixes #12654.
2017-01-17 15:46:11 +01:00
bors-servo
463a8bbdb6 Auto merge of #14936 - servo:incumbent-global, r=jdm
Implement the incumbent global.

Fixes #10963.

<!-- 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/14936)
<!-- Reviewable:end -->
2017-01-17 04:45:29 -08:00
Ms2ger
51df04d93e Implement the incumbent global.
Fixes #10963.
2017-01-17 12:57:02 +01:00
bors-servo
a70af60eec Auto merge of #15063 - Wafflespeanut:calc, r=heycam
Cleaning up CalcLengthOrPercentage

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

We don't really need enum variants in `CalcLengthOrPercentage`. Given that we already have the information (whether it's `vw`, `ch`, etc.) in the struct fields, we could just store `Option<CSSFloat>` there, and modify our `ToCss` implementation a bit.

cc #15061

r? @Manishearth or anyone interested

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

<!-- Either: -->
- [x] These changes do not require tests because it's a refactor

<!-- 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/15063)
<!-- Reviewable:end -->
2017-01-17 02:18:15 -08:00
Ravi Shankar
3ac73edf66 Change the order of values in mozilla/calc.html to suite serialization 2017-01-17 14:37:02 +05:30
bors-servo
a4551d0cee Auto merge of #15047 - emilio:click-regression, r=notriddle,emilio
gfx: Don't mutate the same point multiple times while translating it …

…to other stacking context space.

I don't know how neither review or a test caught this.

r? @pcwalton  or @notriddle

Fixes #15015

<!-- 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/15047)
<!-- Reviewable:end -->
2017-01-16 15:46:05 -08:00
bors-servo
ecd1d2dbc9 Auto merge of #15020 - jdm:external_script_line, r=Ms2ger
Do not use the script element's line number for external scripts.

This was yielding incorrect line numbers when looking at JS backtraces in gdb.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [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/15020)
<!-- Reviewable:end -->
2017-01-16 11:11:46 -08:00
Emilio Cobos Álvarez
602b45a372
gfx: Don't mutate the same point multiple times while translating it to other stacking context space.
I don't know how neither review or a test caught this.
2017-01-16 14:39:55 +01:00
Ms2ger
a1d478fbb7 Update regex. 2017-01-16 13:11:16 +01:00
tyler
0fae39f468 Converted --max-session-history opt into a pref, updated its uses to PREF api
updated test docs
2017-01-14 17:02:53 -05:00
Anthony Ramine
9c87cb7e26 Kill beforescriptexecute and afterscriptexecute (fixes #12446) 2017-01-14 16:16:53 +01:00
bors-servo
c2d2c38b0f Auto merge of #15011 - nox:load-fixes, r=jdm
Various script loading fixes

<!-- 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/15011)
<!-- Reviewable:end -->
2017-01-14 06:18:31 -08:00
Anthony Ramine
6d33f36e6a Fix 128.html
The spec says that a script must be immediately prepared whenever "the script element
is connected and a node or document fragment is inserted into the script element,
after any script elements inserted at that time."
2017-01-14 14:53:09 +01:00
Anthony Ramine
4c38bec7d9 Fix 096.html and remove 098.html
Deferred scripts should have all ran before DOMContentLoaded is fired.
The removed script was a duplicate.
2017-01-14 14:53:07 +01:00
Anthony Ramine
91717ab17c Implement HTMLScriptElement async attribute 2017-01-14 14:53:04 +01:00
Josh Matthews
6f19b0cd82 Do not use the script element's line number for external scripts. 2017-01-13 17:50:54 -05:00
mrnayak
3d9e44a8c4 Handle crossorigin in link and refactor crossorigin handling
Implemented Step three and handled step four of obtain the resource part
of 4.2.4 The link element.
Link to spec : https://html.spec.whatwg.org/multipage/semantics.html#concept-link-obtain

Refactored crossOrigin handling in HTMLScriptElement, HTMLImageElement
2017-01-13 23:35:00 +05:30
Permutator
290ebab87e
Moved and adjusted offset_properties_inline test 2017-01-13 09:13:24 -08:00
Permutator
db5da15e79
Updated expectations for failing tests that were passing erroneously 2017-01-13 09:13:23 -08:00
Permutator
923ecba91a
Updated expectations for passing tests 2017-01-13 09:13:22 -08:00
Permutator
a61a263291
Added tests/wpt/web-platform-tests/cssom-view/offsetPropertiesInline.html 2017-01-13 09:13:21 -08:00
Anthony Ramine
3e19b37c83 Don't fire a load event on inline scripts
https://github.com/whatwg/html/issues/1757
2017-01-13 13:50:31 +01:00
bors-servo
6a04aea4a5 Auto merge of #14989 - notriddle:ellipsis_reflow, r=emilio
Fix the incrmental reflow behavior of text-overflow

This patch allows Servo to incrementally reflow truncated fragments correctly.

* The untruncated version of a fragment is preserved, and when incrementally reflowing, the untruncated version is what gets reflowed. If it needs truncated, it will get truncated again.
* The ellipsis fragments are skipped when incrementally reflowing a line. If it is still needed, it will be recreated.

---

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

<!-- 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/14989)
<!-- Reviewable:end -->
2017-01-12 17:31:19 -08:00