Commit graph

16155 commits

Author SHA1 Message Date
Ms2ger
a84055d8fe Return the result from process_node_geometry_request. 2015-10-26 10:41:50 +01:00
Ms2ger
9754bfc330 Return the result from process_resolved_style_request. 2015-10-26 10:41:49 +01:00
Ms2ger
16b6e812a2 Return the result from process_offset_parent_query. 2015-10-26 10:41:48 +01:00
bors-servo
4e015b5378 Auto merge of #8203 - Ms2ger:unsafe-impl-baseflow, r=nox
Remove manual implementations of Send and Sync for BaseFlow.

They don't appear to be necessary.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8203)
<!-- Reviewable:end -->
2015-10-26 03:48:19 -05:00
Ms2ger
28f9302b38 Privatize FlowConstructionUtils.
This makes it match the documentation.
2015-10-26 08:52:52 +01:00
Ms2ger
c8ad7c750e Remove manual implementations of Send and Sync for BaseFlow.
They don't appear to be necessary.
2015-10-26 08:47:57 +01:00
Ms2ger
4cac3f4f97 Remove a pointless clone() from add_font_face_rules. 2015-10-25 22:46:34 +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
Ms2ger
5da7af0b14 Update js. 2015-10-25 19:49:34 +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
Ms2ger
c86141c55a Remove an unnecessary Atom::clone() call. 2015-10-25 11:08:15 +01:00
Tetsuharu OHZEKI
04967ed97e script: Element.webkitMatchesSelector()
spec:
9ac9c15486
2015-10-25 15:27:20 +09:00
Dongie Agnir
b5e991c89e Replace if-else with match. 2015-10-24 19:10:52 -10:00
bors-servo
bb88832c07 Auto merge of #8073 - eefriedman:root-lint, r=Manishearth
Make unrooted_must_root a bit more aggressive.

Basically, instead of trying to check for specific kinds of statements,
just check the types of all local variables.

Also included are some commented-out proposals for some slightly more
aggressive lints which might be useful (but trigger a little too
frequently at the moment).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8073)
<!-- Reviewable:end -->
2015-10-24 20:20:04 -05:00
Corey Farwell
48ea5959c7 Remove unnecessary allocation with getElementById 2015-10-24 17:50:42 -04:00
benshu
a3859c0726 Fixed panic in ActiveTimers.set_timeout_or_interval. 2015-10-24 11:27:59 +02:00
Gilles Leblanc
725484d619 Compute value of float according to position value
According to CSS2 Section 9.7, if 'position' has a value of 'absolute'
or 'fixed' the computed value of 'float' should be 'none'.

This changes the float to a single_keyword_computed which checks the
positioned value of the element to compute the float value.

Fixes #8002
2015-10-23 20:56:52 -04:00
Dongie Agnir
ea21db6a0f Move cast into if block. 2015-10-23 13:59:02 -10:00
Dongie Agnir
663801ed79 ask for reset and pick on option insert. 2015-10-23 13:16:52 -10:00
Dongie Agnir
6e9e1465bf Implement pick_option. 2015-10-23 13:12:06 -10:00
bors-servo
354e75a447 Auto merge of #8171 - Ms2ger:reflector, r=jdm
Remove the default implementation of Reflectable::init_reflector.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8171)
<!-- Reviewable:end -->
2015-10-23 17:49:28 -05:00
bors-servo
22a6884a67 Auto merge of #8140 - mrobinson:canvas, r=pcwalton
Integrate Canvas into the DisplayList

Canvas is currently given a layer at the stacking context level.
Instead it's DisplayItem should be given a layer directly. This fixes
painting order issues where canvases are painted on top of other
positioned content that is later in tree order. It always simplifies
the code a bit.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8140)
<!-- Reviewable:end -->
2015-10-23 17:17:12 -05:00
Dongie Agnir
b1d6b0f797 Implement ask_for_reset for HTMLSelectElement.
Fixes #7774
2015-10-23 11:47:20 -10:00
Eli Friedman
a9ef40c716 Don't allow unrooted values in function arguments. 2015-10-23 14:44:19 -07:00
Eli Friedman
81ecf7824c Make unrooted_must_root a bit more aggressive.
Basically, instead of trying to check for specific kinds of statements,
just check the types of all local variables.

Also included are some commented-out proposals for some slightly more
aggressive lints which might be useful (but trigger a little too
frequently at the moment).
2015-10-23 14:43:44 -07:00
bors-servo
ff2c7bb47b Auto merge of #8137 - romankl:gh/8126, r=nox
Remove unnecessary rooting from `CSSStyleDeclaration`

This commit will replace calls to `self.owner.root()` with `self.owner` to avoid unnecessary rooting of JS elements objects.

Ref.- Issue: #8126

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8137)
<!-- Reviewable:end -->
2015-10-23 16:38:24 -05:00
bors-servo
e3bcf7bab7 Auto merge of #8091 - nox:cleanup-range, r=eefriedman
Remove Rc<T> usage from Range

I initially used this to correctly handle ranges when their respective containers
are mutated, to get weak references of Range objects. I now realise that the weak
references should be handled at a lower level, closer to the JS-managed object.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8091)
<!-- Reviewable:end -->
2015-10-23 16:00:00 -05:00
Roman Klauke
fe2401c566 Remove unnecessary rooting from CSSStyleDeclaration
This commit will replace calls to `self.owner.root()` with `self.owner`
to avoid unnecessary rooting of JS elements objects.

Ref.- Issue: #8126
2015-10-23 20:27:15 +02:00
Rohan Prinja
fe59b62db7 make changes according to code review (#8097) 2015-10-24 01:42:22 +09:00
Ms2ger
970b8aa8bc Remove the unused default implementation of Reflectable::init_reflector. 2015-10-23 17:21:04 +02:00
Ms2ger
9be52dc41a Implement GlobalRef::reflector as an inherent method.
Reflectable is meant for actual DOM objects, not for references to them.
2015-10-23 17:20:17 +02:00
Ms2ger
8361d54a6e Cleanup some code in htmlcanvaselement.rs. 2015-10-23 16:55:12 +02:00
Axel Solis Trompler
2cb6972d14 Implement document.createEvent(TouchEvent) 2015-10-23 15:30:26 +02:00
bors-servo
94aa8ca80a Auto merge of #8167 - Ms2ger:util, r=nox
Various cleanup in util.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8167)
<!-- Reviewable:end -->
2015-10-23 07:00:09 -06:00
bors-servo
4d737b51bb Auto merge of #8155 - Ms2ger:join, r=jdm
Remove Window::layout_join_port.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8155)
<!-- Reviewable:end -->
2015-10-23 04:50:38 -06:00
Anthony Ramine
a1b15d36c9 Remove Rc<T> usage from Range
I initially used this to correctly handle ranges when their respective containers
are mutated, to get weak references of Range objects. I now realise that the weak
references should be handled at a lower-level, closer to the JS-managed object.
2015-10-23 11:12:02 +02:00
Ms2ger
4297a44435 Remove a pointless closure from spawn_named. 2015-10-23 10:35:58 +02:00
Ms2ger
cfc80582c8 Associate documentation comments for LogicalPoint's fields with the correct field. 2015-10-23 10:35:35 +02:00
Ms2ger
d20ef3b6d8 Use a where clause for rect_contains_point to bring the line under 100 columns. 2015-10-23 10:35:11 +02:00
bors-servo
dcd207f9bf Auto merge of #7204 - mbrubeck:touchevent, r=jdm
Very basic touch events and touch scrolling

This implements just enough of [Touch Events](http://w3c.github.io/touch-events/) to enable scrolling on Android without regressing basic single-touch interaction like clicking on links.

Dragging a page will scroll it, unless the page calls `preventDefault` on the "touchstart" event.

Does **not** yet support pinch zooming or other multi-touch gestures or events.

Includes a `-Z convert-mouse-to-touch` command line flag for testing on non-touch platforms.  This is also enabled by default on Android because Glutin currently translates touch input to mouse events on Android.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7204)
<!-- Reviewable:end -->
2015-10-22 15:54:01 -06:00
Matt Brubeck
316802e206 Implement Document.createTouch 2015-10-22 10:49:30 -07:00
Matt Brubeck
817eed22d1 Add a "-Z convert-mouse-to-touch" debug argument.
This is enabled by default on Android, because Glutin currently sends mouse
events instead of touch events on Android.  It's also useful for testing on
non-touch platforms.
2015-10-22 10:37:04 -07:00
Matt Brubeck
fe7460f34d Dispatch touch events and perform default touch actions.
This is currently limited to simple single-touch actions. It does not include
momentum scrolling or pinch zooming.
2015-10-22 10:37:03 -07:00
Matt Brubeck
4ed15a8853 Add bindings for TouchEvent DOM interfaces 2015-10-22 10:35:11 -07:00
bors-servo
e05999ea9f Auto merge of #8150 - Ms2ger:select-layout, r=jdm
Use the select!{} macro in LayoutTask::handle_request.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8150)
<!-- Reviewable:end -->
2015-10-22 11:14:52 -06:00
Ms2ger
1608450e4e Remove Window::layout_join_port.
It is only used in Window::force_reflow.
2015-10-22 16:12:59 +02:00
Ms2ger
9ad69586d1 Remove the ConstellationControlMsg::ReflowComplete message. 2015-10-22 16:12:58 +02:00