Commit graph

237 commits

Author SHA1 Message Date
Anthony Ramine
31e9d81c0f Make #[dom_struct] a proc_macro attribute 2017-02-24 01:50:51 +01:00
Connor Brewster
bfd7b950ad Add ImmutableOrigin to allow for serializing origins 2017-02-22 11:11:59 -06:00
Alan Jeffrey
7c2de62124 Implement browsing context discarding. 2017-01-05 21:12:57 +00:00
Ms2ger
d49e34c1b1 Implement correct security checks for HTMLIFrameElement::contentDocument.
Fixes #10964.
2016-12-23 11:15:47 +01:00
Ms2ger
ec5d08c887 Pass the Document's origin to its constructor.
CC #10963.
2016-12-23 11:15:46 +01:00
Alan Jeffrey
9be4fd56ce Removed util. 2016-12-14 18:04:37 -06:00
Anthony Ramine
1327ebd52f Remove HeapGCValue
It could be used to have mutable JSVal fields without GC barriers.
With the removal of that trait, MutHeap and MutNullableHeap can respectively
be replaced by MutJS and MutNullableJS.
2016-12-12 10:47:54 -10:00
Jansen Jan
55f0e56224 Add support for fullscreen #10102 2016-12-09 11:45:50 +01:00
Corey Farwell
449f6337d4 Rename Reflectable to DomObject.
Fixes https://github.com/servo/servo/issues/8473.
2016-12-08 08:50:35 -10:00
Alan Jeffrey
97ae51cf45 Added debugging to htmliframeelement.rs. 2016-12-06 15:52:40 -10:00
Ms2ger
b86965f394 Implement synchronous about:blank loading.
Based on initial work by jdm in <https://github.com/servo/servo/pull/8600>.
2016-11-30 11:26:35 +01:00
Pu Xingyu
91f3d4f474 Remove redundant url clones
They are now redundant since now document.url() returns a struct rather
than a reference.
2016-11-18 12:39:22 +08:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
Alan Jeffrey
90e9c910f4 Replace script thread root browsing context by a collection of documents. 2016-11-08 10:48:58 -06:00
bors-servo
73c9847ef8 Auto merge of #14036 - frewsxcv:event, r=nox
A couple improvements to `EventTarget` event firing.

<!-- 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/14036)
<!-- Reviewable:end -->
2016-11-04 06:43:56 -05:00
Corey Farwell
f447040ea9 Migrate EventTarget event firing functions to use Atoms.
This allows us to utilize more `atom` macros.
2016-11-03 17:04:30 -04:00
Alan Jeffrey
f3993d99b9 Lookup frames by frame_id, not pipeline_id. 2016-11-03 15:39:51 -05:00
bors-servo
4984a83f67 Auto merge of #13965 - asajeffrey:script-iframe-check-document-browsing-context, r=Ms2ger
Check that an iframe is in a document with a browsing context before processing src

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

Check that an iframe is in a document with a browsing context before processing src.
---

<!-- 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 #13964.
- [X] These changes do not require tests because this is already tested by https://github.com/servo/servo/blob/master/tests/wpt/web-platform-tests/old-tests/submission/Opera/script_scheduling/034.html

<!-- 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/13965)

<!-- Reviewable:end -->
2016-11-03 14:03:19 -05:00
Corey Farwell
c3b279a4c3 Remove "fire a simple event" concept, refactor event firing API.
"fire a simple event" concept was removed in
https://github.com/whatwg/html/pull/1933.
2016-11-03 15:01:07 -04:00
Alan Jeffrey
1803a585e5 Check that an iframe is in a document with a browsing context before processing src. 2016-11-03 12:51:33 -05:00
Simon Sapin
53b638c0e2 Update to string-cache 0.3 2016-11-03 16:23:05 +01:00
Daan Sprenkels
66059904b7 Remove extra spaces in function calls and declarations 2016-10-31 18:11:37 +01:00
Patrick Walton
f83e1a34dc script: Implement the frameBorder attribute on HTMLIFrameElement.
google.com uses this for the "set Google as your home page" popup.
2016-10-26 17:12:43 -07:00
Ms2ger
e97f06800e Move LoadData to script_traits. 2016-10-21 12:49:16 +02:00
Anthony Ramine
0b3ab875f4 Remove intrinsic Root::r() 2016-10-11 19:44:32 +02:00
Alan Jeffrey
f53408df80 IFrame elements now manage FrameIds rather than the constellation. 2016-10-07 14:11:32 -05:00
Anthony Ramine
27f100b1d4 Introduce GlobalScope::pipeline_id 2016-10-06 20:59:13 +02:00
Anthony Ramine
f789e73fd2 Introduce GlobalScope::constellation_chan 2016-10-06 20:59:12 +02:00
Anthony Ramine
fcb59d3057 Make reflect_dom_object take a &GlobalScope 2016-10-06 20:59:09 +02:00
Connor Brewster
e9b2f1b916 Replace current session entry for reloads 2016-09-19 14:23:03 -05:00
Arthur Marble
b874e76455 Made fixes for PR. 2016-09-18 07:12:39 -05:00
Arthur Marble
883902bd97 Most of the code refactoring needed to be done is done with this commit. 2016-09-18 03:41:16 -05:00
Aneesh Agrawal
56fbfd46a4 Excise SubpageId and use only PipelineIds
SubpageId was originally introduced in 2013 to help iframes keep track of
their associated (children) pipelines. However, since each pipeline
already has a PipelineId, and those are unique, those are sufficient
to keep track of children.
2016-09-13 15:37:38 -04:00
Aneesh Agrawal
b9b25b6f82 Consistently use parent_pipeline_id
Instead of containing_pipeline_id, use parent_pipeline_id because it is
more clear that it refers to the immediate parent.
2016-09-13 15:24:13 -04:00
Aneesh Agrawal
9d097e7d15 Use fn pipeline_id consistently, not fn pipeline
Consistently use the name 'pipeline_id' to refer to a function that
returns an (optional) PipelineId.

This was prompted by discovering both fn pipeline and fn pipeline_id
doing the same job in htmliframeelement.rs.

Note that there is fn pipeline in components/compositing/compositor.rs,
but that actually returns an Option<&CompositionPipeline>, not any kind
of PipelineId.
2016-09-13 15:17:40 -04:00
UK992
93a103ba73 Reorder use statements 2016-09-09 04:55:19 +02:00
Lars Bergstrom
bdf4563c6a Remove static usage at compile-time of GIT_INFO to enable builds outside of a git repo 2016-08-27 06:31:28 -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
Alan Jeffrey
c889900cff Removed panic channel, replaced by integrated logging and issue reporting. 2016-07-20 21:56:43 -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
Kuba Birecki
85f4da18a6 Inline DOM element creation into box expressions in components/script/dom/ 2016-07-14 08:44:22 +02:00
bors-servo
80cb0cf821 Auto merge of #11872 - eddyb:back-to-roots, r=Ms2ger
Replace return_address usage for rooting with stack guards and convenience macros.

The existing `Rooted` and `RootedVec` users were migrated the the following two macros:
```rust
let x = Rooted::new(cx, value);
// Was changed to:
rooted!(in(cx) let x = value);
// Which expands to:
let mut __root = Rooted::new_unrooted(value);
let x = RootedGuard::new(cx, &mut __root);
```
```rust
let mut v = RootedVec::new();
v.extend(iterator);
// Was changed to:
rooted_vec!(let v <- iterator);
// Which expands to:
let mut __root = RootableVec::new();
let v = RootedVec::new(&mut __root, iterator);
```

The `rooted!` macro depends on servo/rust-mozjs#272.
These APIs based on two types, a container to be rooted and a rooting guard, allow implementing both `Rooted`-style rooting and `Traceable`-based rooting in stable Rust, without abusing `return_address`.

Such macros may have been tried before, but in 1.9 their hygiene is broken, they work only since 1.10.

Sadly, `Rooted` is a FFI type and completely exposed, so I cannot prevent anyone from creating their own, although all fields but the value get overwritten by `RootedGuard::new` anyway.
`RootableVec` OTOH is *guaranteed* to be empty when not rooted, which makes it harmless AFAICT.

By fixing rust-lang/rust#34227, this PR enables Servo to build with `-Zorbit`.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix rust-lang/rust#34227
- [x] These changes do not require tests because they are not functional changes

<!-- 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/11872)
<!-- Reviewable:end -->
2016-07-04 11:03:35 -07:00
Eduard Burtescu
0db1faf876 Switch to using the new rooted!/RootedGuard API for rooting. 2016-07-04 20:59:01 +03:00
Corey Farwell
22928f50ac Refactor util::prefs operations to be methods on static struct. 2016-07-02 16:43:39 -04:00
bors-servo
307844a8c1 Auto merge of #12136 - ConnorGBrewster:servo_version_reporter, r=asajeffrey
Send servo version in mozbrowser error.

<!-- Please describe your changes on the following line: -->
Adds support for sending a version string to b.html so we can put the servo version in the auto generated issue reports.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because sending servo version on mozbrwosererror for issue reporter.

<!-- 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/12136)
<!-- Reviewable:end -->
2016-07-02 12:33:57 -07:00
Patrick Trottier
7be78a3e54 Removing u8 from HTMLIframeElement
Remove u8 in HTMLIframeElement.rs

Remove u8 from IframeElement.rs

u8 removal

trying to pass test - uri

Update htmliframeelement.rs

u8 removal

removing u8 from Rust HTMLIFrameElement
2016-07-01 18:40:25 -04:00
Connor Brewster
ed678cb7f1 Send servo version in mozbrowser error.
Also moved servo version to util for usage by the --version flag
and for sending the version to browser.html with mozbrowsererror
2016-07-01 16:39:22 -06:00
Patrick Trottier
97eb594cc2 URI to URL
trying to pass test - uri
2016-06-20 20:18:42 -04:00
bors-servo
6166d8e74f Auto merge of #11544 - jdm:privatebrowsing, r=asajeffrey
Implement private browsing for mozbrowser

<!-- Please describe your changes on the following line: -->
Support the `mozprivatebrowsing` attribute on mozbrowser iframes. This separates the non-private and private sessions in terms of cookies, HSTS lists, cached HTTP credentials, HTTP connection pools, and web storage. The private session is shared between all private mozbrowsers, and lasts until shutdown.

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

<!-- 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/11544)
<!-- Reviewable:end -->
2016-06-20 14:32:17 -05:00
Sagar Muchhal
7e2b4d163b Propagate privacy information of iframes to corresponding pipelines. Make iframes of differing privacy values be considered cross-origin.
Make the constellation hand out separate private and public channels for the pipeline content to communicate with the resource thread as necessary.
2016-06-20 14:55:01 -04:00