Commit graph

4021 commits

Author SHA1 Message Date
Zhen Zhang
49ed453a59 Fix FileAPI's refcount implementation 2016-07-25 17:48:03 +02:00
Nikhil Shagrithaya
8a05e7a413 Implemented name for Runnable trait in WebSocket Runnables 2016-07-23 23:27:31 +05:30
Kuba Birecki
2c5ea6bd0d Partial fix for #12415: expose interfaces only where necessary 2016-07-23 14:48:33 +02:00
Kuba Birecki
fa8c407191 Partial fix for #12415: expose interfaces only where necessary 2016-07-23 11:09:48 +02:00
Jean SIMARD
e70f68046e
partial-fix #12415: incorrect exposure of Window,Worker in webidl
* HTMLTableCaptionElement.webidl
* HTMLTableCellElement.webidl
* HTMLTableColElement.webidl
* HTMLTableDataCellElement.webidl
* HTMLTableElement.webidl
* HTMLTableHeaderCellElement.webidl
* HTMLTableRowElement.webidl
* HTMLTableSectionElement.webidl
2016-07-23 00:05:40 -04:00
bors-servo
07fcaf48f6 Auto merge of #12526 - woshilapin:fix-12415/htmlp-htmls, r=jdm
partial-fix #12415: incorrect exposure of Window,Worker in webidl

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they don't add any feature

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

* HTMLParagraphElement.webidl [[spec](https://html.spec.whatwg.org/multipage/#htmlparagraphelement
)]
* HTMLParamElement.webidl [[spec](https://html.spec.whatwg.org/multipage/#htmlparamelement)]
* HTMLPreElement.webidl [[spec](https://html.spec.whatwg.org/multipage/#htmlpreelement)]
* HTMLProgressElement.webidl [[spec](https://html.spec.whatwg.org/multipage/#htmlprogresselement)]
* HTMLQuoteElement.webidl [[spec](https://html.spec.whatwg.org/multipage/#htmlquoteelement)]
* HTMLScriptElement.webidl [[spec](https://html.spec.whatwg.org/multipage/#htmlscriptelement)]
* HTMLSelectElement.webidl [[spec](https://html.spec.whatwg.org/multipage/#htmlselectelement)]
* HTMLSourceElement.webidl [[spec](https://html.spec.whatwg.org/multipage/#htmlsourceelement)]
* HTMLSpanElement.webidl [[spec](https://html.spec.whatwg.org/multipage/#htmlspanelement)]
* HTMLStyleElement.webidl [[spec](https://html.spec.whatwg.org/multipage/#htmlstyleelement)]

<!-- 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/12526)
<!-- Reviewable:end -->
2016-07-22 20:14:55 -05:00
bors-servo
ccc4b41d36 Auto merge of #12533 - woshilapin:fix-12415/htmlt-htmlv, r=jdm
partial-fix #12415: incorrect exposure of Window,Worker in webidl

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they don't add any feature

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

* HTMLTemplateElement.webidl [[spec](https://html.spec.whatwg.org/multipage/scripting.html#htmltemplateelement)]
* HTMLTextAreaElement.webidl [[spec](https://html.spec.whatwg.org/multipage/forms.html#htmltextareaelement)]
* HTMLTimeElement.webidl [[spec](https://html.spec.whatwg.org/multipage/semantics.html#htmltimeelement)]
* HTMLTitleElement.webidl [[spec](https://html.spec.whatwg.org/multipage/semantics.html#htmltitleelement)]
* HTMLTrackElement.webidl [[spec](https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement)]
* HTMLUnknownElement.webidl [[spec](https://html.spec.whatwg.org/multipage/semantics.html#htmlunknownelement)]
* HTMLUListElement.webidl [[spec](https://html.spec.whatwg.org/multipage/semantics.html#htmlulistelement)]
* HTMLVideoElement.webidl [[spec](https://html.spec.whatwg.org/multipage/embedded-content.html#htmlvideoelement)]

<!-- 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/12533)
<!-- Reviewable:end -->
2016-07-22 19:17:34 -05:00
Jean SIMARD
2aed5b9781
partial-fix #12415: incorrect exposure of Window,Worker in webidl
* HTMLTemplateElement.webidl
* HTMLTextAreaElement.webidl
* HTMLTimeElement.webidl
* HTMLTitleElement.webidl
* HTMLTrackElement.webidl
* HTMLUnknownElement.webidl
* HTMLUListElement.webidl
* HTMLVideoElement.webidl
2016-07-22 17:10:36 -04:00
bors-servo
0e887ca8d3 Auto merge of #12552 - ConnorGBrewster:history_interface, r=asajeffrey
History interface Go, Back, and Forward

<!-- Please describe your changes on the following line: -->
r? @asajeffrey

---
<!-- 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 #5670 (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. -->

implement go, forward, back

<!-- 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/12552)
<!-- Reviewable:end -->
2016-07-22 15:34:14 -05:00
Jean SIMARD
99b82529a8
partial-fix #12415: incorrect exposure of Window,Worker in webidl
* HTMLParagraphElement.webidl
* HTMLParamElement.webidl
* HTMLPreElement.webidl
* HTMLProgressElement.webidl
* HTMLQuoteElement.webidl
* HTMLSelectElement.webidl
* HTMLSourceElement.webidl
* HTMLSpanElement.webidl
* HTMLStyleElement.webidl
2016-07-22 16:07:57 -04:00
Connor Brewster
8d7a0c2cda Add History interface
implement go, forward, back
2016-07-22 14:07:51 -06:00
bors-servo
9c0e7b1cf2 Auto merge of #12544 - izgzhen:patch-file-api, r=Manishearth
Patches of File API

r? @Manishearth

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

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

<!-- 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/12544)
<!-- Reviewable:end -->
2016-07-22 01:09:58 -05:00
bors-servo
05cc76370f Auto merge of #11866 - ConnorGBrewster:joint_session_history, r=asajeffrey
Implement joint session history

<!-- Please describe your changes on the following line: -->
This is cleaned up and should align with the patches on https://github.com/ConnorGBrewster/ServoNavigation/blob/master/notes/notes.pdf
r? @asajeffrey

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because this is not testable until the History API is added.

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11866)
<!-- Reviewable:end -->
2016-07-21 22:40:56 -05:00
Connor Brewster
f131818763 Implement beginnings of joint session history
Fix backward navigation

make use of history iterator

Add frame iterator
add different back logic

cleanup navigation_info

Add extra explanation for iter logic

Remove forward history on full frame tree

Rename navigation to traversal where appropriate

check full tree for can go back/forward

simplify frame iter logic

remove FrameIterator

cleanup history iter

reduce amount of vec allocations

removed extra parenthesis

Remove history iterator

cleanup after rebasing

avoid recursive vec allocation
remove full_frame_tree
remove_forward_history_in_frame_tree -> clear_joint_session_future
2016-07-21 20:51:38 -06:00
bors-servo
6064f31f19 Auto merge of #12546 - malisas:malisa-bytestring-unions, r=KiChjang
Union types now allow ByteString

<!-- Please describe your changes on the following line: -->
This PR addresses issue #12527 to allow ByteStrings in union types.
---
<!-- 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 #12527  (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/12546)
<!-- Reviewable:end -->
2016-07-21 21:25:42 -05:00
Malisa Smith
56bdc002fc Union types now allow ByteString 2016-07-21 19:19:12 -07:00
bors-servo
1e0321f7dd Auto merge of #12469 - emilio:stylo, r=bholley
style: Rewrite the restyle hints code to allow different kinds of element snapshots.

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

<!-- Either: -->
- [x] These changes do not require tests because refactoring.

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

This is a rewrite for how style interfaces with its consumers in order to allow
different representations for an element snapshot.

This also changes the requirements of an element snapshot, requiring them to
only implement MatchAttr, instead of MatchAttrGeneric. This is important for
stylo since implementing MatchAttrGeneric is way more difficult for us given the
atom limitations. This also allows for more performant implementations in the
Gecko side of things.

I don't want to get this merged just yet, mainly because the stylo part is not
implemented, but I'd like early feedback from @bholley and/or @heycam: How do
you see this approach? I don't think we'll have much problem to implement
MatchAttr for our element snapshots, but... worth checking.

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/12469)
<!-- Reviewable:end -->
2016-07-21 16:54:34 -05:00
Emilio Cobos Álvarez
611e611215
style: Rewrite the restyle hints code to allow different kinds of element snapshots, and use it for Gecko.
This is a rewrite for how style interfaces with its consumers in order to allow
different representations for an element snapshot.

This also changes the requirements of an element snapshot, requiring them to
only implement MatchAttr, instead of MatchAttrGeneric. This is important for
stylo since implementing MatchAttrGeneric is way more difficult for us given the
atom limitations. This also allows for more performant implementations in the
Gecko side of things.
2016-07-21 14:24:04 -07:00
bors-servo
4ae0897175 Auto merge of #12541 - jdm:seqseq, r=nox
Support sequences of sequences in generated bindings.

This fixes a blocker for #11897. `unroll` recursively gets the inner type of any sequence type encountered, so it's inappropriate for codegen that only wants the immediate inner type. However, if a type identifies as a sequence and is nullable, we need to reach through the nullable wrapper first. Gecko does very similar things.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12528 (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/12541)
<!-- Reviewable:end -->
2016-07-21 14:24:52 -05:00
Zhen Zhang
f598b5f7fd Patches of File API 2016-07-21 20:52:00 +02:00
bors-servo
1e835e330d Auto merge of #12539 - johannhof:error-page, r=jdm
Improve page load error information

Fixes #8640.

This commit adds a neterror page that displays really really basic
information about what went wrong with your request, which is an
improvement over the current state of blank page.

It also fixes the problem of certificate validation errors not
triggering the cert error page, since for some reason the function
string seems to have turned lowercase.

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

- [x] These changes do not require tests because I'm not sure how to test this, suggestions welcome!

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/12539)
<!-- Reviewable:end -->
2016-07-21 13:27:06 -05:00
bors-servo
df1b00d43d Auto merge of #12468 - asajeffrey:constellation-remove-panic-channel, r=emilio
Removed panic channel, replaced by integrated logging and issue reporting

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

Remove the previous ad hoc panic channel, replace it by an integrated logging and panicking mechanism, including crash reporting. All thread panics are now reported, not just content threads.

---
<!-- 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 #11838
- [X] These changes do not require tests because we don't test error reporting

<!-- 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/12468)
<!-- Reviewable:end -->
2016-07-21 11:20:37 -05:00
Josh Matthews
9ef848b65e Support sequences of sequences in generated bindings.
unroll recursively gets the inner type of any sequence type encountered, so it's inappropriate for codegen that only wants the immediate inner type. However, if a type identifies as a sequence and is nullable, we need to reach through the nullable wrapper first. Gecko does very similar things.
2016-07-21 10:26:57 -04:00
Johann Hofmann
8e3593aa67
Improve page load error information
Fixes #8640.

This commit adds a neterror page that displays really really basic
information about what went wrong with your request, which is an
improvement over the current state of blank page.

It also fixes the problem of certificate validation errors not
triggering the cert error page, since for some reason the function
string seems to have turned lowercase.
2016-07-21 16:06:13 +02:00
Manish Goregaokar
ceb85795b1
Use Result instead of panicking when the resource dir can't be found 2016-07-21 12:07:25 +05:30
Alan Jeffrey
c889900cff Removed panic channel, replaced by integrated logging and issue reporting. 2016-07-20 21:56:43 -05:00
bors-servo
03fa7f0ba5 Auto merge of #12467 - jeenalee:jeena-headersAPI, r=jdm
Add the append method for the Headers API

<!-- Please describe your changes on the following line: -->
This commit adds the append method for the Headers API. @malisas and I are both contributors.

There are a few TODOs related:
- The script needs to parse the header value for certain header names to decide the header group it belongs
- There are possible spec bugs that could change what a valid header value looks like (related: [issue page](https://github.com/whatwg/fetch/issues/332))

There are WPT tests already written for the Headers API, but they will fail as the Headers API is not fully implemented.

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because tests for the Headers API already exists, but this commit does not implement the interface fully. The tests will fail.

<!-- 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/12467)
<!-- Reviewable:end -->
2016-07-20 16:24:48 -05:00
Malisa Smith
272d12da26 Small changes to Headers.webidl and headers.rs
Expose the Headers interface to the Window scope and to Workers
Move Append function inside HeadersMethods trait
2016-07-20 11:41:35 -07:00
Emilio Cobos Álvarez
0b67b218d0
style: Add a new Timer structure to the shared style context, and basic infrastructure for controlling animations. 2016-07-20 09:05:53 -07:00
bors-servo
b6c0ed9a44 Auto merge of #12426 - asajeffrey:mozbrowser-event-targets, r=SimonSapin
Allow window elements as well as iframes to the the target of mozbrowser events

<!-- Please describe your changes on the following line: -->
Allow mozbrowser events, in particular mozbrowsererror events, to target a window. Needed for https://github.com/browserhtml/browserhtml/issues/1182

---
<!-- 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 #12420
- [X] These changes do not require tests because we're not testing our issue reporting system, which this is intended for.

<!-- 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/12426)
<!-- Reviewable:end -->
2016-07-20 04:41:34 -05:00
bors-servo
2d01d41a50 Auto merge of #12515 - servo:concrete-style, r=bholley
Make the style crate more concrete

Background:

The changes to Servo code to support Stylo began in the `selectors` crate with making pseudo-elements generic, defined be the user, so that different users (such as Servo and Gecko/Stylo) could have a different set of pseudo-elements supported and parsed. Adding a trait makes sense there since `selectors` is in its own repository and has others users (or at least [one](https://github.com/SimonSapin/kuchiki)).

Then we kind of kept going with the same pattern and added a bunch of traits in the `style` crate to make everything generic, allowing Servo and Gecko/Stylo to do things differently. But we’ve also added a `gecko` Cargo feature to do conditional compilation, at first to enable or disable some CSS properties and values in the Mako templates. Since we’re doing conditional compilation anyway, it’s often easier and simpler to do it more (with `#[cfg(feature = "gecko")]` and `#[cfg(feature = "servo")]`) that to keep adding traits and making everything generic. When a type is generic, any method that we want to call on it needs to be part of some trait.

----

The first several commits move some code around, mostly from `geckolib` to `style` (with `#[cfg(feature = "gecko")]`) but otherwise don’t change much.

The following commits remove some traits and many type parameters through the `style` crate, replacing them with pairs of conditionally-compiled API-compatible items (types, methods, …).

Simplifying code is nice to make it more maintainable, but this is motivated by another change described in https://github.com/servo/servo/pull/12391#issuecomment-232183942. (Porting Servo for that change proved difficult because some code in the `style` crate was becoming generic over `String` vs `Atom`, and this PR will help make that concrete. That change, in turn, is motivated by removing geckolib’s `[replace]` override for string-cache, in order to enable using a single Cargo "workspace" in this repository.)

r? @bholley

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

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

<!-- 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/12515)
<!-- Reviewable:end -->
2016-07-20 02:58:34 -05:00
Simon Sapin
6d0e48f6cc Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
bors-servo
86ed7bfc09 Auto merge of #12500 - Ms2ger:DOMString, r=nox
Expand the documentation for DOMString.

There was some confusion on IRC about its purpose; hopefully this will clarify the situation.

<!-- 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/12500)
<!-- Reviewable:end -->
2016-07-20 01:41:55 -05:00
Malisa Smith
60549c47ba makes XMLHttpRequest::SetRequestHeader call dom::headers::is_forbidden_header_name 2016-07-19 13:43:50 -07:00
Jeena Lee
530b02790b Add the append method for the Headers API for the Fetch API
This commit will add the append method and associated helper functions, and introduce any necessary changes for it.
2016-07-19 13:40:31 -07:00
bors-servo
efa5a0329a Auto merge of #12457 - johannhof:worker-global, r=Ms2ger
Expose Worker interfaces only to Worker

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

Partial #12415. Let me know if you suspect some other tests may be affected by this.

r? @Ms2ger

---
<!-- 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] There (sorta) 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/12457)
<!-- Reviewable:end -->
2016-07-19 04:40:41 -07:00
Johann Hofmann
bad529a0f7
Expose Worker interfaces only to Worker
See #12415.
2016-07-19 12:43:16 +02:00
Ms2ger
94fabbc366 Expand the documentation for DOMString.
There was some confusion on IRC about its purpose; hopefully this will clarify
the situation.
2016-07-19 09:57:51 +02:00
Kuba Birecki
fcabcccd9a Implement Runnable trait name method for PauseIfNotInDocumentTask 2016-07-18 21:13:59 +02:00
bors-servo
513811f6b4 Auto merge of #11727 - creativcoder:swmanager, r=jdm
Integrate service worker manager thread

<!-- 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 are part of #11091

<!-- Either: -->
- [X] There are tests for these changes at my [gh-pages](https://github.com/creativcoder/gsoc16/tree/gh-pages) branch to test  the instantiation of service workers by their manager, but will need to discuss how that would integrate into master.

Changes:
- Introduces a `ServiceWorkerManager`, which maintains an map of registered service workers as well as a map of active workers keyed by their `scope_url`.
- Adds the initialization of ServiceWorkerManager, at the `script::init()`, which makes it available as a single entity listening for requests from different script threads.
- Adds a timeout thread in `serviceworkerglobalscope`, which terminates the workers, after a timeout of 60 secs, thereby removing it from the active workers list.
- Adds the matching of scope urls, in longest prefix way rather than path structural way, according to [spec](https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#scope-match-algorithm).
- Make ServiceWorkerManager, the holder of network sender, instead of script thread, so it can send `CustomResponse`.

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11727)
<!-- Reviewable:end -->
2016-07-18 09:50:59 -07:00
Alan Jeffrey
72aa4f2f62 Allow window elements as well as iframes to the the target of mozbrowser events. 2016-07-18 11:23:03 -05:00
bors-servo
fa432a5a34 Auto merge of #12400 - izgzhen:fix-type-string, r=Manishearth
Fix Blob type-string

Use a final construction guard over type-string format; and other minor related cleanups

r? @Manishearth
<!-- 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

<!-- 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/12400)
<!-- Reviewable:end -->
2016-07-18 07:19:49 -07:00
Shing Lyu
f754cacbd5 Only restyle viewport-relative nodes on viewport size change 2016-07-18 11:01:42 +08:00
Rahul Sharma
1e6293ea1d Integrate service worker manager thread 2016-07-16 23:29:44 +05:30
Ms2ger
b65240d730 Stop destructuring load in HTMLScriptElement::execute(). 2016-07-16 12:33:52 +02:00
Ms2ger
91b9bcd125 Turn ScriptOrigin into a struct. 2016-07-16 12:24:36 +02:00
Ms2ger
a13318fb2c Convert script source to DOMString earlier. 2016-07-16 12:24:35 +02:00
Ms2ger
4896200467 Pull HTMLScriptElement::load inside-out. 2016-07-16 12:24:34 +02:00
Ms2ger
180569f65f Update step numbers in HTMLScriptElement::execute(). 2016-07-16 12:24:32 +02:00
bors-servo
73ad0b928d Auto merge of #12451 - jdm:generate-dom-apis, r=Ms2ger
Generate a list of supported DOM APIs from parsed WebIDLs.

Supplement the existing list of supported CSS properties with an equivalent list of DOM APIs.

---
<!-- 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 do not require tests because automatic generated documentation

<!-- 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/12451)
<!-- Reviewable:end -->
2016-07-15 15:13:22 -07:00