Commit graph

118 commits

Author SHA1 Message Date
Ms2ger
bd92d57c35 servo: Merge #11656 - Reduce the amount of dom code used outside the script crate (from Ms2ger:reduce-dom-exposure); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 1e3edf3ca454b91dfdc267c5b2f4347eda9b7cb6
2016-06-07 11:09:14 -05:00
Rafael Quintero
ec88ba13f2 servo: Merge #11605 - Rename the variants of the SubmittedFrom and ResetFrom enums to be less repetitive (from rafaqtro:local_r); r=KiChjang,emilio
<!-- Please describe your changes on the following line: -->

delete suffixes for variants SubmittedFrom, ResetFrom

---
<!-- 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 #11557 (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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: a8c1cb39713697c12831b38985f1e5a9c576c37c
2016-06-04 09:22:34 -05:00
Keith Yeung
e27e8db18f servo: Merge #11564 - Clean up DOMManipulationTaskSource (from KiChjang:dom-manipulation-task-source); r=jdm
- [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 refactoring

Source-Repo: https://github.com/servo/servo
Source-Revision: e8cf789fc56dfbc4bfd6145d3bd1a30aa9459c95
2016-06-02 15:38:55 -05:00
Zhen Zhang
7a309c887c servo: Merge #11221 - Add file backend support for Blob and related (from izgzhen:blob-file-backend); r=Manishearth
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [x] These changes fix #10851, related to #11131
- [x] These changes do not require tests because the implementation is partial and can't work alone

1. Add new backend to `Blob` and a `BlobImpl` struct to abstract multiple backends
2. Rewrite most interfaces of `Blob` to accommodate the change
3. Change the `read` behaviour of `FileReader`, considering the case when blob is file-backed and not cached

The design is still immature, welcome comments!

- [x] I used `DOMRefCell` to cache the bytes in `BlobImpl`, is it sound?
- [x] The interfaces (like `BlobImpl::get_bytes`) handle requests in a default-to-empty way when the inner `DataSlice` is not cached. It might be possible to handle this condition better.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3d7b17681dc9c20358fda9efc72575feb968cc81
2016-06-01 05:09:21 -05:00
Anthony Ramine
5aa3cb5ed3 servo: Merge #11326 - Move DOMString back to script (from nox:non-geckolib); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 6abcd793d780369767385b01b02ee725d6b10585
2016-05-24 02:07:29 -07:00
Manish Goregaokar
9912f2cea8 servo: Merge #11333 - Include <button type=submit> data whilst constructing the form dataset (from Manishearth:submit-submit-button); r=nox
This makes it possible to close things in github (see
https://github.com/Manishearth/mitochondria/issues/1)

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

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

Source-Repo: https://github.com/servo/servo
Source-Revision: de79f967752c91ddd4f6eab8f2f4135572f305fa
2016-05-23 04:18:09 -07:00
Zhen Zhang
d77fd07ddc servo: Merge #11225 - Implement file related functionalities in htmlinputelement and related (from izgzhen:patch-input-element-file); r=Manishearth
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [x] These changes is related to #11131
- [x] These changes do not require tests because it is a partial implementation

1. Improve the `filemanager_thread` by adding type string and create `SelectedFile`
2. Fill several gaps in `htmlinputelement` implementation related to file type
3. Improve the `File` interface to accommodate the above changes
4. Integrate changes introduced by PR #11189

Source-Repo: https://github.com/servo/servo
Source-Revision: 7cea4eb01ce3b84ca276ca417d933fb122005b51
2016-05-23 01:10:46 -07:00
Per Lundberg
28632dc3a1 servo: Merge #11192 - Removed unused imports (from perlun:remove-unused-imports); r=Manishearth
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11185
- [X] These changes do not require tests because it only removes dead code.

----

This fixes #11185.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2c674d0397927ef6563feb70e54f46815af55600
2016-05-15 15:41:16 -07:00
Keith Yeung
e9fa874e6b servo: Merge #10953 - Implement text/plain form encoding (from KiChjang:text-plain-encoding); r=jdm
Fixes #3649.

Source-Repo: https://github.com/servo/servo
Source-Revision: 641b374f0b752671207d21941c3e5ff4e681d706
2016-05-11 19:43:37 -07:00
Connor Brewster
336550651a servo: Merge #11020 - Fix formsubmitter methods for buttons (from cbrewster:fix_button_formsubmitter_methods); r=KiChjang
Fixes #11015
Fixes #11014

Source-Repo: https://github.com/servo/servo
Source-Revision: 15c5c81b1f025ad66f9eb000d1ac583dadc510f9
2016-05-05 07:48:40 -07:00
Keith Yeung
570d798ed2 servo: Merge #10712 - Support form submission of multipart/form-data (from KiChjang:multipart-form-data); r=jdm
Fixes #7553.

Source-Repo: https://github.com/servo/servo
Source-Revision: 77cb2ca89a87829e7e95fad17ae698c4ae097455
2016-04-30 18:43:30 -07:00
Keith Yeung
4afedbf0a7 servo: Merge #10890 - Remove extraneous script_chan parameter from Trusted::new (from servo:trusted); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 78e23f4c9b54c51012c672839545682b38455d67
2016-04-28 01:57:52 -07:00
Rebecca
c6a0cc3d7f servo: Merge #10696 - Referer header (from rebstar6:referrerPolicy); r=jdm
PR1 for https://github.com/servo/servo/issues/10311

This puts the code and data structures in place to set the Referer header based on the Referrer Policy for a given document. Note that document:: get_referrer_policy() always returns the 'No Referrer' option, so for now, this should have no impact on production code, and that policy requires that the Referer header is not added.

Later PRs will determine the policy and edit that get_referrer_policy() accordingly.

Source-Repo: https://github.com/servo/servo
Source-Revision: 34900814fca3b21fbb27bed58d4f4af8a8e307e9
2016-04-25 13:52:01 -07:00
Simon Sapin
15f5299fe5 servo: Merge #9840 - Update to rust-url 1.0 (from servo:url-1.0); r=asajeffrey
**Do not merge yet:** rust-url 1.0 is not published yet and may still get breaking changes. The goal of this PR for now is to demonstrate API usage.

Depends on:

* <s>https://github.com/servo/rust-url/pull/176</s>
* <s>https://github.com/alexcrichton/cookie-rs/pull/42</s>
* <s>https://github.com/hyperium/hyper/pull/740</s>
* https://github.com/cyderize/rust-websocket/pull/70
* https://github.com/jgraham/webdriver-rust/pull/28

Source-Repo: https://github.com/servo/servo
Source-Revision: 84ab7e9fe8f4a6528995eff3eb6e814cb724c364
2016-04-23 11:28:31 -07:00
Zbynek Winkler
c70e781908 servo: Merge #10751 - Report lines starting with && in tidy (from zwn:tidy-start-operator); r=Wafflespeanut
Partial implementation of the issue #10692 (the easy part).

Source-Repo: https://github.com/servo/servo
Source-Revision: d926b5d3762a101d5280266f806f2b979f73b695
2016-04-22 10:40:06 -07:00
Keith Yeung
36fd3b91c3 servo: Merge #10522 - Various cleanups in HTMLInputElement (from KiChjang:input-cleanup); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: 934ae41fc982058048f460a77687ab026c9a909f
2016-04-12 07:27:38 +05:01
Corey Farwell
4db88605d6 servo: Merge #10514 - Various 'element.rs' cleanup (from frewsxcv:element-cleanup); r=KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: 5aa62b3621f4793c559f6c7eb77e06259b0a00ea
2016-04-11 08:58:11 +05:01
Rahul Sharma
2c5ce6248a servo: Merge #10342 - Refactors some entities from script_thread into script_runtime (from creativcoder:script-runtime-module); r=Ms2ger
Fixes #10271.

Source-Repo: https://github.com/servo/servo
Source-Revision: 883cde424b61f4a06d52da5448da0095503b29b8
2016-04-06 12:52:21 +05:01
Keith Yeung
f7c5861d34 servo: Merge #9217 - Redesign ScriptMsg to be more specific to DOMManipulationTaskSource (from KiChjang:dom-manipulation-msg); r=jdm
This is a large-ish PR that contains the following:
* A new directory is created under `components/script/` called `task_source`, which houses all the stuff for different task sources. Note that the ones that I have now aren't exhaustive - there are more task sources than just the generic ones.
* A `DOMManipulationTaskMsg` which eliminates some usage of `Runnable`s to fire events. Instead, they send event information to the `DOMManipulationTaskSource` and lets the `ScriptTask` handle all the event firing.
* Re-added `fn script_chan`, since I can't think of any other way to give `Trusted` values an appropriate sender.
* Rewrote step 7 of [the end](https://html.spec.whatwg.org/multipage/syntax.html#the-end) to make use of the `DOMManipulationTaskSource`

Partial #7959

Source-Repo: https://github.com/servo/servo
Source-Revision: 740965e39f4d62e5807d21734ed9a7a881eca392
2016-03-11 01:09:27 +05:01
Keith Yeung
ff3628a45f servo: Merge #8952 - Implement planned navigation (from KiChjang:planned-navigation); r=Manishearth
Fixes #3648.

Note that I have only implemented "mutate action URL" and "get action URL". The remaining ones can have E-less easy issues created for them.

Source-Repo: https://github.com/servo/servo
Source-Revision: fe70efe07f6d72665f10c752884e5705d5bdc600
2016-02-18 21:57:19 +05:01
Ms2ger
523467b043 servo: Merge #9571 - Remove the global argument to EventTarget::{fire_event, fire_simple_event} (from Ms2ger:fire); r=asajeffrey
Source-Repo: https://github.com/servo/servo
Source-Revision: 0124d90a6d1fb17a986b06825f8b3d2af0055144
2016-02-09 04:39:00 +05:01
Joshua Holmer
ef7e43368f servo: Merge #9404 - Update HTMLFormElement.length to be of type unsigned long (from shssoichiro:htmlformelementlength); r=nox
Fixes #9402

Source-Repo: https://github.com/servo/servo
Source-Revision: a9147275413a1a83ab737f0188a283b2a7dedb85
2016-01-22 22:24:53 +05:01
Corey Farwell
f48992dccf servo: Merge #9242 - HTMLFormElement::Elements should honor [SameObject] attribute (from frewsxcv:form-elements-sameobject); r=ecoal95
Ideally, this would get tested by web-platform-tests, but that has yet
to be implemented:

https://github.com/w3c/web-platform-tests/issues/2462

Source-Repo: https://github.com/servo/servo
Source-Revision: 4d8d6bf7ff286a0257a3f42ea514f305670b6c15
2016-01-11 04:50:56 +05:01
Corey Farwell
f298178c46 servo: Merge #9241 - Implement HTMLFormElement::Length (from frewsxcv:htmlformelement-length); r=ecoal95
Source-Repo: https://github.com/servo/servo
Source-Revision: 4056716ecdf5382eadf5866f7ac08ee49dcda8bb
2016-01-11 01:34:49 +05:01
Corey Farwell
5fe7a9ed43 servo: Merge #9237 - Implement HTMLFormElement::Elements (from frewsxcv:htmlformelement-elements); r=KiChjang
Fixes #8566

Source-Repo: https://github.com/servo/servo
Source-Revision: 99d01422931cee3ee0b51d7546796de6d09fb7a0
2016-01-10 22:26:15 +05:01
rohan.prinja
d440ee6a41 servo: Merge #9201 - task -> thread (from ajnirp:8512-task-thread); r=jdm
for #8512

Source-Repo: https://github.com/servo/servo
Source-Revision: d3e2f94f2024f4735f836588ed11303a0abafdf8

--HG--
rename : servo/components/canvas/canvas_paint_task.rs => servo/components/canvas/canvas_paint_thread.rs
rename : servo/components/canvas/webgl_paint_task.rs => servo/components/canvas/webgl_paint_thread.rs
rename : servo/components/compositing/compositor_task.rs => servo/components/compositing/compositor_thread.rs
rename : servo/components/gfx/font_cache_task.rs => servo/components/gfx/font_cache_thread.rs
rename : servo/components/gfx/paint_task.rs => servo/components/gfx/paint_thread.rs
rename : servo/components/layout/layout_task.rs => servo/components/layout/layout_thread.rs
rename : servo/components/net/image_cache_task.rs => servo/components/net/image_cache_thread.rs
rename : servo/components/net/resource_task.rs => servo/components/net/resource_thread.rs
rename : servo/components/net/storage_task.rs => servo/components/net/storage_thread.rs
rename : servo/components/net_traits/image_cache_task.rs => servo/components/net_traits/image_cache_thread.rs
rename : servo/components/net_traits/storage_task.rs => servo/components/net_traits/storage_thread.rs
rename : servo/components/script/script_task.rs => servo/components/script/script_thread.rs
rename : servo/components/util/task.rs => servo/components/util/thread.rs
rename : servo/tests/unit/gfx/font_cache_task.rs => servo/tests/unit/gfx/font_cache_thread.rs
rename : servo/tests/unit/net/resource_task.rs => servo/tests/unit/net/resource_thread.rs
rename : servo/tests/unit/util/task.rs => servo/tests/unit/util/thread.rs
2016-01-10 15:20:04 +05:01
Brandon Fairchild
3820fe771d servo: Merge #9193 - Rename fire_simple_event_params to fire_event in eventtarget.rs (from nerith:fire_event); r=KiChjang
Fixes #9180.

Source-Repo: https://github.com/servo/servo
Source-Revision: 083d3e0201772918d040a6eb12e87c03fd443587
2016-01-08 22:05:14 +05:01
Guillaume Gomez
c2448b55aa servo: Merge #9146 - Generate PartialEq automatically (from GuillaumeGomez:generate_partial_eq); r=nox
r? @nox

Fixes #8804

Source-Repo: https://github.com/servo/servo
Source-Revision: 1096183cceea9ec78ab02caa33ee2d14668d977d
2016-01-04 00:08:10 +05:01
Johannes Linke
38405ee47e servo: Merge #9123 - Fix a bunch of clippy lints (from karyon:clippy_cleanup); r=Manishearth
This fixes about 130 clippy lints. Let me know if i should split up the commit.

I wasn't sure about some of the changes, especially map_or instead of map(...).unwrap_or(...) and if let instead of single arm match were not always a strict improvement in my opinion, but i'll leave that decision to the reviewer :)

There are about 150 lints left which i thought were clippy bugs or i didn't know how to fix.

cc @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 9da739acefc7d1776bf727c8bf782eb79f241028
2016-01-03 08:47:34 +05:01
Nicolas
0f30129cdd servo: Merge #7919 - form submission for <textarea> and <select> (from 6112:master); r=nox
Fixes #7849.
Fixes #7850.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3d969e429d2cf92ae9c548bedc688a5175322854
2015-12-30 23:29:40 +05:01
Simon Martin
6f8d33fe11 servo: Merge #9055 - Issue #9042: Report incorrect number of spaces around => in the style checker (from simartin:issue_9042); r=Wafflespeanut
Fixes https://github.com/servo/servo/issues/9042

Source-Repo: https://github.com/servo/servo
Source-Revision: f77c7928868469ef4f326a269147ae2aee6151ee
2015-12-24 10:26:48 +05:01
Arthur Skobara
4db2f3646f servo: Merge #9030 - Add helper method HTMLFormElement::fire_event (from askobara:refactoring-add-htmlformelement-fire_event); r=Manishearth
Fixes #8777

Source-Repo: https://github.com/servo/servo
Source-Revision: dafdc856ac3fc2bd000e61bdcaed2c024828de0c
2015-12-22 22:09:19 +05:01
Mathieu Agopian
2ee894fb9d servo: Merge #9019 - Use Url.join instead of UrlParser.base_url(...).parse (#9002) (from magopian:9002-use-url.join); r=SimonSapin
Fix issue #9002

Source-Repo: https://github.com/servo/servo
Source-Revision: f9141ef2db693518fef676740f25abee3b938cac
2015-12-19 01:29:56 +05:01
Ms2ger
a70f14b6a0 servo: Merge #9010 - Silence warnings in htmlformelement.rs (from Ms2ger:warnings); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 22e1ccae37172851decea097284a3f6cb5464c71
2015-12-18 14:47:32 +05:01
Keith Yeung
3cf5f15b06 servo: Merge #8747 - Implement basic framework for static and interactive validation on forms (from KiChjang:form-interactive-validation); r=Manishearth
This came along when I was trying to do #3648. I was about to do form validation as well, but then I saw it was actually intended to be a student project. Hopefully I didn't step on too many toes on this one; I did leave most of the important bits out (the fun bits I believe, e.g. interactive validation doesn't actually interactively validate anything right now).

Source-Repo: https://github.com/servo/servo
Source-Revision: d9bf1ba616b6b30f800aaa388745c2fcda9e784e
2015-12-17 05:12:45 +05:01
Arthur Skobara
6167240f11 servo: Merge #8955 - Add comments for the "Constructing the form data set" algorithm (from askobara:docs-htmlformelement-get_form_dataset); r=waffles
Fixes #7852

Source-Repo: https://github.com/servo/servo
Source-Revision: 1d7f296fb8263490ebbcdac371f671ef15a36665
2015-12-14 13:32:25 +05:01
Corey Farwell
8c454ce7ad servo: Merge #8930 - Pass around event types as Atoms instead of Strings (from frewsxcv:event-type-atom); r=nox
`Event` internally stores the `type` as an `Atom`, and we're `String`s
everywhere, which can cause unnecessary allocations to occur since
they'll end up as `Atom`s anyways.

Source-Repo: https://github.com/servo/servo
Source-Revision: 99fd946130c9f06433b47c7f60241d5f7ad14a5b
2015-12-11 20:43:35 +05:01
Simon Martin
35f7464d57 servo: Merge #8293 - Issue #8113: Support file, about and data schemes as form action (from simartin:issue_8113); r=jdm
Fix https://github.com/servo/servo/issues/8113 by supporting those schemes as form action and unit test the "about:blank" case

Source-Repo: https://github.com/servo/servo
Source-Revision: 18f74a3d69fc7ef0a3dabb5551d7d5a7eb973439
2015-12-03 22:19:46 +05:01
Eli Friedman
70ebd13eff servo: Merge #8786 - Remove unnecessary conversion to/from DOMString for localName (from eefriedman:localname-atom); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 63762d2b52ee6026216d304c8826bf8b4a5fdd20
2015-12-03 14:36:22 +05:01
Eli Friedman
ab5455716f servo: Merge #8703 - Compute attribute name atoms at compile-time (from eefriedman:dom-getter-setter-atom); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: eadaf30af396857535ad15b269bcba4f58e1ff9a
2015-11-28 20:11:07 +05:01
Alan Jeffrey
f8093754b7 servo: Merge #8477 - Opaque DOMString (from asajeffrey:opaque-domstring); r=asajeffrey
This patch makes DOMString an opaque wrapper round String (currently it's a transparent wrapper).

The changes are:

* Replacing DOMString(foo) by DOMString::from(foo).
* Replacing foo.0 by String::from(foo).
* Adding functions clear, push_str and extend for in-place mutation of DOMStrings.
* Replacing DOMString by String in other threads (devtools, storage and filereader).
* Making DOMString implement !Send.
* Removing the pub attribute from the contents of DOMString.

This enables experimenting with other string representations in the DOM.

Source-Repo: https://github.com/servo/servo
Source-Revision: 62acdd303b78951885c2c90747b31f318907d6c9
2015-11-13 06:48:30 +05:01
Ms2ger
7cb2a13f43 servo: Merge #8312 - Make DOMString a newtype around String, rather than a typedef (from Ms2ger:DOMString); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: abfd1fb1bf071961bc8a581927eaa96a2d3e2cba
2015-11-04 16:18:41 +05:01
David Zbarsky
ed7fd17b12 servo: Merge #8305 - Get rid of a bunch of explicit derefs (from dzbarsky:roots); r=Ms2ger,
Source-Repo: https://github.com/servo/servo
Source-Revision: 4b9fa13f2f6a1aa38d180367426498f01f6414c9
2015-11-04 10:34:54 +05:01
rohan.prinja
e8b504412b servo: Merge #8221 - move modules around (from ajnirp:8130-reorganise); r=jdm
for #8130

Source-Repo: https://github.com/servo/servo
Source-Revision: daad09d44245228fba9118316937add71bec7c58
2015-11-04 02:27:02 +05:01
Anthony Ramine
bb8125a3da servo: Merge #8041 - Introduce trait Castable (from nox:castable); r=jdm
Removes all those messy FooCast structures in InheritTypes.rs.

Source-Repo: https://github.com/servo/servo
Source-Revision: 674589c370d978f543e71f995d58c5b28e6e9842
2015-10-21 07:57:32 -06:00
Adam Szopa
7ecd87862f servo: Merge #8099 - Remove explicit lifetimes which can be elided (from Darktori:master); r=mbrubeck
Fixes https://github.com/servo/servo/issues/8069

Source-Repo: https://github.com/servo/servo
Source-Revision: 941c06eb99533c6c1d55b4ad3b51804badf48a23
2015-10-20 17:30:57 -06:00
Bobby Holley
ad33b14737 servo: Merge #7935 - Move event state from Node to Element (from bholley:eventstate_element); r=nox
Just getting my feet wet with Rust here. Please feel free to nit the hell out of it stylistically and idiomatically. :-)

Source-Repo: https://github.com/servo/servo
Source-Revision: ff2151b8bbc62fa29c90a429b7a4f12520420b6e
2015-10-19 02:47:21 -06:00
Anthony Ramine
06fd534a1b servo: Merge #8020 - Generate all Derived implementations in codegen (from nox:codegen-derived); r=Ms2ger
Follow-up of #7873.

@Ms2ger r? :)

Source-Repo: https://github.com/servo/servo
Source-Revision: 417cf5738e4609f4b2e34e9e0c4f7ef68f087432
2015-10-15 12:53:08 -06:00
Anthony Ramine
d5038d123e servo: Merge #7873 - Generate the various TypeId enums in codegen (from nox:codegen-typeid); r=Ms2ger
This frees us forever from caring about maintaining these enums. The last commit removes their use from the initialisation of interface objects derived from Node.

Source-Repo: https://github.com/servo/servo
Source-Revision: 32daa17d5cbcad02db0713e21e52410cdc60480e
2015-10-14 12:47:48 -06:00
Anthony Urena
d38f437e11 servo: Merge #7892 - Refactor html form dataset collection (from anthgur:form-data-refactor); r=jdm
Factor out FormDatum collection for `<input>`
Improve early return logic for getting the FormDatum from an `<input>`
Condense element type patterns

Proposed to close #7851

Source-Repo: https://github.com/servo/servo
Source-Revision: 94dc98717b79c12cdac6b1eba72227199850ac31
2015-10-07 08:32:44 -06:00