Commit graph

2550 commits

Author SHA1 Message Date
bors-servo
b34b82537a Auto merge of #7955 - frewsxcv:listing-pre, r=nox
Add 'listing' alias for <pre> elements



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7955)
<!-- Reviewable:end -->
2015-10-10 11:08:14 -06:00
Corey Farwell
9b68d715de Explicitly place '/' before fragment for multipage spec links
This prevents us from 301 redirecting, which could cause the fragment to
get lost
2015-10-10 12:07:10 -04:00
Corey Farwell
85f2b6fc5b Replace usage of old-style WHATWG spec links 2015-10-10 11:55:09 -04:00
Corey Farwell
59e2911f28 Add 'listing' alias for <pre> elements 2015-10-10 08:58:38 -04:00
bors-servo
9cccd98254 Auto merge of #7948 - kunitsyn:master, r=Manishearth
Changed dom_class type to Option<&'static DOMClass> to fix #7942

I have a feeling that converting `Option<&T>` to `*const libc::c_void` could be less explicit.
Was there any way to do it shorter?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7948)
<!-- Reviewable:end -->
2015-10-09 23:22:59 -06:00
bors-servo
bc5444067f Auto merge of #7936 - alexcrichton:script-rebuild, r=jdm
Fix spurious rebuilds of the script crate

The script crate currently has a build script, and Cargo will consider all files
in the script crate as inputs to the build script as it otherwise doesn't know
[what the input files are][cargo-1162]. This means that if any file in the
source tree of the script crate changes (or is created) then Cargo will think it
needs to re-run the build script and rebuild the crate.

[cargo-1162]: https://github.com/rust-lang/cargo/issues/1162

The build script of the script crate is invoking python, and consequently Python
is generating some bytecode files in the source tree. On the second build of
Servo, Cargo will see these new files, think that something has changed, and
will re-run the build script of the script crate.

This change passes the `-B` flag to python to avoid generating these bytecode
files, which should avoid tampering with the source tree and appease Cargo by
ensuring that it doesn't get rebuilt.

---

As a helpful tip to if this comes up again, this was discovered by using the
changes in rust-lang/cargo@c447e9d plus the change in rust-lang/cargo#2044. Once
`RUST_LOG` was set to `cargo::ops::cargo_rustc::fingerprint=info`, the second
run of `./mach build` printed out:

```
precalculated components have changed:
  1444364448.000000000s (/build/servo/components/script/dom/bindings/codegen/parser/WebIDL.pyc) !=
  1444364235.000000000s (/build/servo/components/script/document_loader.rs)
```

Which should help easily diagnose these kinds of problems in the future!

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7936)
<!-- Reviewable:end -->
2015-10-09 13:23:41 -06:00
bors-servo
06e0447e82 Auto merge of #7835 - iawaknahc:webstorage-quota, r=jdm
Implement a quota of 5MB per origin for localstorage and sessionstorage

PR for https://github.com/servo/servo/issues/6739

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7835)
<!-- Reviewable:end -->
2015-10-09 12:36:47 -06:00
Andriy Kunitsin
7301609c18 Changed dom_class type to Option<&'static DOMClass> 2015-10-09 19:57:22 +03:00
bors-servo
12139f73ef Auto merge of #7925 - Ms2ger:iframe-pipeline-layout, r=glennw
Implement HTMLIFrameElement::pipeline_id on LayoutJS<HTMLIFrameElement>.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7925)
<!-- Reviewable:end -->
2015-10-09 09:49:08 -06:00
bors-servo
8c81d9ab28 Auto merge of #7885 - jimberlage:7858/null-message, r=Ms2ger
Creates empty string when passed null

This should fix #7858.  An empty `USVString` is now used when `data` is `None`.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7885)
<!-- Reviewable:end -->
2015-10-09 09:02:45 -06:00
bors-servo
1029feb55d Auto merge of #7841 - frewsxcv:htmlbodyelement-text, r=nox
Implement <body>'s "text" attribute



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7841)
<!-- Reviewable:end -->
2015-10-09 06:11:46 -06:00
Alex Crichton
e8eebc1111 Fix spurious rebuilds of the script crate
The script crate currently has a build script, and Cargo will consider all files
in the script crate as inputs to the build script as it otherwise doesn't know
[what the input files are][cargo-1162]. This means that if any file in the
source tree of the script crate changes (or is created) then Cargo will think it
needs to re-run the build script and rebuild the crate.

[cargo-1162]: https://github.com/rust-lang/cargo/issues/1162

The build script of the script crate is invoking python, and consequently Python
is generating some bytecode files in the source tree. On the second build of
Servo, Cargo will see these new files, think that something has changed, and
will re-run the build script of the script crate.

This change passes the `-B` flag to python to avoid generating these bytecode
files, which should avoid tampering with the source tree and appease Cargo by
ensuring that it doesn't get rebuilt.

---

As a helpful tip to if this comes up again, this was discovered by using the
changes in rust-lang/cargo@c447e9d plus the change in rust-lang/cargo#2044. Once
`RUST_LOG` was set to `cargo::ops::cargo_rustc::fingerprint=info`, the second
run of `./mach build` printed out:

```
precalculated components have changed:
  1444364448.000000000s (/build/servo/components/script/dom/bindings/codegen/parser/WebIDL.pyc) !=
  1444364235.000000000s (/build/servo/components/script/document_loader.rs)
```

Which should help easily diagnose these kinds of problems in the future!
2015-10-08 21:37:56 -07:00
Pierre Chevalier
8b5fe88bd3 Refactor away duplication of get_rooted functionality
Refactor .get().map(Root::from_rooted)
and .get().map(|foo| foo.root())
to .get_rooted() on MutNullableHeap objects.

First part done mechanically with the following comand:
sed -i s/"get().map(Root::from_rooted)"/"get_rooted()"/g *.rs

Second part done manually after finding them with
git grep ".get().map("

Fixes 7929.
2015-10-08 23:12:20 +01:00
Louis Chan
fb45b0e691 Implement a quota of 5MB per origin for localstorage and sessionstorage 2015-10-09 03:55:27 +08:00
Jim Berlage
0ffd2f636f Require the argument to WebSocket#send() (fixes #7858). 2015-10-08 12:08:26 -05:00
Corey Farwell
64f4835a4f Implement <body>'s "text" attribute 2015-10-08 10:55:12 -04:00
Ms2ger
25c19f77af Implement HTMLIFrameElement::pipeline_id on LayoutJS<HTMLIFrameElement>. 2015-10-08 11:00:56 +02:00
bors-servo
1d617f332e Auto merge of #7899 - glennw:subpage-fixes-1, r=pcwalton
Remove constellation round trip for subpage mapping in compositor.

This makes use of the new functionality that allows iframes to generate their own pipeline IDs in order to remove any knowledge of subpage ids from the compositor.

(This is the first of several commits removing subpage from parts of servo).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7899)
<!-- Reviewable:end -->
2015-10-07 18:36:35 -06:00
Emilio Cobos Álvarez
7030f09823 webgl: Implement WebGLContextEvent and use it on context creation error
spec: https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15
2015-10-08 00:29:31 +02:00
bors-servo
94dc98717b Auto merge of #7892 - anthgur:form-data-refactor, r=jdm
Refactor html form dataset collection

Factor out FormDatum collection for `<input>`
Improve early return logic for getting the FormDatum from an `<input>`
Condense element type patterns

Proposed to close #7851

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7892)
<!-- Reviewable:end -->
2015-10-07 08:32:44 -06:00
Anthony Urena
31980a7a34 Refactor html form dataset collection
Factor out FormDatum collection for <input>
Improve early return logic for getting the FormDatum from an <input>
Condense element type patterns
2015-10-07 10:22:02 -04:00
bors-servo
60a77defe5 Auto merge of #7898 - frewsxcv:htmlfontelement-size-attribute-setter, r=nox
Use the correct IDL setter for <font>.size

Previously, the IDL attribute would incorrectly set the `size` attribute
for `<font>` elements as `AttrValue::String`. Now it correctly sets it
as `AttrValue::Length`. Also included is a regression test.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7898)
<!-- Reviewable:end -->
2015-10-07 07:04:28 -06:00
Corey Farwell
eabaf2c6a5 Use the correct IDL setter for <font>.size
Previously, the IDL attribute would incorrectly set the `size` attribute
for `<font>` elements as `AttrValue::String`. Now it correctly sets it
as `AttrValue::Length`. Also included is a regression test.
2015-10-07 08:28:43 -04:00
bors-servo
745635a706 Auto merge of #7903 - Ms2ger:codegen-docs, r=Manishearth
Add support for documenting CGAbstractMethods.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7903)
<!-- Reviewable:end -->
2015-10-07 06:20:20 -06:00
bors-servo
9a12c2c061 Auto merge of #7902 - mskrzypkows:HTMLInputElement_pub_refactor, r=nox
Removed unneeded pub annotations in HTMLInputElement  #7897

get_size method appeared to be never used so I removed it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7902)
<!-- Reviewable:end -->
2015-10-07 05:35:14 -06:00
Ms2ger
6b160c6a29 Document RegisterBindings::RegisterProxyHandlers. 2015-10-07 12:22:15 +02:00
Ms2ger
03b04e5363 Add support for documenting CGAbstractMethods. 2015-10-07 12:21:59 +02:00
Maciej Skrzypkowski
7a5390d936 Removed unneeded pub annotations in HTMLInputElement #7897
get_size method appeared to be never used so I removed it.
2015-10-07 11:24:49 +02:00
Ms2ger
b96594ea50 Remove a pointless level of indentation. 2015-10-07 11:15:20 +02:00
Ms2ger
a701397a9d Pass an Element to collect_text. 2015-10-07 11:07:20 +02:00
Ms2ger
6e745b5a00 Avoid panicking in the implementation of HTMLOptionElement#text for non-element, non-text children. 2015-10-07 10:52:44 +02:00
Glenn Watson
da881947e5 Remove constellation round trip for subpage mapping in compositor.
This makes use of the new functionality that allows iframes to generate their own pipeline IDs in order to remove any knowledge of subpage ids from the compositor.

(This is the first of several commits removing subpage from parts of servo).
2015-10-07 12:24:15 +10:00
vectorijk
0fb5e745e5 make blacklist as const array 2015-10-06 09:03:51 -07:00
vectorijk
4e21b9fa83 Fix #7855 Implement port blocking
For WebSocket connection algorithm
2015-10-06 07:31:33 -07:00
bors-servo
f5cd90805e Auto merge of #7882 - anthgur:consistent-enum-use, r=Ms2ger
Refactor Error enum usage to consistently be qualified

Closes #7869

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7882)
<!-- Reviewable:end -->
2015-10-06 04:58:17 -06:00
Anthony Urena
ba86131cd5 Refactor Error enum usage to consistently be qualified 2015-10-06 05:43:52 -04:00
bors-servo
50db64a20e Auto merge of #7874 - Ms2ger:layoutjs-tdth, r=jdm
Define the parsed attribute getters for HTMLTableCellElement on LayoutJS.

This documents their intended usage and prevents script callers from using
them.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7874)
<!-- Reviewable:end -->
2015-10-06 01:57:05 -06:00
Ms2ger
cd7b4d4e61 Define the parsed attribute getters for HTMLTableCellElement on LayoutJS.
This documents their intended usage and prevents script callers from using
them.
2015-10-06 09:40:33 +02:00
bors-servo
098bdb5f22 Auto merge of #7807 - glennw:pid, r=jdm
Make it possible for iframes to create their own pipeline ID.

This doesn't change any functionality, but it's the first step towards removing SubpageId.

Adding this change now will allow us to gradually change over code referencing subpage id rather than in one massive PR.

Introduces a namespace for pipeline ID generation - there is a namespace for the constellation thread, and one per script thread.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7807)
<!-- Reviewable:end -->
2015-10-06 01:08:32 -06:00
Glenn Watson
5645dba1fa Make it possible for iframes to create their own pipeline ID.
This doesn't change any functionality, but it's the first step towards removing SubpageId.

Adding this change now will allow us to gradually change over code referencing subpage id rather than in one massive PR.

Introduces a namespace for pipeline ID generation - there is a namespace for the constellation thread, and one per script thread.
2015-10-06 17:06:53 +10:00
Roman Klauke
1f82e5121c remove data field from websockets
The data field is currently not used (no reads/ writes). This commit
removes this field.

Ref.-Issue: #7859
2015-10-05 21:23:42 +02:00
bors-servo
a350b215cc Auto merge of #7867 - Ms2ger:layoutjs, r=nox
Move some methods from RawLayoutElementHelpers to LayoutElementHelpers.

This is part of a long-term plan to ensure layout never has access to
unwrapped pointers to DOM objects. The remaining methods on the
RawLayoutElementHelpers trait are harder to move, because of the lifetimes in
their signatures.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7867)
<!-- Reviewable:end -->
2015-10-05 08:19:21 -06:00
bors-servo
243647d15a Auto merge of #7735 - nox:rm-useless-casts, r=Ms2ger
Don't generate useless InheritTypes interfaces

Interfaces with no descendant need neither a Base trait nor upcast functions, and interfaces with no ancestors neither a Derived trait nor downcast functions.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7735)
<!-- Reviewable:end -->
2015-10-05 06:09:56 -06:00
Ms2ger
1552022d96 Move some methods from RawLayoutElementHelpers to LayoutElementHelpers.
This is part of a long-term plan to ensure layout never has access to
unwrapped pointers to DOM objects. The remaining methods on the
RawLayoutElementHelpers trait are harder to move, because of the lifetimes in
their signatures.
2015-10-05 11:40:37 +02:00
bors-servo
7debfd1f4c Auto merge of #7683 - frewsxcv:html-font-element-size-attr, r=nox
Implement `size` attribute for <font> element



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7683)
<!-- Reviewable:end -->
2015-10-05 02:33:02 -06:00
bors-servo
9eb0effaf6 Auto merge of #7750 - frewsxcv:html-table-section-element-rows, r=nox
HTMLTableSectionElement improvements

'thead' and 'tfoot' now create instances of HTMLTableSectionElement

HTMLTableSectionElement.rows has been implemented

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7750)
<!-- Reviewable:end -->
2015-10-04 11:57:10 -06:00
Mathieu Rheaume
e7a3220bc1 Implement Storage::SupportedPropertyNames 2015-10-04 10:22:13 -04:00
Corey Farwell
adbcb5345c HTMLTableSectionElement improvements
'thead' and 'tfoot' now create instances of HTMLTableSectionElement

HTMLTableSectionElement.rows has been implemented
2015-10-03 12:23:22 -04:00
bors-servo
e9842b7db2 Auto merge of #7777 - KiChjang:caseless-group-name-match, r=jdm
Add support for caseless group name matching in HTML input elements

Fixes #7749

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7777)
<!-- Reviewable:end -->
2015-10-02 13:26:05 -06:00
Keith Yeung
5c9a25d46b Add support for caseless group name matching in HTML input elements 2015-10-02 10:41:02 -07:00