Commit graph

369 commits

Author SHA1 Message Date
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
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
Rahul Sharma
1e6293ea1d Integrate service worker manager thread 2016-07-16 23:29:44 +05:30
Keith Yeung
aa5f34fcd9 Implement file reading task source
And remove superfluous FileReaderEvent enum
2016-07-14 13:27:42 -04:00
bors-servo
12260b24d0 Auto merge of #12277 - ConnorGBrewster:network_listener_cancellable, r=Manishearth
Make network listener runnable cancellable

<!-- Please describe your changes on the following line: -->
This keeps scripts from executing after its script thread has been shut down.

---
<!-- 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 (maybe) #12048 (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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12277)
<!-- Reviewable:end -->
2016-07-08 09:56:31 -07:00
Connor Brewster
55267560ca Change ignore async events ordering to SeqCst 2016-07-08 09:02:16 -06:00
bors-servo
5afdf7fb5c Auto merge of #11781 - sjmelia:8719_support_for_css_active, r=Manishearth
Issue 8719: Add basic support for :active selector

<!-- Please describe your changes on the following line: -->
Added toggling of active state for element and parents on mousedown/mouseup. Active state is removed when mouseout. (hover)

- As with my other PR i'm struggling a bit with the automated testing. I've added a manual test case and found quirks-mode/active-and-hover-manual.html which - aside from also being a manual test, is functional in Firefox but does not render correctly in Servo.
- Not implemented: In Firefox, behaviour differs with a <!DOCTYPE HTML> and an anchor does not lose it's activation on mouseout; whereas a button does.

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

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11781)
<!-- Reviewable:end -->
2016-07-08 05:06:57 -07:00
Anthony Ramine
5f2d5ef748 Remove util::breakpoint 2016-07-06 12:20:47 +02:00
bors-servo
bb916bb38b Auto merge of #12256 - nox:die-util-die, r=Ms2ger
Move some stuff from util to style

<!-- 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/12256)
<!-- Reviewable:end -->
2016-07-05 02:04:42 -07:00
Anthony Ramine
8ecb5962f3 Move util::str to style 2016-07-05 10:43:54 +02:00
Ms2ger
77caf83098 Move webdriver_msg to script_traits. 2016-07-05 09:02:46 +02:00
Ms2ger
b8fe9e9637 Move WindowSizeData to script_traits. 2016-07-05 09:02:43 +02:00
Steve Melia
421c354d44 Issue 8719: Add basic support for :active selector 2016-07-04 22:24:13 +01:00
Corey Farwell
22928f50ac Refactor util::prefs operations to be methods on static struct. 2016-07-02 16:43:39 -04:00
Josh Matthews
b8853554db Wrap executions of Rust code called from JS in catch_unwind. Propagate the interrupted panic to the origin of the JS execution via TLS before resuming. Fix #6462. 2016-06-22 09:35:19 -04:00
Ms2ger
b56821a01f Move CSSErrorReporter to script_layout_interface. 2016-06-20 19:08:13 +02:00
Ms2ger
9e2e0ff98c Move the remainder of layout_interface into script_layout_interface. 2016-06-20 19:08:12 +02:00
Ms2ger
86bfd2cc9f Move LayoutRPC to script_layout_interface. 2016-06-20 19:08:07 +02:00
Ms2ger
68d603a6d0 Move TrustedNodeAddress to script_layout_interface. 2016-06-20 19:08:06 +02:00
Zhen Zhang
4d3379392d Implement Blob URL's DOM interfaces 2016-06-17 20:06:37 +08:00
bors-servo
d620ab71c4 Auto merge of #10225 - jmr0:visibility_api, r=jdm
Implement non-visible pipeline and iframe visibility methods

This addresses #9566 and a good part of #9751, specifically:

* Pipeline has a notion of visibility
* IFrame setVisible/getVisible interface with IFrame's pipeline visibility
* IFrame mozbrowservisibilitychange responds to changes in visibility
* Pipeline visibility is used to limit animations (requestAnimationFrame does not tick animations when hidden) and to increase timer intervals (currently set to a minimum of 1 second while hidden)

Absent for now are any changes to the Document API and general implementation of the Page Visibility API, since the more interesting parts require knowledge of whether the user agent is minimized, OS screen locked, etc.

cc @paulrouget @jdm

<!-- 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/10225)
<!-- Reviewable:end -->
2016-06-16 08:53:56 -05:00
jmr0
2bff131535 Implement non-visible pipeline and iframe visibility methods 2016-06-15 23:28:07 -04:00
Patrick Walton
041cfe6d0a script: When using WebRender, keep the DOM-side scroll positions for
elements with `overflow: scroll` up to date, and take them into account
when doing hit testing.

Closes #11648.
2016-06-10 18:43:04 -07:00
Jansen Jan
fda011923e Support WindowProxy return values in bindings
unscopable
2016-06-09 23:42:27 +02:00
Alan Jeffrey
0769982ec3 Window::Parent and Window::Top now return the right result inisde a mozbrowser iframe. 2016-06-07 08:51:41 -05:00
Zhen Zhang
3d7ed42652 add Blob URL store 2016-06-03 08:17:24 +08:00
Connor Brewster
9980acf2c5 removed unused imports 2016-06-02 16:18:13 -06:00
Keith Yeung
05fc799f92 Clean up DOMManipulationTaskSource 2016-06-02 15:27:08 -04:00
Emilio Cobos Álvarez
f08971ec88
script: Ensure we don't ignore reflows for queries that bail out due to the viewport size not yet present.
This fixes #11223.

Note that this didn't happen in the root pipeline because we explicitly set the
window size in that case.
2016-06-01 19:42:15 +02:00
Patrick Walton
a86f77e36d script: Keep the DOM-side viewport up to date when scrolling happens in
WebRender.

This happens asynchronously, just as it does in non-WebRender mode.

This functionality is a prerequisite for doing proper display-list-based
hit testing in WebRender, since it moves the scroll offsets into Servo
(and, specifically, into the script thread, enabling iframe event
forwarding) instead of keeping them private to WebRender.

Requires servo/webrender_traits#55 and servo/webrender#277.

Partially addresses #11108.
2016-05-31 14:12:51 -07:00
Anthony Ramine
704646698f Fix permissions of mozbrowser and BrowserElementPrivileged (fixes #11498) 2016-05-30 11:23:42 +02:00
bors-servo
3ec20d9cf5 Auto merge of #11472 - jdm:wip, r=mbrubeck
Report blank lines that follow an open brace

This automates something that I find myself frequently commenting on in PRs.

---
<!-- 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] 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11472)
<!-- Reviewable:end -->
2016-05-27 18:14:25 -05:00
Josh Matthews
3cb8af20c2 Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
bors-servo
3052e4f478 Auto merge of #11465 - nox:open, r=jdm
Implement window.openURLInDefaultBrowser() (fixes #11292)

<!-- 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/11465)
<!-- Reviewable:end -->
2016-05-27 12:03:56 -05:00
Anthony Ramine
056bdc5514 Implement window.openURLInDefaultBrowser() (fixes #11292) 2016-05-27 16:16:02 +02:00
Ms2ger
e94f3d4fe0 Remove the LayoutChan type.
It is a pointless abstraction.
2016-05-27 15:33:04 +02:00
bors-servo
2f9796fa69 Auto merge of #11329 - c-rhodes:11320, r=jdm
Report use statements that use {} with only one entry

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 --faster` does not report any errors
- [X ] These changes fix #11320  (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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11329)
<!-- Reviewable:end -->
2016-05-27 07:11:17 -05:00
bors-servo
d890453f78 Auto merge of #11434 - catchmrbharath:status, r=nox
WIP: Fixes #11407: Implement Window.status

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 #11407 (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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11434)
<!-- Reviewable:end -->
2016-05-27 05:33:14 -05:00
bors-servo
073c5e3b6b Auto merge of #11308 - nox:guarded, r=jdm
Implement [Func]

First part of #11292, this just includes support of `[Func]`.

<!-- 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/11308)
<!-- Reviewable:end -->
2016-05-27 04:45:06 -05:00
Bharath M R
a4d9a1d6a1 Fixes #11407: Implement Window.status 2016-05-27 02:28:36 -07:00
Cullen Rhodes
40acd24e8f Report use statements that use {} with only one entry 2016-05-27 10:18:44 +01:00
Anthony Ramine
694deabcd5 Use [Func] on HTMLIFrameElement.mozbrowser 2016-05-27 00:55:05 +02:00
Abelardo E. Mendoza
d72dbb6198 implement window alert with no params 2016-05-26 11:38:53 -06:00
Ms2ger
4113eb6f72 Remove the script listener thread (fixes #11345).
We needed a separate thread in the chrome process because communication to the
compositor is done through a trait object, and cross-process virtual calls are
forbidden.

Also, the fact that these messages are ultimately handled by the compositor is
an implementation detail; conceptually, the relevant constellation is supposed
to handle these messages.

So instead, the script thread will now send the messages to the constellation,
which will ask the compositor to handle them.
2016-05-25 12:50:22 +02:00
Anthony Ramine
cdc7bca944 Move DOMString back to script
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
bors-servo
7cea4eb01c Auto merge of #11225 - izgzhen:patch-input-element-file, r=Manishearth
Implement file related functionalities in htmlinputelement and related

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [x] These changes is related to #11131
- [x] These changes do not require tests because it is a partial implementation

1. Improve the `filemanager_thread` by adding type string and create `SelectedFile`
2. Fill several gaps in `htmlinputelement` implementation related to file type
3. Improve the `File` interface to accommodate the above changes
4. Integrate changes introduced by PR #11189

<!-- 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/11225)
<!-- Reviewable:end -->
2016-05-23 01:10:46 -07:00
Zhen Zhang
dd590d088b Implement file-type functionalities in htmlinputelement and related
Changes include:
- Implement file selection and other DOM behaviours in htmlinputelement
- Integrate IpcSender<FileManagerThreadMsg> into ResourceThreads
- Improve filemanager_thread, including adding type_string field to SelectedFile
- Improve interfaces in FileList/File/Blob to accommodate the above changes
2016-05-23 15:35:46 +08:00
bors-servo
1a34137ac4 Auto merge of #10961 - creativcoder:custom_response_iface, r=jdm
adding interface for custom responses

Fixes #10960

<!-- 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/10961)
<!-- Reviewable:end -->
2016-05-21 01:12:54 -07:00
bors-servo
5fc511a40e Auto merge of #11255 - s-baldrick:11158, r=ConnorGBrewster
11158 - add event handlers

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 --faster` does not report any errors
- [X] These changes fix #11158 (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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11255)
<!-- Reviewable:end -->
2016-05-20 21:26:41 -07:00