Commit graph

509 commits

Author SHA1 Message Date
Keith Yeung
3110647852 Make IFrameLoadInfo take an Option<LoadData> instead of Option<Url> 2016-04-30 21:43:01 -04:00
Ms2ger
897be5f6ee Reduce channel cloning. 2016-04-29 14:55:52 +02:00
Ms2ger
207be7d2e2 Avoid the unnecessary MainThreadScriptChan in ScriptThread::create(). 2016-04-29 14:55:52 +02:00
Ms2ger
5d2c7935d9 Remove unused SendableMainThreadScriptChan::new() method. 2016-04-29 14:55:51 +02:00
Ms2ger
57b662534f Remove unused MainThreadScriptChan::new() method. 2016-04-29 14:55:50 +02:00
Ms2ger
703d018f23 Avoid some clones. 2016-04-29 14:55:49 +02:00
Patrick Walton
7bd257089c script: Make iframes know their pipeline IDs at all times, even after
navigation.

Since WebRender uses the pipeline ID stored in the iframe element to
determine which pipeline to display, it had better be kept up to date!

Closes #9919.
2016-04-28 10:53:13 -07:00
Keith Yeung
33acb1937c Remove extraneous script_chan parameter from Trusted::new 2016-04-28 10:52:44 +02:00
bors-servo
daa1a2a0a8 Auto merge of #10647 - ConnorGBrewster:parse_xml, r=jdm
Finish hooking up XML parser

This is a work in progress PR for #10581. I just want to make sure I am headed in the right direction.

cc @jdm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10647)
<!-- Reviewable:end -->
2016-04-27 07:50:54 -07:00
Connor Brewster
3389c497c0 Finish hooking up XML parser
added script integration with xml5ever

Updated test expectations

Removed timeout test expectation

Refactors

application/xhtml+xml is treated as HTML

Updated xml5ever

Updated Text Expectations
2016-04-27 08:44:13 -06:00
Martin Broesamle
7c4489b193 Move abstract parser infrastructure from servohtmlparser.rs to parse 2016-04-27 10:32:59 +02:00
Rebecca
526525b835 Add referrer policy pass-through and referrer header logic
add pass-through from doc to http-loader for referrer_policy, ref_URL
add logic for setting referer header
add script pass-through for referrer
add unit tests for setting referer header
2016-04-25 16:41:06 -04:00
Simon Sapin
7932ab6ac2 Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
bors-servo
47a0f58f98 Auto merge of #10654 - notriddle:no_resize_on_initial_load, r=asajeffrey
compositing/script: Do not dispatch the resize event when initially l…

…oading.

No bug report corresponds to this, but I noticed it while trying to
reduce #10593

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10654)
<!-- Reviewable:end -->
2016-04-22 14:25:51 -07:00
Michael Howell
7940b22158 compositing/script: Do not dispatch the resize event when initially loading.
No bug report corresponds to this, but I noticed it while trying to
reduce #10593
2016-04-22 13:36:43 -07:00
bors-servo
7e370c4df4 Auto merge of #10710 - Ms2ger:js, r=nox
Update js.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10710)
<!-- Reviewable:end -->
2016-04-21 15:41:44 +05:30
Ravi Shankar
5e6f32a59b Propagating the load errors from network loader 2016-04-20 12:38:35 -04:00
Ms2ger
12b922b67f Update js. 2016-04-20 11:44:32 +02:00
Alan Jeffrey
cfb066ef20 Added a dedicated panic channel. 2016-04-19 09:08:44 -05:00
bors-servo
2b910678db Auto merge of #10587 - asajeffrey:add-failure-panic-message, r=Manishearth
Added panic message to failures.

Added the panic message to failures. This is a step towards #10334, since it gives us access to the panic error message when we fire a `mozbrowsererror` event. The remaining steps are also to record the backtrace, and to report the failure in the event.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10587)
<!-- Reviewable:end -->
2016-04-14 19:55:17 +05:30
Simon Sapin
6889f37d9e Remove the url! plugin.
In rust-url 1.0 the `Url` struct is going to have private fields, and there
is no way to to create an aribitrary one without going through the parser.

The plugin never had a clear demonstrated performance benefit,
it was made mostly because it was possible and relatively easy at the time.
2016-04-14 15:35:28 +02:00
Alan Jeffrey
8c0fa01884 Added panic message to failures. 2016-04-13 16:09:48 -05:00
Jack Moffitt
1bec193415 Use better JS engine defaults
This adds in preferences for all the SM 39 available options (as
retrieved from Gecko), and uses the same defaults as Gecko. A few
properties are not supported yet, and incremental GC is still always
disabled regardless of the preference setting.

This also adds back in the options that were accidentally deleted when
\#10342 was rebased, which moved things from script_thread.rs to
script_runtime.rs.
2016-04-08 08:46:22 -06:00
Stjepan Glavina
4f34422474 Fix rebasing error
This PR mistakenly removed JIT enabling/disabling by preference:
https://github.com/servo/servo/pull/10342/files
Look for `get_pref`.

I'm putting the missing piece of code into the appropriate place in
script_runtime.rs
2016-04-07 22:49:13 +02:00
Rahul Sharma
2caa9a2a76 refactors entities from script_thread into script_runtime 2016-04-06 12:46:49 +05:30
Paul Rouget
df6e7394d4 forcetouch events support
This enables Apple forcetouch DOM events. It requires the preference dom.forcetouch.enabled.

The DOM events are described here:
- https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/SafariJSProgTopics/RespondingtoForceTouchEventsfromJavaScript.html

The Cocoa mechanism is documented here:
- 20000016-SW274
2016-04-05 18:42:28 +08:00
bors-servo
863c905025 Auto merge of #10325 - stjepang:pref-disable-jit, r=mbrubeck
Add preferences to enable/disable the JITs

When creating a runtime (script.rs), we check prefs and then enable or
disable the JITs (Baseline and Ion) accordingly.

Closes #10278.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10325)
<!-- Reviewable:end -->
2016-04-05 05:50:13 +05:30
Stjepan Glavina
3ad7119b08 Add preferences to enable/disable the JITs
When creating a runtime (script.rs), we check prefs and then enable or
disable the JITs (Baseline and Ion).
2016-04-04 22:42:45 +02:00
Adrian Utrilla
bc1b8ef4c6 Inlined content_changed 2016-04-04 11:33:37 +02:00
bors-servo
0760e56bb6 Auto merge of #10327 - frewsxcv:get-prefix, r=ms2ger
Remove `get_*` on getters as per RFC 0344.

https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10327)
<!-- Reviewable:end -->
2016-04-02 14:19:39 +05:30
Corey Farwell
bf4db405e4 Remove get_* on getters as per RFC 0344.
https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis

https://github.com/servo/servo/issues/6224
2016-03-31 21:12:38 -04:00
Josh Matthews
2cfedc7288 Report errors from ScriptPort trait methods. 2016-03-31 17:14:23 +02:00
bors-servo
aac2da75f4 Auto merge of #8641 - notriddle:no_headless, r=glennw
No more headless compositor. Just the normal one.

Fixes #8573

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8641)
<!-- Reviewable:end -->
2016-03-29 12:42:01 +05:30
faineance
7c45a4fea0 change changes effecting verbosity 2016-03-27 13:54:41 +01:00
faineance
418842faf9 use self.0 instead of destructing single item tuple structs 2016-03-27 11:50:08 +01:00
Michael Howell
c9cb4839e4 No more headless compositor. Just the normal one.
This changes headless operation to strictly be a runtime option, rather
than a compile-time one. Note that the old headless version still relied
on a display server to support WebGL, while it now requires one all the
time.

Fixes #8573
2016-03-24 11:18:54 -07:00
Keith Yeung
3f2cbf0025 Add task_source directory
Use DOMManipulationTaskSource whenever possible
2016-03-10 01:05:53 -05:00
Emilio Cobos Álvarez
3662491d8f Refactor mouseover code to be more performant
This increases mouseover/out performance drastically on my machine.
2016-03-02 20:14:15 +01:00
Daniel Robertson
83b2388ef4 Implement GetElementRect webdriver command
Implement the webdriver Get Element Rect command
2016-02-24 11:41:42 -05:00
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
Keith Yeung
ace5b7a2e8 Implement planned navigation 2016-02-18 06:37:32 -05:00
Kamil Muszyński
076cc409e6 Issue #9561 Renamed *_thread_source to *_task_source and ThreadSource to TaskSource 2016-02-14 15:29:44 +01:00
Josh Matthews
a1f0b39340 Notify devtools about new script globals sooner. 2016-02-11 14:48:48 -05:00
Josh Matthews
e6d906dbbf Report CSS errors to script task for further processing. 2016-02-11 14:48:47 -05:00
Ms2ger
152cec69eb Store a pointer to the browsing context in the Document. 2016-02-11 13:08:11 +01:00
Josh Matthews
e9b98ad5fa Make iframes block the enclosing document's load event. Fixes #6663. 2016-02-10 09:20:00 -05:00
Paul Rouget
63519c3574 mozbrowsersercuritychange event 2016-02-09 08:05:17 +01:00
Josh Matthews
7eca462c5a Make iframe's load event trigger a reflow of the enclosing window. Add a catch-all reflow for all same-origin pages sharing an event loop.a 2016-01-26 16:37:23 -05:00
Patrick Walton
e5a1af5b7a compositing: Fix a couple of bugs that prevented iframes from painting
after navigation.

The first bug was that iframes were not reflowed in their parent DOM
when the child page navigated. This is fixed by simply having the
constellation notify the appropriate script thread when navigation
occurs.

The second bug was that the compositor was unable to adjust the pipeline
for existing iframe layers, only new ones. This patch adds logic to do
that.

Closes #8081.
2016-01-26 16:37:23 -05:00
Paul Rouget
a2c931e4df Check if root page exist before handling DOM events 2016-01-25 16:31:59 +01:00