Commit graph

603 commits

Author SHA1 Message Date
Manish Goregaokar
177d6fa4ee Support basic immutable CSSOM 2016-11-15 06:56:18 -08:00
Bobby Holley
b69fdad8e4 Stop using associated types for the concrete ElementSnapshot implementation.
MozReview-Commit-ID: LS23s2RbMBg
2016-11-07 10:07:34 -08:00
bors-servo
dd34b2a335 Auto merge of #14059 - mrnayak:refPolicy, r=nox
Network Security : Implement StrictOrigin and StrictOriginWhenCrossOr…

This pull request contains commit implementing initial steps for Improving Network Security project. As part of initial steps referer policy enums for strict-origin and strict-origin-when-cross-origin have been added to [hyper](https://github.com/hyperium/hyper/pull/943). Unit tests and additional logic has been added to handle these policies. Since enum changes are available on hyper version 0.9.11. We had to update hyper version to 0.9.11.

Hyper 0.9.11 depends on num_cpus 1.1.0. To avoid different version of num_cpus. We have updated rayon version from 0.4.0 to 0.4.3. Cargo.toml of util, style, geckolib, stylo component has been updated to use num_cpus version 1.1.0 instead of 0.2.2.

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

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

…igin

Referer policy strict-origin and strict-origin-when-cross-origin changes have been implemented. Relevant unit test cases have been added. Enum for RefererPolicy has been added to hyper codebase and v 0.9.11 of hyper contains these changes.

This commit also contains changes related to upgrade of hyper from v0.9.10 to v0.9.11. Other dependencies changed are rayon, utils, num_cpus.

<!-- 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/14059)
<!-- Reviewable:end -->
2016-11-07 04:37:35 -06:00
bors-servo
cfef68f92d Auto merge of #14047 - mskrzypkows:getElementsByTagName, r=nox
fix getElementsByTagName()

<!-- Please describe your changes on the following line: -->
Improved implementation of getElementsByTagName() in Document, properly pass 3 cases of https://dom.spec.whatwg.org/#concept-getelementsbytagname

---
<!-- 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  #11596 (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/14047)
<!-- Reviewable:end -->
2016-11-04 12:41:22 -05:00
Maciej Skrzypkowski
af5d109695 fix getElementsByTagName() 2016-11-04 16:58:19 +01:00
Raghav
26dac98546 Code review comments and upstream merge conflicts
Incorporated code review comments in components/net/http_loader.rs
Resolved merge conflicts in cargo.lock file. Updated ReferrerPolicy in
lib.rs
2016-11-04 11:18:22 -04: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
Ms2ger
277c6d0154 Move ReferrerPolicy to net_traits. 2016-11-04 10:43:37 +01:00
Raghav
c24aa56377 Network Security : Implement StrictOrigin and StrictOriginWhenCrossOrigin
Referer policy strict-origin and strict-origin-when-cross-origin changes have been implemented. Relevant unit test cases have been added. Enum for RefererPolicy has been added to hyper codebase and v 0.9.11 of hyper contains these changes.

This commit also contains changes related to upgrade of hyper from v0.9.10 to v0.9.11. Other dependencies changed are rayon, utils, num_cpus.
2016-11-04 03:17:04 -04: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
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
Simon Sapin
53b638c0e2 Update to string-cache 0.3 2016-11-03 16:23:05 +01:00
Ms2ger
7b905a5590 Remove Document::load_async. 2016-10-13 11:10:32 +02:00
Anthony Ramine
0b3ab875f4 Remove intrinsic Root::r() 2016-10-11 19:44:32 +02:00
Anthony Ramine
1405be6917 Unify ServoHTMLParser and ServoXMLParser in ServoParser 2016-10-11 15:08:37 +02:00
Glenn Watson
291af9d115 Send touch events to root pipeline, and allow forwarding to iframes.
Instead of letting the compositor try to find the correct scroll
layer for a touch event, switch touch events to work the same way
that mouse events do.

Touch events are now dispatched to the root pipeline, and then
forwarded to child iframes as required.
2016-10-08 06:00:00 +10:00
Anthony Ramine
19108aa330 Pass a &GlobalScope to WebIDL static methods and constructors 2016-10-06 21:35:49 +02:00
Anthony Ramine
bad49e4696 Introduce GlobalScope::resource_threads 2016-10-06 21:35:46 +02:00
Anthony Ramine
766010379e Introduce GlobalScope::as_window 2016-10-06 21:35:45 +02: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
bors-servo
aea9545e16 Auto merge of #13459 - servo:no-arc-heapsize, r=emilio
Use parking_lot::RwLock for PropertyDeclarationBlock

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

As discussed in https://bugzilla.mozilla.org/show_bug.cgi?id=1305141

Closes #13176

---

Original PR title: Stop relying on `impl<T: HeapSizeOf> HeapSizeOf for Arc<T>`
https://github.com/servo/heapsize/issues/37#issuecomment-249861171

This builds on top of that.

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

<!-- 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/13459)
<!-- Reviewable:end -->
2016-10-04 11:58:56 -05:00
Simon Sapin
fbde392c3d Revert "Make DOMRefCell use style’s copy of RefCell"
This reverts commit ec723057b2.
2016-10-04 18:35:01 +02:00
Simon Sapin
aeb3efda1f Make script build without impl<T: HeapSizeOf> HeapSizeOf for Arc<T>.
The removal of this impl is not included in this commit.
CC https://github.com/servo/heapsize/issues/37#issuecomment-249861171
2016-10-04 13:45:58 +02:00
Ms2ger
aa48ec7628 Remove Document::add_blocking_load. 2016-10-04 13:11:03 +02:00
Ms2ger
8d01baaf44 Remove unused Document::prepare_async_load. 2016-10-04 11:27:45 +02:00
Ms2ger
59689475af Avoid PendingAsyncLoad in fetch_async. 2016-10-04 11:17:05 +02:00
bors-servo
9b7708063a Auto merge of #13397 - aochagavia:dispatch-event, r=Ms2ger
Return an enum instead of a boolean from dispatch_event

Fixes #13196

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13196.
- [X] These changes do not require tests because the functionality hasn't changed

<!-- 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/13397)
<!-- Reviewable:end -->
2016-09-26 12:09:48 -05:00
Adolfo Ochagavía
6c8bfdb774 Return an enum instead of a boolean from dispatch_event
Fixes #13196
2016-09-26 17:52:38 +02:00
Keith Yeung
d4816762fa Add fetch_async to PendingAsyncLoad, DocumentLoader and Document 2016-09-21 11:50:54 -07:00
Keith Yeung
f566a8d44f Update step annotations for prepare a script 2016-09-21 11:49:47 -07:00
Ying-Ruei Liang(KK)
55a2270e16 Bring referrer policy delivery to <a> and <link> via rel attribute 2016-09-20 21:17:37 +08:00
Arthur Marble
dbec9d8454 More code refactoring (exampleVar to example_var) 2016-09-18 01:02:57 -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
bors-servo
67bfd0df4b Auto merge of #13130 - samuknet:dblclick, r=nox
'dblclick' event

<!-- Please describe your changes on the following line: -->
* Add field to document struct to store information about last 'click' event
* Add code to `handle_mouse_event` function to detect and fire double click events

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X ] These changes do not require tests because it is input related

<!-- 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/13130)
<!-- Reviewable:end -->
2016-09-10 08:46:13 -05:00
UK992
93a103ba73 Reorder use statements 2016-09-09 04:55:19 +02:00
Sam Wood
b6f2a4f159 Working implementation of dblclick.
Signed-off-by: Sam Wood <sam@sam.uk.net>

Fix mach test tidy

Signed-off-by: Sam Wood <sam@sam.uk.net>

Fix import newline

Signed-off-by: Sam Wood <sam@sam.uk.net>
2016-09-07 09:51:48 +01:00
bors-servo
bbfe38e35f Auto merge of #13134 - servo:archery, r=emilio
Add lots of Arc’s in style, and prepare for using DOMRefCell

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

`DOMRefCell` usage is not there year because of thread-safety questions, but I have this much already that I’d like to land before it bitrots.

r? @emilio

---
<!-- 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 new tests because refactor

<!-- 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/13134)
<!-- Reviewable:end -->
2016-08-31 16:30:56 -05:00
bors-servo
3649a356c8 Auto merge of #13100 - nox:better-getters, r=Ms2ger
Use Option<T> to return from getters

<!-- 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/13100)
<!-- Reviewable:end -->
2016-08-31 04:10:42 -05:00
Simon Sapin
ec723057b2 Make DOMRefCell use style’s copy of RefCell 2016-08-31 02:34:04 +02:00
Emilio Cobos Álvarez
fd9cd2f103
layout: Keep track of whether we've deferred the painting of the document due to
a script query.

This will, rather unfortunately, mean that we might repaint two times if we've
deferred a paint, then get an out-of-band reflow. Still seemed better than not
suppressing paints at all.

Fixes #13131
2016-08-30 17:01:03 -07:00
Anthony Ramine
7dfb336be8 Use Option<T> to return from getters
This removes the cumbersome &mut bool argument and offers overall
a more readable code.
2016-08-30 19:07:19 +02:00
Anthony Ramine
6e1523f4ae Compile WebIDL return type "object" to NonZero<*mut JSObject> 2016-08-30 19:07:13 +02:00
bors-servo
5b915c403d Auto merge of #12817 - servo:euclid, r=nox
Update to euclid 0.8

<!-- 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/12817)
<!-- Reviewable:end -->
2016-08-11 20:12:29 -05:00
Martin Robinson
6259df5e2d Update to euclid 0.8 2016-08-12 03:12:06 +02:00
Emilio Cobos Álvarez
f9c0f2df13
dom: getElementsFromPoint does the hit testing on viewport coordinates.
We got this wrong, I was just writing a test for #12777 when I found this.
2016-08-10 21:15:10 -07:00