Commit graph

516 commits

Author SHA1 Message Date
Michael Howell
d86b5f936b servo: Merge #12862 - added dom obj counting to decide sequential/parallel layout (#10110) (from servo:layout-new); r=emilio
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

Source-Repo: https://github.com/servo/servo
Source-Revision: 0fe94a6724a42da8f02a60d1efe18fdfc96885ae
2016-12-07 14:32:20 -08:00
Anthony Ramine
db21c41983 servo: Merge #14473 - Clean up JSTraceable and how we use it (from nox:raf-safety); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 32c121b6ff4a3f9336e742ecf1a96b187986fde0
2016-12-06 18:31:46 -08:00
Martin Robinson
6017bd9b4b servo: Merge #14367 - Reimplement scrolling to fragments (from mrobinson:scroll-fragment-point); r=pcwalton
<!-- 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.

Source-Repo: https://github.com/servo/servo
Source-Revision: a0619688a638b322f17d2034e0309502af1a5e52
2016-12-06 14:42:00 -08:00
Anthony Ramine
45df216ae8 servo: Merge #14423 - Properly mark application/xhtml+xml documents as XML (from nox:xml-document); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 5abbc9f69668f23469a9c01937c68e305fa36cd8
2016-12-01 03:57:14 -08:00
Anthony Ramine
8a68e5aa5a servo: Merge #14376 - Make WebIDL static items take a more specific global if possible (from nox:specialized-constructors); r=KiChjang,nox
Source-Repo: https://github.com/servo/servo
Source-Revision: e315da07319c115bd85f7da1baa1cf0577a1980b
2016-11-30 15:43:48 -08:00
Anthony Ramine
61cbd1a9f8 servo: Merge #14361 - Implement document.write (fixes #3704) (from nox:write); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 00f30d1b7e0073cd7896eee12ca3832c017993a0
2016-11-29 04:18:43 -08:00
Bobby Holley
62e95664e4 servo: Merge #14300 - stylo: Basic infrastructure for RestyleHint-driven traversal (from bholley:restyle_driven_traversal); r=emilio
Gecko Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=131701

(Don't review yet, will flag on the gecko bug when the time comes)

Source-Repo: https://github.com/servo/servo
Source-Revision: d98abaec20e624aa89a3abddf4cf2a6399951ef1
2016-11-25 09:00:44 -08:00
Pu Xingyu
54e0d4829f servo: Merge #14341 - script: Fix the scroll to top behavior (from stshine:where-is-the-top); r=mrobinson,emilio
<!-- Please describe your changes on the following line: -->

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".

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

<!-- 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: 61a225bab0d82dd9a4e3b1cec910e78a02cf875a
2016-11-23 21:51:20 -08:00
Simon Sapin
c839f3f401 servo: Merge #14294 - Rename a few source files (from servo:renames); r=Wafflespeanut
<!-- 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 _____

<!-- 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: 68b1d1d2860ac6c6e8c1c0dfe46af6790ca01dc8

--HG--
rename : servo/components/style/gecko/selector_impl.rs => servo/components/style/gecko/selector_parser.rs
rename : servo/components/style/selector_impl.rs => servo/components/style/selector_parser.rs
rename : servo/components/style/servo/selector_impl.rs => servo/components/style/servo/selector_parser.rs
rename : servo/components/style/selector_matching.rs => servo/components/style/stylist.rs
rename : servo/tests/unit/style/selector_matching.rs => servo/tests/unit/style/stylist.rs
2016-11-20 09:21:52 -06:00
Pu Xingyu
8f506067e0 servo: Merge #13418 - Make document url mutable and implement location.replace() (from stshine:location-replace); r=KiChjang
<!-- 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 #13413 (github issue number if applicable).

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

<!-- 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: 72e4c6dc21c132d49cf0a5f68a3ba45d16cc8322
2016-11-20 02:27:54 -06:00
Emilio Cobos Álvarez
9747761479 servo: Merge #14246 - Urlmageddon (from emilio:servo-url); r=SimonSapin
<!-- 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

Source-Repo: https://github.com/servo/servo
Source-Revision: 22aebdf5d41a3509cd6515ccf5edcdf33715a76d
2016-11-17 15:34:47 -06:00
Bobby Holley
484461d581 servo: Merge #14214 - Overhaul dirtiness handling in Servo to prepare for the new incremental restyle architecture (from bholley:dirtiness_overhaul); r=emilio
Source-Repo: https://github.com/servo/servo
Source-Revision: e4a27c4d16ee0e80ccd4ffd97a93c2b2a4f05391
2016-11-17 12:25:52 -06:00
Abelardo E. Mendoza
7269bcf046 servo: Merge #14096 - 11485 make dom methods taking mut js content unsafe (from fflorent:11485-make-dom-methods-taking-mut-JSContent-unsafe); r=nox
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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: f70fc6644ddb142627c188ebbde2cc0a0282f9b4
2016-11-17 02:44:54 -06:00
Manish Goregaokar
d8a79aa1af servo: Merge #14190 - Immutable CSSOM (from Manishearth:cssom); r=SimonSapin
This PR is intended to add basic support for all CSSOM interfaces, with the ability to index `document.styleSheets` and css rule lists, and serializing individual css rules. Handling individual interface methods for CSSRule subclasses can probably be done with easy/medium bugs.

Mutation safety isn't dealt with here; if the css rule list is mutated the CSSOM will be in an inconsistent state. I intend to deal with this via zero sized tokens, see https://groups.google.com/forum/#!topic/mozilla.dev.servo/AnxJoVmtMXQ .  I'll handle that when I start making the CSSOM mutable. (Getting the immutable bit landed first opens this up for easy bugs)

This doesn't really change style aside from adding an extra arc in the CSS rule list as discussed in the linked thread. So far this same design can be used by stylo as well when the time comes.

f? @SimonSapin @emilio

cc @upsuper

part of #11420
Todo:

 - [x] Stubs for rest of the CSSRule subclasses
 - [x] <s>ToCSS impls for CSSRules.</s> May make into easy bugs and stub out in this PR https://github.com/servo/servo/issues/14195
 - [x] Cache CSSStyleSheet on the relevant node

Source-Repo: https://github.com/servo/servo
Source-Revision: afc60bee2809059b8b754a1c6d6d10c1d36326fb
2016-11-16 15:05:59 -06:00
Bobby Holley
bc86bdcc31 servo: Merge #14034 - incremental restyle: Use more concrete types in the style system (from bholley:more_concrete_types); r=emilio
We need to hang both snapshots and restyle damage off of ElementData, and so we need them to be concrete to avoid infecting ElementData with the trait hierarchy.

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

--HG--
rename : servo/resources/shaders/debug_color.fs.glsl => servo/components/style/servo/mod.rs
rename : servo/components/script_layout_interface/restyle_damage.rs => servo/components/style/servo/restyle_damage.rs
rename : servo/components/style/servo_selector_impl.rs => servo/components/style/servo/selector_impl.rs
2016-11-07 16:31:10 -06:00
gurudarshan266
6efb224e77 servo: Merge #14059 - Network Security : Implement StrictOrigin and StrictOriginWhenCrossOr… (from mrnayak:refPolicy); r=nox
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: dd34b2a3355dc7fa23d118888359d70f8b445db8
2016-11-07 04:37:35 -06:00
Maciej Skrzypkowski
990ddaaabf servo: Merge #14047 - fix getElementsByTagName() (from mskrzypkows:getElementsByTagName); r=nox
<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: cfef68f92d1c8cdc928d3c0b60f22de4b40a97be
2016-11-04 12:41:22 -05:00
Corey Farwell
dae55a7be9 servo: Merge #14036 - A couple improvements to EventTarget event firing (from frewsxcv:event); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 73c9847ef81e838c970e44c1645209134fddd32e
2016-11-04 06:43:56 -05:00
Ms2ger
8f63ddaa76 servo: Merge #13816 - Move some types out of msg (from servo:msg-crate); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: be58dc36e85414a4d47e6c69f1dd520d300cb50c
2016-11-04 05:26:27 -05:00
Alan Jeffrey
65e4918470 servo: Merge #13646 - Script lookup iframes by frameid (from asajeffrey:script-lookup-iframes-by-frameid); r=ConnorGBrewster
<!-- Please describe your changes on the following line: -->

Lookup iframes by `FrameId` rather than `PipelineId`. This should make lookup much more reliable, since the frame id doesn't change.

cc @ConnorGBrewster @aneeshusa
---

<!-- 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 do not require tests because refactoring

<!-- 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: ce725c9475b9fb97a8559b29c1e7a080633cd002
2016-11-03 18:11:05 -05:00
Simon Sapin
7cb2f9a2dc servo: Merge #14043 - Update to string-cache 0.3 (from servo:string-cache-up); r=nox
Previously, `string-cache` defined:
*  An string-like `Atom` type,
* An `atom!("foo")` macro that expands to a value of that type, for a set of strings known at compile-time,
* A `struct Namespace(Atom);` type
* A `ns!(html)` macro that maps known prefixed to `Namespace` values with the corresponding namespace URL.

Adding a string to the static set required making a change to the `string-cache` crate.

With 0.3, the `Atom` type is now generic, with a type parameter that provides a set of static strings. We can have multiple such sets, defined in different crates. The `string_cache_codegen` crate, to be used in build scripts, generates code that defines such a set, a new atom type (a type alias for `Atom<_>` with the type parameter set), and an `atom!`-like macro.

The html5ever repository has a new `html5ever_atoms` crate that defines three such types: `Prefix`, `Namespace`, and `LocalName` (with respective `namespace_prefix!`, `namespace_url!`, and `local_name!` macros). It also defines the `ns!` macro like before.

This repository has a new `servo_atoms` crate in `components/atoms` that, for now, defines a single `Atom` type (and `atom!`) macro. (`servo_atoms::Atom` is defined as something like `type Atom = string_cache::Atom<ServoStaticStringSet>;`, so overall there’s now two types named `Atom`.)

In this PR, `servo_atoms::Atom` is used for everything else that was `string_cache::Atom` before. But more atom types can be defined as needed. Two reasons to do this are to auto-generate the set of static strings (I’m planning to do this for CSS property names, which is the motivation for this change), or to have the type system help us avoid mix up unrelated things (this is why we had a `Namespace` type ever before this change).

Introducing new types helped me find a bug: when creating a new attribute `dom::Element::set_style_attr`, would pass `Some(atom!("style"))` instead of `None` (now `Option<html5ever_atoms::Prefix>` instead of `Option<string_cache::Atom>`) to the `prefix` argument of `Attr::new`. I suppose the author of that code confused it with the `local_name` argument.

---

Note that Stylo is not affected by any of this. The `gecko_string_cache` module is unchanged, with a single `Atom` type. The `style` crate conditionally compiles `Prefix` and `LocalName` re-exports for that are both `gecko_string_cache::Atom` on stylo.

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 5b4cc9568dbd5c15e5d2fbc62719172f11566ffa
2016-11-03 11:19:44 -05:00
Ms2ger
3e9051996f servo: Merge #13741 - Remove some unused support for the legacy network stack in script (from servo:fetch-doc-unused); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 740464df8af6e0f167bafa1a760078e420172eb7
2016-10-13 09:55:00 -05:00
Anthony Ramine
cf69fd522f servo: Merge #13647 - Unify all rooting traits under RootedReference (from nox:rootedreference); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: cf2a6475cb3d7d98b925e7a235ebf36f6abe883d
2016-10-11 17:00:55 -05:00
Anthony Ramine
4adf074ce8 servo: Merge #13675 - Clean up the parsers into a single interface (from nox:servoparser); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 928e5ad1e5ca4344e69cd8029749ecb623eabd9f

--HG--
rename : servo/components/script/parse/html.rs => servo/components/script/dom/servoparser/html.rs
rename : servo/components/script/parse/xml.rs => servo/components/script/dom/servoparser/xml.rs
rename : servo/components/script/dom/webidls/ServoXMLParser.webidl => servo/components/script/dom/webidls/ServoParser.webidl
2016-10-11 10:16:23 -05:00
Glenn Watson
a2735cc232 servo: Merge #13633 - Send touch events to root pipeline, and allow forwarding to iframes (from glennw:forward-touch-events); r=mbrubeck
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9d3fc76463cb226ffeb9a6aca7239bbe36543802
2016-10-07 19:07:24 -05:00
Anthony Ramine
b95407a112 servo: Merge #13596 - Get rid of dom::bindings::global (from nox:inline); r=Ms2ger
Globals in that PR are now represented by the fake IDL interface `GlobalScope`.

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

--HG--
rename : servo/components/script/dom/webidls/ServoXMLParser.webidl => servo/components/script/dom/webidls/GlobalScope.webidl
2016-10-07 07:52:09 -05:00
Simon Sapin
da3297354f servo: Merge #13459 - Use parking_lot::RwLock for PropertyDeclarationBlock (from servo:no-arc-heapsize); r=emilio
<!-- 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. -->

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

--HG--
rename : servo/components/style/domrefcell.rs => servo/components/script/dom/bindings/cell.rs
2016-10-04 11:58:56 -05:00
Ms2ger
3562383730 servo: Merge #13571 - Simplify fetching code (from servo:simplify-fetching); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: b80769dbf5e8f0c59db353b8e0ee7e4d77813294
2016-10-04 08:05:44 -05:00
Adolfo Ochagavía
942bb79c00 servo: Merge #13397 - Return an enum instead of a boolean from dispatch_event (from aochagavia:dispatch-event); r=Ms2ger
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

Source-Repo: https://github.com/servo/servo
Source-Revision: 9b7708063aec5dbabc96cd93e16028e0ee6e14cd
2016-09-26 12:09:48 -05:00
Keith Yeung
b6928297e8 servo: Merge #12472 - Use fetch infrastructure to load external scripts (from KiChjang:use-fetch-in-script); r=jdm
Fixes  #9186.

Source-Repo: https://github.com/servo/servo
Source-Revision: f357afc94ac437c4323bcc4d46c2767ccef73b73
2016-09-21 18:49:33 -05:00
Ying-Ruei Liang(KK)
385e51da79 servo: Merge #12493 - Implement referrer policy delivery via noreferrer link relation (from TheKK:referrer_policy_dliver_via_rel); r=jdm
According to https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-delivery, there's `<a>`, `<link>` and `<area>` could apply this delivery method. This PR contains changes for `<a>` and `<link>` **but** not `<area>`, since HTMLAreaElement is barely implemented.

We should file another issue for it.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11862
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: 8a78e75d4314aa5ac770ec070a6ea7eed341e3ec
2016-09-20 17:42:11 -05:00
Arthur Marble
8c93f25e9f servo: Merge #13307 - Code refactoring (from bubbles231:code_refactor); r=Manishearth
<!-- Please describe your changes on the following line: -->
The code was refactored to follow Rust naming conventions better.

---
<!-- 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 help fix #12379.

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

<!-- 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: 5457b80233f9ce6773711c7189230d9a0a63d93a
2016-09-18 22:57:59 -05:00
Aneesh Agrawal
16d75f6b59 servo: Merge #11698 - Excise SubpageId and use only PipelineIds (from aneeshusa:remove-subpage-id); r=notriddle
<!-- Please describe your changes on the following line: -->

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.

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

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

<!-- 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: 161e0741cd4942d337b8d0fca2e0eaa86482ad9a
2016-09-14 01:45:56 -05:00
Sam Wood
63e9402da3 servo: Merge #13130 - 'dblclick' event (from samuknet:dblclick); r=nox
<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 67bfd0df4b11c5f81a6cc6041bfbc8317cd03d42
2016-09-10 08:46:13 -05:00
UK992
f8cb9971b7 servo: Merge #13205 - Tidy: Fix ordering use statements with braces (from UK992:tidy-sort); r=Wafflespeanut
This hack fixes https://github.com/servo/servo/issues/7412 and matches behavior with rustfmt.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3117787fd2a8b7748cfde1e9b8c5be3c00f2c599
2016-09-08 22:19:19 -05:00
Simon Sapin
ec40d2a379 servo: Merge #13134 - Add lots of Arc’s in style, and prepare for using DOMRefCell (from servo:archery); r=emilio
<!-- 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. -->

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

--HG--
rename : servo/components/script/dom/bindings/cell.rs => servo/components/style/domrefcell.rs
2016-08-31 16:30:56 -05:00
Anthony Ramine
1c0d09c584 servo: Merge #13100 - Use Option<T> to return from getters (from nox:better-getters); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 3649a356c8ddd04d3beebff9978b1bffa407c307
2016-08-31 04:10:42 -05:00
Emilio Cobos Álvarez
9c7ac5c04c servo: Merge #13132 - layout: Keep track of whether we've deferred the painting of the document due to a script query (from emilio:deferred-paint); r=pcwalton
<!-- 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 #13131

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

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

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: acb47007ba9494c73272494efe9ebd2c05e4c014
2016-08-30 21:05:56 -05:00
Martin Robinson
c116a510e2 servo: Merge #12817 - Update to euclid 0.8 (from servo:euclid); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 5b915c403d2e96bd2917e7df4f2a58a6668a0c0e
2016-08-11 20:12:29 -05:00
Emilio Cobos Álvarez
09bdc2cd2d servo: Merge #12813 - dom: getElementsFromPoint does the hit testing on viewport coordinates (from emilio:hit-test); r=notriddle
<!-- 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

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

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

We got this wrong (I think it wasn't my fault actually), I was just writing a test for #12777 when I found this.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4cefbcc94927a1c7cf12b188c4abbd63d7636e3d
2016-08-11 05:34:27 -05:00
Emilio Cobos Álvarez
64a444210a servo: Merge #12777 - layout: Take into account the client point for fixed positioned stacking contexts (from emilio:hit-test); r=pcwalton
<!-- 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 #12763 (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: 9b4b94aa755a04d4b9c9703574b01c03ad25a788
2016-08-10 18:50:33 -05:00
Josh Matthews
dc43a0a68f servo: Merge #11161 - Implement same-origin Window.postMessage (from jdm:postmessage2); r=Ms2ger
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:
- [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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 504954890e406b6e735fb17caa8e3454b17b8208
2016-08-04 06:46:33 -05:00
Steve Melia
1938063073 servo: Merge #11726 - Issue 7720: Add target selector and update when scrolling to fragment (from sjmelia:7720_add_target_selector); r=mbrubeck
<!-- Please describe your changes on the following line: -->
Add the target pseudo selector and set/unset it during scrolling to fragment. This change is not complete as no repaint is triggered after the selector is added - it will only take effect after a repaint is triggered by e.g. hovering over another element. (See manual test)

I would like some help because i'm not sure how to resolve this; I can only think to call window.reflow.

I added a manual test case, don't think this counts really! I think the applicable automated test is in /tests/wpt/web-platform-tests/dom/nodes/Element-matches.html but it currently fails, I think due to the above.

---
<!-- 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 #7720  (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: 7a7bdf51adc3c5051f93c8044797c8fcaf89953c
2016-08-03 14:53:30 -05:00
Emilio Cobos Álvarez
e6192bfc52 servo: Merge #12563 - stylo: Improve restyling performance (from emilio:stylo); r=bholley,jdm,pcwalton
This commit adds hooks to the Servo style traversal to avoid traversing all the
DOM for every restyle. Additionally it changes the behavior of the dirty flag to
be propagated top down, to prevent extra overhead when an element is dirtied.

This commit doesn't aim to change the behavior on Servo just yet, since Servo does extra job when dirtying the node related with DOM revision counters that might be necessary.

CC @asajeffrey for the DOM revision counters stuff. When a node is dirty, do all its descendants really need to increment the revision counter, or is this an unintended effect? My intuition is that this is hurting performance quite a lot for servo.

r? @bholley

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

<!-- Either: -->
- [x] These changes do not require tests because no geckolib tests yet.

<!-- 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: 944d371b8f0e72f6aa5465be38c0c8daeab66127
2016-07-27 17:56:26 -05:00
Emilio Cobos Álvarez
634c096b10 servo: Merge #12469 - style: Rewrite the restyle hints code to allow different kinds of element snapshots (from emilio:stylo); r=bholley
<!-- 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

<!-- Either: -->
- [x] These changes do not require tests because refactoring.

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

This is a rewrite for how style interfaces with its consumers in order to allow
different representations for an element snapshot.

This also changes the requirements of an element snapshot, requiring them to
only implement MatchAttr, instead of MatchAttrGeneric. This is important for
stylo since implementing MatchAttrGeneric is way more difficult for us given the
atom limitations. This also allows for more performant implementations in the
Gecko side of things.

I don't want to get this merged just yet, mainly because the stylo part is not
implemented, but I'd like early feedback from @bholley and/or @heycam: How do
you see this approach? I don't think we'll have much problem to implement
MatchAttr for our element snapshots, but... worth checking.

r? @heycam

Source-Repo: https://github.com/servo/servo
Source-Revision: 1e0321f7dde5f33f7d26bbd4f088622fa3660477
2016-07-21 16:54:34 -05:00
Alan Jeffrey
413d971d84 servo: Merge #12426 - Allow window elements as well as iframes to the the target of mozbrowser events (from asajeffrey:mozbrowser-event-targets); r=SimonSapin
<!-- Please describe your changes on the following line: -->
Allow mozbrowser events, in particular mozbrowsererror events, to target a window. Needed for https://github.com/browserhtml/browserhtml/issues/1182

---
<!-- 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 #12420
- [X] These changes do not require tests because we're not testing our issue reporting system, which this is intended for.

<!-- 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: b6c0ed9a44b076928ea816ca529702eec25d0029
2016-07-20 04:41:34 -05:00
Simon Sapin
c710b104be servo: Merge #12515 - Make the style crate more concrete (from servo:concrete-style); r=bholley
Background:

The changes to Servo code to support Stylo began in the `selectors` crate with making pseudo-elements generic, defined be the user, so that different users (such as Servo and Gecko/Stylo) could have a different set of pseudo-elements supported and parsed. Adding a trait makes sense there since `selectors` is in its own repository and has others users (or at least [one](https://github.com/SimonSapin/kuchiki)).

Then we kind of kept going with the same pattern and added a bunch of traits in the `style` crate to make everything generic, allowing Servo and Gecko/Stylo to do things differently. But we’ve also added a `gecko` Cargo feature to do conditional compilation, at first to enable or disable some CSS properties and values in the Mako templates. Since we’re doing conditional compilation anyway, it’s often easier and simpler to do it more (with `#[cfg(feature = "gecko")]` and `#[cfg(feature = "servo")]`) that to keep adding traits and making everything generic. When a type is generic, any method that we want to call on it needs to be part of some trait.

----

The first several commits move some code around, mostly from `geckolib` to `style` (with `#[cfg(feature = "gecko")]`) but otherwise don’t change much.

The following commits remove some traits and many type parameters through the `style` crate, replacing them with pairs of conditionally-compiled API-compatible items (types, methods, …).

Simplifying code is nice to make it more maintainable, but this is motivated by another change described in https://github.com/servo/servo/pull/12391#issuecomment-232183942. (Porting Servo for that change proved difficult because some code in the `style` crate was becoming generic over `String` vs `Atom`, and this PR will help make that concrete. That change, in turn, is motivated by removing geckolib’s `[replace]` override for string-cache, in order to enable using a single Cargo "workspace" in this repository.)

r? @bholley

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

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

<!-- 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: 2d01d41a506bcbc7f26a2284b9f42390d6ef96ab

--HG--
rename : servo/ports/geckolib/selector_impl.rs => servo/components/style/gecko_selector_impl.rs
rename : servo/ports/geckolib/values.rs => servo/components/style/gecko_values.rs
rename : servo/ports/geckolib/properties.mako.rs => servo/components/style/properties/gecko.mako.rs
2016-07-20 02:58:34 -05:00
Aravind Gollakota
78fcf243f3 servo: Merge #12441 - Implement referrer policy delivery by header (from aravind-pg:referrer-pol-header); r=jdm
Adds a new `Option<ReferrerPolicy>` field to Document and sets it appropriately in `ScriptThread::load` if a Referrer-Policy header is present.

r? @jdm

<!-- 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 #11860
- [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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: b382cc2103180f7dfd8df9c34970a95ed57a2d88
2016-07-15 11:25:43 -07:00
Nazım Can Altınova
19dce5ea54 servo: Merge #12416 - Implement Document.referrer (from canaltinova:referrer); r=jdm
<!-- 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 #12389 (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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 4b78b9adab916cc4fdde6248e785030b79f406da
2016-07-14 11:55:44 -07:00
Connor Brewster
e82a09e24a servo: Merge #12404 - Clean up task sources and make all tasks cancellable (from cbrewster:task_source_cleanup); r=asajeffrey
<!-- Please describe your changes on the following line: -->
This makes it so each task is a thin wrapper over a runnable and whenever a task is queued, it is automatically wrapped by the window's `runnable_wrapper`.

---
<!-- 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  #11703 (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: 3011d4b450b107f87fab54f6c59245ac1478fa79
2016-07-13 10:18:15 -07:00
Aravind Gollakota
6d41187f50 servo: Merge #11978 - Add "origin" and "same-origin" referrer policies, replacing "origin-only" (from aravind-pg:new-referrer-pols); r=jdm
<!-- 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 #11384
- [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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 37dbb502089a4b05eaaa53764a7f37cfe19523c9
2016-07-12 13:44:33 -07:00
Steve Melia
9118aca3be servo: Merge #11781 - Issue 8719: Add basic support for :active selector (from sjmelia:8719_support_for_css_active); r=Manishearth
<!-- Please describe your changes on the following line: -->
Added toggling of active state for element and parents on mousedown/mouseup. Active state is removed when mouseout. (hover)

- As with my other PR i'm struggling a bit with the automated testing. I've added a manual test case and found quirks-mode/active-and-hover-manual.html which - aside from also being a manual test, is functional in Firefox but does not render correctly in Servo.
- Not implemented: In Firefox, behaviour differs with a <!DOCTYPE HTML> and an anchor does not lose it's activation on mouseout; whereas a button does.

---
<!-- 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 #8719  (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: 5afdf7fb5c9a4c997a287f6d61ec05857f073ce2
2016-07-08 05:06:57 -07:00
Andrew Savchyn
8d8b714250 servo: Merge #12340 - Add name method for Runnable trait in DocumentProgressHandler (from Scorpil:document_progress_handler_runnable_name); r=KiChjang
<!-- 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 #12335

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's stated so in issue description.

<!-- 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: 2d9d47315f7ecef73f8437ca196e95aa33ce0c05
2016-07-08 02:23:16 -07:00
Josh Matthews
57518b13d8 servo: Merge #11950 - Support non-QWERTY keyboards (from jdm:keylayout2); r=emilio
Using the ReceivedCharacter event from glutin, we can obtain the actual key characters that the user is pressing and releasing. This gets passed to the script thread along with the physical key data, since KeyboardEvent needs both pieces of information, where they get merged into a single logical key that gets processed by clients like TextInput without any special changes.

Tested by switching my macbook keyboard to dvorak and looking at the output of keypress/keyup/keydown event listeners, as well as playing with tests/html/textarea.html. Non-content keybindings like reload work as expected, too - the remapped keybinding triggers the reload action.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #4144
- [X] These changes do not require tests because I can't think of a way to test remapped keyboard input

Fixes  #11991.

Source-Repo: https://github.com/servo/servo
Source-Revision: 68fb9ebc413f9cfc1ad4ca578d904c164836db74
2016-07-06 02:51:50 -07:00
Anthony Ramine
0f1c59e62d servo: Merge #12256 - Move some stuff from util to style (from nox:die-util-die); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: bb916bb38bc4298477bfc8134b94dc906054bce1

--HG--
rename : servo/components/util/str.rs => servo/components/style/str.rs
rename : servo/components/util/tid.rs => servo/components/style/tid.rs
rename : servo/tests/unit/util/str.rs => servo/tests/unit/style/str.rs
2016-07-05 02:04:42 -07:00
Eduard Burtescu
da092febcb servo: Merge #11872 - Replace return_address usage for rooting with stack guards and convenience macros (from eddyb:back-to-roots); r=Ms2ger
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

Source-Repo: https://github.com/servo/servo
Source-Revision: 80cb0cf8214fd52d2884724614c40cb278ee7575
2016-07-04 11:03:35 -07:00
Corey Farwell
df29454b47 servo: Merge #12178 - Refactor util::prefs operations to be methods on static struct (from frewsxcv:prefs); r=emilio
<!-- 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 _____

<!-- 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: b0a8ce5341f5148e36523fee0b0fcbc2684c0a68
2016-07-03 08:19:04 -07:00
Dan Robertson
827980c736 servo: Merge #10826 - Add webdriver commands for (Get|Add)Cookie (from danlrobertson:cookies); r=asajeffrey
Add the webdriver commands for GetCookie and AddCookie. In addition the basic messages for sending cookie data back and forth from the resource thread needed to be created and the handlers for those messages were created as well.

Do we plan to have some sort of test suite for the webdriver at some point? At this point I primarily test my PRs with basic shell scripts with a lot of `curl` and `jq`.

Source-Repo: https://github.com/servo/servo
Source-Revision: 054bb381e94b82fad4e502bc0f3229f39195c713
2016-06-26 03:19:14 -05:00
Davide Giovannini
33b46d13e4 servo: Merge #11665 - Fixed issue #11651 (Do not fire a blur event when calling .focus() on… (from davideGiovannini:master); r=KiChjang
<!-- Please describe your changes on the following line: -->
Added check in `HTMLElement.Focus` to avoid requesting focus when the element already has it.
Added check in `Document.commit_focus_transaction` to avoid sending `blur` and `focus` events when clicking on an already focused element.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11651

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 7d978e7b3d6b41b234f7c9b4051b746a1fbeddee
2016-06-24 23:34:37 -05:00
Ms2ger
874621db97 servo: Merge #11754 - Move ServoLayoutNode and related structs to script (from Ms2ger:wrapper-traits-prep2); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: ee8c5c5a67e1181eca163d3cd1189866d230b8f0

--HG--
rename : servo/components/script/reporter.rs => servo/components/script_layout_interface/reporter.rs
rename : servo/components/layout/incremental.rs => servo/components/script_layout_interface/restyle_damage.rs
2016-06-20 12:54:20 -05:00
Kosov Eugene
1aaea8d579 servo: Merge #11548 - Make Document::DefaultView return a null value when there's no browsing context (from kevgs:default_view2); r=Ms2ger
Fixes #11469.

Source-Repo: https://github.com/servo/servo
Source-Revision: 77e0089c1234b4a762f0676a46f1921c76b7f362
2016-06-09 02:48:30 -05:00
Anthony Ramine
1a3ce10075 servo: Merge #11640 - Update Rust to 1.11.0-nightly (ec872dc8a 2016-06-07) (from servo:rustup); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 57e086f0fb185e5f6143f5c26d54162c5d07456b
2016-06-08 07:36:55 -05:00
Alan Jeffrey
75a888e78c servo: Merge #11644 - Mozbrowser top level browsing context (from asajeffrey:mozbrowser-top-level-browsing-context); r=ConnerGBrewster
<!-- Please describe your changes on the following line: -->
Got `window.top` and `window.parent` to return the right result inside a `mozbrowser` iframe.

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 280bfc961a013bec58ba23d756db002b3e44fdef
2016-06-07 13:27:44 -05:00
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
Anthony Ramine
bdd5c96847 servo: Merge #11610 - Fix all the links to the UI Events spec (from nox:dom3events); r=emilio
Source-Repo: https://github.com/servo/servo
Source-Revision: 573c0a74684dc0043da4800a84065d72453641fd
2016-06-04 20:25:36 -05:00
Rebecca
ffc625b7fe servo: Merge #11468 - Implement meta referrer policy delivery (3) (from rebstar6:refPol4); r=nox
<!-- 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 #10311 (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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 530b5a649eb7284c0ff4e316b8eabd5cc62c1e80
2016-06-02 21:51:10 -05:00
Connor Brewster
133091a736 servo: Merge #11567 - removed unused imports (from cbrewster:no_unused); r=metajack
<!-- 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 do not require tests because removing unused imports

<!-- 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: 4e277d74e83bf9c3e1d237d1f779753c4c6a3a6e
2016-06-02 17:24:10 -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
Anthony Ramine
7fb96a2fc4 servo: Merge #11522 - Remove all uses of &Root<T> (from nox:root-ref); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 2be5f7211377a9609aad962be443308bef247df1
2016-06-01 07:36:47 -05:00
Thiago Pontes
95f41e530d servo: Merge #11491 - use USVStrings instead of DOMString for urls in Node and Document (from thiagopnts:master); r=Ms2ger
<!-- 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 #11475

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

<!-- 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: e8e7c6545d714a64d7971fad74f2b2c538dbed65
2016-05-28 14:37:16 -05:00
Josh Matthews
7f10c47c0a servo: Merge #11472 - Report blank lines that follow an open brace (from jdm:wip); r=mbrubeck
This automates something that I find myself frequently commenting on in PRs.

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

<!-- 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: 3ec20d9cf517c67f4d280e8958cc58c4c2b4fbb2
2016-05-27 18:14:25 -05:00
Ms2ger
ce64c413c5 servo: Merge #11463 - Remove the LayoutChan type (from Ms2ger:LayoutChan); r=nox
<!-- 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 refactoring

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

It is a pointless abstraction.

Source-Repo: https://github.com/servo/servo
Source-Revision: d160f8cb8037db0f4fa0b592d5f59162c1428494
2016-05-27 10:26:23 -05:00
Cullen Rhodes
2bd22f97ce servo: Merge #11329 - Report use statements that use {} with only one entry (from c-rhodes:11320); r=jdm
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 --faster` does not report any errors
- [X ] These changes fix #11320  (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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2f9796fa696e9514280777398467696dd4f004b3
2016-05-27 07:11:17 -05:00
Dirkjan Ochtman
ddcb9dabdb servo: Merge #11449 - Remove Document.get_html_element() (fixes #8409) (from djc:rm-get-html-element); r=nox
<!-- 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 #8409 (github issue number if applicable).

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

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

Replace uses by calling self.GetDocumentElement(), instead.

Source-Repo: https://github.com/servo/servo
Source-Revision: fb8934a1382ca2c9145895cf77cbe222beeb93e4
2016-05-27 06:21:36 -05:00
Anthony Ramine
35439b7531 servo: Merge #11308 - Implement [Func] (from nox:guarded); r=jdm
First part of #11292, this just includes support of `[Func]`.

Source-Repo: https://github.com/servo/servo
Source-Revision: 073c5e3b6b8950c01c9e5691925d24787fd06d53
2016-05-27 04:45:06 -05:00
Ms2ger
efab52e555 servo: Merge #11410 - Remove the script listener thread (from Ms2ger:script-listener-thread); r=nox
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 --faster` 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 refactoring

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: 1640ade0b3f703b54c2c2285271d44a037f7eabc
2016-05-25 06:10:17 -05:00
Ms2ger
e35d119d3e servo: Merge #11366 - Stop storing CSS errors on the Document (from Ms2ger:css_errors_store); r=SimonSapin
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 --faster` 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 removing dead code

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

They are never read.

Source-Repo: https://github.com/servo/servo
Source-Revision: a3fe756cdbe1ce4ea478a2026e0735a62f9411f5
2016-05-25 00:09:16 -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
Ms2ger
ec933c529c servo: Merge #11338 - Take ScriptThread::compositor out of its RefCell (from Ms2ger:compositor-refcell); r=nox
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 --faster` 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 refactoring

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

There's no reason for it; IpcSender::send takes &self.

Source-Repo: https://github.com/servo/servo
Source-Revision: ef81e6982ab79722fd16b9cf0da615054bcd6520
2016-05-23 19:16:12 -07:00
Anthony Ramine
e9b9dba63f servo: Merge #11341 - Use a simple Vec for the animation frame list (from nox:raf); r=pcwalton
Adding an animation frame list is now just pushing a new pair onto the vector,
while canceling one is setting its callback to None.

This means we can't send NoAnimationCallbacksPresent anymore to the constellation
when all entries were cancelled, but I'm not sure that's very important anyway.

The good downside of this change is that when running the callbacks, if no
new one was queued during their execution, we can just swap back the original Vec
into the Document in run_the_animation_frame_callbacks, thus reusing the
original allocation.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7d02c2055d5c5c7a5a6b1fff34bbef75e1da7cf6
2016-05-23 10:50:37 -07:00
Rahul Sharma
934afa2733 servo: Merge #10961 - adding interface for custom responses (from creativcoder:custom_response_iface); r=jdm
Fixes #10960

Source-Repo: https://github.com/servo/servo
Source-Revision: 1a34137ac41276239850d91073bec2c0ef2344d9
2016-05-21 01:12:54 -07:00
Piotr Stankiewicz
1c26a3157a servo: Merge #11255 - 11158 - add event handlers (from s-baldrick:11158); r=ConnorGBrewster
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 --faster` does not report any errors
- [X] These changes fix #11158 (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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5fc511a40e4f5710783cd76875fd119997307ad8
2016-05-20 21:26:41 -07:00
Zhen Zhang
036cdcf2ea servo: Merge #11189 - Refactor resource thread code (from izgzhen:refactor-resource-thread); r=nox
- [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 it is refactoring

Source-Repo: https://github.com/servo/servo
Source-Revision: bcea0ada27de694cd0c465d04fd35eba70503d62
2016-05-19 19:15:08 -07:00
Ms2ger
c69abc638b servo: Merge #11270 - Remove ConstellationChan (from servo:ConstellationChan); 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 --faster` 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 _____

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

It's a pointless abstraction that propagates the obsolete chan terminology,
swaps the order in which the sender and receiver are returned, and hides a
source of panics.

Source-Repo: https://github.com/servo/servo
Source-Revision: 27c25e859a45c3d79c85e96b85ec5226a3231e10
2016-05-19 12:38:26 -07:00
Patrick Walton
10fbb66e33 servo: Merge #11205 - script: Avoid needless ChangeRunningAnimationsState messages during typical requestAnimationFrame() animations (from pcwalton:avoid-needless-animation-state-changes); r=jdm
This skips useless message traffic when `requestAnimationFrame()` is
called during an animation frame callback. It reduces CPU usage of the
following snippet by 49%:

    <script>
        function foo() {
            requestAnimationFrame(foo);
        }
    </script>
    <button onclick="foo()">Start rAF</button>

Partially addresses #9844.

Source-Repo: https://github.com/servo/servo
Source-Revision: e5c3bb8977221b07e5c4eccf2ec22dff25e547be
2016-05-17 17:24: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
Connor Brewster
a9a47b0470 servo: Merge #11006 - Implement navigation events (from cbrewster:history_events); r=asajeffrey
fixes #11005

Events:
 * `PopStateEvent`
 * `HashChangeEvent`
 * `PageTransitionEvent`

Source-Repo: https://github.com/servo/servo
Source-Revision: bca625bd8e60685b92a56d42eab3599a056280f6
2016-05-12 07:27:12 -07:00
mrmiywj
6cee307af5 servo: Merge #11051 - 'closeevent' argument for Document::createEvent (from mrmiywj:closeevent-argument); r=Ms2ger
Add "close event" argument for Document::createEvent
Fixes #10737

Source-Repo: https://github.com/servo/servo
Source-Revision: a76db9af54692f47ca592b062c1165fbc5ed2433
2016-05-09 00:48:41 -07:00
askeing
fc61208984 servo: Merge #10821 - Checking the browsing_context before change title (from askeing:fix_10782); r=jdm
fix #10782

Source-Repo: https://github.com/servo/servo
Source-Revision: 17ba9fb5da73e6edd265c8e126344259e897c095
2016-05-06 14:20:45 -07:00
bd339
ce7ed8f01f servo: Merge #10946 - Disable scripting for documents created without a browsing context (from bd339:iss10940); r=nox
Goes towards closing #10940.

Source-Repo: https://github.com/servo/servo
Source-Revision: a54dedac1f8ebb960f844b617fcf0f4b108f1a80
2016-05-02 08:48:02 -07:00
Ms2ger
fc7055d9f4 servo: Merge #10918 - Avoid some clones (from Ms2ger:clones); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 9770e3c1e37a29c4b01ebfc243db2c7be58ec006
2016-04-29 06:33:34 -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
SunyDays
3be282a328 servo: Merge #10816 - Implement the errorevent argument to Document::createEvent (from SunyDays:errorevent_argument); r=frewsxcv
new_uninitialized function on ErrorEvent has already been in components/script/dom/errorevent.rs

close #10738

Source-Repo: https://github.com/servo/servo
Source-Revision: 311dd0f930b9e8e90d08151f1956e2da25737d8a
2016-04-27 10:52:41 -07:00
Martin Broesamle
92bb89e398 servo: Merge #10866 - Move abstract parser infrastructure from servohtmlparser.rs to parse (from broesamle:issue10856-a); r=Ms2ger
Fixes #10856

Source-Repo: https://github.com/servo/servo
Source-Revision: 5fd93de7be21220ec309969e7795061d835b0e84
2016-04-27 03:29:50 -07:00
SunyDays
7058e90fa1 servo: Merge #10820 - Implement the "focusevent" argument to Document::createEvent (from SunyDays:focusevent_argument); r=Ms2ger
close #10739

Source-Repo: https://github.com/servo/servo
Source-Revision: aa078a0780465a4dbf3ce91494f8c55a57359fd3
2016-04-26 17:50:51 -07:00
Stephen (Ziyun) Li
0ee57a9156 servo: Merge #10844 - Implement the "progressevent" argument to Document::createEvent (from sliz1:10740); r=frewsxcv
Fixes https://github.com/servo/servo/issues/10740

Source-Repo: https://github.com/servo/servo
Source-Revision: 09b2efc7061337593d948c7fb11b9d80ba42df5a
2016-04-25 22:00:24 -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
Maciej Skrzypkowski
831ed37a78 servo: Merge #10831 - "storageevent" argument for Document::createEvent (from mskrzypkows:storageevent); r=Ms2ger
Fixes  #10736

Source-Repo: https://github.com/servo/servo
Source-Revision: 8bf732e633cc63dd56a8b6a9f503d694e4b569fe
2016-04-25 03:44:24 -07:00
Tyler Southwick
984a700e82 servo: Merge #10805 - implement webglcontextevent (from tylersouthwick:webglcontextevent); r=Ms2ger
fixes #10742

Source-Repo: https://github.com/servo/servo
Source-Revision: 59205323da10b5867d4386a50a290c3a7500c217
2016-04-25 01:50:52 -07:00
SunyDays
e9a0413a8c servo: Merge #10814 - Implement the svgevents argument to Document::createEvent (from SunyDays:svgevents_argument); r=Ms2ger
close #10741

Source-Repo: https://github.com/servo/servo
Source-Revision: 4b8f1260b9e8fa875dd8055dd5f60f06d053a843
2016-04-24 22:49:26 -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
Tetsuharu OHZEKI
5c15edec1e servo: Merge #10769 - Drop support for keyevents in Document::createEvent (from saneyuki:keyevents); r=frewsxcv
Fix #10735

Source-Repo: https://github.com/servo/servo
Source-Revision: e12fc2a6f70b44784baee7ec2d27879b2b38afe9
2016-04-22 15:56:49 -07:00
Ms2ger
828c6b2e34 servo: Merge #10750 - Use num's constituent crates (from servo:num); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 89b276c889ce76f8fe43c22779835af138472dac
2016-04-20 20:11:24 +05:01
Rizky Luthfianto
17ed0bc790 servo: Merge #10649 - Fix Document#elementFromPoint no viewport available test (from rilut:fix-elementFromPoint-no-viewport-available-test); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: e0a100cacb812113a43b7425d8878fb1c6d153db
2016-04-16 16:10:06 +05:01
Rizky Luthfianto
e2b0095765 servo: Merge #10426 - Fix Document#elementsFromPoint no viewport available test (from rilut:fix-elementsFromPoint-no-viewport-available-test); r=nox
Fixes #10093 and improves #10034.

Source-Repo: https://github.com/servo/servo
Source-Revision: 44d7657487797575bb47aa295a13b496dd2cd69c
2016-04-15 23:32:23 +05:01
Simon Sapin
031eaaddbf servo: Merge #10606 - Remove the url! plugin (from servo:remove-url-plugin); r=nox
In rust-url 1.0 the `Url` struct is going to have private fields, and there is no way to to create an aribitrary one without going through the parser.

The plugin never had a clear demonstrated performance benefit, it was made mostly because it was possible and relatively easy at the time.

This commit was originally part of #9840, but it’s taking a while to land and I keep removing new uses of `url!` when rebasing.

r? @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: 3368565b3c6c76e5ce2d170d5c5cfb2f52a56956
2016-04-14 18:45:35 +05:01
Josh Matthews
c57148a88d servo: Merge #8658 - Implement origin concept and browsing contextless documents (from jdm:origin2); r=Ms2ger+jdm
These pave the way for implementing other parts of specifications more thoroughly.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9b57d8d686d361c0dfba1056523cbea12abd148b
2016-04-13 15:40:38 +05:01
Zhen Zhang
abd44774f2 servo: Merge #10538 - Improve PerformanceTiming Interface (from izgzhen:performance_timing); r=Ms2ger
Solving https://github.com/servo/servo/issues/10428

- Fix timing precision in old `update_with_current_time`
- Correct time unit in `navigation_start`
- Add `LoadEventStart` and `LoadEventEnd` timing properties

There are still many properties left unimplemented. I tend to leave the for future PRs.

Welcome comments!

Source-Repo: https://github.com/servo/servo
Source-Revision: 421dcc92f05532e5d8bda850c8d14c9375da2bd9
2016-04-13 01:16:10 +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
shubham_jain
3256246329 servo: Merge #10257 - #10141 : Document::location set null for documents without a browsing context (from slayerjain:first_bug); r=KiChjang
Fixes #10141.

Source-Repo: https://github.com/servo/servo
Source-Revision: c33bf4987af3479c515351195a55c12dacfcc871
2016-04-10 00:10:51 +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
Paul Rouget
e3fd7bc0f2 servo: Merge #9811 - forcetouch events (from paulrouget:forceTouch); r=mbrubeck
https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/SafariJSProgTopics/RespondingtoForceTouchEventsfromJavaScript.html

Not sure how we want to land that yet. Maybe reproduce the webkit events (as in this PR), or as touch/mousemouse events.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0ff8adb09778402e88fe0d0ad92f4b399ca8ca01
2016-04-05 20:38:05 +05:01
Adrian Utrilla
340cfcacf8 servo: Merge #10391 - Inlined content_changed (from autrilla:inline-content-changed); r=Ms2ger
cc @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: b568b72d760623462fe1a19544e1ad59f98e4480
2016-04-05 01:08:55 +05:01
Emilio Cobos Álvarez
74d1661a85 servo: Merge #10365 - servo: Clean up unused variables and imports (from emilio:warnings); r=Wafflespeanut
Source-Repo: https://github.com/servo/servo
Source-Revision: a29da7b48e41327aa7226bda8bea7b00dac88b6c
2016-04-04 23:10:31 +05:01
Rizky Luthfianto
629a825885 servo: Merge #10034 - Implement Document#elementsFromPoint (from rilut:implement-elementsfrompoint); r=emilio
Fixes #9859.

I'm trying to implement Document#elementsFromPoint, which I need to reuse the `get_nodes_under_mouse` and `mouse_over` function which have been removed a days ago in #9715. So I added it back while I'm not sure if my implementation is correct. Any advice will be greatly appreciated.

Source-Repo: https://github.com/servo/servo
Source-Revision: 241518a7d2c26da421d0273f101550215576c5a7
2016-04-04 12:19:39 +05:01
Corey Farwell
491d163fd9 servo: Merge #10327 - Remove get_* on getters as per RFC 0344 (from frewsxcv:get-prefix); r=ms2ger
https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis

https://github.com/servo/servo/issues/6224

Source-Repo: https://github.com/servo/servo
Source-Revision: 0760e56bb66e38a16543ed24385c29fd7c4a034b
2016-04-02 13:50:39 +05:01
Ms2ger
8531be300e servo: Merge #10304 - Implement Document::cookie correctly for cookie-averse documents (from Ms2ger:cookie-averse); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 7d79df4a05948e0ce6e3abc6bef0f833d8bf541e
2016-04-01 22:22:51 +05:01
Mohamed Albashir
8446a0072d servo: Merge #10292 - Initial steps for CSSOM (from jdm:cssom); r=jdm
Squashed and rebased #10133.

Source-Repo: https://github.com/servo/servo
Source-Revision: f335586ff538004c708d836876b359704ebed86a
2016-04-01 04:00:08 +05:01
Connor Brewster
a24820d19d servo: Merge #10202 - Added a mapping between nodes and stylesheets (from cbrewster:stylesheet-node-mapping); r=nox
Currently a work in progress solution for #10143.

I am not sure how to make the stylesheets() func return a `Ref<Vec<Arc<Stylesheet>>>` or if this way work just as well.

If anyone has any feedback, that would be great.

Source-Repo: https://github.com/servo/servo
Source-Revision: b38fafcf11d2588fecc565c581260106411ad484
2016-03-31 20:19:03 +05:01
Ms2ger
5d89cb8c05 servo: Merge #10287 - Include square brackets for IPv6 addresses in Document::domain (from Ms2ger:domain); r=jdm
The specification changed out from under us.

It's unfortunately impossible to write a test for this right now.

Source-Repo: https://github.com/servo/servo
Source-Revision: af06d32628bafe50e82a17e50d3daea2981974f2
2016-03-31 05:15:10 +05:01
Ms2ger
fb70f27034 servo: Merge #10079 - Implement encoding determination for external scripts (from servo:script-encoding); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 8e95f54501efd74007bb19009b6d2b7522872d57
2016-03-20 05:59:25 +05:01
Rebecca
1d9a694577 servo: Merge #9930 - Remove activatable element filter within HTMLElement#click() (from rebstar6:htmlclick); r=jdm
Address https://github.com/servo/servo/issues/6542

Ensure that click() calls are not limited to activatable elements. Also makes the isTrusted attribute false when synthetic click activation are called from a click() method (as per spec).

Source-Repo: https://github.com/servo/servo
Source-Revision: f2f6787189d8ea021cbd4ea3425d39ef8b1b8f93
2016-03-11 09:37:24 +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
Jack Moffitt
7d68aad107 servo: Merge #9832 - Suppress reflows before RefreshTick or FirstLoad (from metajack:suppress-reflows); r=mbrubeck
This fixes a bug where partially loaded content is displayed to the user
before it should be, usually before stylesheets have loaded. This commit
supresses reflows until either FirstLoad or RefreshTick, whichever comes
first.

Source-Repo: https://github.com/servo/servo
Source-Revision: 37bcc161fe45bf8c1cb1172b8e0d12c7d03371b6
2016-03-04 03:31:30 +05:01
Emilio Cobos Álvarez
fef86e7406 servo: Merge #9715 - script: Fix MouseOver handling (from emilio:mousemove); r=mbrubeck
Now we only query for the topmost node, and apply the hover state to all
of the parent elements.

This fixes things like #9705, where the hover state was applied only to
the children.

This also makes us more conformant with other browsers in the case of
taking in account margins and paddings.

For example, prior to this PR, when your mouse was over the inner
element, in the bottom part, `hover` styles didn't apply to the parent.

```html
<style>
div {
  padding: 10px;
  margin: 10px;
  height: 15px;
  background: blue;
}

div:hover {
  background: red;
}
</style>

<div>
  <div></div>
</div>
```

Fixes #9705

Source-Repo: https://github.com/servo/servo
Source-Revision: 056a7cf1a2284063e5d32c6627b86f6931957a74
2016-03-03 22:26:35 +05:01
Anthony Ramine
0afd393fe0 servo: Merge #9837 - Use a BTreeMap for Document::animation_frame_list (fixes #9834) (from nox:deterministic-raf); r=mbrubeck
The callbacks must stay ordered.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9ceda7de509d3dff01a766077011207f94ffadfd
2016-03-02 20:55:38 +05:01
Rizky Luthfianto
2e6459eeb6 servo: Merge #8932 - Implement Document#elementFromPoint (from rilut:add-elementfrompoint); r=nox
Related to #8666. I haven't implemented elementsFromPoint, because from my past discussion with jdm, [it's not good yet](dbfa25214b (commitcomment-14668959)) to implement elementsFromPoint because it may cause GC hazards.

By the way, I also have to include the test for this, right? I've found this [1]. So, is all I have to do is just to put this into `tests/wpt/web-platform-tests/cssom-view/elementFromPoint.html`?

[1] http://test.csswg.org/suites/cssom-view-1_dev/nightly-unstable/html/elementFromPosition.htm

Source-Repo: https://github.com/servo/servo
Source-Revision: 4bcdbe6d56d4d4e2a679ad7e0e27f2caf71f4d22
2016-03-01 02:32:50 +05:01
Paul Rouget
760de9998e servo: Merge #9740 - Support Browser API event mozbrowserconnected (from paulrouget:mozbrowserconnected); r=jdm
Fixes https://github.com/servo/servo/issues/9382

This new event is not yet documented. If this lands, I will add documentation to MDN.

Source-Repo: https://github.com/servo/servo
Source-Revision: 42f17128461f8da56a510b3454406cb74e3bba1a
2016-02-25 15:27:24 +05:01
Anthony Ramine
69b87ee72d servo: Merge #9742 - Make use of From<String> for Atom (from nox:atom-from-string); r=ecoal95
Source-Repo: https://github.com/servo/servo
Source-Revision: b3b6f092062eed2f323da88991553d0285da6a16
2016-02-25 08:10:44 +05:01
Josh Matthews
a73840d9c8 servo: Merge #9714 - Improvements to Documents' browsing contexts (from servo:browsingcontext); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: f5193ebd82b7d4daf2e5aa30948845bab7a696ea
2016-02-21 04:04:32 +05:01
Ms2ger
de2a28770a servo: Merge #9603 - Store a pointer to the browsing context in the Document (from Ms2ger:document-bc); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: ee158cc65f117f8fa10c4b706ff4009c579c7775
2016-02-19 12:20:35 +05:01
Paul Rouget
9bfde7b59b servo: Merge #9529 - Implement focus, blur, focusin and focusout events (from paulrouget:focusEvents); r=asajeffrey
Based on https://github.com/servo/servo/pull/7985

Fixes https://github.com/servo/servo/issues/7981

Source-Repo: https://github.com/servo/servo
Source-Revision: d8ffa3d0b85815a5ff62491f9f3bc7445834fc0e
2016-02-18 08:34:42 +05:01
Peter
77f0496d57 servo: Merge #9632 - Addresses Issue #1716. Indicated part of the document (from peterjoel:issue_1716); r=KiChjang
Fixes #1716.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8d63eff463417cdc739dd291d0ae4ab225b8dce5
2016-02-17 14:54:21 +05:01
Emilio Cobos Álvarez
b1dd4fcd79 servo: Merge #9567 - style: Make the whole style crate independent of the implementation (from emilio:general-pseudo-element-parsing); r=bholley,SimonSapin
This allows, among other things, having different implementations for parsing pseudo{elements, classes} in both `ports/geckolib` and in servo.

Source-Repo: https://github.com/servo/servo
Source-Revision: c11844cbf28054784c8d65781cff20045d8ee48b
2016-02-14 03:30:59 +05:01
Josh Matthews
401a4eb0e3 servo: Merge #6677 - Make iframes block the enclosing document's load event (from jdm:iframeblockonload); r=Ms2ger
It occurs to me as I write this that this doesn't handle the case of removing the iframe from the document before it's finished loading. Consider this an early feedback release!

Source-Repo: https://github.com/servo/servo
Source-Revision: a31f31e81977be5215f31851885e8ab46890c556
2016-02-10 19:21:29 +05:01
Paul Rouget
177aa965b3 servo: Merge #9244 - mozbrowsersecuritychange event (from paulrouget:securitychange); r=jdm
Fixes #8544

No test yet. Is there a way to mock a https connection?

Also, I wish I could use the `HTTPSState` enum instead of a `String` when calling `trigger_mozbrowser_event` (https://github.com/servo/servo/compare/master...paulrouget:securitychange?expand=1#diff-30a18e04d7e0b66aafdf192e416cad44R306) but that would require `constellation_msg.rs` to know about `HTTPSState`, which is defined in `document.rs`, which would add a dependency to `components/msg`. I could define `HTTPSState` somewhere else maybe? Or maybe it's fine to use a `String`. But then, should I use the HTTPSState strings (`"modern/deprecated/none"`) or the mozbrowser strings (`"secure/insecure/broken"`) (as it is now)

Source-Repo: https://github.com/servo/servo
Source-Revision: 3d63f09361afa80b9d5c4f6b192c9bd8936094b7
2016-02-09 12:31:29 +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
Alexander Lopatin
6da1d8c042 servo: Merge #9543 - Fix #9508: Beautify our union enums constructors (from alopatindev:enums_constructors_codingstyle_fix); r=KiChjang
Solves #9508
@jdm Please review. Thanks!

Source-Repo: https://github.com/servo/servo
Source-Revision: 28ecb0bba3fa395ed56bb2448a21e02c3ff88c8b
2016-02-07 05:30:57 +05:01
Glenn Watson
a495c8cb58 servo: Merge #9401 - Fixes additional calls to rAF (from glennw:raf-timing); r=jdm
Often, a rAF callback will request another rAF from the callback itself.

Previously, the constellation would quickly receive two messages saying
that there were no animations, and then there are animations again in the
situation above. This would make the compositor tick the new animation straight
away, causing strange fluctuations and timings in rAF callbacks.

Instead, only send the NoAnimationCallbacks message if the animation
callback queue is still empty after invoking the callbacks.

This fixes rAF timing, which now runs at the correct (vsync) framerate.

Source-Repo: https://github.com/servo/servo
Source-Revision: bc44ae679f0d4a01194777c56e09a48fbebea1ad
2016-01-28 10:49:24 +05:01
Kishor Bhat
79a9a23449 servo: Merge #9348 - Remove unused imports in script (from therealkbhat:script-cleanup); r=Wafflespeanut
Fixes #9345.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7f16b4e47bf8aef035ea788d80172dfd1a11ecff
2016-01-18 00:07:34 +05:01
Lanza
9af07af8ba servo: Merge #9334 - DOMContentLoaded event should be trusted (from MonsieurLanza:DomContentLoadedBubbles); r=KiChjang
Hopefully resolves #9332.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5a954d2492195aab2f3bd5a8d2775ef5c586689d
2016-01-16 21:45:38 +05:01
Darin Minamoto
7af6d9dbee servo: Merge #9263 - Moved MouseButton from msg to script_traits (from DarinM223:move_mousebutton); r=KiChjang
Fixes #9250

Source-Repo: https://github.com/servo/servo
Source-Revision: 9118b64b4b610a95f48a88a198baac4eb31a04a0
2016-01-16 19:05:51 +05:01
Lanza
f516d45bea servo: Merge #9317 - DOMContentLoaded should bubble (from MonsieurLanza:DomContentLoadedBubbles); r=KiChjang
DOMContentLoaded event is currently set as non bubbling event.
Test :
./tests/wpt/web-platform-tests/html/syntax/parsing/the-end.html

Source-Repo: https://github.com/servo/servo
Source-Revision: 0c500a9da53145bf065804794137e2b4fc295dee
2016-01-15 06:24:12 +05:01
Joshua Holmer
511a4a2f92 servo: Merge #9295 - Move AnimationState to script_traits (from shssoichiro:move-animationstate); r=KiChjang
Resolves #9223

Source-Repo: https://github.com/servo/servo
Source-Revision: b26c7bd7ea92bdbf7cdcaa0e3d826a880b9cd0ca
2016-01-14 06:01:05 +05:01
apopiak
cb076cb7bf servo: Merge #9271 - Move MozBrowserEvent to script_traits (from apopiak:moveMozBrowserEvent_9225); r=KiChjang
close #9225

Source-Repo: https://github.com/servo/servo
Source-Revision: 897007f13447f6b34e220042e5cfd31f7686cfec
2016-01-13 23:41:48 +05:01
Matt McCoy
927dd11ffe servo: Merge #9282 - Making create attribute lowercase (from mattnenterprise:create-attribute-lowercase); r=nox
This should fix #9252. I need some help getting the test case to work correctly. I get output that "TITLE" should FAIL, but it PASS. How do I make it to where it should PASS?

Source-Repo: https://github.com/servo/servo
Source-Revision: ee5aead60bba3c6a482960021677aac3d559289b
2016-01-13 15:17:13 +05:01
Matt McCoy
dc281a0e73 servo: Merge #9265 - Moving MouseEventType from msg to script_traits (from mattnenterprise:move-mouse-event-type); r=KiChjang
Fixes #9251

Source-Repo: https://github.com/servo/servo
Source-Revision: 464b6414ce28ceb6b0674511c78da0bc751c2e31
2016-01-12 06:02:16 +05:01
GauriGNaik
f88e2a7946 servo: Merge #8972 - M1501: CSS Error Reporting: Final Steps Last Part (from GauriGNaik:expose-css-errors-1); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: a5a7a8318cbb9cc1338e9894aee61221a2fa3f27
2016-01-12 03:18:50 +05:01
Ms2ger
2b13d697b7 servo: Merge #9245 - Stop reexporting style types from layout_interface (from Ms2ger:reexports); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 47617578af97204168fb985b956d8c85c2b9f349
2016-01-11 23:28:51 +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