Commit graph

411 commits

Author SHA1 Message Date
Josh Matthews
e9b98ad5fa Make iframes block the enclosing document's load event. Fixes #6663. 2016-02-10 09:20:00 -05:00
bors-servo
3d63f09361 Auto merge of #9244 - paulrouget:securitychange, r=jdm
mozbrowsersecuritychange event

Fixes #8544

No test yet. Is there a way to mock a https connection?

Also, I wish I could use the `HTTPSState` enum instead of a `String` when calling `trigger_mozbrowser_event` (https://github.com/servo/servo/compare/master...paulrouget:securitychange?expand=1#diff-30a18e04d7e0b66aafdf192e416cad44R306) but that would require `constellation_msg.rs` to know about `HTTPSState`, which is defined in `document.rs`, which would add a dependency to `components/msg`. I could define `HTTPSState` somewhere else maybe? Or maybe it's fine to use a `String`. But then, should I use the HTTPSState strings (`"modern/deprecated/none"`) or the mozbrowser strings (`"secure/insecure/broken"`) (as it is now)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9244)
<!-- Reviewable:end -->
2016-02-09 13:00:29 +05:30
Paul Rouget
63519c3574 mozbrowsersercuritychange event 2016-02-09 08:05:17 +01:00
Ms2ger
5317af1e19 Remove the global argument to EventTarget::{fire_event, fire_simple_event}. 2016-02-08 19:21:56 +01:00
Alexander Lopatin
2be49404be Fix #9508: Beautify our union enums constructors 2016-02-07 02:55:21 +03:00
Glenn Watson
de81d88324 Add comment to explain callback ordering 2016-01-27 09:25:20 +10:00
Glenn Watson
dfaf28d5cd Fixes additional calls to rAF.
Often, a rAF callback will request another rAF from the callback itself.

Previously, the constellation would quickly receive two messages saying
that there were no animations, and then there are animations again in the
situation above. This would make the compositor tick the new animation straight
away, causing strange fluctuations and timings in rAF callbacks.

Instead, only send the NoAnimationCallbacks message if the animation
callback queue is still empty after invoking the callbacks.

This fixes rAF timing, which now runs at the correct (vsync) framerate.
2016-01-22 16:08:28 +10:00
Kishor Bhat
1ca2073979 Remove unused imports in script 2016-01-17 12:41:28 +05:30
bors-servo
5a954d2492 Auto merge of #9334 - MonsieurLanza:DomContentLoadedBubbles, r=KiChjang
DOMContentLoaded event should be trusted

Hopefully resolves #9332.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9334)
<!-- Reviewable:end -->
2016-01-16 22:14:38 +05:30
bors-servo
9118b64b4b Auto merge of #9263 - DarinM223:move_mousebutton, r=KiChjang
Moved MouseButton from msg to script_traits

Fixes #9250

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9263)
<!-- Reviewable:end -->
2016-01-16 19:34:51 +05:30
Lanza
27b78f3b84 Use fire_event instead of DispatchEvent to make DOMContentLoaded trusted
Removed unused import.

Update expectations for EventTarget#dispatchEvent()
2016-01-16 14:12:38 +01:00
bors-servo
0c500a9da5 Auto merge of #9317 - MonsieurLanza:DomContentLoadedBubbles, r=KiChjang
DOMContentLoaded should bubble.

DOMContentLoaded event is currently set as non bubbling event.
Test :
./tests/wpt/web-platform-tests/html/syntax/parsing/the-end.html

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9317)
<!-- Reviewable:end -->
2016-01-15 06:53:12 +05:30
Lanza
eb018c0a04 DOMContentLoaded should bubble. 2016-01-14 17:11:30 +01:00
Darin Minamoto
374bd5be27 Moving MouseButton from msg to script_traits 2016-01-13 19:23:45 -08:00
Joshua Holmer
83e66d6959 Move AnimationState to script_traits
Resolves #9223
2016-01-13 18:14:12 -05:00
apopiak
4b773cefe9 move MozBrowserEvent to script_traits (+ documentation) 2016-01-13 17:48:50 +01:00
Matt McCoy
e684a20a1a Making create attribute lowercase 2016-01-12 21:03:50 -05:00
Matt McCoy
a2bf5b6b51 Moving MouseEventType from msg to script_traits 2016-01-11 19:54:51 -05:00
bors-servo
a5a7a8318c Auto merge of #8972 - GauriGNaik:expose-css-errors-1, r=jdm
M1501: CSS Error Reporting: Final Steps Last Part

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8972)
<!-- Reviewable:end -->
2016-01-12 03:47:50 +05:30
GauriGNaik
907322c666 Final steps 2016-01-11 18:48:54 +05:30
Ms2ger
9dc85e0d40 Stop reexporting ReflowGoal from layout_interface. 2016-01-11 10:00:17 +01:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00
Guillaume Gomez
99ac1a81cc Generate PartialEq automatically 2016-01-03 18:07:09 +01:00
Johannes Linke
6b215f38ee Fix a bunch of clippy lints 2016-01-02 23:27:15 +01:00
bors-servo
f77c792886 Auto merge of #9055 - simartin:issue_9042, r=Wafflespeanut
Issue #9042: Report incorrect number of spaces around => in the style checker

Fixes https://github.com/servo/servo/issues/9042

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9055)
<!-- Reviewable:end -->
2015-12-24 10:55:48 +05:30
Simon Martin
cec661fa86 Issue #9042: Report incorrect number of spaces around => in the style checker. 2015-12-23 20:54:26 +01:00
Arthur Skobara
d38771e270 Implement EventTarget::fire_simple_event and EventTarget::fire_simple_event_params 2015-12-22 13:47:57 +06:00
vectorijk
c559270b83 implement document charset
- pre-compute the adjusted encoding name

Fix build errors and update test expectations
2015-12-21 03:17:52 -08:00
bors-servo
5b91daa923 Auto merge of #9025 - k-cross:master, r=nox
touchlist dom api #8225

Sorry for the wait, I just finished my finals.

Fixes #8225

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9025)
<!-- Reviewable:end -->
2015-12-21 01:19:41 +05:30
k-cross
ae8d3f67c8 touchlist dom api #8225 2015-12-19 12:10:18 -08:00
Beomjin Kim
2637d30c2a Moved ScriptToCompositorMsg enum and EventResult enum to script_traits
Moved ScriptToCompositorMsg enum and EventResult enum to script_traits
resolving issue #8835.
2015-12-20 00:31:33 +09:00
GauriGNaik
fc81276c8e Add pipeline information to CSS error reporting. 2015-12-14 11:18:30 -05:00
Corey Farwell
4accaf50b2 Pass around event types as Atoms instead of Strings
`Event` internally stores the `type` as an `Atom`, and we're `String`s
everywhere, which can cause unnecessary allocations to occur since
they'll end up as `Atom`s anyways.
2015-12-10 23:47:25 -05:00
Tomas Cernaj
5507be2653 Move ScriptMsg from msg crate into script_traits 2015-12-09 20:50:11 +01:00
Roman Klauke
bcc53edda4 move FocusType enum to the script crate
This commit moves the FocusType enum to the script crate and replaces
all usages with the new `usage`.

Fixes #8840
2015-12-06 15:39:45 +01:00
Josh Matthews
9d3b915cac Introduce abstraction over HTML and XML parsers for parser network listener. 2015-12-04 16:32:54 -05:00
bors-servo
9c26903472 Auto merge of #8805 - Ms2ger:drain_modified_elements, r=jdm
Simplify drain_modified_elements a bit.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8805)
<!-- Reviewable:end -->
2015-12-04 20:22:54 +05:30
Ms2ger
208c05f944 Fix warnings. 2015-12-04 10:31:19 +01:00
Ms2ger
367787c155 Simplify drain_modified_elements a bit. 2015-12-03 17:52:08 +01:00
Matt Brubeck
9551363bfb If a mouse event is targeting an iframe, forward it to the iframe's inner window
Fixes #8759.

This adds a slow path for cases where the compositor's layer-based hit testing
is incorrect.  To optimize for this case, we could instead replace the
layer hit testing with display-list hit testing done in the paint task.
2015-12-03 08:19:41 -08:00
Matt Brubeck
8c4fed42b0 Minor refactoring of mouse event types
* Move some types into the `msg` crate so they can be shared more.
* Use MouseEventType instead of duplicating it in other enums.
2015-12-03 08:19:40 -08:00
bors-servo
65108348aa Auto merge of #8714 - frewsxcv:body-fgcolor, r=Ms2ger
Implement attribute 'fgColor' on 'document'

The 'text' attribute was implemented on `<body>` in #7841

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8714)
<!-- Reviewable:end -->
2015-12-01 21:40:58 +05:30
Corey Farwell
320263199f Implement attribute 'fgColor' on 'document'
The 'text' attribute was implemented on '<body>' in #7841
2015-11-30 18:19:07 -05:00
Josh Matthews
c23cbd4163 Dispatch load events for cross origin iframes. Resolves #6672. 2015-11-30 17:37:16 -05:00
bors-servo
99223656fb Auto merge of #8675 - GuillaumeGomez:master, r=nox
Add XMLDocument object

Fixes #8000

(Still working on it)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8675)
<!-- Reviewable:end -->
2015-11-27 19:29:04 +05:30
Guillaume Gomez
adf8b359bb Add XMLDocument object 2015-11-27 14:55:41 +01:00
Manish Goregaokar
dc0e467945 Upgrade to rustc 1.6.0-nightly (d5fde83ae 2015-11-12)
… and libc 0.2 and many other dependencies
2015-11-27 00:15:29 -05:00
bors-servo
8efc954531 Auto merge of #8671 - paulrouget:iframe-hit-test, r=pcwalton
Fix clip rect for iframes in hit testing code

Fixes #8080 r? @mrobinson

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8671)
<!-- Reviewable:end -->
2015-11-26 00:39:36 +05:30
Alan Jeffrey
3dec6edd10 Update string_cache to 0.2.
Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced atom!(foo) by atom!("foo").
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.
2015-11-25 10:13:21 -06:00
Matt Brubeck
7b799497d1 Convert from client to page coords in script 2015-11-25 07:16:09 +01:00