Commit graph

419 commits

Author SHA1 Message Date
bors-servo
ee158cc65f Auto merge of #9603 - Ms2ger:document-bc, r=jdm
Store a pointer to the browsing context in the Document.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9603)
<!-- Reviewable:end -->
2016-02-19 12:49:35 +05:30
bors-servo
d8ffa3d0b8 Auto merge of #9529 - paulrouget:focusEvents, r=asajeffrey
Implement focus, blur, focusin and focusout events

Based on https://github.com/servo/servo/pull/7985

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

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9529)
<!-- Reviewable:end -->
2016-02-18 09:03:42 +05:30
Paul Rouget
c7195cb456 Implement focus and blur events 2016-02-18 03:49:31 +01:00
Peter
e39e59ef18 #1716 The indicated part of the document.
Interactive test for fragid resolution.

    Added HTML tests for scrolling to fragid

    Applied algorithm from whatwg spec
    https://html.spec.whatwg.org/multipage/#the-indicated-part-of-the-document

    Changes following code review
2016-02-17 00:51:46 +00:00
Emilio Cobos Álvarez
dd503dfacb Refactor style to be completely backend-independent
This commit refactors the style crate to be completely independent of
the actual implementation and pseudo-elements supported.

This also adds a gecko backend which introduces parsing for the
anonymous box pseudo-elements[1], although there's still no way of
querying them.

https://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSAnonBoxList.h
2016-02-13 16:05:14 +01:00
Ms2ger
152cec69eb Store a pointer to the browsing context in the Document. 2016-02-11 13:08:11 +01:00
Josh Matthews
047bb060c1 Improve documentation for new methods. 2016-02-10 09:20:06 -05:00
Josh Matthews
b7bff424da Reorder marking of pending parser-blocking scripts to avoid reentrancy.
In cases where a pending parser-blocking script is executing, if the script
caused another load to complete (eg. by removing a pending iframe from the
DOM, thus terminating the load) then the currently-executing script would
attempt to execute itself again.
2016-02-10 09:20:02 -05:00
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