Commit graph

7594 commits

Author SHA1 Message Date
Matt Brubeck
4d05bf23b8 Get rid of unnecessary clamping in text shaping 2016-04-27 10:58:16 -07:00
Matt Brubeck
83feda3ac2 Stop using deprecated str::char_* methods
Fixes deprecation warnings in the gfx crate.
2016-04-27 10:57:11 -07:00
Matt Brubeck
7e67bb788c Replace range::Range with std::ops::Range in text shaping code 2016-04-27 10:17:21 -07:00
bors-servo
88020e9151 Auto merge of #10869 - frewsxcv:dry, r=jdm
DRY out `StreamedResponse::from_http_response`.

<!-- 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/10869)
<!-- Reviewable:end -->
2016-04-27 04:23:34 -07:00
bors-servo
5fd93de7be Auto merge of #10866 - broesamle:issue10856-a, r=Ms2ger
Move abstract parser infrastructure from servohtmlparser.rs to parse

Fixes #10856

<!-- 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/10866)
<!-- Reviewable:end -->
2016-04-27 03:29:50 -07:00
bors-servo
e079e01320 Auto merge of #10848 - heycam:struct-accessor, r=bholley
Add Servo_GetStyleFoo functions to get style structs from GeckoComputedValues

r?@bholley

<!-- 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/10848)
<!-- Reviewable:end -->
2016-04-27 02:20:17 -07:00
Martin Broesamle
7c4489b193 Move abstract parser infrastructure from servohtmlparser.rs to parse 2016-04-27 10:32:59 +02:00
bors-servo
ad77d40360 Auto merge of #10868 - frewsxcv:loadcancelled, r=Ms2ger
Add `NetworkError::LoadCancelled` variant.

<!-- 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/10868)
<!-- Reviewable:end -->
2016-04-27 01:26:05 -07:00
bors-servo
21c1773115 Auto merge of #10838 - bd339:iss9551, r=KiChjang
Implement step 3 according to spec

Goes towards fixing #9551

<!-- 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/10838)
<!-- Reviewable:end -->
2016-04-27 00:16:08 -07:00
Cameron McCormack
88f51af3f8 Add Servo_GetStyleFoo functions to get style structs from GeckoComputedValues.
While we're here we also:

* remove any code conditional on style_struct.gecko_ffi_name, since all
  style structs now do have a corresponding Geckos struct

* add new UIReset and XUL style structs, so that all Gecko structs are
  now present (apart from Variables, which is special)
2016-04-27 17:13:26 +10:00
Akshit Khurana
4a3addb72f Return a Result<i64, ()> from do_parse_integer
Fixes #10860
2016-04-26 23:03:16 -07:00
bd339
ac88c5e16b Implement step 3 according to spec 2016-04-27 07:45:38 +02:00
Corey Farwell
87b54ef685 DRY out StreamedResponse::from_http_response. 2016-04-27 01:00:50 -04:00
Corey Farwell
2099b190bb Remove superfluous end-of-file whitespace. 2016-04-27 00:26:37 -04:00
Corey Farwell
55c2f93740 Add NetworkError::LoadCancelled variant. 2016-04-27 00:25:27 -04:00
bors-servo
959dbac0e7 Auto merge of #10862 - asajeffrey:only-the-chrome-survives, r=SimonSapin
Don't kill the root pipeline when randomly killing pipelines.

Useful for stress-testing the browser chrome, e.g. testing #10334.

<!-- 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/10862)
<!-- Reviewable:end -->
2016-04-26 18:40:21 -07:00
bors-servo
aa078a0780 Auto merge of #10820 - SunyDays:focusevent_argument, r=Ms2ger
Implement the "focusevent" argument to Document::createEvent

close #10739

<!-- 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/10820)
<!-- Reviewable:end -->
2016-04-26 17:50:51 -07:00
SunyDays
e4f3a31caf Implement the focusevent argument to Document::createEvent 2016-04-27 01:51:48 +03:00
bors-servo
2729864af7 Auto merge of #10857 - servo:toml, r=nox
Simplify TOML syntax

* Sections like `[dependencies.foo]` can be entries in a `[dependencies]` section with the `{key = value}` syntax.
* Per-target dependencies can be expressed with more general `cfg(…)` conditions instead of exact target triples: https://github.com/rust-lang/cargo/pull/2328

<!-- 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/10857)
<!-- Reviewable:end -->
2016-04-26 15:46:37 -07:00
Simon Sapin
83b3ebf6ac Simplify TOML syntax
* Sections like `[dependencies.foo]` can be entries in a `[dependencies]`
  section with the `{key = value}` syntax.
* Per-target dependencies can be expressed with more general `cfg(…)`
  conditions instead of exact target triples:
  https://github.com/rust-lang/cargo/pull/2328
2016-04-26 23:51:36 +02:00
bors-servo
caba731da1 Auto merge of #10847 - servo:rustup-20160424, r=nox
Update rustc.

<!-- 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/10847)
<!-- Reviewable:end -->
2016-04-26 14:41:54 -07:00
bors-servo
f773dc182b Auto merge of #10824 - asajeffrey:communicate-backtrace-on-panic, r=Manishearth
Communicate a backtrace to the constellation when panicking.

Send a representation of the backtrace from a pipeline thread to the constellation in the case of panic. This is the next step in communicating the backtrace to the browser chrome (#10334).

<!-- 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/10824)
<!-- Reviewable:end -->
2016-04-26 13:17:33 -07:00
Alan Jeffrey
2a52351de0 Don't kill the root pipeline when randomly killing pipelines. 2016-04-26 14:32:11 -05:00
bors-servo
ccba2d6841 Auto merge of #10608 - KiChjang:parse-double, r=nox
Add parsing of double values in style attributes

<!-- 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/10608)
<!-- Reviewable:end -->
2016-04-26 11:59:25 -07:00
bors-servo
31a440867d Auto merge of #10722 - notriddle:table_cell_valign, r=SimonSapin
layout: Add support for vertical alignment within table cells.

Fixes #10621

<!-- 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/10722)
<!-- Reviewable:end -->
2016-04-26 11:04:41 -07:00
bors-servo
1fee7185a7 Auto merge of #10810 - mrobinson:displayitem, r=pcwalton
Merge DisplayListEntry into DisplayItem

We don't really need two levels of abstraction for every element in the
DisplayList. This simplifies the complexity of the data structure in
preparation for providing documentation and properly handling scrolling
roots.

<!-- 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/10810)
<!-- Reviewable:end -->
2016-04-26 10:13:00 -07:00
Alan Jeffrey
9153333f62 Communicate a backtrace to the constellation when panicking. 2016-04-26 11:31:36 -05:00
bors-servo
47efbea666 Auto merge of #10767 - akhan7:command, r=jdm
Added Store Command to ImageCache Task

Implemented last bullet of [Image conformance student project: Initial Steps](https://github.com/servo/servo/wiki/Image-load-conformance-student-project)

<!-- 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/10767)
<!-- Reviewable:end -->
2016-04-26 07:40:18 -07:00
bors-servo
a44ebd5024 Auto merge of #10813 - perlun:improve-mako-file-structure-v3, r=SimonSapin
Moved the rest of the longhand structs to separate files.

Sorry for the bulk size of this; I know already it's not going to be a fun thing to review. Nevertheless, it should be done so we finalize the split of this huge file into smaller, more maintable parts.

The content of stuff being moved to separate files is unchanged. Only some minor formatting changes have been made and similar, but nothing of particular interest. IMHO it should be safe to merge if all the tests are fine.

/cc @KiChjang - I know you will like this. 😄

<!-- 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/10813)
<!-- Reviewable:end -->
2016-04-26 05:56:33 -07:00
Ramana Venkata
f56bd3a6f3 Allow setting withCredentials in synchronous XMLHttpRequest
closes #10839
2016-04-26 17:08:39 +05:30
Ms2ger
40fdf450c8 Update rustc. 2016-04-26 09:52:09 +02:00
Sagar Muchhal
5b9251ed3b Added Store Command to ImageCache Task 2016-04-26 03:05:15 -04:00
bors-servo
09b2efc706 Auto merge of #10844 - sliz1:10740, r=frewsxcv
Implement the "progressevent" argument to Document::createEvent

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

<!-- 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/10844)
<!-- Reviewable:end -->
2016-04-25 22:00:24 -07:00
Stephen (Ziyun) Li
889579c6de
Implement the "progressevent" argument to Document::createEvent 2016-04-26 00:32:50 -04:00
bors-servo
5ef355cf43 Auto merge of #10842 - fabricedesre:webrender-no-nativewindow, r=Manishearth
Webrender no nativewindow

@glennw this fixed the panic when using webrender and no native display is available.

<!-- 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/10842)
<!-- Reviewable:end -->
2016-04-25 19:11:15 -07:00
Fabrice Desré
aac7101593 Don't expect a native_window when using webrender 2016-04-25 18:16:42 -07:00
bors-servo
7a582b4bf9 Auto merge of #10800 - DDEFISHER:read_profile_dir_from_file, r=frewsxcv
read cookie_jar, hsts_list, auth_cache, and local_data from file if profile_dir option is present

Last step in Persistent sessions student project

"check for the presence of the profile directory command-line option in the ResourceThread constructor and look for files that will contain serialized versions of the previous steps. If they exist, populate the appropriate fields with deserialized versions of the file contents."

Also populated local_data in StorageManager constructor

I am not sure if the handling of decoding and encoding the Option Tm type was done in the cleanest way here.

<!-- 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/10800)
<!-- Reviewable:end -->
2016-04-25 18:10:40 -07:00
Daniel
d9c32b273a read cookie_jar, hsts_list, auth_cache, and local_data from file if profile_dir option is present 2016-04-25 19:39:40 -04:00
bors-servo
81f6e70a62 Auto merge of #10785 - frewsxcv:loaderrortype-nostring, r=jdm
Refactor `LoadErrorType` to not require a `String` for every type.

Some of the `LoadErrorType` like `LoadCancelled` don't need a `String`
associated with the type since the variant is self-explanatory.

There are some variants that don't need an associated `String`, but that
can be cleaned up in a later refactor. Also, `net_traits::NetworkError`
currently requires a `String`, but that can potentially also be
refactored away too.

<!-- 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/10785)
<!-- Reviewable:end -->
2016-04-25 14:37:44 -07:00
Corey Farwell
2675d9d1ff Refactor LoadErrorType to not require a String for every type.
Some of the `LoadErrorType` like `LoadCancelled` don't need a `String`
associated with the type since the variant is self-explanatory.

There are some variants that don't need an associated `String`, but that
can be cleaned up in a later refactor. Also, `net_traits::NetworkError`
currently requires a `String`, but that can potentially also be
refactored away too.
2016-04-25 17:10:33 -04:00
bors-servo
34900814fc Auto merge of #10696 - rebstar6:referrerPolicy, r=jdm
Referer header

PR1 for https://github.com/servo/servo/issues/10311

This puts the code and data structures in place to set the Referer header based on the Referrer Policy for a given document. Note that document:: get_referrer_policy() always returns the 'No Referrer' option, so for now, this should have no impact on production code, and that policy requires that the Referer header is not added.

Later PRs will determine the policy and edit that get_referrer_policy() accordingly.

<!-- 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/10696)
<!-- Reviewable:end -->
2016-04-25 13:52:01 -07: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
Per Lundberg
4e8831457a Moved the rest of the longhand structs to separate files.
Sorry for the bulk size of this; I know already it's not going to be a fun thing to review. Nevertheless, it should be done so we finalize the split of this huge file into smaller, more maintable parts.

The content of stuff being moved to separate files is unchanged. Only some minor formatting changes have been made and similar, but nothing of particular interest. IMHO it should be safe to merge if all the tests are fine.
2016-04-25 21:36:58 +03:00
Bridget McErlean
d15495aade Modify Worker constructor to use the document's base URL. 2016-04-25 09:24:16 -07:00
bors-servo
8bf732e633 Auto merge of #10831 - mskrzypkows:storageevent, r=Ms2ger
"storageevent" argument for Document::createEvent

Fixes  #10736

<!-- 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/10831)
<!-- Reviewable:end -->
2016-04-25 03:44:24 -07:00
Maciej Skrzypkowski
6187ee631b "storageevent" argument for Document::createEvent
Fixes  #10736
2016-04-25 12:02:05 +02:00
bors-servo
a92a6360cf Auto merge of #10819 - nox:call-without-new, r=Ms2ger
Refactor the `call` hook on non-callback interface objects (fixes #10744)

<!-- 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/10819)
<!-- Reviewable:end -->
2016-04-25 02:45:29 -07:00
Anthony Ramine
4c2ca7a8c9 Refactor the call hook on non-callback interface objects (fixes #10744)
It's now set through the intermediate InterfaceConstructorBehavior structure,
which lets us improve the abstraction around NonCallbackInterfaceObjectClass
a bit better.

When the interface's constructor is supposed to always throw, the error for
calling `Foo()` without new is "Illegal constructor.". when the interface
actually defines an interface, the error is instead
"This constructor needs to be called with `new`.".
2016-04-25 11:44:59 +02:00
Anthony Ramine
a45f117838 Make NonCallbackInterfaceObjectClass::new unsafe 2016-04-25 10:51:07 +02:00
bors-servo
59205323da Auto merge of #10805 - tylersouthwick:webglcontextevent, r=Ms2ger
implement webglcontextevent

fixes #10742

<!-- 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/10805)
<!-- Reviewable:end -->
2016-04-25 01:50:52 -07:00