Commit graph

283 commits

Author SHA1 Message Date
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
Nazım Can Altınova
0c62ad2732 servo: Merge #10762 - Implement Element::hasAttributes (from canaltinova:has_attributes); r=nox
Fixes #10748 .
Implement Element::hasAttributes. I'm not sure if tests are enough. I'm open to suggestion :)

Source-Repo: https://github.com/servo/servo
Source-Revision: 8163347e347996f0337086f605d74ce19b4930d0
2016-04-22 15:11:20 -07:00
Zhen Zhang
f136b02391 servo: Merge #9968 - Implement scroll, scrollLeft, scrollTop and friends, addressing issue #9650 (from izgzhen:scroll); r=asajeffrey
This is a work in progress to solve https://github.com/servo/servo/issues/9650. Thanks a lot for helping the review.

- [x] scroll
- [x] scrollTo
- [x] scrollBy
- [x] scrollTop (setter and getter)
- [x] scrollLeft (setter and getter)

The setters will be implemented in another PR after this is merged.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8d988f20c12e0a5267e79650a90310951c66ca77
2016-04-20 18:11:26 +05:01
Di Xu
586563bc29 servo: Merge #10566 - replace Fallible<()> with ErrorResult (from xudifsd:error-result); r=Ms2ger
Fixes #10541

Source-Repo: https://github.com/servo/servo
Source-Revision: 697300bb16ae2fc27e0ac507210f65de4254f33d
2016-04-14 02:22:48 +05:01
Keith Yeung
36fd3b91c3 servo: Merge #10522 - Various cleanups in HTMLInputElement (from KiChjang:input-cleanup); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: 934ae41fc982058048f460a77687ab026c9a909f
2016-04-12 07:27:38 +05:01
Corey Farwell
4db88605d6 servo: Merge #10514 - Various 'element.rs' cleanup (from frewsxcv:element-cleanup); r=KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: 5aa62b3621f4793c559f6c7eb77e06259b0a00ea
2016-04-11 08:58:11 +05:01
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
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
Eduard Burtescu
74f1f8b080 servo: Merge #10247 - Use <base> in resolving url attributes (like "href") (from eddyb:document-base-url); r=Ms2ger
Second take of #6303, now that the `base_url` infrastructure is in place.

Source-Repo: https://github.com/servo/servo
Source-Revision: c4e112a3be6930e6373483f6e42279d0682b3a48
2016-03-29 16:42:12 +05:01
Guillaume Gomez
32c92c74a1 servo: Merge #10219 - Add insert_adjacent methods into Element (from GuillaumeGomez:adjacent); r=nox
Fixes #10205

Source-Repo: https://github.com/servo/servo
Source-Revision: 0826a5b45455cdbecf484136b1bab39bcc0b15ff
2016-03-27 23:14:04 +05:01
Sagar Muchhal
135f6ff4b2 servo: Merge #10169 - Implement initial pieces of form validation (from jdm:formvalidation); r=jdm
Rebase of #10108.

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

--HG--
rename : servo/resources/shaders/clear.fs.glsl => servo/components/script/dom/validation.rs
2016-03-24 18:44:02 +05:01
Daniel Robertson
f0ceb122c9 servo: Merge #9824 - Add the scrollWidth and scrollHeight extensions to the element interface (from danlrobertson:element1); r=asajeffrey
Add the `scrollWidth` and `scrollHeight` extensions to the element interface. My goal was to create a method that encompassed getting `scrollWidth`, `scrollHeight`, `scrollTop`, and `scrollLeft`.

I also noted that `clientHeight` and `clientWidth` to not handle the root element and the body element correctly.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7ff7932a8cb15c42a436958e953cc904ba7a0bd8
2016-03-11 23:50:24 +05:01
Simon Sapin
1436e99264 servo: Merge #9903 - Replace usage of deprecated std::cell::Ref::filter_map (from servo:ref-filter-map); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: b6e469cbde0e58bab1b99e8c5ba356be2fc61843
2016-03-08 08:23:45 +05:01
Nick Fitzgerald
5be296fd98 servo: Merge #9774 - Implement removeAttributeNode (from nox:remove-attribute-node); r=nox
Supersedes #8727

Source-Repo: https://github.com/servo/servo
Source-Revision: 6c65e154f481afca53f155736c0d226e3ae44916
2016-02-27 14:54:06 +05:01
Anthony Ramine
2b5874c2f7 servo: Merge #9064 - Implement Element.getAttributeNames (from nox:them-attr-names); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 918681931f0eff7f7e5658b8d869eba233bbd1c6
2016-02-27 00:15:24 +05:01
Eli Friedman
d54fe3d15b servo: Merge #9743 - Use presentation hints correctly for the dimensions of <img> (from jdm:image-preshint-rebase); r=pcwalton
Mostly straightforward; includes some extra fixes to make `<canvas>`
work the same way as `<img>` for reflow.

Rebase of #8531.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8c23cbb78b36ac143bbea3b2e64961bfc46d8e0d
2016-02-26 00:40:32 +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
Matt Brubeck
486920bd45 servo: Merge #9722 - Dirty elements whose selectors are affected by sibling changes (from mbrubeck:slow-selector); r=nox
This fixes incremental layout of nodes that match pseudo-class selectors such as :first-child, :nth-child, :last-child, :first-of-type, etc.  Fixes #8191 and other intermittent layout bugs.

This code is based on the following flags from Gecko:
https://hg.mozilla.org/mozilla-central/file/e1cf617a1f28/dom/base/nsINode.h#l134

Depends on servo/rust-selectors#71. r? @SimonSapin

There are a couple of TODO items in this commit, but I'd appreciate feedback on the general approach before I finish it up.  (Also, if someone who knows more than I do could give some advice about atomic orderings...)

Source-Repo: https://github.com/servo/servo
Source-Revision: 438b3a444b40ea85e53be0bd1c4689680d577727
2016-02-24 18:26:39 +05:01
Anthony Ramine
08f5c3da70 servo: Merge #9532 - Say farewell to in-tree HeapSizeOf (from nox:dedup-heapsize); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 2a6707ce58df27d93e865bffb6b44d396b810c99
2016-02-05 03:11:36 +05:01
Emilio Cobos Álvarez
83aa64a599 servo: Merge #9510 - Update rust-selectors (from nox:bump-selectors); r=SimonSapin
This commits updates rust-selectors to use the generic parser, and as
such it moves the element state into the style crate.

Source-Repo: https://github.com/servo/servo
Source-Revision: ae20f2556bc7807b39b6649ac1f738644abcc26a
2016-02-03 06:35:11 +05:01
Mathieu Hordesseaux
1c95618f18 servo: Merge #9061 - Implement SetNamedItem and SetNamedItemNS (from mathieuh:setNameItem); r=eefriedman
@nox Can you add the "it needs tests" tag or so?

Source-Repo: https://github.com/servo/servo
Source-Revision: 55d4773311b7d15b5e1a7fc4b17047a51e097933
2016-01-28 16:37:41 +05:01
Bobby Holley
97c1afa558 servo: Merge #9261 - Remove the msg dependency from style (from bholley:geckolib_nomsg); r=Manishearth
This is part of slimming down the dependencies of geckolib.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3680e82cab766a412a969a21c0cdff0c7f97d7bc
2016-01-12 08:54:31 +05:01
Manish Goregaokar
a60fbbcbd2 servo: Merge #8983 - Various textinput fixes (from Manishearth:cursors); r=jdm
- Currently the cursor sticks around if you click elsewhere. Now the text inputs are relayout-ed on blur.
 - Currently whitespace gets collapsed in text input (https://github.com/servo/servo/issues/8772). Not anymore.

Source-Repo: https://github.com/servo/servo
Source-Revision: 099beee85c02d391b854dc5e06da34f89df8b760
2016-01-11 22:52:03 +05:01
Ying-Ruei Liang (KK)
2186b63a77 servo: Merge #9119 - Parse size attribute of HTMLInputElemnt correctly (from TheKK:input_element_size); r=eefriedman
Should fix #8773

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

Fixes #8804

Source-Repo: https://github.com/servo/servo
Source-Revision: 1096183cceea9ec78ab02caa33ee2d14668d977d
2016-01-04 00:08:10 +05:01
Iszak Bryan
d29ef38a74 servo: Merge #9137 - #9135 Optimise get_root_element for elements in documents (from iszak:issue-9135); r=nox
Fixes https://github.com/servo/servo/issues/9135

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

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

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

cc @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 9da739acefc7d1776bf727c8bf782eb79f241028
2016-01-03 08:47:34 +05:01
Corey Farwell
96fcc5d105 servo: Merge #9099 - Remove fields with parsed attribute values on HTMLTextAreaElement (from frewsxcv:rm-parsed-attr); r=nox
https://github.com/servo/servo/issues/7863

Source-Repo: https://github.com/servo/servo
Source-Revision: 5e497cf3112194e4e35776c7df97930f8ff7e153
2016-01-01 00:46:13 +05:01
David Raifaizen
f718d1505b servo: Merge #8420 - Enabled use of FontFamily enum type (from craftytrickster:8371/generic-font-family); r=glennw
https://github.com/servo/servo/issues/8371

In addition to replacing loose strings with the FontFamily enum in `font_cache_task.rs`, I also centralized the add_generic_font calls into one single function. If centralizing into one function is not desired or if anything else needs to be changed, please let me know.

Source-Repo: https://github.com/servo/servo
Source-Revision: 66c8aa8cdac24ad956be5e99be3b7bc07c5f798c
2015-12-31 16:20:48 +05:01
Josh Matthews
d5d080413b servo: Merge #8109 - Make button elements activatable (from jdm:buttonactivate); r=eefriedman
Source-Repo: https://github.com/servo/servo
Source-Revision: 4a8e22c864a0fa1b6fca1c82374a3227afa3298d
2015-12-30 03:23:26 +05:01
Anthony Ramine
ef99a3f214 servo: Merge #8506 - Properly propagate changes when range or trees are mutated (from nox:finish-ranges); r=dzbarsky
Does the same thing as #6817, but storing Range instances directly in their start and end containers.

Cc @dzbarsky

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

Source-Repo: https://github.com/servo/servo
Source-Revision: f9141ef2db693518fef676740f25abee3b938cac
2015-12-19 01:29:56 +05:01
Alan Jeffrey
0007a41bcc servo: Merge #8992 - Bump string_cache version to 0.2.5 (from asajeffrey:bump_string_cache_version); r=nox
Atom::to_lower_case() now returns an Atom rather than a String,
so there are a few asserts that need a different collection of &s and *s.

Source-Repo: https://github.com/servo/servo
Source-Revision: 85b43ea31726776b5d9aafa58786850c12e2c852
2015-12-16 04:04:50 +05:01
GauriGNaik
5be1a03fb2 servo: Merge #8971 - Add pipeline information to CSS error reporting (from jdm:expose-css-errors-1); r=jdm
Rebase of #8838.

Source-Repo: https://github.com/servo/servo
Source-Revision: d11f96e27074b0130760a02d39d2da4e003c820e
2015-12-14 21:22:41 +05:01
Simon Sapin
636b1c6bcb servo: Merge #8852 - Add link to issue for :visited (from servo:visited-issue-link); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 2af23dc06151475b053bd76976fd9da899f27b8b
2015-12-06 01:37:40 +05:01
Eli Friedman
70ebd13eff servo: Merge #8786 - Remove unnecessary conversion to/from DOMString for localName (from eefriedman:localname-atom); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 63762d2b52ee6026216d304c8826bf8b4a5fdd20
2015-12-03 14:36:22 +05:01
Sam Gibson
8846f71259 servo: Merge #7323 - Adds support for input element's maxlength attr (from samfoo:input-maxlength); r=jdm
This implements maxlength [as described by whatwg](https://html.spec.whatwg.org/multipage/forms.html#dom-input-maxlength) for input elements.

Remaining work:
* WPT test - I have no idea how to write a WPT for simulating user input. Webdriver? Open to suggestions here.
* Support for textarea (should be trivial, probably worth filing another issue)

servo/servo#7320
servo/servo#7004

Source-Repo: https://github.com/servo/servo
Source-Revision: fc3e950052b6cc580dc32fc03d978fad97b49ba8
2015-12-03 09:59:24 +05:01
Guillaume Gomez
e2ebe34e9f servo: Merge #8675 - Add XMLDocument object (from GuillaumeGomez:master); r=nox
Fixes #8000

(Still working on it)

Source-Repo: https://github.com/servo/servo
Source-Revision: 99223656fbf6cade8c41d161a9e61a39f58ec796
2015-11-27 19:00:04 +05:01
GauriGNaik
5b0ca679ad servo: Merge #8682 - Defined new trait ParseErrorReporter and added error_reporter member … (from jdm:css-error-reporter); r=jdm
…to ParserContext.

Rebase of #8210.

Source-Repo: https://github.com/servo/servo
Source-Revision: f5ef2f4f75cd58a3c6f1f123e413dc9d3a24f841
2015-11-27 03:27:08 +05:01
Alan Jeffrey
f4ab2bfdb5 servo: Merge #8667 - Update string cache (from asajeffrey:update-string-cache); r=SimonSapin
Updated string_cache to 0.2, and updated the dependencies that depend on string_cache.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 188fa9378c103093f1f8dac24bff0d9d237fd2bc
2015-11-25 23:41:39 +05:01
Ms2ger
f0af48c824 servo: Merge #8569 - Rustfmt some of script (from Ms2ger:fmt-script); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: 7a87312121a69b590b364f9b5095f3145554e24b
2015-11-18 15:15:30 +05:01
Ms2ger
fc071d28f4 servo: Merge #8533 - Remove the legacy module (from Ms2ger:legacy); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: b6f519cd0a9bdec909dcc5498f36f33e05f1115a
2015-11-15 18:44:13 +05:01
Corey Farwell
933234be87 servo: Merge #8526 - Fix parse_length 0 values, implement <hr> 'width' (from frewsxcv:parse-length); r=eefriedman
Follow-up to https://github.com/servo/servo/issues/8424

Source-Repo: https://github.com/servo/servo
Source-Revision: 3ef0a9a79dffcde41cdd6081ef79a0f0593b5104
2015-11-15 03:01:46 +05:01
Alan Jeffrey
f8093754b7 servo: Merge #8477 - Opaque DOMString (from asajeffrey:opaque-domstring); r=asajeffrey
This patch makes DOMString an opaque wrapper round String (currently it's a transparent wrapper).

The changes are:

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

This enables experimenting with other string representations in the DOM.

Source-Repo: https://github.com/servo/servo
Source-Revision: 62acdd303b78951885c2c90747b31f318907d6c9
2015-11-13 06:48:30 +05:01
Corey Farwell
c79a3bc7db servo: Merge #8459 - Simplify iterating over Element attributes (from frewsxcv:namednodemap-iter); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 5e6efd62c1f19408f2d0dd50c48345b4122c0269
2015-11-11 19:50:49 +05:01
Corey Farwell
25b4a40a5a servo: Merge #8453 - Prefer Atoms over strs for comparison (from frewsxcv:atoms); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: fd5540df626508a57f6698b71d4d8ac8e95fb12e
2015-11-11 06:26:39 +05:01
Bobby Holley
6c48a45939 servo: Merge #8381 - Implement attribute restyle hints (from bholley:attr_restyle_hints); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 13226f847234cd0130820338d5a272277780d278
2015-11-11 00:58:45 +05:01
Eli Friedman
ae8a852668 servo: Merge #8431 - Move storage of bgcolor for <tr> and <tbody> (from eefriedman:table-bgcolor); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: b386008623132deca21049f125ac761b20edc1dd
2015-11-10 06:29:16 +05:01
Eli Friedman
d1d6ecbdd2 servo: Merge #8404 - Misc cleanup for DOM attributes (from eefriedman:misc-attributes); r=nox
No functional change; just cleanups related to parsing attributes.

Source-Repo: https://github.com/servo/servo
Source-Revision: d8df028197505ca439363cdb05bed58fe9b4b726
2015-11-10 00:03:24 +05:01
Corey Farwell
556847039f servo: Merge #8419 - Implement <hr> 'color' attribute (from frewsxcv:html-hr-element-color-attribute); r=eefriedman
Source-Repo: https://github.com/servo/servo
Source-Revision: 3780fb7fe02ed66bd391421a0c5506b5635279dd
2015-11-09 04:59:51 +05:01