Commit graph

308 commits

Author SHA1 Message Date
Corey Farwell
4db88605d6 servo: Merge #10514 - Various 'element.rs' cleanup (from frewsxcv:element-cleanup); r=KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: 5aa62b3621f4793c559f6c7eb77e06259b0a00ea
2016-04-11 08:58:11 +05:01
shubham_jain
3256246329 servo: Merge #10257 - #10141 : Document::location set null for documents without a browsing context (from slayerjain:first_bug); r=KiChjang
Fixes #10141.

Source-Repo: https://github.com/servo/servo
Source-Revision: c33bf4987af3479c515351195a55c12dacfcc871
2016-04-10 00:10:51 +05:01
Rahul Sharma
2c5ce6248a servo: Merge #10342 - Refactors some entities from script_thread into script_runtime (from creativcoder:script-runtime-module); r=Ms2ger
Fixes #10271.

Source-Repo: https://github.com/servo/servo
Source-Revision: 883cde424b61f4a06d52da5448da0095503b29b8
2016-04-06 12:52:21 +05:01
Paul Rouget
e3fd7bc0f2 servo: Merge #9811 - forcetouch events (from paulrouget:forceTouch); r=mbrubeck
https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/SafariJSProgTopics/RespondingtoForceTouchEventsfromJavaScript.html

Not sure how we want to land that yet. Maybe reproduce the webkit events (as in this PR), or as touch/mousemouse events.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0ff8adb09778402e88fe0d0ad92f4b399ca8ca01
2016-04-05 20:38:05 +05:01
Adrian Utrilla
340cfcacf8 servo: Merge #10391 - Inlined content_changed (from autrilla:inline-content-changed); r=Ms2ger
cc @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: b568b72d760623462fe1a19544e1ad59f98e4480
2016-04-05 01:08:55 +05:01
Emilio Cobos Álvarez
74d1661a85 servo: Merge #10365 - servo: Clean up unused variables and imports (from emilio:warnings); r=Wafflespeanut
Source-Repo: https://github.com/servo/servo
Source-Revision: a29da7b48e41327aa7226bda8bea7b00dac88b6c
2016-04-04 23:10:31 +05:01
Rizky Luthfianto
629a825885 servo: Merge #10034 - Implement Document#elementsFromPoint (from rilut:implement-elementsfrompoint); r=emilio
Fixes #9859.

I'm trying to implement Document#elementsFromPoint, which I need to reuse the `get_nodes_under_mouse` and `mouse_over` function which have been removed a days ago in #9715. So I added it back while I'm not sure if my implementation is correct. Any advice will be greatly appreciated.

Source-Repo: https://github.com/servo/servo
Source-Revision: 241518a7d2c26da421d0273f101550215576c5a7
2016-04-04 12:19:39 +05:01
Corey Farwell
491d163fd9 servo: Merge #10327 - Remove get_* on getters as per RFC 0344 (from frewsxcv:get-prefix); r=ms2ger
https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis

https://github.com/servo/servo/issues/6224

Source-Repo: https://github.com/servo/servo
Source-Revision: 0760e56bb66e38a16543ed24385c29fd7c4a034b
2016-04-02 13:50:39 +05:01
Ms2ger
8531be300e servo: Merge #10304 - Implement Document::cookie correctly for cookie-averse documents (from Ms2ger:cookie-averse); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 7d79df4a05948e0ce6e3abc6bef0f833d8bf541e
2016-04-01 22:22:51 +05:01
Mohamed Albashir
8446a0072d servo: Merge #10292 - Initial steps for CSSOM (from jdm:cssom); r=jdm
Squashed and rebased #10133.

Source-Repo: https://github.com/servo/servo
Source-Revision: f335586ff538004c708d836876b359704ebed86a
2016-04-01 04:00:08 +05:01
Connor Brewster
a24820d19d servo: Merge #10202 - Added a mapping between nodes and stylesheets (from cbrewster:stylesheet-node-mapping); r=nox
Currently a work in progress solution for #10143.

I am not sure how to make the stylesheets() func return a `Ref<Vec<Arc<Stylesheet>>>` or if this way work just as well.

If anyone has any feedback, that would be great.

Source-Repo: https://github.com/servo/servo
Source-Revision: b38fafcf11d2588fecc565c581260106411ad484
2016-03-31 20:19:03 +05:01
Ms2ger
5d89cb8c05 servo: Merge #10287 - Include square brackets for IPv6 addresses in Document::domain (from Ms2ger:domain); r=jdm
The specification changed out from under us.

It's unfortunately impossible to write a test for this right now.

Source-Repo: https://github.com/servo/servo
Source-Revision: af06d32628bafe50e82a17e50d3daea2981974f2
2016-03-31 05:15:10 +05:01
Ms2ger
fb70f27034 servo: Merge #10079 - Implement encoding determination for external scripts (from servo:script-encoding); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 8e95f54501efd74007bb19009b6d2b7522872d57
2016-03-20 05:59:25 +05:01
Rebecca
1d9a694577 servo: Merge #9930 - Remove activatable element filter within HTMLElement#click() (from rebstar6:htmlclick); r=jdm
Address https://github.com/servo/servo/issues/6542

Ensure that click() calls are not limited to activatable elements. Also makes the isTrusted attribute false when synthetic click activation are called from a click() method (as per spec).

Source-Repo: https://github.com/servo/servo
Source-Revision: f2f6787189d8ea021cbd4ea3425d39ef8b1b8f93
2016-03-11 09:37:24 +05:01
Keith Yeung
f7c5861d34 servo: Merge #9217 - Redesign ScriptMsg to be more specific to DOMManipulationTaskSource (from KiChjang:dom-manipulation-msg); r=jdm
This is a large-ish PR that contains the following:
* A new directory is created under `components/script/` called `task_source`, which houses all the stuff for different task sources. Note that the ones that I have now aren't exhaustive - there are more task sources than just the generic ones.
* A `DOMManipulationTaskMsg` which eliminates some usage of `Runnable`s to fire events. Instead, they send event information to the `DOMManipulationTaskSource` and lets the `ScriptTask` handle all the event firing.
* Re-added `fn script_chan`, since I can't think of any other way to give `Trusted` values an appropriate sender.
* Rewrote step 7 of [the end](https://html.spec.whatwg.org/multipage/syntax.html#the-end) to make use of the `DOMManipulationTaskSource`

Partial #7959

Source-Repo: https://github.com/servo/servo
Source-Revision: 740965e39f4d62e5807d21734ed9a7a881eca392
2016-03-11 01:09:27 +05:01
Jack Moffitt
7d68aad107 servo: Merge #9832 - Suppress reflows before RefreshTick or FirstLoad (from metajack:suppress-reflows); r=mbrubeck
This fixes a bug where partially loaded content is displayed to the user
before it should be, usually before stylesheets have loaded. This commit
supresses reflows until either FirstLoad or RefreshTick, whichever comes
first.

Source-Repo: https://github.com/servo/servo
Source-Revision: 37bcc161fe45bf8c1cb1172b8e0d12c7d03371b6
2016-03-04 03:31:30 +05:01
Emilio Cobos Álvarez
fef86e7406 servo: Merge #9715 - script: Fix MouseOver handling (from emilio:mousemove); r=mbrubeck
Now we only query for the topmost node, and apply the hover state to all
of the parent elements.

This fixes things like #9705, where the hover state was applied only to
the children.

This also makes us more conformant with other browsers in the case of
taking in account margins and paddings.

For example, prior to this PR, when your mouse was over the inner
element, in the bottom part, `hover` styles didn't apply to the parent.

```html
<style>
div {
  padding: 10px;
  margin: 10px;
  height: 15px;
  background: blue;
}

div:hover {
  background: red;
}
</style>

<div>
  <div></div>
</div>
```

Fixes #9705

Source-Repo: https://github.com/servo/servo
Source-Revision: 056a7cf1a2284063e5d32c6627b86f6931957a74
2016-03-03 22:26:35 +05:01
Anthony Ramine
0afd393fe0 servo: Merge #9837 - Use a BTreeMap for Document::animation_frame_list (fixes #9834) (from nox:deterministic-raf); r=mbrubeck
The callbacks must stay ordered.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9ceda7de509d3dff01a766077011207f94ffadfd
2016-03-02 20:55:38 +05:01
Rizky Luthfianto
2e6459eeb6 servo: Merge #8932 - Implement Document#elementFromPoint (from rilut:add-elementfrompoint); r=nox
Related to #8666. I haven't implemented elementsFromPoint, because from my past discussion with jdm, [it's not good yet](dbfa25214b (commitcomment-14668959)) to implement elementsFromPoint because it may cause GC hazards.

By the way, I also have to include the test for this, right? I've found this [1]. So, is all I have to do is just to put this into `tests/wpt/web-platform-tests/cssom-view/elementFromPoint.html`?

[1] http://test.csswg.org/suites/cssom-view-1_dev/nightly-unstable/html/elementFromPosition.htm

Source-Repo: https://github.com/servo/servo
Source-Revision: 4bcdbe6d56d4d4e2a679ad7e0e27f2caf71f4d22
2016-03-01 02:32:50 +05:01
Paul Rouget
760de9998e servo: Merge #9740 - Support Browser API event mozbrowserconnected (from paulrouget:mozbrowserconnected); r=jdm
Fixes https://github.com/servo/servo/issues/9382

This new event is not yet documented. If this lands, I will add documentation to MDN.

Source-Repo: https://github.com/servo/servo
Source-Revision: 42f17128461f8da56a510b3454406cb74e3bba1a
2016-02-25 15:27:24 +05:01
Anthony Ramine
69b87ee72d servo: Merge #9742 - Make use of From<String> for Atom (from nox:atom-from-string); r=ecoal95
Source-Repo: https://github.com/servo/servo
Source-Revision: b3b6f092062eed2f323da88991553d0285da6a16
2016-02-25 08:10:44 +05:01
Josh Matthews
a73840d9c8 servo: Merge #9714 - Improvements to Documents' browsing contexts (from servo:browsingcontext); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: f5193ebd82b7d4daf2e5aa30948845bab7a696ea
2016-02-21 04:04:32 +05:01
Ms2ger
de2a28770a servo: Merge #9603 - Store a pointer to the browsing context in the Document (from Ms2ger:document-bc); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: ee158cc65f117f8fa10c4b706ff4009c579c7775
2016-02-19 12:20:35 +05:01
Paul Rouget
9bfde7b59b servo: Merge #9529 - Implement focus, blur, focusin and focusout events (from paulrouget:focusEvents); r=asajeffrey
Based on https://github.com/servo/servo/pull/7985

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

Source-Repo: https://github.com/servo/servo
Source-Revision: d8ffa3d0b85815a5ff62491f9f3bc7445834fc0e
2016-02-18 08:34:42 +05:01
Peter
77f0496d57 servo: Merge #9632 - Addresses Issue #1716. Indicated part of the document (from peterjoel:issue_1716); r=KiChjang
Fixes #1716.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8d63eff463417cdc739dd291d0ae4ab225b8dce5
2016-02-17 14:54:21 +05:01
Emilio Cobos Álvarez
b1dd4fcd79 servo: Merge #9567 - style: Make the whole style crate independent of the implementation (from emilio:general-pseudo-element-parsing); r=bholley,SimonSapin
This allows, among other things, having different implementations for parsing pseudo{elements, classes} in both `ports/geckolib` and in servo.

Source-Repo: https://github.com/servo/servo
Source-Revision: c11844cbf28054784c8d65781cff20045d8ee48b
2016-02-14 03:30:59 +05:01
Josh Matthews
401a4eb0e3 servo: Merge #6677 - Make iframes block the enclosing document's load event (from jdm:iframeblockonload); r=Ms2ger
It occurs to me as I write this that this doesn't handle the case of removing the iframe from the document before it's finished loading. Consider this an early feedback release!

Source-Repo: https://github.com/servo/servo
Source-Revision: a31f31e81977be5215f31851885e8ab46890c556
2016-02-10 19:21:29 +05:01
Paul Rouget
177aa965b3 servo: Merge #9244 - mozbrowsersecuritychange event (from paulrouget:securitychange); r=jdm
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)

Source-Repo: https://github.com/servo/servo
Source-Revision: 3d63f09361afa80b9d5c4f6b192c9bd8936094b7
2016-02-09 12:31:29 +05:01
Ms2ger
523467b043 servo: Merge #9571 - Remove the global argument to EventTarget::{fire_event, fire_simple_event} (from Ms2ger:fire); r=asajeffrey
Source-Repo: https://github.com/servo/servo
Source-Revision: 0124d90a6d1fb17a986b06825f8b3d2af0055144
2016-02-09 04:39:00 +05:01
Alexander Lopatin
6da1d8c042 servo: Merge #9543 - Fix #9508: Beautify our union enums constructors (from alopatindev:enums_constructors_codingstyle_fix); r=KiChjang
Solves #9508
@jdm Please review. Thanks!

Source-Repo: https://github.com/servo/servo
Source-Revision: 28ecb0bba3fa395ed56bb2448a21e02c3ff88c8b
2016-02-07 05:30:57 +05:01
Glenn Watson
a495c8cb58 servo: Merge #9401 - Fixes additional calls to rAF (from glennw:raf-timing); r=jdm
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: bc44ae679f0d4a01194777c56e09a48fbebea1ad
2016-01-28 10:49:24 +05:01
Kishor Bhat
79a9a23449 servo: Merge #9348 - Remove unused imports in script (from therealkbhat:script-cleanup); r=Wafflespeanut
Fixes #9345.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7f16b4e47bf8aef035ea788d80172dfd1a11ecff
2016-01-18 00:07:34 +05:01
Lanza
9af07af8ba servo: Merge #9334 - DOMContentLoaded event should be trusted (from MonsieurLanza:DomContentLoadedBubbles); r=KiChjang
Hopefully resolves #9332.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5a954d2492195aab2f3bd5a8d2775ef5c586689d
2016-01-16 21:45:38 +05:01
Darin Minamoto
7af6d9dbee servo: Merge #9263 - Moved MouseButton from msg to script_traits (from DarinM223:move_mousebutton); r=KiChjang
Fixes #9250

Source-Repo: https://github.com/servo/servo
Source-Revision: 9118b64b4b610a95f48a88a198baac4eb31a04a0
2016-01-16 19:05:51 +05:01
Lanza
f516d45bea servo: Merge #9317 - DOMContentLoaded should bubble (from MonsieurLanza:DomContentLoadedBubbles); r=KiChjang
DOMContentLoaded event is currently set as non bubbling event.
Test :
./tests/wpt/web-platform-tests/html/syntax/parsing/the-end.html

Source-Repo: https://github.com/servo/servo
Source-Revision: 0c500a9da53145bf065804794137e2b4fc295dee
2016-01-15 06:24:12 +05:01
Joshua Holmer
511a4a2f92 servo: Merge #9295 - Move AnimationState to script_traits (from shssoichiro:move-animationstate); r=KiChjang
Resolves #9223

Source-Repo: https://github.com/servo/servo
Source-Revision: b26c7bd7ea92bdbf7cdcaa0e3d826a880b9cd0ca
2016-01-14 06:01:05 +05:01
apopiak
cb076cb7bf servo: Merge #9271 - Move MozBrowserEvent to script_traits (from apopiak:moveMozBrowserEvent_9225); r=KiChjang
close #9225

Source-Repo: https://github.com/servo/servo
Source-Revision: 897007f13447f6b34e220042e5cfd31f7686cfec
2016-01-13 23:41:48 +05:01
Matt McCoy
927dd11ffe servo: Merge #9282 - Making create attribute lowercase (from mattnenterprise:create-attribute-lowercase); r=nox
This should fix #9252. I need some help getting the test case to work correctly. I get output that "TITLE" should FAIL, but it PASS. How do I make it to where it should PASS?

Source-Repo: https://github.com/servo/servo
Source-Revision: ee5aead60bba3c6a482960021677aac3d559289b
2016-01-13 15:17:13 +05:01
Matt McCoy
dc281a0e73 servo: Merge #9265 - Moving MouseEventType from msg to script_traits (from mattnenterprise:move-mouse-event-type); r=KiChjang
Fixes #9251

Source-Repo: https://github.com/servo/servo
Source-Revision: 464b6414ce28ceb6b0674511c78da0bc751c2e31
2016-01-12 06:02:16 +05:01
GauriGNaik
f88e2a7946 servo: Merge #8972 - M1501: CSS Error Reporting: Final Steps Last Part (from GauriGNaik:expose-css-errors-1); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: a5a7a8318cbb9cc1338e9894aee61221a2fa3f27
2016-01-12 03:18:50 +05:01
Ms2ger
2b13d697b7 servo: Merge #9245 - Stop reexporting style types from layout_interface (from Ms2ger:reexports); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 47617578af97204168fb985b956d8c85c2b9f349
2016-01-11 23:28:51 +05:01
rohan.prinja
d440ee6a41 servo: Merge #9201 - task -> thread (from ajnirp:8512-task-thread); r=jdm
for #8512

Source-Repo: https://github.com/servo/servo
Source-Revision: d3e2f94f2024f4735f836588ed11303a0abafdf8

--HG--
rename : servo/components/canvas/canvas_paint_task.rs => servo/components/canvas/canvas_paint_thread.rs
rename : servo/components/canvas/webgl_paint_task.rs => servo/components/canvas/webgl_paint_thread.rs
rename : servo/components/compositing/compositor_task.rs => servo/components/compositing/compositor_thread.rs
rename : servo/components/gfx/font_cache_task.rs => servo/components/gfx/font_cache_thread.rs
rename : servo/components/gfx/paint_task.rs => servo/components/gfx/paint_thread.rs
rename : servo/components/layout/layout_task.rs => servo/components/layout/layout_thread.rs
rename : servo/components/net/image_cache_task.rs => servo/components/net/image_cache_thread.rs
rename : servo/components/net/resource_task.rs => servo/components/net/resource_thread.rs
rename : servo/components/net/storage_task.rs => servo/components/net/storage_thread.rs
rename : servo/components/net_traits/image_cache_task.rs => servo/components/net_traits/image_cache_thread.rs
rename : servo/components/net_traits/storage_task.rs => servo/components/net_traits/storage_thread.rs
rename : servo/components/script/script_task.rs => servo/components/script/script_thread.rs
rename : servo/components/util/task.rs => servo/components/util/thread.rs
rename : servo/tests/unit/gfx/font_cache_task.rs => servo/tests/unit/gfx/font_cache_thread.rs
rename : servo/tests/unit/net/resource_task.rs => servo/tests/unit/net/resource_thread.rs
rename : servo/tests/unit/util/task.rs => servo/tests/unit/util/thread.rs
2016-01-10 15:20:04 +05:01
Guillaume Gomez
c2448b55aa servo: Merge #9146 - Generate PartialEq automatically (from GuillaumeGomez:generate_partial_eq); r=nox
r? @nox

Fixes #8804

Source-Repo: https://github.com/servo/servo
Source-Revision: 1096183cceea9ec78ab02caa33ee2d14668d977d
2016-01-04 00:08:10 +05:01
Johannes Linke
38405ee47e servo: Merge #9123 - Fix a bunch of clippy lints (from karyon:clippy_cleanup); r=Manishearth
This fixes about 130 clippy lints. Let me know if i should split up the commit.

I wasn't sure about some of the changes, especially map_or instead of map(...).unwrap_or(...) and if let instead of single arm match were not always a strict improvement in my opinion, but i'll leave that decision to the reviewer :)

There are about 150 lints left which i thought were clippy bugs or i didn't know how to fix.

cc @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 9da739acefc7d1776bf727c8bf782eb79f241028
2016-01-03 08:47:34 +05:01
Simon Martin
6f8d33fe11 servo: Merge #9055 - Issue #9042: Report incorrect number of spaces around => in the style checker (from simartin:issue_9042); r=Wafflespeanut
Fixes https://github.com/servo/servo/issues/9042

Source-Repo: https://github.com/servo/servo
Source-Revision: f77c7928868469ef4f326a269147ae2aee6151ee
2015-12-24 10:26:48 +05:01
Arthur Skobara
4db2f3646f servo: Merge #9030 - Add helper method HTMLFormElement::fire_event (from askobara:refactoring-add-htmlformelement-fire_event); r=Manishearth
Fixes #8777

Source-Repo: https://github.com/servo/servo
Source-Revision: dafdc856ac3fc2bd000e61bdcaed2c024828de0c
2015-12-22 22:09:19 +05:01
vectorijk
2513404f5a servo: Merge #9036 - Implement Document charset (from KiChjang:document-charset); r=Ms2ger
Rebase of #7966.

Fixes #7718.

Source-Repo: https://github.com/servo/servo
Source-Revision: df087cc6cf4d97c5cc93befec922b38b56e6def7
2015-12-21 21:36:02 +05:01
k-cross
13e7c12ec9 servo: Merge #9025 - touchlist dom api #8225 (from k-cross:master); r=nox
Sorry for the wait, I just finished my finals.

Fixes #8225

Source-Repo: https://github.com/servo/servo
Source-Revision: 5b91daa92378d3b9fe80b2fc8f8072085d4949b3
2015-12-21 00:50:41 +05:01
Beomjin Kim
3b52036023 servo: Merge #9027 - Moved ScriptToCompositorMsg enum and EventResult enum to script_traits (from vwvww:cmrf2); r=jdm
Moved ScriptToCompositorMsg enum and EventResult enum to script_traits
resolving issue #8835.

(Need to be checked)
Variants in ScriptToCompositorMsg enum and EventResult enum had no doc
comment. I found some with grep command and copied it, and others I
wrote some doc comments manually to pass the build system. It needs to
be checked whether the doc comment is proper or not.

Source-Repo: https://github.com/servo/servo
Source-Revision: 62b11a28fa41d6665408844eb7b09d3479c4ea20
2015-12-21 00:01:03 +05:01
GauriGNaik
5be1a03fb2 servo: Merge #8971 - Add pipeline information to CSS error reporting (from jdm:expose-css-errors-1); r=jdm
Rebase of #8838.

Source-Repo: https://github.com/servo/servo
Source-Revision: d11f96e27074b0130760a02d39d2da4e003c820e
2015-12-14 21:22:41 +05:01