Commit graph

112 commits

Author SHA1 Message Date
Alan Jeffrey
05391e27cd Add lots of derived Debug impls 2018-10-29 09:21:37 -05:00
Anthony Ramine
a3392610c3 Make HTMLCanvasElement::get_size return a Size2D<u32>
The changes keep trickling down.
2018-10-02 14:21:06 +02:00
mandreyel
bed16ddd89 Create ScriptMsg::GetBrowsingContextInfo 2018-09-14 00:23:49 +02:00
chansuke
fda3111f67 Format components/script_traits 2018-09-13 00:54:56 +09:00
Gregory Terzian
21bf5a3a4b implement opener, disowning 2018-08-11 01:13:11 +02:00
Gregory Terzian
f408b798c4 implement window.open, create auxiliary browsing context 2018-08-11 01:12:55 +02:00
Connor Brewster
61442cce4b Track hash changes in session history
Notify history changed on pushState and scroll to frag
2018-07-21 12:38:51 -06:00
Gregory Terzian
2753e5efab improve spec compliance of window.close 2018-06-04 15:02:23 +08:00
Gregory Terzian
d438240772 move msg to embedder_traits, use in script, handle send error in embedder 2018-05-23 21:45:57 +08:00
Connor Brewster
ee3c26c56c Cleanup constellation debug messages 2018-05-18 14:53:04 -06:00
bors-servo
3d109b4574
Auto merge of #20615 - KiChjang:window-indexed-getter, r=emilio
Implement window indexed getter

Fixes #4589.

<!-- 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/20615)
<!-- Reviewable:end -->
2018-05-17 18:52:38 -04:00
bors-servo
1d8283e010
Auto merge of #20329 - gterzian:before_unload, r=cbrewster
Implement beforeunload event and infrastructure

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

Implementation of:
1. https://html.spec.whatwg.org/multipage/#prompt-to-unload-a-document, and
2. https://html.spec.whatwg.org/multipage/#unload-a-document
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #10787 and fix #20485 and fix #20588 and fix #20496 (github issue number if applicable).

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

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/20329)
<!-- Reviewable:end -->
2018-05-07 13:22:23 -04:00
Gregory Terzian
427eaed535 beforeunload and unload infrastructure 2018-05-05 19:14:36 +08:00
bors-servo
894caaa98f
Auto merge of #20743 - paulrouget:rmFwdEvent, r=emilio
Remove useless message

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

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

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/20743)
<!-- Reviewable:end -->
2018-05-03 05:30:12 -04:00
Paul Rouget
af5b50006f Remove useless message 2018-05-03 14:37:21 +08:00
Keith Yeung
4383b3053b Add a new RPC call for getting a child browsing context ID 2018-04-30 15:43:39 -07:00
bors-servo
847115ba04
Auto merge of #20671 - cbrewster:history_url, r=asajeffrey
Make session history aware of URLs

<!-- 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 build-geckolib` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

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

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/20671)
<!-- Reviewable:end -->
2018-04-30 13:33:23 -04:00
Connor Brewster
e7ef9cfb30 Make session history aware of URLs 2018-04-24 15:13:11 -05:00
Fabrice Desré
42886613d3 Notify the embedder when it should display or hide an IME 2018-04-21 19:46:42 -07:00
Connor Brewster
17bd80a7b1 Implement history state 2018-04-16 10:21:15 -05:00
Brody Eastwood
8a1590efc6 Add unique canvas IDs to all canvas operations. 2018-04-02 22:02:22 -04:00
Paul Rouget
10abe03948 Reduce the number of calls to the embedder by grouping the screen and window coordinates into one structure 2018-03-22 07:56:50 +01:00
Paul Rouget
e25dd45139 alias some euclid types 2018-03-16 14:34:29 +08:00
Paul Rouget
ac4614d6ce Use typed coordinates.
We use Size2D and Point2D across compositing, constellation and script,
losing the type of pixels we use (DevicePixel, DeviceIndepententPixel
or CSSPixel) along the way, which might lead to bugs like
window.outerHeight not taking into account the page zoom (using
DeviceIndepententPixel instead of CSSPixel).
2018-03-16 14:34:29 +08:00
Paul Rouget
da349ee8a9 remove mozbrowser code 2018-02-13 09:40:06 +01:00
Igor Gutorov
4ee9eb8563 style: Move cursor property out of mako 2018-01-20 19:06:29 +02:00
Josh Matthews
0e211d0d8f Revert "Send IPC receiver for canvas as part of CreateCanvasPaintThread message"
This reverts commit a504c9358b.
2017-12-18 10:51:00 -05:00
tigercosmos
a504c9358b Send IPC receiver for canvas as part of CreateCanvasPaintThread message 2017-12-16 12:04:59 +08:00
Manish Goregaokar
3900f5e616
Use FetchCanceller for document loads 2017-11-22 14:06:27 -08:00
Shing Lyu
c120234f0e Enable screen.availHeight/availWidth/Height/Width 2017-11-13 21:32:10 +01:00
bors-servo
ca08271345 Auto merge of #18704 - mrobinson:wr-hit-testing, r=jdm,glennw,mbrubeck
Switch to using WebRender hit testing

This trades quite a bit of complicated code in Servo for few more
messages and a significant performance improvement. In particular,
WebRender can search the entire display list at once instead of
ping-ponging down the pipeline tree. This allows us to send mouse
events to the correct pipeline immediately.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they should not change behavior.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/18704)
<!-- Reviewable:end -->
2017-10-17 17:09:25 -05:00
Martin Robinson
b5d51dd263 Switch to using WebRender hit testing
This trades quite a bit of complicated code in Servo for few more
messages and a significant performance improvement. In particular,
WebRender can search the entire display list at once instead of
ping-ponging down the pipeline tree. This allows us to send mouse
events to the correct pipeline immediately.
2017-10-17 23:33:13 +02:00
Matt Brubeck
efc3683cc7 Fix commonmark Markdown warnings in docs, part 1
Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is
passed to rustdoc.

This is mostly a global find-and-replace for bare URIs on lines by
themselves in doc comments.
2017-10-17 11:24:57 -07:00
bors-servo
40c8a6389a Auto merge of #17083 - danielj41:javascript-url-global-3, r=jdm
"javascript:" urls: execute in correct global scope

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

#### Summary

This pull request makes `javascript:` urls execute in the correct global scope.

#### Example

```html
<script> var x = 4; </script>

<!-- this branch: logs "4" -->
<!-- master: undefined variable error -->
<a href="javascript:console.log(x)">link</a>
```

#### Questions

I'm new to servo and rust, so I'm unsure about these changes. In particular:
  * What's the appropriate place to evaluate the js?
    * I moved it to `handle_navigate`, but I'm not sure if this will catch all occurrences of `javascript:` urls. I also don't know if this will execute in the correct thread and the correct window.
  * What should I do with the result of the js evaluation?
    * I just ignored it. The previous behavior displayed it as the content of a new page load.

---
<!-- 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 #15147, #16718

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

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/17083)
<!-- Reviewable:end -->
2017-09-09 04:39:43 -05:00
Daniel Johnson
ff786a050a "javascript:" urls: clean up after aborting a page load
Problem:
  After aborting on a 204 or 205 status code, you could no longer
  follow links on the page.

Cause:
  `constellation.rs` ignores new LoadUrl requests since the aborted
  one is in its `pending_changes` list.

Solution:
  Send a message to constellation that lets it clean up its
  `pending_changes` list.
2017-08-27 21:58:11 -07:00
Clément DAVID
c5fe235112 order derivable traits lists
Ignoring :
 - **generated**.rs
 - python/tidy/servo_tidy_tests/rust_tidy.rs
2017-08-23 21:38:44 +02:00
Fernando Jiménez Moreno
1b123400eb Wait for actual paint before setting paint related metrics 2017-08-22 14:36:06 +02:00
Anthony Ramine
676f2c8acf Revert "Auto merge of #18114 - emilio:revert-webgl-refactor, r=nox"
This reverts commit 4d10d39e8f, reversing
changes made to ee94e2b7c0.
2017-08-16 23:23:18 +02:00
Emilio Cobos Álvarez
cfe22e3979
Revert "Auto merge of #17891 - MortimerGoro:webgl_move, r=glennw,emilio"
This reverts commit 90f55ea458, reversing
changes made to 2e60b27a21.
2017-08-16 16:42:13 +02:00
Imanol Fernandez
703962fe61 Improve WebGL architecture. 2017-08-15 22:14:32 +02:00
Paul Rouget
d241389129 make use of ScriptToConstellationChan 2017-08-15 08:22:09 +02:00
Martin Robinson
e58e8ab42e Upgrade to the latest version of WebRender 2017-07-13 07:44:08 +10:00
Nicolas Silva
8617320500 Bump euclid to 0.14. 2017-06-14 16:00:59 +02:00
Alan Jeffrey
2fd925bac9 Removed root browsing context from constellation. 2017-06-07 22:53:50 -05:00
Nikhil Shagrithaya
541baafe1c Redirect document loads manually 2017-05-31 17:28:53 +05:30
Alan Jeffrey
79743b5358 Webdriver uses browsing context ids rather than pipeline ids. 2017-05-25 17:14:28 -05:00
Alan Jeffrey
42577365b7 Added a TopLevelBrowsingContextId type. 2017-05-22 09:27:07 -05:00
Alan Jeffrey
607e011b05 Renamed constellation::Frame to constellation::BrowsingContext. 2017-05-15 21:03:11 -05:00
Connor Brewster
d004db95cf Make non-initial about:blank loads asynchronous
Don't update iframe pipeline until load completes

To preserve the previous functionality of delaying load events when a
new navigation is triggered, pending pipeline id represents the
current pending load. The load event is only fired if the load message's
pipeline id matches the pending pipeline id.

Track frame size on Frame instead of Pipeline

Disabled matchMedia test

Track creator pipeline id
2017-05-12 11:53:43 -06:00
Martin Robinson
d150cc9f95 Eliminate ScrollRootId
Just use WebRender's ClipId directly. This will allow us to create and
use ReferenceFrames in the future, if we need to do that. It will also
make it easier to have Servo responsible for creating the root
scrolling area, which will allow removing some old hacks in the future.
2017-04-20 08:51:38 +02:00