Commit graph

163 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
2e68821014
script: Implement Debug on ConstellationControlMsg to simplify script_thread.rs 2016-07-20 09:03:56 -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
eff3e01df0 make resource_thread talk to sw-manager 2016-07-18 19:06:48 +05:30
Rahul Sharma
1e6293ea1d Integrate service worker manager thread 2016-07-16 23:29:44 +05:30
Alan Jeffrey
44422744ff Sent log messages to the constellation. 2016-07-15 13:44:44 -05:00
Ms2ger
cbfe77cee1 Move some unit type definitions to style_traits. 2016-07-11 12:14:27 +02:00
Josh Matthews
6496d73210 Make textinput handle actual key values. Don't restrict character values to a single byte. 2016-07-06 00:10:24 -04:00
Josh Matthews
04ce86c08c Associate logical and physical keypresses together to support non-QWERTY keyboards. 2016-07-05 18:06:42 -04: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
Ms2ger
54bb138ddc Move WebDriverCommandMsg to script_traits. 2016-07-05 09:02:15 +02:00
mrmiywj
909f0da3c2 add reload keyboard shortcut
rename the preference to shell.builtin-key-shortcuts.enabled
2016-06-23 17:37:56 +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
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
Ms2ger
021b9e3239 Remove the layout shutdown channel.
Nobody is listening.
2016-06-04 13:24:32 +02:00
bors-servo
bdecfa13d2 Auto merge of #11542 - asajeffrey:mozbrowser-send-opentab-event, r=paulrouget
Fire a mozbrowseropenwindow event when an html anchor has a non-self target

<!-- Please describe your changes on the following line: -->
When an html anchor has a non-self target, fire a `mozbrowseropenwindow` event.

---
<!-- 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 #11539.
- [X] These changes do not require tests because we don't have the infrastructure for mozbrowser testing yet.

<!-- 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/11542)
<!-- Reviewable:end -->
2016-06-02 09:45:26 -05:00
Alan Jeffrey
835b6a9017 Fire a mozbrowseropenwindow event when an html anchor has a non-self target. 2016-06-02 09:44:35 -05:00
Rahul Sharma
15a2064c0d implement related sw interface and register method 2016-06-02 04:09:39 +05:30
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
bors-servo
64cca225e5 Auto merge of #11430 - asajeffrey:constellation-record-mozbrowser-parent-info, r=ConnorGBrewster
Record the frame type (IFrame or MozBrowserIFrame) in the pipeline.

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 this is a 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 first step towards supporting the notion of multiple top-level browsing contexts in Servo, by making the constellation aware of which content is loaded in a mozbrowser iframe.

<!-- 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/11430)
<!-- Reviewable:end -->
2016-05-26 14:53:09 -05:00
Alan Jeffrey
d92dfe1b8c Record the frame type (IFrame or MozBrowserIFrame) in the pipeline. 2016-05-26 12:55:55 -05:00
bors-servo
97e58e6cfe Auto merge of #11382 - mbrubeck:warnings, r=nox
Fix unused crate warning in script_tests

<!-- 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/11382)
<!-- Reviewable:end -->
2016-05-26 01:43:21 -05:00
Matt Brubeck
ea21fdbd48 Fix unused import warnings 2016-05-25 12:09:23 -07:00
Ms2ger
4f893ee96e Remove ScriptThread::layout_to_constellation_chan.
Instead, pass it along in NewLayoutInfo when needed.
2016-05-25 15:41:01 +02: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
Ms2ger
49d244d39c Use associated types to improve LayoutThreadFactory and ScriptThreadFactory. 2016-05-24 17:50:06 +02:00
Ms2ger
47933479da Move CompositorMsg to script_traits. 2016-05-24 12:28:10 +02:00
Ms2ger
8ecd2debc7 Remove the unused ScriptControlChan type. 2016-05-24 10:18:27 +02:00
Ms2ger
9ee8c33a8d Remove pointless phantom arguments to ScriptThreadFactory and LayoutThreadFactory. 2016-05-20 10:20:58 +02:00
Zhen Zhang
a51db4cfa8 Implement trait-based ResourceThreads and clean up related naming issues
Changes include:

- Introduce an IpcSend trait to abstract over a collection of IpcSenders
- Implement ResourceThreads collection to abstract the resource-related
  sub threads across the component
- Rename original ResourceThread and ControlMsg into an unifed CoreResource__
  to accommodate above changes and avoid confusions
2016-05-20 08:00:16 +08:00
Ms2ger
cc2b2b50a7 Remove ConstellationChan.
It's a pointless abstraction that propagates the obsolete chan terminology,
swaps the order in which the sender and receiver are returned, and hides a
source of panics.
2016-05-19 17:13:44 +02:00
fokinv
9825ea41b4 Add Bluetooth IPC support 2016-05-03 10:17:41 +02:00
Keith Yeung
3110647852 Make IFrameLoadInfo take an Option<LoadData> instead of Option<Url> 2016-04-30 21:43:01 -04:00
bors-servo
990dd72da7 Auto merge of #10837 - asajeffrey:add-mozbrowsererror-details, r=Manishearth
Add detail to mozbrowsererror events.

Part of #10334. Once #10824 lands, we can include the panic reason and backtrace in the error report.

<!-- 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/10837)
<!-- Reviewable:end -->
2016-04-29 09:18:39 -07:00
Patrick Walton
7bd257089c script: Make iframes know their pipeline IDs at all times, even after
navigation.

Since WebRender uses the pipeline ID stored in the iframe element to
determine which pipeline to display, it had better be kept up to date!

Closes #9919.
2016-04-28 10:53:13 -07:00
Alan Jeffrey
d65cf8e833 Add detail to mozbrowsererror events. 2016-04-25 12:18:28 -05:00
Michael Howell
7940b22158 compositing/script: Do not dispatch the resize event when initially loading.
No bug report corresponds to this, but I noticed it while trying to
reduce #10593
2016-04-22 13:36:43 -07:00
bors-servo
8d988f20c1 Auto merge of #9968 - izgzhen:scroll, r=asajeffrey
Implement scroll, scrollLeft, scrollTop and friends, addressing issue #9650

This is a work in progress to solve https://github.com/servo/servo/issues/9650. Thanks a lot for helping the review.

- [x] scroll
- [x] scrollTo
- [x] scrollBy
- [x] scrollTop (setter and getter)
- [x] scrollLeft (setter and getter)

The setters will be implemented in another PR after this is merged.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9968)
<!-- Reviewable:end -->
2016-04-20 18:40:26 +05:30
Alan Jeffrey
cfb066ef20 Added a dedicated panic channel. 2016-04-19 09:08:44 -05:00
Zhen Zhang
fefdaf76de Implement ScrollTop and ScrollLeft getters:
Add new compositor message to get scroll_offset;
Add new layout query for computed value of overflow-x/y;
Implement layer_id method for ThreadSafeLayoutNode;
Add new layout query for layer_id;
Implement script interface for getting scrollTop and scrollLeft, as well as relavant helper functions.
2016-04-19 12:27:35 +08:00
bors-servo
0ff8adb097 Auto merge of #9811 - paulrouget:forceTouch, r=mbrubeck
forcetouch events

https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/SafariJSProgTopics/RespondingtoForceTouchEventsfromJavaScript.html

Not sure how we want to land that yet. Maybe reproduce the webkit events (as in this PR), or as touch/mousemouse events.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9811)
<!-- Reviewable:end -->
2016-04-05 21:07:05 +05:30
bors-servo
d1e8b79583 Auto merge of #10399 - jdm:pb, r=jdm
Private browsing - Initial steps

Rebase of #10160.

<!-- 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/10399)
<!-- Reviewable:end -->
2016-04-05 17:41:11 +05:30
Paul Rouget
df6e7394d4 forcetouch events support
This enables Apple forcetouch DOM events. It requires the preference dom.forcetouch.enabled.

The DOM events are described here:
- https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/SafariJSProgTopics/RespondingtoForceTouchEventsfromJavaScript.html

The Cocoa mechanism is documented here:
- 20000016-SW274
2016-04-05 18:42:28 +08:00
dhaval0603
af64a888e6 Private browsing - Initial steps 2016-04-04 15:22:38 -04:00
Michael Howell
c9cb4839e4 No more headless compositor. Just the normal one.
This changes headless operation to strictly be a runtime option, rather
than a compile-time one. Note that the old headless version still relied
on a display server to support WebGL, while it now requires one all the
time.

Fixes #8573
2016-03-24 11:18:54 -07:00
Paul Rouget
6577409b95 Add history information to mozbrowserlocationchange event 2016-03-21 19:19:48 +08:00
Ms2ger
08083f1c9d Deny unsafe code in more crates. 2016-03-18 14:43:03 +01:00