Commit graph

786 commits

Author SHA1 Message Date
Patrick Walton
d2ff8bc1ff servo: Merge #6308 - script: Make PartialEq on element type IDs generate a lot less code (from pcwalton:debloat-partialeq); r=nox
This makes the difference between selector matching scaling on the ARM
Cortex-A9 and not, because the auto-derived `PartialEq` implementation
blows out the 32KB I-cache. With this change, there is a 2x improvement
in selector matching over sequential when using all 8 cores. (More work
needs to be done; this is a start.)

r? any DOM expert

Source-Repo: https://github.com/servo/servo
Source-Revision: c3d242544e809aca945cf0ca6c2bf0f45ce6a602
2015-06-12 21:04:05 -06:00
Avi Weinstock
23f0359eb3 servo: Merge #6340 - Remove some unnecessary allocations in text input handling (from aweinstock314:reduce-textinput-allocations); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 2168ec3c96ca9e8e1174be22be07d1168061b4b6
2015-06-12 15:00:37 -06:00
Mátyás Mustoha
a48503b881 servo: Merge #6354 - Remove gfx_traits from the dependencies of [script] (from mmatyas:canvas_remdep); r=Ms2ger
It seems @hyowon uploaded her canvas shadow patch faster than me; I've handled the color dependency a bit different, this way `gfx_traits` is not required by the script module.

Source-Repo: https://github.com/servo/servo
Source-Revision: c8c7bd900dde73d4fddafea8239f44440f1c863b
2015-06-12 10:22:54 -06:00
Hyowon Kim
a540721b23 servo: Merge #6337 - Add attributes for canvas shadows (from hyowon:shadow_attrs); r=nox
The first step of the implementation for shadows in canvas.
r? @nox @jdm
cc @yichoi

Source-Repo: https://github.com/servo/servo
Source-Revision: f163f2bf0d32861ea20470d405bb517ed5b09e84
2015-06-12 03:27:07 -06:00
Ms2ger
3e4e83073b servo: Merge #6353 - Revert "WebSocket constructor should not panic" (from servo:revert); r=Ms2ger
This reverts commit 877c369e0bc5db4286457be36d015eeb1f0ae2f2.

Source-Repo: https://github.com/servo/servo
Source-Revision: 85d839fb5c6ff023897828b0873caa8972842969
2015-06-12 02:44:37 -06:00
Jinwoo Song
fb5908901f servo: Merge #6338 - WebSocket constructor should not panic (from servo:ws-connect); r=Ms2ger
Make an early return when the WebSocket connection fails in the constructor.
Also let the WebSockect connection to be closed when the connection could
not be established.

Fixes #6082.
Fixes #6086.

Source-Repo: https://github.com/servo/servo
Source-Revision: a3eb253bdce7ed4ad5bcc2c2e7af9cfe01826d99
2015-06-11 05:58:56 -06:00
Corey Farwell
f95f1555cf servo: Merge #6317 - Remove fnv & smallvec crate reexports from util (from frewsxcv:rm-util-crate-reexports); r=Ms2ger
The util component specified fnv and smallvec as dependencies and publicly
reexported both of them. Several other components utilized these reexports,
presumably because fnv and smallvec used to live in the tree so reexporting
made the transition easier.

These indirect dependencies through the util component are unnecessary.

This commit removes the fnv & smallvec crate reexports in the util component.
It exchange, it adds fnv & smallvec as dependencies to non-util components
wherever needed. Finally, it removes the fnv dependency from util as it is not
utilized anywhere in the util component.

Source-Repo: https://github.com/servo/servo
Source-Revision: 35000a9b854dc0989cc473aaec0ea8c082521c66
2015-06-10 08:23:11 -06:00
Ms2ger
1bb7c4d069 servo: Merge #6323 - Fix a typo in the DOM documentation (from Ms2ger:typo); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: c86e461555902ad88d25163724798b333d21c0ef
2015-06-10 07:30:09 -06:00
Ms2ger
19c2399332 servo: Merge #6320 - Remove null_str_as_empty and null_str_as_empty_ref functions (from Ms2ger:as-empty); r=nox
With just one caller between the two functions, there doesn't seem to be
much point in having the abstraction.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6bd798a69f0ae0fe19f6385a8c1bb3204185da68
2015-06-10 05:40:26 -06:00
Ms2ger
199e8eedb1 servo: Merge #6318 - Optimize lookupPrefix (from Ms2ger:optimize-lookup-prefix); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 3ece6bc166c06b1b63f417742cb30dde0e34e63e
2015-06-10 04:30:38 -06:00
Mukilan Thiyagarajan
d0d7a0e325 servo: Merge #6319 - Fix codegen for overload resolution. Fixes #6300 (from mukilan:overload-codegen); r=Ms2ger
The cause of the issue is that the index of the overload to be invoked was being derived from the wrong lists (that contain only a subset of the overloads)  - `possibleOverloads` and `interfaceSigs` rather than the `method.signatures()` (which contains all possible overloads).

Source-Repo: https://github.com/servo/servo
Source-Revision: b46ab0c60d53461d639c74d9c6b39d0c6c2d78c9
2015-06-10 03:50:42 -06:00
Francesc Bautista
e5a8317929 servo: Merge #6284 - Fix #6242 testbinding add specialoperations (from fbau123:6242-testbinding-add-specialoperations); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 44a4b7886d05b6e219f71f958d913657b08eea7d
2015-06-09 17:12:43 -06:00
Manish Goregaokar
3a4ae3831a servo: Merge #6314 - Audit and reduce usage of unstable features (from Manishearth:feature_audit); r=mbrubeck
Will post audit report in a bit

Source-Repo: https://github.com/servo/servo
Source-Revision: 88c1cdc9fca6568d1075ea9577ac996c5f73b98f
2015-06-09 14:31:42 -06:00
ecoal95
ed9a142a22 servo: Merge #6293 - Implement new WebGL interfaces and methods (from emilio:webgl-objects); r=nox
This commit implements:
* WebGLFramebuffer
* WebGLRenderbuffer
* WebGLTexture

And adds the following methods to `WebGLRenderingContext`:
* create{Texture,Framebuffer,Renderbuffer}
* bind{Texture,Framebuffer,Renderbuffer}
* destroy{Buffer,Texture,Framebuffer,Renderbuffer}

Fixes:
* WebGLUniform location shouldn't inherit from WebGLObject.

Known Issues:
* WebGL objects have to be destroyed on drop, we may want to keep a reference to the context, or maybe a clone of the renderer to achieve this

Also refactors a huge part of the current implementation, to allow
failing on creation of different WebGL objects.

Blocked on https://github.com/servo/gleam/pull/22

A reftest for most of the added functionality is not doable right now,
we need a few more functions in order to upload a texture, for example.

Source-Repo: https://github.com/servo/servo
Source-Revision: e09c555a41b0803388e54013ac8885fb789a0fa6
2015-06-09 10:06:37 -05:00
Hyowon Kim
93ae8060b7 servo: Merge #6290 - Replace fill_color & stroke_color with fill_style & stroke_style in CanvasContextState (from hyowon:fill_or_stroke_style); r=nox
The fillStyle and strokeStyle attributes can be either strings(color), CanvasGradients, or CanvasPatterns.
The current implementation only considers strings(color).
r? @nox @jdm @pcwalton
cc @yichoi

Source-Repo: https://github.com/servo/servo
Source-Revision: ce30807be594d62b75772eac6356f84089a18c09
2015-06-08 09:49:13 -05:00
Daniel Le
40dcea91f9 servo: Merge #6299 - Avoid casting in the callers (from GreenRecycleBin:#6271); r=Ms2ger
get_proto_or_iface_array now returns *mut ProtoOrIfaceArray

Fix #6271

Source-Repo: https://github.com/servo/servo
Source-Revision: ca6a34a1cdf3b74f9eab04cf6ff914e47b37b640
2015-06-07 10:47:14 -05:00
Eduard Burtescu
1ef27572ef servo: Merge #6301 - Use the correct log crate and setup env_logger in main (from eddyb:fix-logging-2); r=larsbergstrom
Fixes #6103.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1587d8a301983b881b038c7e443ba6d1deb1f72f
2015-06-06 15:49:56 -05:00
Brian Anderson
72f556065f servo: Merge #6297 - Convert inline(always) to inline in CodegenRust and jstraceable (from brson:inline); r=jdm
This results in a 14% compile time improvement.

See https://gist.github.com/brson/b48dd03b06c406be68e6

I'm not suggesting you merge this as-is, but you might consider whether removing some of these is worth pursuing.

Source-Repo: https://github.com/servo/servo
Source-Revision: 78665336e6a3d57e43610365f52ce038ba0d9e8b
2015-06-06 08:25:29 -05:00
Ms2ger
e09e8b57a1 servo: Merge #6291 - Use if let in HTMLTableElement::SetCaption (from Ms2ger:caption); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 493f96b9ab73d41286407a78930f481a6f1b94e9
2015-06-06 07:45:43 -05:00
Wafflespeanut
d5241ec13c servo: Merge #6292 - window.performance.now values are way too big #5690; r=jdm (from Wafflespeanut:timestamp); r=jdm
Changed the operator and updated the wpt-test for `hr-time`.

Source-Repo: https://github.com/servo/servo
Source-Revision: 458a5324618b8e58565d686fdea3363a31e11973
2015-06-05 11:46:48 -05:00
Josh Matthews
c4cc28789a servo: Merge #6247 - Trace the prototype array on the global object (from jdm:tracefix); r=Ms2ger
This should allow the jQuery testsuite to complete.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9edc296c46b05606c74920a42ba0effb5c953db0
2015-06-03 05:26:26 -05:00
Philipp Hartwig
789c1bea66 servo: Merge #6231 - Restrict output of getElementsByName to HTML elements (from aopicier:get_elements_by_name); r=Ms2ger
Fixes #1745
Should I adjust the expected result of the corresponding wpt test cases?

html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace.html
html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace.xhtml

Source-Repo: https://github.com/servo/servo
Source-Revision: bb95e07f8e75663706f9077138912c4e06c3eac9
2015-06-03 04:14:18 -05:00
Mike Blumenkrantz
6cb20728b5 servo: Merge #6219 - Favicon support: way more work than anyone expected or considered (from zmike:favicons_and_stringlOWWW-MY-HEAD); r=pcwalton
Getting these down to the embedding API level required that I redo the bindings generator again, so this is more commits than anticipated.

@mbrubeck @Manishearth @pcwalton but NOT @larsbergstrom so don't even look at this.

Source-Repo: https://github.com/servo/servo
Source-Revision: b0f3417cffb211d547853b8069e7a444a1d9964f
2015-06-03 00:27:41 -05:00
Hyowon Kim
bf011a9eaf servo: Merge #6253 - Serialize colors for fill and stroke styles in canvas (issue #4761) (from hyowon:serialize_colour); r=nox
Fixes #4761
cc @yichoi
r? @jdm @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 4b1e955069509aa224c62119b78f731f102221ec
2015-06-02 19:15:09 -05:00
Manish Goregaokar
def53ee6c3 servo: Merge #6254 - Move to latest hyper everywhere, more package updates (from servo:rustup_20150601); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 20f63459ef198bf96679cbb72355917e7a774265
2015-06-02 12:53:37 -05:00
Corey Farwell
2196fc505a servo: Merge #6230 - Remove get_ prefix on getters (from frewsxcv:getters-get); r=nox
Part of #6224

I certainly didn't remove all of them; I avoided `unsafe` areas and also `components/script`

Source-Repo: https://github.com/servo/servo
Source-Revision: f6fe1953343a417b62fb310a380af7c6973849b0
2015-06-02 08:17:03 -05:00
Jacob Parker
1276c4474f servo: Merge #6193 - fixes #5232, more console log levels sent to devtools (from j3parker:fix-5232); r=nox
fixes #5232

The correct styling shows up in the Firefox devtools (e.g. a caution symbol beside warning messages.)

I couldn't quickly find the corresponding Firefox code that handles log-levels so the values I'm sending are "guesses" (but they work seem to work.) I'll look today because I'm sending "log" for Debug-level, Error for failed asserts etc.

Source-Repo: https://github.com/servo/servo
Source-Revision: ec79881471bf3e952f40ee7021b561532a9020c6
2015-06-01 20:13:30 -05:00
James Graham
35d7b3b717 servo: Merge #6009 - Add support for switching frames with the webdriver API (from jgraham:webdriver_frames); r=jdm
This moves webdriver_traits into msg to avoid a circular dependency.

Source-Repo: https://github.com/servo/servo
Source-Revision: d08995e1a94fa093b7fc1e5d918d9dca79f260d6
2015-06-01 17:30:37 -05:00
Matt Brubeck
6ed17c03e5 servo: Merge #6245 - Change not(ndebug) to debug_assertions (from mbrubeck:ndebug); r=SimonSapin
The name of this directive changed in rust-lang/rust#22980.

Source-Repo: https://github.com/servo/servo
Source-Revision: c724444ccb85551b5a0a581d673875ec9bce3d1f
2015-06-01 15:53:02 -05:00
ecoal95
6679e6dff7 servo: Merge #6240 - WebGLRenderingContext getters and getParameter (from emilio:webgl-context-enhancements); r=nox
This implements the `canvas`, `drawingBufferHeight` and `drawingBufferWidth` getters to `WebGLRenderingContext`, and an initial version of `getParameter`.

r? @jdm or @nox?

Source-Repo: https://github.com/servo/servo
Source-Revision: 042737793b1995ad93dc093ea12ec986b99e64b8
2015-06-01 10:20:14 -05:00
ecoal95
73d5e20fe6 servo: Merge #6183 - Add WebGLContextAttributes support (from emilio:webglcontextattributes); r=nox
r? @jdm

I couldn't add the `getContextAttributes` method since `CodegenRust`
doesn't know how to return a dictionary value, I'll take a look at it ASAP.

I think the helper functions can return directly the renderer, since they're used just for that, but I wanted to hear your opinions about this.

By the way I'm interested in adding more serious tests for WebGL, and I think the [khronos conformance suit](https://github.com/KhronosGroup/WebGL/tree/master/conformance-suites/1.0.3) should be the best option.

Should I try to integrate it in wpt, or making a `tests/webgl` directory (or similar) inside the servo tree? (Maybe this question should be for @Ms2ger)

Source-Repo: https://github.com/servo/servo
Source-Revision: 0de09b936e5e37c15b7865157a98ad78b1077659
2015-06-01 08:37:48 -05:00
Hyowon Kim
1ffadc119a servo: Merge #6239 - Correct the calculation of rects for drawimage (from hyowon:drawimage_rects); r=jdm
https://html.spec.whatwg.org/multipage/#dom-context-2d-drawimage
The source and destination rectangles have four points (x, y), (x+w, y), (x+w, y+h), (x, y+h), which doesn't mean rect(x, y, w, h).
cc @yichoi

Source-Repo: https://github.com/servo/servo
Source-Revision: 2a8d5952892e050a3d604741dd1007e3bd563315
2015-06-01 07:36:42 -05:00
Peter
fe672294d7 servo: Merge #5972 - Makes Node::remove recursively remove all descendants of removed node from the doc (from pgonda:remove-children-from-doc); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: bf4fc6f388676cdc31cebc742a52e9d8896575f5
2015-05-29 12:03:28 -05:00
Anthony Ramine
248f6a2dbb servo: Merge #6206 - Make throw_not_in_union() throw a TypeError (fixes #6194) (from nox:typeerror-for-unions); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: df74ed136cd7de07fd1563129b9828f5425a8dbf
2015-05-28 06:24:00 -05:00
Jinwoo Song
6a080bd126 servo: Merge #5981 - Implement NodeIterator (from Jinwoo-Song:nodeiterator); r=Manishearth
Implement NodeIterator's basic functionality. (Fixes #1235)  But the cases for node removals are not implemented yet.

r? @jdm
cc @yichoi

Source-Repo: https://github.com/servo/servo
Source-Revision: 2b52006b1c503a24d5e832934d3265d45e425f40
2015-05-28 05:14:08 -05:00
Mike Blumenkrantz
2dc4375f93 servo: Merge #6175 - Embedding: revenge of cargo (from zmike:embedding-REVENGE_OF_CARGO); r=larsbergstrom
Adds a bunch more embedding interfaces/callbacks/functionality

@larsbergstrom

Source-Repo: https://github.com/servo/servo
Source-Revision: 94ebfe81e454ca6dd68210b4475b4091e836dd1a
2015-05-27 14:17:32 -05:00
Anthony Ramine
f3ca7195dc servo: Merge #6192 - Cleanup URLSearchParams (from nox:cleanup-urlsearchparams); r=Manishearth
It now uses rust-url for its serializer.

Source-Repo: https://github.com/servo/servo
Source-Revision: d87af8ac52b16a3763420fb7ad8fb45af785a23b
2015-05-27 05:21:05 -05:00
Tamir Duberstein
29a5385bee servo: Merge #6187 - Avoid extra O(n) scan in validate_and_extract (from tamird:cleanup-validate-and-extract); r=mbrubeck
Also `debug_assert!`s that `splitn` was called with the
correct `count` argument.

Adaptation of #5778.

Source-Repo: https://github.com/servo/servo
Source-Revision: df2f8d0636922a7e89895fa61fdba30099cec9ea
2015-05-26 16:29:42 -05:00
Patrick Walton
a9af0b6fd4 servo: Merge #6028 - script: Reflow 200 milliseconds after the <body> is parsed, like Gecko does (from pcwalton:reflow-timer); r=jdm
It would be nice if HTML parsing didn't have to hog the event loop, so I didn't have to do this polling in `content_changed()`, but maybe the way we do it is unavoidable.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: e604b663f4e664b9a94d61569082b2b62de2151d
2015-05-26 13:18:26 -05:00
Tamir Duberstein
905e1fd54b servo: Merge #6168 - Implemented GetCachedMessages (from tamird:get-cached-messages); r=jdm
Rebase of #4175, closes #4175. r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 8759d42559bc5c10f8d90903f33f75bddf44d9fe
2015-05-26 10:34:03 -05:00
Anthony Ramine
9512a913c9 servo: Merge #6140 - Cleanup some gratuitous or inefficient uses of RootedVec (from nox:cleanup-rootedvec); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 7d0409b8421e1b0c055507acc7d784cac890f47e
2015-05-26 08:36:29 -05:00
Philipp Hartwig
5fd9e25365 servo: Merge #6179 - Use byte string instead of handcrafted byte array (from aopicier:byte_strings); r=jdm
Fixes #3257
In eventtarget.rs I'm not sure whether ARG_NAMES actually needs to be static!?

Source-Repo: https://github.com/servo/servo
Source-Revision: 999325460ecc71b02160e8c79e71a694987d9acd
2015-05-25 17:13:27 -05:00
Tamir Duberstein
a69d841adc servo: Merge #6169 - Use a struct variant for clarity (from tamird:struct-variant); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 34a617aaa133b0bc0756dd7d904203c9d633e69a
2015-05-25 15:53:56 -05:00
Corey Farwell
333cc6c59d servo: Merge #6174 - Reduce max line length from 150 to 120 characters (from frewsxcv:cleanup-long-lines); r=SimonSapin
Part of https://github.com/servo/servo/issues/6041

Source-Repo: https://github.com/servo/servo
Source-Revision: 542519ebfd073662bc9421ac5fa0aa01ebc0d6fe
2015-05-24 18:27:26 -05:00
Alexander Putilin
2ba83cc42b servo: Merge #6170 - fixes 6111: WebSocket close event shouldn't be Cancelable (from eleweek:fix-6111); r=Ms2ger
This fixes #6111 , @jdm said that I can work on this issue

Source-Repo: https://github.com/servo/servo
Source-Revision: 16f19b628fa630aab8cfd275a90128da7b59723b
2015-05-24 10:27:41 -05:00
Josh Matthews
afb6727d56 servo: Merge #5727 - Make external script sources load asynchronously, yet still block furthe (from jdm:parserinterrupt2); r=mbrubeck
...r parsing. Hook up document loading to async networking events.

Relies on https://github.com/servo/html5ever/pull/107, so we'll likely need to backport it rather than wait for the next rustc upgrade.

Source-Repo: https://github.com/servo/servo
Source-Revision: dd319c1a998bbd3eeb84fdc4ca8a41ee7877ca37
2015-05-21 12:37:06 -05:00
Paul Faria
e75d4a7ceb servo: Merge #6154 - Adding in a missed algorithm step number in the comments (from Nashenas88:websocket-parse-url-typo); r=jdm
This is a really small typo fix for an issue I worked on recently.

Source-Repo: https://github.com/servo/servo
Source-Revision: b84aa41c229a18fa77f4ae815fc0166cb3fbb1b6
2015-05-21 06:59:06 -05:00
Glenn Watson
de0de69bad servo: Merge #6152 - Fix document load event firing after pipeline is closed (from glennw:runnable-panic); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1060cfde68c8d355b54a271923c9682721c5ed19
2015-05-20 20:01:32 -05:00
Patrick Walton
f8784adc92 servo: Merge #5586 - net: Don't load the placeholder image for background images, only for image fragments (from pcwalton:no-broken-background-image-redux); r=glennw
r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 77099b25d590fdaac76721e7f98f4e83672e64a6
2015-05-20 16:43:31 -05:00
ecoal95
9dbd03da1c servo: Merge #6083 - First steps to layerize canvas (from emilio:layerize-canvas); r=pcwalton
I've done a bit of job to get this done. Right now readback is still used, but we have a `LayerId` -> `CanvasRenderer` map on the paint task, that we can use to get rid of that.

I'd want review, to see if this is a good approach (I know it's not the initial `CanvasId` -> renderer approach, but it's pretty similar, since a canvas involves a `PaintLayer`).

I had to do a bit of refactoring to avoid cyclic dependencies between canvas and gfx. I'd want you to review them too.

It's mergeable and doesn't break any tests :P

Some of my main concerns:
* Does the canvas render really need to be behind an `Arc<Mutex<T>>`?
* I can't clone a `NativeSurface` right now (that's why the `SendNativeSurface()` msg is unimplemented in the WebGL task). It should be easy to add that to rust-layers, supposing the caller is responsible to mark it as non-leaking, any reason to not do it?

cc @jdm @pcwalton

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

--HG--
rename : servo/components/gfx/color.rs => servo/components/gfx_traits/color.rs
2015-05-20 15:42:06 -05:00