Commit graph

680 commits

Author SHA1 Message Date
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
bors-servo
0fe94a6724 Auto merge of #12862 - servo:layout-new, r=emilio
added dom obj counting to decide sequential/parallel layout (#10110)

This is a rebased version of #11713

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #10110 (github issue number if applicable).
- [X] There are no tests for these changes because it's an optimization with no visible behavioral changes

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

<!-- Reviewable:end -->
2016-12-07 14:32:20 -08:00
bors-servo
32c121b6ff Auto merge of #14473 - nox:raf-safety, r=Ms2ger
Clean up JSTraceable and how we use it

<!-- 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/14473)
<!-- Reviewable:end -->
2016-12-06 18:31:46 -08:00
Anthony Ramine
e8c9c12b6e Remove usage of FnBox for animation frame callbacks (fixes #14416) 2016-12-06 13:15:09 -10:00
bors-servo
a0619688a6 Auto merge of #14367 - mrobinson:scroll-fragment-point, r=pcwalton
Reimplement scrolling to fragments

<!-- 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
- [x] These changes fix #13736, #10753 (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. -->

This reimplemntation of the feature uses ScrollRootIds to scroll
particular scrollable areas of the page.

Fixes #13736.
Fixes #10753.

<!-- 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/14367)
<!-- Reviewable:end -->
2016-12-06 14:42:00 -08:00
ddh
479a2c1217 added dom obj counting to decide sequential/parallel layout (#10110) 2016-12-05 17:42:17 +00:00
Anthony Ramine
c1bdd3d5ce Properly mark application/xhtml+xml documents as XML
For this to work, we must remove the unimplemented!() call
in Element::parse_fragment because all the tests rely on
setting innerHTML.
2016-12-01 11:55:16 +01:00
Rohan Prinja
973f77c006 Make WebIDL constructors take a more specific global if possible (fixes #14071) 2016-11-30 23:23:41 +01:00
Anthony Ramine
8af2327e95 Expose WebGL-related interfaces only in Window 2016-11-30 23:23:39 +01:00
Martin Robinson
0b56bb2237 Reimplement scrolling to fragments
This reimplemntation of the feature uses ScrollRootIds to scroll
particular scrollable areas of the page.

Fixes #13736.
Fixes #10753.
2016-11-29 22:12:16 +01:00
bors-servo
00f30d1b7e Auto merge of #14361 - nox:write, r=jdm
Implement document.write (fixes #3704)

<!-- 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/14361)
<!-- Reviewable:end -->
2016-11-29 04:18:43 -08:00
Anthony Ramine
4d93ee134c Implement document.write (fixes #3704)
This is a bit crude because of some missing utility methods on BufferQueue.
2016-11-28 23:05:56 +01:00
Anthony Ramine
c801327eab Rewrite how parser handles script scheduling 2016-11-26 22:58:20 +01:00
Bobby Holley
992f7dddf4 Bug 1317016 - Basic infrastructure for RestyleHint-driven traversal.
MozReview-Commit-ID: 7wH5XcILVmX
2016-11-24 17:07:38 -08:00
Pu Xingyu
74fa801b03 script: Fix the scroll to top behavior
When finding the indicated fragment, do not use the document element to indicate
the top of the Document, and when scrolling to the frament and we do not find a
element, scrolling the top if the fragment is empty or equal to "top".
2016-11-24 00:44:09 +08:00
Simon Sapin
b203ab2419 Rename selector_impl.rs to selector_parser.rs
This makes it consistent with an upcoming update of the selectors crate.
2016-11-20 15:30:37 +01:00
Pu Xingyu
5287e70829 Minor fixes and update test expectations 2016-11-20 06:30:10 +08:00
Pu Xingyu
9863149043 Move fragment navigation into Document object
Move the `check_and_scroll_fragment()` method into Document, make the
mothod set the fragment of url after navigation, and use the
`perform_a_scroll()` method to scroll rather than an individual
method. Also removes the broken `Window.fragment` fields.
2016-11-18 12:33:30 +08:00
Pu Xingyu
eca8f1d0b4 Make 'Document.url' field mutable
Use DOMRefCell as the type of the url field.
2016-11-18 12:29:02 +08:00
bors-servo
22aebdf5d4 Auto merge of #14246 - emilio:servo-url, r=SimonSapin
Urlmageddon

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

Still needs a bunch of code in net to be converted in order to get more
advantage of this for images and stuff, but meanwhile this should help quite a
bit with #13778.

Still wanted to get this in.

r? @SimonSapin

<!-- 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/14246)
<!-- Reviewable:end -->
2016-11-17 15:34:47 -06:00
bors-servo
e4a27c4d16 Auto merge of #14214 - bholley:dirtiness_overhaul, r=emilio
Overhaul dirtiness handling in Servo to prepare for the new incremental restyle architecture

<!-- 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/14214)
<!-- Reviewable:end -->
2016-11-17 12:25:52 -06:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
bors-servo
f70fc6644d Auto merge of #14096 - fflorent:11485-make-dom-methods-taking-mut-JSContent-unsafe, r=nox
11485 make dom methods taking mut js content unsafe

This is a rebased version of PR #11595

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because: no code logic was changed

<!-- 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/14096)
<!-- Reviewable:end -->
2016-11-17 02:44:54 -06:00
Bobby Holley
f1043f6305 Track all node damage with PendingRestyles. 2016-11-16 12:09:47 -08:00
Bobby Holley
0547a6b313 Expand the role of modified_elements to include explicit restyle hints and damage.
This will take the place of setting IS_DIRTY and HAS_CHANGED.
2016-11-15 10:51:14 -08:00
Manish Goregaokar
177d6fa4ee Support basic immutable CSSOM 2016-11-15 06:56:18 -08:00
Abelardo E. Mendoza
b372e7c98f script creates methods taking '*mut JSContext' unsafe
rebase + marked the necessary new code as unsafe
2016-11-14 11:06:17 +01: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