Commit Graph

1443 Commits

Author SHA1 Message Date
Anthony Ramine
cdab80c43c servo: Merge #9799 - Fix step 14.2 of Range::ExtractContents (from nox:range-extractcontents); r=KiChjang
We need the last inclusive ancestor of start node that is not an inclusive ancestor
of end node, not the first that is an inclusive ancestor of it.

Source-Repo: https://github.com/servo/servo
Source-Revision: dfdeabf57df02cf4b8a878b3b9933a08d156082d
2016-02-29 04:41:28 +05:00
Anthony Ramine
20ceb47c3a servo: Merge #9797 - Fix step 1 of Range::InsertNode (from nox:range-insertnode); r=KiChjang
The method needs to throw when trying to insert start node into range.

Source-Repo: https://github.com/servo/servo
Source-Revision: b3964a89585539082982160f5f4fb4bd05ddac2f
2016-02-29 03:48:06 +05:00
Emilio Cobos Álvarez
02369afff6 servo: Merge #9795 - script: Fix remaining bugs from Range.deleteContents (from emilio:other-range-bugs); r=nox
This makes all the `Range.deleteContents` tests pass.

I changed some `try!()`s for `unwraps()` because those calls are actually infallible.

r? @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: 492e3241715e125df3587c8454ce52c925377152
2016-02-28 23:28:41 +05:00
Anthony Ramine
e369d2b4c7 servo: Merge #9793 - Fix step 6 of Range::DeleteContents (from nox:range-deletecontents); r=ecoal95
Source-Repo: https://github.com/servo/servo
Source-Revision: be6940db59a2e8bf4fac45911848edbc8cd3dd8d
2016-02-28 19:51:51 +05:00
Josh Matthews
b71084427f servo: Merge #9784 - Fix some errors in the DOM documentation (from servo:jdm-patch-1); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 5b8041147d81f56c908080c6da36d206bdc3debe
2016-02-28 01:12:47 +05:00
Anthony Ramine
2b0d8015f8 servo: Merge #9734 - Fix the "get the parent" loop when dispatching event (fixes #6733) (from nox:finish-event-dispatch); r=Ms2ger
The DOM specification says:

> A document's get the parent algorithm, given an event, returns null
> if event's type attribute value is "load" or document does not have
> a browsing context, and the document's associated Window object
> otherwise.

Source-Repo: https://github.com/servo/servo
Source-Revision: d5ce8f308faca3dda0728a2fd92b7d875a955d15
2016-02-27 22:33:25 +05:00
Chandler Abraham
882b70a9d7 servo: Merge #9768 - disallow restricted XMLHttpRequest header prefixes (from jdm:add_disallowed_prefixes); r=jdm
Rebased from #9376.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4a7d234510d5a5f6b2b960a84f70a7260e1fc0a9
2016-02-27 21:39:46 +05:00
Nick Fitzgerald
e2b9500fa0 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:53:06 +05:00
João Oliveira
2e430a19e4 servo: Merge #9755 - use return value of invoking event handlers to cancel the event (from jdm:handlerreturn); r=jdm
Rebased from #8707. Fixes #8490. We can modify the code and test as necessary whenever we make a decision about https://github.com/whatwg/html/issues/423 in the future.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8bdffa25f9eb69b3c044d89364083755687acf8f
2016-02-27 06:40:50 +05:00
Greg Guthe
297060996c servo: Merge #9514 - HTML input value (from g-k:html-input-value); r=KiChjang
Ready for review.

Fixes #9455.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0d7a2eee2db7a2bc96f69645c9eefee5204ebbb2
2016-02-27 04:06:46 +05:00
Anthony Ramine
a163e999dd 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:14:24 +05:00
Sam Gibson
ead2896473 servo: Merge #9757 - Trigger WebSocket error event (from jdm:websocket-errors-rebase); r=jdm
Trigger a WebSocket error after receiving an invalid message from the server. Rebased from #8868. Fixes #7861.

Source-Repo: https://github.com/servo/servo
Source-Revision: 26b40afe237f97ebd81d537e8ed1201c7c1e4011
2016-02-26 13:44:06 +05:00
Eli Friedman
ed6993fee8 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:39:32 +05:00
Anthony Ramine
4acb3febf5 servo: Merge #9652 - Lazily define interface objects on globals (fixes #6419) (from nox:lazy-interface-object); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: b188cb542e92f3490b049e8db8473c7e2acf6dc9
2016-02-25 21:12:11 +05:00
Paul Rouget
1068e083ab 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:26:24 +05:00
Anthony Ramine
1856ae1166 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:09:44 +05:00
benshu
e36cabb63f servo: Merge #9661 - Completed implementation of devtools' getLayout (from jdm:devtools-inspector-get-layout); r=pcwalton
Rebase of #7267. Fixes #3598.

This avoids all of the sketchy issues of trying to read the style data for margins from the script thread. I replaced it with a layout query that fetches the margin style properties for a given element.

Source-Repo: https://github.com/servo/servo
Source-Revision: 09e987b559688caeef75aecd265c68f8d2b5c7e2
2016-02-24 23:52:43 +05:00
Paul Rouget
884ac2e5e4 servo: Merge #9731 - allow mozbrowser only for top level windows (from paulrouget:mozbrowserRootPipelineOnly); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 3212d3a91ef749db9eb118c9168b2d5f6510bb59
2016-02-24 21:48:19 +05:00
Matt Brubeck
cf6376f15e 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:25:39 +05:00
Saurav Sachidanand
e36dd9057e servo: Merge #9739 - Inline functions HTMLCollection::get_length and get_item (from saurvs:master); r=nox
Fixes https://github.com/servo/servo/issues/9726

Source-Repo: https://github.com/servo/servo
Source-Revision: 7d25243af12e8546c6a7dc5dafc15fc2a5006345
2016-02-24 17:31:29 +05:00
Ms2ger
ad2340f22d servo: Merge #9729 - Stop returning an Option from Window::browsing_context (from Ms2ger:bc-option); r=jdm
A Window always has a WindowProxy; the only reason it's wrapped in a nullable
field is the order in which those objects are created.

Source-Repo: https://github.com/servo/servo
Source-Revision: d85ee09bc72a9819269455a126a1eda018254822
2016-02-24 00:51:01 +05:00
Anthony Ramine
0bb2cc8605 servo: Merge #9067 - Make NamedNodeMap's named properties unenumerable (from nox:unenumerable-named-properties); r=jdm
https://dom.spec.whatwg.org/#dom-htmlcollection-item

Source-Repo: https://github.com/servo/servo
Source-Revision: 7192495e1a5ae24b62c61b718df38ee2f8803e03
2016-02-23 22:28:30 +05:00
Tim Neumann
f377cd7dc7 servo: Merge #9598 - Implement XHR::SetRequestHeader Step 3 (from TimNN:xhr-header-step-3); r=Ms2ger
Closes #9548.

Alternative implementation of #9595.

cc @timvandermeij

I'm not sure if a utility method on `ByteString` is the best place for this functionality, maybe a free function in XHR module would be more suitable.

Also where would be the correct place to add a test for this functionality (if required)?

Source-Repo: https://github.com/servo/servo
Source-Revision: 433232a7fffc3bd6bb830b4e1580e24801618fc1
2016-02-23 20:38:43 +05:00
Anthony Ramine
b9bea8d569 servo: Merge #9728 - Preliminary commits for lazy interface objects in #9652 (from nox:lazy-preliminaries); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 3550993075a0dedb5857a421cf39c3e8942b30f8
2016-02-23 19:43:45 +05:00
Ms2ger
061de8b75e servo: Merge #9727 - Remove an unused import from xmlhttprequest (from Ms2ger:xhr-import); r=KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: 90c7b78b12c772e4019c9724e0037b813eb8a555
2016-02-23 17:59:59 +05:00
benshu
78d56ec03d servo: Merge #8603 - Timers clean up (from benschulz:timers-clean-up); r=jdm
This PR splits the `ActiveTimers` abstraction into

 - `OneshotTimers` for scheduling "arbitrary" oneshot timers, such as XHR timeouts, and
 - `JsTimers`, based on `OneshotTimers`, for scheduling JS timers (`setTimeout`/`setInterval`).

The result is mich cleaner and the timer initialization steps now closely resemble the specification.

**Notes**
 - The second and third commit are strictly renames and code rearrangements.
 - I'm not particularily happy with the `OneshotTimerCallback` enum and its circular dependency with `XHRTimeoutCallback`, but I couldn't come up with anything better.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8f278109ce84aa482ccc0d25938970435fb6e536
2016-02-21 21:13:28 +05:00
Josh Matthews
f0b42112b4 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:03:32 +05:00
Saurav Sachidanand
0268ca97b1 servo: Merge #9689 - Update some canvas properties as enums instead of DOMString (from saurvs:master); r=jdm
Fixes https://github.com/servo/servo/issues/9617

I'm going to incrementally rollout commits and squash them finally.

Source-Repo: https://github.com/servo/servo
Source-Revision: c68fbee03ecc0054205b7f58ce232cd844eee578
2016-02-20 00:10:28 +05:00
Ms2ger
f3cd46a51c servo: Merge #9700 - Avoid some spurious string copies in XHR (from servo:xhr-to-owned); r=KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: 94d28bfecf127c9245103ed18b4a3e046795a1d7
2016-02-19 21:53:35 +05:00
Ms2ger
b9c19aff29 servo: Merge #9701 - Use if-let in set_inline_event_listener (from Ms2ger:listener-is-some); r=KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: 0209d42b7bb11b0e0e4cab8850e5f77cc0e31ad1
2016-02-19 21:04:22 +05:00
Guillaume Gomez
75cb058ec0 servo: Merge #9633 - All interface objects now share the same hasInstance (from GuillaumeGomez:has_instance); r=nox
r? @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: 267630779316d2291b10ed8e60d0f9f5f2100ab1
2016-02-19 19:19:33 +05:00
Daniel Robertson
d39717ceb2 servo: Merge #9684 - Add methods to move ByteStrings underlying bytes (from danlrobertson:i9655); r=KiChjang
Add methods to move the underlying `Vec<u8>` for `ByteString`.

I saw this as at least two methods. One to "move and replace with and empty Vec<u8> (`bytes`), and one to take ownership of the whole object (`own_bytes`). I typically also don't like adding methods with out unit tests. If you think they're unnecessary, just let me know.

As always, please let me know if you have any comments, critiques, or nits!

Fixes #9655

Source-Repo: https://github.com/servo/servo
Source-Revision: aae6525f7d23e0a1b2af0e77e7c9a91402e1f9e7
2016-02-19 16:51:14 +05:00
liviuba
3962640578 servo: Merge #9610 - Bypass GetResponseXML to better match spec (from liviuba:Fix-9553); r=KiChjang
Resolves https://github.com/servo/servo/issues/9553

Source-Repo: https://github.com/servo/servo
Source-Revision: 361bb24a4904eb8045779b7f79859dbd4970d02e
2016-02-19 15:09:59 +05:00
Ms2ger
c8eae6656d 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:19:35 +05:00
Jonathan Schuster
c5b561a9c0 servo: Merge #9526 - #8465: Update node::remove comments to reflect standard (from schuster:node-remove); r=nox
My updates so far for issue #8465. See comments there for more information.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2374e9d30e015884e87305006ac61a77b7efd5ee
2016-02-19 02:44:28 +05:00
Keith Yeung
afadf6b0b7 servo: Merge #9383 - Clean up XHR API (from KiChjang:xhr-cleanup); r=Ms2ger
I've also added annotations about the steps that we're performing within each method.

Source-Repo: https://github.com/servo/servo
Source-Revision: 96d185359d78e82d2f41a56a1793f7e657c2d103
2016-02-19 01:55:18 +05:00
Glenn Watson
3b05a50ca8 servo: Merge #9589 - Add WebRender integration to Servo (from glennw:webrender); r=pcwalton
WebRender is an experimental GPU accelerated rendering backend for Servo.

The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used).

WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!

Source-Repo: https://github.com/servo/servo
Source-Revision: ab07b06823ea9748a6091aee2281495f86f00bce
2016-02-19 00:24:06 +05:00
Keith Yeung
966fd998f2 servo: Merge #8952 - Implement planned navigation (from KiChjang:planned-navigation); r=Manishearth
Fixes #3648.

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

Source-Repo: https://github.com/servo/servo
Source-Revision: fe70efe07f6d72665f10c752884e5705d5bdc600
2016-02-18 21:56:19 +05:00
zakorgyula
c6f153e7d2 servo: Merge #9580 - Fixing issue with uniontypes not created with primitive types (from zakorgy:pythonfix); r=Ms2ger
Fixes #9531

Source-Repo: https://github.com/servo/servo
Source-Revision: 9778e5e84d95af1d1dadf71ad8a28701762bf8fc
2016-02-18 16:10:10 +05:00
Ms2ger
d90b0bab5f servo: Merge #9678 - Derive the Debug trait for WebIDL-generated enums (from servo:debug-enum); r=KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: 07cb6599d0829d2eccdd8a2a0cf46ff657901593
2016-02-18 09:21:57 +05:00
Paul Rouget
a50c6d0d91 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:33:42 +05:00
Kamil Muszyński
66afed6092 servo: Merge #9683 - Issue #9561 continued - renamed *_thread_source to *_task_source (from kmuszyn:9561-more-thread-source-renamings); r=jdm
components/script/dom/bindings/global.rs modified -> all *_thread_source occurrences renamed to *_task_source to comply with spec

Source-Repo: https://github.com/servo/servo
Source-Revision: 63dc161b773775c6755a604ec04b81c0bc479bf3
2016-02-18 04:29:32 +05:00
Rebecca
114769dd9e servo: Merge #9662 - Add support for websocket cookies (from rebstar6:websocket_cookies); r=jdm
Addresses both cookies in request and response. Resolves #9540.

Source-Repo: https://github.com/servo/servo
Source-Revision: bc034845b7e543e4e71fa21d6bf99e9f10ddb6c5
2016-02-18 02:14:01 +05:00
Anthony Ramine
6ebe6b0385 servo: Merge #9676 - Support [ExceptionClass] (from nox:domexception); r=KiChjang
Use it on DOMException.

Source-Repo: https://github.com/servo/servo
Source-Revision: 61f09cce4e7c1681fd1f7fbefada596316f06809
2016-02-17 18:21:47 +05:00
Daniel Robertson
1522ccd40e servo: Merge #9664 - Implement RootedReference<T> for Option<JS<T>> (from danlrobertson:i9654); r=KiChjang
A basic implementation of `RootedReference for Option<JS<T>>` based off of
other implementations of `RootedReference` for `Option` wrapped types.

Really I just wanted an excuse to read more in `bindings` 😄 Let me know
if you have any comments or critiques.

Fixes  #9654

Source-Repo: https://github.com/servo/servo
Source-Revision: ab381cf951f3e556d0f4c1f2107a311b0d275f91
2016-02-17 17:24:15 +05:00
Peter
ba40dfb3c2 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:53:21 +05:00
zakorgyula
bc09c20121 servo: Merge #9657 - Move parse_integer and parse_unsigned_integer from util::str to style::attr (from zakorgy:refactor); r=KiChjang
Fixes #9637

Source-Repo: https://github.com/servo/servo
Source-Revision: c075092fe067292b58a781169da937d1f047b62e
2016-02-17 14:05:26 +05:00
Daniel Robertson
7af3549f07 servo: Merge #9625 - Implement step 9 of XHR Open method (from danlrobertson:i9547); r=KiChjang
Implement step 9 of the [XMLHttpRequest Open](https://xhr.spec.whatwg.org/#dom-xmlhttprequest-open) method. Thanks to @KiChjang for all the help!

As always, comments and critiques are welcomed!

Fix: #9547
Source-Repo: https://github.com/servo/servo
Source-Revision: c388c83dcdab0f4c7c8026a9ba1a123e0b59fad9
2016-02-17 02:21:44 +05:00
Jayflux
af38fc2eb5 servo: Merge #9647 - refactor, moving functions into attr and htmlfontelemend fixes #9639 … (from Jayflux:hotfix/9638); r=nox
…#9638

Source-Repo: https://github.com/servo/servo
Source-Revision: 5f8cfcd512bddba306def79aaec6cae6cdbff76b
2016-02-16 04:03:01 +05:00
Prabhjyot Singh Sodhi
857b545b86 servo: Merge #9648 - fix Node-isEqualNode.html test failure (from psdh:fixnodeiseual); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 3ef0bb4b374e45fe8e9fb1192307c1b0224a0006
2016-02-16 02:05:47 +05:00