Commit graph

2403 commits

Author SHA1 Message Date
Gökberk Yaltıraklı
aa7a3919c4 Made binary files show an info message instead of garbled text. 2015-10-31 18:07:13 +03:00
Bobby Holley
79ac365a68 Move EventState to rust-selectors. 2015-10-30 21:02:35 -07:00
Bobby Holley
f7f27a8146 Hoist checked and indeterminate state into EventState.
This is necessary for those selectors to take advantage of restyle hints.
2015-10-30 21:01:50 -07:00
bors-servo
7512aa69c0 Auto merge of #8114 - nfallen:7695, r=eefriedman
Implement DOMStringMap::SupportedPropertyNames and NamedNodeMap::SupportedPropertyNames #7695

Here is a draft for issue #7695 with web platform tests. 
Thanks for reviewing!
https://dom.spec.whatwg.org/#namednodemap
https://html.spec.whatwg.org/multipage/infrastructure.html#domstringmap

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8114)
<!-- Reviewable:end -->
2015-10-31 08:04:08 +05:30
bors-servo
913ac56875 Auto merge of #8279 - frewsxcv:clippy-fixes, r=eefriedman
Fix some rust-clippy violations



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8279)
<!-- Reviewable:end -->
2015-10-31 06:51:47 +05:30
Nova Fallen
73c4af626a Implement DOMStringMap::SupportedPropertyNames and NamedNodeMap::SupportedPropertyNames 2015-10-30 21:13:29 -04:00
Corey Farwell
16fa9cabc9 Fix some rust-clippy violations 2015-10-30 18:41:22 -04:00
Michael Wu
434a5f1d8b Initialize dom struct fields in declaration order 2015-10-30 15:40:43 -04:00
Michael Wu
7e786fb8ac Infer types when appropriate 2015-10-30 15:23:29 -04:00
Ms2ger
48c232f72b Remove the pointless TextEncoder::encoding field. 2015-10-30 16:48:30 +01:00
Ms2ger
e8914cd829 Update URLSearchParams to use USVString and String.
This matches the specification.
2015-10-30 16:33:29 +01:00
Ms2ger
7ccc5ad7da Support unions that contain USVStrings. 2015-10-30 16:24:04 +01:00
Ms2ger
b0841e007e Avoid a Vec copy in SendParam::extract. 2015-10-30 15:45:25 +01:00
Corey Farwell
edc1493932 Use 'atom!' macro for known static strings 2015-10-30 08:30:13 -04:00
bors-servo
a1939b0c6f Auto merge of #8255 - frewsxcv:rm-font-face-attribute-field, r=eefriedman
Remove struct field for <font> 'face' attribute

Part of #7863

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8255)
<!-- Reviewable:end -->
2015-10-30 11:29:29 +05:30
bors-servo
851e7098c9 Auto merge of #8248 - Ms2ger:finite-zero, r=jdm
Remove the Zeroable definition for Finite<T>.

I have no idea why it was added, and it appears to be unused.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8248)
<!-- Reviewable:end -->
2015-10-30 07:21:57 +05:30
bors-servo
00b60b9386 Auto merge of #8250 - wenderen:8246-remove-get-rooted, r=Ms2ger
remove get_rooted() and replace all references to it with references …

…to get()

for #8246

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8250)
<!-- Reviewable:end -->
2015-10-30 06:37:44 +05:30
Corey Farwell
c844c53ba5 Remove struct field for <font> 'face' attribute
Part of #7863
2015-10-29 18:49:44 -04:00
bors-servo
88f501c412 Auto merge of #5745 - servo:gc, r=Manishearth
Move the DOM memory management blog post into the tree.

This is a WIP, but I wanted to get eyes on it already.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5745)
<!-- Reviewable:end -->
2015-10-29 21:58:22 +05:30
Ms2ger
4dbc99c7f3 Move the DOM memory management blog post into the tree. 2015-10-29 17:25:00 +01:00
rohan.prinja
4a4f041948 remove get_rooted() and replace all references to it with references to get() 2015-10-29 21:48:39 +09:00
Ms2ger
04e32c7ab0 Remove the Zeroable definition for Finite<T>.
I have no idea why it was added, and it appears to be unused.
2015-10-29 12:21:51 +01:00
Ms2ger
85a57b5111 Add thread assertions to js.rs. 2015-10-29 11:56:17 +01:00
bors-servo
285e29c066 Auto merge of #8098 - bholley:dirty_from_layout, r=jdm
Track event state changes on Document and do the dirtying from layout

This is a first step in fixing #6942.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8098)
<!-- Reviewable:end -->
2015-10-29 00:24:53 +05:30
bors-servo
30ce2a84c1 Auto merge of #8242 - Ms2ger:update-js, r=metajack
Update js.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8242)
<!-- Reviewable:end -->
2015-10-28 23:35:40 +05:30
Ms2ger
2a2ab23dfb Update js. 2015-10-28 18:02:10 +01:00
bors-servo
3efa749976 Auto merge of #8226 - froydnj:gc-zeal, r=Ms2ger
unblock using JS_GC_ZEAL

I think these patches move the `JS_SetReservedSlot` call to the right place for #6057.  I'm not sure that the interface to `create_dom_global` is the best; passing a `JSVal` or a `*libc::c_void` seemed about equal, so I'd welcome feedback there.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8226)
<!-- Reviewable:end -->
2015-10-28 17:24:36 +05:30
bors-servo
3951c577bf Auto merge of #7963 - dagnir:issue-7774, r=eefriedman
Implement ask_for_reset for HTMLSelectElement.

Fixes #7774

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7963)
<!-- Reviewable:end -->
2015-10-28 07:45:02 +05:30
Dongie Agnir
4849033297 Add fixes based on review.
- Use if let instead of match for Option

- Refactor common code into pick_if_selected_and_reset
2015-10-27 15:20:35 -10:00
bors-servo
7c9f4644f3 Auto merge of #8169 - ax3lst:master, r=eefriedman
Implement document.createEvent(TouchEvent)

This solves #8160

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8169)
<!-- Reviewable:end -->
2015-10-28 05:55:03 +05:30
Nathan Froyd
c82b6ce843 move reserved slot setting for DOM globals
Moving this slot setting prior to initializing standard classes and
other initialization tasks means that we can effectively use JS_GC_ZEAL.

Fixes #6057.
2015-10-27 18:08:35 -04:00
Dongie Agnir
92e008307f Add fixes based on review.
- Whitespace and indentation issues

- call as_for_reset on option insert

- add link to 'pick' in standard
2015-10-27 11:52:55 -10:00
Nathan Froyd
3d39646c8e reduce indentation in CodegenRust.py
We're going to wind up tacking on different pieces of code for the
global vs. non-global case once we move the JS_SetReservedSlot call into
create_dom_global.  We might as well separate the indentation changes
into a separate commit.
2015-10-27 16:46:01 -04:00
Bobby Holley
069c40f788 Check modified event state from layout and dirty it there.
This adds some overhead, but also provides the small performance benefit of
avoiding dirtying in the case where an event state is toggled an even
number of times between reflows.

The main benefit here though is that it sets us up to be smarter about
what we mark as dirty using restyle hints.
2015-10-27 12:48:48 -07:00
Bobby Holley
441c84d75d Pass the document instead of the documentElement to reflow. 2015-10-27 12:41:16 -07:00
Bobby Holley
630b9f8fa0 Implement Hash and Eq for JS<T> and LayoutJS<T>. 2015-10-27 12:41:14 -07:00
bors-servo
d1295e9e7d Auto merge of #8040 - froydnj:codegen-arg-info, r=jdm
generate JIT argument type information for methods

This enhances `CodegenRust.py` to output `JSTypedMethodJitInfo` structures where appropriate.  This brings a notable speedup to tests like Dromaeo's `dom-attr/getAttribute`, which improves by several orders of magnitude with these patches applied.

If there are tricks for addressing the XXX comments, I would appreciate hearing them.

I think this addresses all of #6904.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8040)
<!-- Reviewable:end -->
2015-10-28 01:06:06 +05:30
Nathan Froyd
4f649ac6dd generate JIT argument type information for methods
Fixes #6904.
2015-10-27 15:09:32 -04:00
Nathan Froyd
dd74572dc0 add CGMemberJITInfo.{getJSArgType,getSingleArgType}
These are copied directly from Gecko's Codegen.py, with two changes:

- We need to use ArgType:: to qualify the enums rather than plain
  JSJitInfo::

- Given Rust's stronger notion of enums, we need to treat everything as an
  i32 so we can bitwise-or things together.
2015-10-27 15:07:55 -04:00
bors-servo
a6e2c138db Auto merge of #8217 - wenderen:8211-remove-documentprogresstask, r=Manishearth
remove DocumentProgressTask enum

for #8211

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8217)
<!-- Reviewable:end -->
2015-10-27 00:12:02 -05:00
David Zbarsky
a63c98c24a Implement HTMLCanvasElement#toDataURL 2015-10-26 21:24:21 -07:00
Rohan Prinja
6b42a7366a remove DocumentProgressTask enum 2015-10-27 10:24:37 +09:00
bors-servo
704c5ef25a Auto merge of #7979 - tschneidereit:script-loading-fixes, r=jdm
Improve spec-compliance of script loading and execution during document startup

Including proper support for async and deferred scripts.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7979)
<!-- Reviewable:end -->
2015-10-26 15:48:23 -05:00
Till Schneidereit
a0c5d47910 Improve spec-compliance of script loading and execution during document startup
Including proper support for async and deferred scripts.
2015-10-26 21:35:09 +01:00
bors-servo
6c051ce828 Auto merge of #8201 - KiChjang:add-missing-htmlpreelement, r=jdm
Add missing htmlpreelement

Fixes #7995. My tests came out pretty weird, with additional crashes and timeouts.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8201)
<!-- Reviewable:end -->
2015-10-26 14:07:50 -05:00
Keith Yeung
1fc50af8d3 Add HTMLPreElement type to xml and plaintext DOM nodes 2015-10-26 10:22:04 -07:00
bors-servo
2091aafcfb Auto merge of #8206 - Ms2ger:dlb-canvas, r=jdm
Cleanup layout interaction with canvas elements. 



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8206)
<!-- Reviewable:end -->
2015-10-26 10:27:47 -05:00
bors-servo
af8a1cb8a0 Auto merge of #8178 - frewsxcv:label, r=nox
Implement a couple attributes for <label> elements



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8178)
<!-- Reviewable:end -->
2015-10-26 09:51:56 -05:00
bors-servo
6b95c3957b Auto merge of #8097 - wenderen:8090-partialeq-for-mutheap, r=nox
implement PartialEq for MutHeap<JS<T>> and MutNullableHeap<JS<T>>

for #8090

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8097)
<!-- Reviewable:end -->
2015-10-26 06:08:01 -05:00
Ms2ger
b1f4bf617d Pass all the data layout needs from canvas elements at once. 2015-10-26 11:43:23 +01:00