Commit graph

1607 commits

Author SHA1 Message Date
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
cjkenned
f245db90ec servo: Merge #10830 - DOMImplementation::createDocument should set content type based on namespace (from cjkenn:10743); r=Ms2ger
Set document content type based on the namespace.
Standard: https://dom.spec.whatwg.org/#dom-domimplementation-createdocument
Fixes #10743.

Source-Repo: https://github.com/servo/servo
Source-Revision: 408f9abb7a3588edaf1443273508bdb2220fa486
2016-04-28 21:31:30 -07:00
Matt Brubeck
22979e08c6 servo: Merge #10895 - Use byte indices instead of char indices for text runs (from mbrubeck:byteindex); r=pcwalton
Replace character indices with UTF-8 byte offsets throughout all code dealing with text runs.  This eliminates a lot of complexity when converting from one to the other, and interoperates better with the rest of the Rust ecosystem.

For most code this is just a simple replacement of char indices with byte indices.  In a few places like glyph storage and text fragment scanning, it also lets us get rid of code that existed only to map between bytes and chars.

Also includes some related fixes to text shaping, discovered while working on this conversion.  See the commit messages for details.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: cf121ad8dff90b8fa55558ca9bdcbfe29512a617
2016-04-28 20:22:09 -07:00
askeing
9e612d5993 servo: Merge #10887 - Dispatch error event when link elements get invalid response (from askeing:fix_10374); r=KiChjang
fix #10374

Source-Repo: https://github.com/servo/servo
Source-Revision: 210803b4b2f5bd8e4710c610d6950431137a9f7f
2016-04-28 14:30:04 -07:00
Patrick Walton
bc4a42f15e servo: Merge #10159 - script: Make iframes know their pipeline IDs at all times, even after navigation (from pcwalton:iframes-know-their-pipelines); r=jdm
Since WebRender uses the pipeline ID stored in the iframe element to
determine which pipeline to display, it had better be kept up to date!

Closes #9919.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 3836c2c4cba1f49ea5ce3ce802b0bd604213c2a2
2016-04-28 12:44:39 -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
Connor Brewster
a169b8b4a6 servo: Merge #10647 - Finish hooking up XML parser (from cbrewster:parse_xml); r=jdm
This is a work in progress PR for #10581. I just want to make sure I am headed in the right direction.

cc @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: daa1a2a0a82d336205dae340d705ea6c0bed4ed2
2016-04-27 07:50:54 -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
bd339
d779623ef0 servo: Merge #10838 - Implement step 3 according to spec (from bd339:iss9551); r=KiChjang
Goes towards fixing #9551

Source-Repo: https://github.com/servo/servo
Source-Revision: 21c177311522f0ecf4a5ce4068c8ede58c7ce676
2016-04-27 00:16:08 -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
Keith Yeung
2f28c7365d servo: Merge #10608 - Add parsing of double values in style attributes (from KiChjang:parse-double); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: ccba2d6841119aac82dfe5ae2f528fdb910a6abd
2016-04-26 11:59:25 -07:00
Ramana Venkata
09a7281663 servo: Merge #10850 - Allow setting withCredentials in synchronous XMLHttpRequest (from vramana:issue_10839); r=Ms2ger
closes #10839

Source-Repo: https://github.com/servo/servo
Source-Revision: cb42be98279348981951933aeee4b1bfcf1517d1
2016-04-26 05:07:14 -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
Bridget McErlean
24b0a26e90 servo: Merge #10833 - Use the document base url when resolving worker URLs (from zubron:use-document-base-url-worker-10577); r=Ms2ger
This fixes #10577.

I'm not sure if the `worker.js` file needed by this test is in the right location. I placed it within `tests/wpt/web-platform-tests/workers/constructors/Worker/sample_worker/` but thought it could also be placed in `tests/wpt/web-platform-tests/resources/`. Let me know if I should change its location. Thanks! :)

Source-Repo: https://github.com/servo/servo
Source-Revision: ec9e1fe7e6a98b52fc0a8706160ad7f9201440fe
2016-04-25 12:03:10 -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
Anthony Ramine
dbaf1869d4 servo: Merge #10819 - Refactor the call hook on non-callback interface objects (fixes #10744) (from nox:call-without-new); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: a92a6360cf2833c405ec668ee144db5de44c15cf
2016-04-25 02:45:29 -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
Arnaud Marant
61fa8258ab servo: Merge #10761 - Implements Node::isSameNode (from amarant:Node-isSameNode); r=Ms2ger
Fixes #10746

I adapted the tests from dom/nodes/Node-isEqualNode.html
should I also add ones for xhtml too like here : dom/nodes/Node-isEqualNode-xhtml.xhtml ?

Source-Repo: https://github.com/servo/servo
Source-Revision: 4f05ea73fed3625238b9e662b8b296fe58be44a0
2016-04-25 01:04:47 -07:00
Daniel Robertson
cec88d61d7 servo: Merge #10817 - Add style property for flex-basis (from danlrobertson:flex-basis); r=mbrubeck
Add the style property for flex-basis. The property should allow all
values acceptable for `width` or `height` with the addition of `content`.

I also disabled the tests that I expect to pass. I am confused by [flexbox_computedstyle-flex-basis-0percent:20](https://github.com/servo/servo/blob/master/tests/wpt/css-tests/css-flexbox-1_dev/html/flexbox_computedstyle_flex-basis-0percent.htm#L20). Should that be `0%` instead of `0px`?

Source-Repo: https://github.com/servo/servo
Source-Revision: 20dd8ba7ecb459d1d6acd7a2c5a3631a5731da09
2016-04-24 23:34:37 -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
Keith Yeung
d27d3c60eb servo: Merge #10670 - Implement stencil fns for WebGLRenderingContext (from KiChjang:webgl-stencils); r=emilio
Depends on servo/webrender#261.

Closes #10659.

Source-Repo: https://github.com/servo/servo
Source-Revision: 78041737def89de90cba20ea29afe4e107008117
2016-04-24 12:40:59 -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
Yoav Alon
a70d23c17e servo: Merge #10795 - updated Blob constructor to use optional (from yoava333:master); r=Ms2ger
fixes https://github.com/servo/servo/issues/10779

Source-Repo: https://github.com/servo/servo
Source-Revision: 1b13ddcd8a22694a764260c3573d3b198478d4ce
2016-04-22 23:17:55 -07:00
Corey Farwell
5a26bc2ac2 servo: Merge #10799 - Complete 'inefficient' FIXME by remove unnecessary clone (from frewsxcv:no-clone); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: abce9de2337d4d41ba977241b268f5774975f7b0
2016-04-22 21:00:18 -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
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
Michael Howell
289c44fa79 servo: Merge #10654 - compositing/script: Do not dispatch the resize event when initially l… (from notriddle:no_resize_on_initial_load); r=asajeffrey
…oading.

No bug report corresponds to this, but I noticed it while trying to
reduce #10593

Source-Repo: https://github.com/servo/servo
Source-Revision: 47a0f58f98e1a6ddcf5db24347fc6bf890d4a7d6
2016-04-22 14:25:51 -07:00
Léo Stefanesco
aaa84d3aa7 servo: Merge #10757 - Implement Node::rootNode (from ineol:root-node); r=Ms2ger
Fixes #10747.

I don't know whether it's OK to recurse up the tree, though it is a tail call.

Source-Repo: https://github.com/servo/servo
Source-Revision: 82938547ed0fbc2b5fb80f72f229a07524e72d6e
2016-04-22 12:10:52 -07:00
Emilio Cobos Álvarez
a30e4d95de servo: Merge #10443 - webgl: Implement the pending texImage2D overload, and add more validation (from emilio:webgl-teximage2d-overload); r=jdm
This is a large-ish refactor of the Texture2D code, but it should be
easier to read and of course more correct.

I tried to annotate every error condition with a spec paragraph.

I made just a reftest to ensure this works as intended, since I expect #10373 to land pretty soon.

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

Source-Repo: https://github.com/servo/servo
Source-Revision: d926b5d3762a101d5280266f806f2b979f73b695
2016-04-22 10:40:06 -07:00
David Raifaizen
a7f18babc7 servo: Merge #10651 - Setting current color to black if canvas is not rendered in document (from craftytrickster:10601/current-color); r=Ms2ger
Fixes #10601

The change seems deceptively easy, I hope I am not missing anything...

Source-Repo: https://github.com/servo/servo
Source-Revision: 4da6855e2332ce433fd6d6ea9d84cbb940df2b41
2016-04-22 09:26:51 -07:00
edunham
9b5c18ff2f servo: Merge #10723 - Remove some Emacs & Vim modelines (from edunham:modelines); r=Wafflespeanut
This might be a bad idea, especially on the webidl side. However, we started talking about the idea that modelines are a lint error (https://github.com/servo/servo/issues/10719), and these changes would be required before enabling a modeline lint.

If it bitrots, it's easy to recreate with
```
find * -type f -exec sed '/- Mode:/d' -i {} +
find * -type f -exec sed '/ vim:/d' -i {} +
git checkout -- python/tidy/servo_tidy/tidy.py
git checkout -- python/tidy/servo_tidy_tests/spec.webidl
git commit -a
```

Source-Repo: https://github.com/servo/servo
Source-Revision: dff217c2e3ff0b77eeebf62d36c2bf57c044cf14
2016-04-21 20:05:04 -07:00
Ms2ger
7840a81291 servo: Merge #10710 - Update js (from Ms2ger:js); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 7e370c4df4ee0c564322a0bebd34b31359e88d85
2016-04-21 15:12:44 +05:01
Josh Matthews
39037852d3 servo: Merge #9942 - Moving the error handling out of network loader (from jdm:load_error); r=ms2ger
Rebase of #8851. Fixes #8678. Fixes #9944.

Source-Repo: https://github.com/servo/servo
Source-Revision: f051028ee8cd93168b1abe3742929d43d19cb002
2016-04-20 21:50:22 +05:01
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
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
zakorgyula
764dee0d99 servo: Merge #10745 - Remove extra definition of WHITESPACE under components/util/str.rs (from zakorgy:refaktor); r=nox
issue: #10709
found another ``` const WHITESPACE: &'static [char] = &['\t', '\n', '\r', ' ']; ``` in ```components/style/viewports.rs ``` maybe this could be replaced too with the ```util::str::HTML_SPACE_CHARACTERS```

Source-Repo: https://github.com/servo/servo
Source-Revision: ae63688db8cb7de8643845bdd5880cc50bf927f7
2016-04-20 13:55:53 +05:01
Matt Brubeck
4781925f69 servo: Merge #10718 - Lower the logging level of a really chatty fn (from mbrubeck:trace); r=jdm
Reduces the amount of spew when running with settings like `RUST_LOG=script=debug`.

Source-Repo: https://github.com/servo/servo
Source-Revision: 82873d688e9260b5fc755ec16eec959d94a5cb14
2016-04-20 03:07:52 +05:01
Ms2ger
b29def4f49 servo: Merge #10708 - Fix some compile warnings (from Ms2ger:warnings); r=emilio
Source-Repo: https://github.com/servo/servo
Source-Revision: 4d5fa963fdcf9ec9287eac762bf6afafdbee5f41
2016-04-19 23:06:34 +05:01
Arnaud Marant
11fea26f4a servo: Merge #10634 - Issue #10574 Use the document base url in img (from amarant:10574-image-document-base); r=metajack
add a test with base path set to the resources path and an img with a cat and the reference directly to the image

Source-Repo: https://github.com/servo/servo
Source-Revision: 3d4416e1b0ae758e68900f725979238cc0128f8b
2016-04-19 20:22:18 +05:01
Nazım Can Altınova
cc0ad63090 servo: Merge #10592 - Use the document base url when resolving stylesheets (from canaltinova:stylesheet_with_base); r=Ms2ger
Use the document base url when resolving stylesheets. Fixes #10575 .

Source-Repo: https://github.com/servo/servo
Source-Revision: a7c885706ec4bd526b00ecad5d870415ae6cc1e1
2016-04-19 16:51:32 +05:01
David Zbarsky
433de7f243 servo: Merge #10652 - Prevent use of reserved names in BindAttribLocation (from dzbarsky:reserved); r=dzbarsky
(Depend on the WebGL tests landing)

Source-Repo: https://github.com/servo/servo
Source-Revision: 82b952c03f94c0b8433a9fccbe9b66aa7e704924
2016-04-19 09:17:24 +05:01
Greg Guthe
d400f08881 servo: Merge #10508 - Insert row (from g-k:insert-row); r=KiChjang
Fixes #9269

Source-Repo: https://github.com/servo/servo
Source-Revision: 19a5a9ad081548b1ca03a1ce98857c32be5404b1
2016-04-19 01:09:38 +05:01
Keith Yeung
db9fff8daa servo: Merge #10674 - Avoid generating parameter names that are Rust keywords (from KiChjang:codegen-avoid-rust-keywords); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: f93379ff4e33a74922b859ac2be14c43c58ec24f
2016-04-18 04:41:43 +05:01
Alberto Corona
e70b7e0a13 servo: Merge #10612 - Implement HTMLTextArea.setSelectionRange (continuation of #10007) (from autrilla:textdir); r=emilio
Tests on `tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html` all pass and the other tests don't panic due to double borrows anymore.

cc: @KiChjang

Fixes #9994.

Source-Repo: https://github.com/servo/servo
Source-Revision: b00c2740e300fd7b8c18276d8d416a9f78c42674
2016-04-17 21:29:31 +05:01
Zbynek Winkler
c39453b1f4 servo: Merge #10664 - Use os.path.basename instead of split('/')[-1] (from zwn:os-path-basename); r=Wafflespeanut
Fixes #10596. I have split up this commit from  #10618 as it seem the easiest to review.

Source-Repo: https://github.com/servo/servo
Source-Revision: bae2ab0771972874e9039754e11a2f54c1aae29c
2016-04-17 20:47:08 +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