Commit graph

1302 commits

Author SHA1 Message Date
snf
cdcd6670ba fix defineproperty for cases with namedsetter 2015-04-27 23:47:22 +01:00
bors-servo
8ecb9d681c Auto merge of #5692 - pgonda:get_attributes-memory-safety, r=jdm
Changes Element::get_attributes to use a `&mut Rooted<JS<Attr>>` param instead of returning a `Vec<Temporary<Attr>>`, fixes  #5684.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5692)
<!-- Reviewable:end -->
2015-04-27 15:25:30 -05:00
bors-servo
b0a7d1bf86 Auto merge of #5777 - tamird:ICE-attr-prefix-atom, r=jdm
Rebase of https://github.com/Ms2ger/servo/commits/ICE-attr-prefix-atom

Some of the changes weren't necessary since the internals had been refactored some in the interim. In any case, I was unable to reproduce the ICE reported in https://github.com/rust-lang/rust/issues/18957.

@Ms2ger

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5777)
<!-- Reviewable:end -->
2015-04-27 14:37:38 -05:00
Ms2ger
9435565f85 Pass an Atom to Element::create. 2015-04-27 12:31:37 -07:00
Ms2ger
e8b02acb1d Pass Atom to Attr:new for the prefix argument. 2015-04-27 12:20:23 -07:00
Ms2ger
89a0c004d5 Store an Atom for Attr::prefix. 2015-04-27 11:51:13 -07:00
bors-servo
eefa3eba25 Auto merge of #5872 - nox:canvasgradient, r=saneyuki
The argument should be a double.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5872)
<!-- Reviewable:end -->
2015-04-27 13:45:17 -05:00
bors-servo
9ec2ce0dec Auto merge of #5868 - nox:document-legacy, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5868)
<!-- Reviewable:end -->
2015-04-27 13:06:29 -05:00
Anthony Ramine
e8e7357e99 Fix CanvasGradient.addColorStop()
The argument should be a double.
2015-04-27 19:42:48 +02:00
Patrick Walton
48299a53cb layout: Implement most of border-collapse per CSS 2.1 § 17.6.2.
Known issues:

* Collapsed borders do not correctly affect the border-box of the table
  itself.

* The content widths of all cells in a column and the content height of
  all cells in a row is the same in this patch, but not in Gecko and
  WebKit.

* Corners are not painted well. The spec does not say what to do here.

* Column spans are not handled well. The spec does not say what to do
  here either.
2015-04-27 17:12:07 +02:00
Peter
a270f3e39b Switched Element::Get_attributes to use a RootedVec instead of returning a Vec<Temporary>, fixes #5684 2015-04-27 10:04:54 -04:00
bors-servo
92359c7b9a Auto merge of #5850 - nox:nullary-callbacks, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5850)
<!-- Reviewable:end -->
2015-04-27 08:42:42 -05:00
Anthony Ramine
16973624c8 Implement Body.bgColor and Document.bgColor 2015-04-27 15:28:37 +02:00
bors-servo
56105e9f2f Auto merge of #5865 - gfxmonk:implicit-submit, r=Manishearth
With submission-blocking rules from https://html.spec.whatwg.org/multipage/forms.html#implicit-submission.

I wasn't sure if/where it would be relevant to add new tests (I couldn't find any existing tests in wpt to enable), so just let me know if this needs tests.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5865)
<!-- Reviewable:end -->
2015-04-27 08:05:25 -05:00
Anthony Ramine
34070b1348 Complete Document WebIDL interface 2015-04-27 13:05:56 +02:00
Tim Cuthbertson
69110297c9 Implement implicit form submission from input elements 2015-04-27 19:46:41 +10:00
Anthony Ramine
afafde5191 Change MutNullableJS<T> to MutNullableHeap<JS<T>> 2015-04-27 10:45:38 +02:00
ecoal95
79a5dae170 WebGL context hardware acceleration + error detection 2015-04-27 04:16:47 +02:00
bors-servo
ea00e949a4 Auto merge of #5860 - GlassAndOneHalf:remove-jstraceable, r=jdm
This PR solves Issue #5849.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5860)
<!-- Reviewable:end -->
2015-04-26 19:00:06 -05:00
Jacob Taylor-Hindle
be876b2124 Remove #[jstraceable] annotation for the RootedVec type [Issue #5849] 2015-04-27 00:19:22 +01:00
Anthony Ramine
4e7b9d319c Remove useless unsafe methods on LayoutJS<T> 2015-04-26 21:39:11 +02:00
Anthony Ramine
9369b616ce Remove useless unsafe methods on JS<T> 2015-04-26 21:39:09 +02:00
Anthony Ramine
d4f809f95e Fix generation of nullary callbacks 2015-04-26 16:49:43 +02:00
bors-servo
1389be3782 Auto merge of #5847 - Ms2ger:slice, r=SimonSapin
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5847)
<!-- Reviewable:end -->
2015-04-26 05:30:28 -05:00
Ms2ger
a862479ca8 Remove as_slice() calls from script. 2015-04-26 10:52:55 +02:00
Peter
d0f451c2e1 Removed unessary poping in dispatch_event, fixes #5843 2015-04-25 20:22:04 -04:00
bors-servo
b22a6c8095 Auto merge of #5840 - Ms2ger:attrvalue-slice, r=SimonSapin
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5840)
<!-- Reviewable:end -->
2015-04-25 08:59:26 -05:00
Ms2ger
41cc0a939e Replace the Str implementation for AttrValue by a Deref implementation. 2015-04-25 15:24:27 +02:00
Ms2ger
4108af0c11 Introduce AttrValue::atom(). 2015-04-25 15:13:03 +02:00
bors-servo
1f9de5ee2c Auto merge of #5779 - nox:css-escape, r=Ms2ger
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5779)
<!-- Reviewable:end -->
2015-04-25 05:42:41 -05:00
Anthony Ramine
31a26fa384 Implement the CSS interface 2015-04-25 12:36:38 +02:00
Anthony Ramine
7e7b421db9 Fix generation of static JS methods
They now take a global argument.
2015-04-25 12:23:39 +02:00
Dhananjay Nakrani
731411660c Implement HTMLMetaElement.{name,content} (fixes #5663). 2015-04-24 14:45:51 +02:00
bors-servo
1b08211a5e Auto merge of #5806 - nox:splittext, r=Ms2ger
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5806)
<!-- Reviewable:end -->
2015-04-23 09:38:48 -05:00
Anthony Ramine
163d97d270 Implement Text.splitText() 2015-04-23 16:36:50 +02:00
bors-servo
d037187213 Auto merge of #5768 - nox:document-title, r=Ms2ger
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5768)
<!-- Reviewable:end -->
2015-04-23 05:20:45 -05:00
Anthony Ramine
4e95a8c4c9 Implement SVG support for Document.title 2015-04-23 12:19:12 +02:00
bors-servo
43d666f94b Auto merge of #5802 - mmatyas:indentfix, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5802)
<!-- Reviewable:end -->
2015-04-22 19:49:30 -05:00
bors-servo
ac0645c236 Auto merge of #5767 - glennw:image-cache, r=larsbergstrom,jdm
* Simpler image cache API for clients to use.
 * Significantly fewer threads.
   * One thread for image cache task (multiplexes commands, decoder threads and async resource requests).
   * 4 threads for decoder worker tasks.
 * Removed ReflowEvent hacks in script and layout tasks.
   * Image elements pass a Trusted<T> to image cache, which is used to dirty nodes via script task. Previous use of Untrusted addresses was unsafe.
   * Image requests such as background-image on layout / paint threads trigger repaint only rather than full reflow.
 * Add reflow batching for when multiple images load quickly.
   * Reduces the number of paints loading wikipedia from ~95 to ~35.
 * Reasonably simple to add proper prefetch support in a follow up PR.
 * Async loaded images always construct Image fragments now, instead of generic.
   * Image fragments support the image not being present.
 * Simpler implementation of synchronous image loading for reftests.
 * Removed image holder.
 * image.onload support.
 * image NaturalWidth and NaturalHeight support.
 * Updated WPT expectations.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5767)
<!-- Reviewable:end -->
2015-04-22 19:16:46 -05:00
Glenn Watson
d8aef7208e Refactored image cache task - details below.
* Simpler image cache API for clients to use.
 * Significantly fewer threads.
   * One thread for image cache task (multiplexes commands, decoder threads and async resource requests).
   * 4 threads for decoder worker tasks.
 * Removed ReflowEvent hacks in script and layout tasks.
   * Image elements pass a Trusted<T> to image cache, which is used to dirty nodes via script task. Previous use of Untrusted addresses was unsafe.
   * Image requests such as background-image on layout / paint threads trigger repaint only rather than full reflow.
 * Add reflow batching for when multiple images load quickly.
   * Reduces the number of paints loading wikipedia from ~95 to ~35.
 * Reasonably simple to add proper prefetch support in a follow up PR.
 * Async loaded images always construct Image fragments now, instead of generic.
   * Image fragments support the image not being present.
 * Simpler implementation of synchronous image loading for reftests.
 * Removed image holder.
 * image.onload support.
 * image NaturalWidth and NaturalHeight support.
 * Updated WPT expectations.
2015-04-23 09:40:24 +10:00
bors-servo
43e664cda1 Auto merge of #5801 - Ms2ger:range, r=pcwalton
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5801)
<!-- Reviewable:end -->
2015-04-22 18:24:21 -05:00
Mátyás Mustoha
91b4246e1b Fix some irregular indentation. 2015-04-22 21:57:58 +02:00
Mátyás Mustoha
a8343a0750 Canvas: implement global composition and blending. 2015-04-22 20:54:27 +02:00
Ms2ger
4d41f1c991 Stop using the deprecated range function. 2015-04-22 20:26:40 +02:00
bors-servo
c4b7979450 Auto merge of #5773 - mmatyas:canvas_clip, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5773)
<!-- Reviewable:end -->
2015-04-22 10:40:10 -05:00
Mátyás Mustoha
6fd6eefb35 Canvas: add clipping path support. 2015-04-22 16:25:02 +02:00
Ms2ger
04b532e1fb Store a Runtime object in ScriptTask. 2015-04-22 11:17:09 +02:00
bors-servo
9974ebb2f9 Auto merge of #5547 - aweinstock314:x11-clipboard, r=jdm
Manual re-opening of #5479 (since it seems that GitHub disables re-opening with the same number after a rebase).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5547)
<!-- Reviewable:end -->
2015-04-21 14:41:32 -05:00
Avi Weinstock
cf6aef5d51 Make the channel argument to TextInput::new be optional, to support the signature expected by the unit tests. 2015-04-21 15:18:23 -04:00
Anthony Ramine
b636481ca3 Implement CSSStyleDeclaration.float (fixes #5101)
It just needs to be prefixed by an underscore.
2015-04-21 19:34:52 +02:00