Commit graph

2736 commits

Author SHA1 Message Date
Ms2ger
7ccc5ad7da Support unions that contain USVStrings. 2015-10-30 16:24:04 +01:00
Ms2ger
a67eaa2d82 Avoid string copies in handle_find_{element,elements}_css. 2015-10-30 15:46:17 +01:00
Ms2ger
2f88264351 Use if let in ScriptTask::notify_devtools. 2015-10-30 15:45:48 +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
0d699a2b44 Auto merge of #8241 - Manishearth:euclid_up, r=mbrubeck
Update euclid to 0.3



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8241)
<!-- Reviewable:end -->
2015-10-28 22:01:15 +05:30
Manish Goregaokar
ce5586f74a Update euclid to 0.3 2015-10-28 21:34:23 +05:30
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
Alan Jeffrey
219d1b9201 Updated to v0.1.15 of string_cache.
Manually edited ports/gonk/Cargo.lock.
Trying to rebuild ports/gonk/Cargo.lock using cargo-update produes errors:

$ ./mach update-cargo -p string_cache_shared -p string_cache_plugin -p string_cache
components/servo
    Updating registry `https://github.com/rust-lang/crates.io-index`
      Adding bitflags v0.1.1
      Adding gl_generator v0.0.27
      Adding khronos_api v0.0.7
ports/cef
    Updating registry `https://github.com/rust-lang/crates.io-index`
      Adding bitflags v0.3.2
      Adding gl_generator v0.0.27
      Adding khronos_api v0.0.8
ports/gonk
    Updating registry `https://github.com/rust-lang/crates.io-index`
Package `serde v0.5.2` does not have these features: `unstable`
2015-10-27 11:24:21 -07: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
Rohan Prinja
c1abb4fdb2 clean code as per code review 2015-10-26 03:52:05 +09:00
Ms2ger
54d3462fa5 Use the new define_methods and define_properties functions from js. 2015-10-25 19:50:10 +01:00
Axel Solis Trompler
5542f87400 Refactor document.createEvent(touchevent) 2015-10-25 16:36:16 +01:00
Corey Farwell
98a6fc07e2 Implement 'htmlFor' attribute for <label> elements 2015-10-25 08:06:44 -04:00
Corey Farwell
f97d1d148b Implement 'control' attribute for <label> elements 2015-10-25 08:06:31 -04:00
Tetsuharu OHZEKI
04967ed97e script: Element.webkitMatchesSelector()
spec:
9ac9c15486
2015-10-25 15:27:20 +09:00