Commit graph

16303 commits

Author SHA1 Message Date
Connor Brewster
b09570b2b6 Added global state struct
Replace hsts_list, auth_cache, and cookie_jar with http_state

Reverted a few changes

Moved http_state back to factory
Removed unnecessary Arc

Removed Arc for http_state
2016-03-25 12:35:40 -06:00
Emilio Cobos Álvarez
0a609e81c7 geckolib: Update docs to point to the bindings file. 2016-03-25 18:55:58 +01:00
Emilio Cobos Álvarez
6c851c88ea geckolib: Update bindings with vtable generation and anonymous unions
Only 9 tests failing!

```
bindgen_test_layout_FontFamilyList
bindgen_test_layout_StyleAnimation
bindgen_test_layout_nsFont
bindgen_test_layout_nsStyleBackground
bindgen_test_layout_nsStyleDisplay
bindgen_test_layout_nsStyleFont
bindgen_test_layout_nsStyleGridTemplate
bindgen_test_layout_nsStylePosition
bindgen_test_layout_nsStyleSVG
```

The dependencies are:

 * FontFamilyList makes nsFont fail which makes nsStyleFont fail.
 * nsStyleGridTemplate makes nsStylePosition fail
 * StyleAnimation makes nsStyleDisplay fail

nsStyleGridTemplate and nsStyleSVG failures seem to be bitfield-related.

Except the bitfield-related values and those deps, I don't know what
might cause the other failures, we'll have to check carefully C++
member alignments.
2016-03-25 18:49:23 +01:00
Emilio Cobos Álvarez
c220fcdb00 geckolib: Update bindings with enum name mangling 2016-03-25 18:49:10 +01:00
Emilio Cobos Álvarez
58591652f8 geckolib: Add 100% compilable bindings for the first time! \o/
This still fails some tests (20 of 130 IIRC).

Most of them are derived from others, and those who arent I think it's
because of:

 1. A vtable: Since we don't generate functions I think we don't do the
vtable calculation.

 2. Premature opaque structs: It's the case for nsDataHashtable, where
we generate a 0 byte struct, since we calculate it using sizeof() and
the type is not complete without the type parameters.

 3. Some other subtlety? I think we miss a case of enum-in-union or
something like that, that is explicitely disabled in bindgen since the C
standard forbids it. I think it can be enabled without too much problem.

Anyways, I'll leave it for tomorrow! \o/
2016-03-25 18:48:58 +01:00
Emilio Cobos Álvarez
ef59da51d5 geckolib: Get nsMargin and nsCoord working
I had to make them opaque types since there were so many template
parameters and inheritance when including gfx that... I got scared.
2016-03-25 18:48:43 +01:00
Emilio Cobos Álvarez
247ac2542a geckolib: Stop blacklisting empty types
My fork of bindgen supports them now and doesn't generate tests for
them now.
2016-03-25 18:48:23 +01:00
Emilio Cobos Álvarez
b433d80deb geckolib: Blacklist some more comparators in regen_style_structs.sh
We *do* generate bindings for them, and they compile fine, but the
expected size for them is not correct.

My guess is that C++ types without members have at least 1 byte to be
addressable.

I'll test that later, but for now we don't care about them...
2016-03-25 18:48:00 +01:00
Emilio Cobos Álvarez
88c42cb58f geckolib: tools: Checkout correct nsString bindings 2016-03-25 18:47:35 +01:00
Emilio Cobos Álvarez
3df2eaa410 geckolib: Allow generating correct bindings for nsString
Which is already a win!

I'll keep moving into other style structs later.
2016-03-25 18:47:13 +01:00
Emilio Cobos Álvarez
706285123c geckolib: tools: Switch to llvm+clang 38
It also has our patches, and we'll benefit from improvements.
2016-03-25 18:46:45 +01:00
Emilio Cobos Álvarez
13d7b33a04 geckolib: Define a few MOZ_* things to hack around more easily. 2016-03-25 18:43:42 +01:00
Emilio Cobos Álvarez
18b1cc68db geckolib: Quote paths and remove things after the first non-preceding whitespace
This should allow `regen_style_structs.sh` to run on mac, where a path
like:

/.../Frameworks (framework dir)

was reported.
2016-03-25 18:43:42 +01:00
Emilio Cobos Álvarez
a6ffabb2ad geckolib: Add basic documentation, be consistent and safe with quotes 2016-03-25 18:43:42 +01:00
Emilio Cobos Álvarez
38b30c6490 geckolib: Don't hardcode library paths
It feels like a hack but it's supposed to work in any clang...
2016-03-25 18:43:42 +01:00
Emilio Cobos Álvarez
0128e985f6 geckolib: export LD_LIBRARY_PATH for linux 2016-03-25 18:43:42 +01:00
bors-servo
a211bd1a12 Auto merge of #10193 - larsbergstrom:use_rustflags, r=Ms2ger
Use rustflags

r? @Ms2ger

<!-- 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/10193)
<!-- Reviewable:end -->
2016-03-25 22:42:17 +05:30
Lars Bergstrom
e83369dd25 Enable NEON feature to get hard floats on Android devices 2016-03-25 10:50:54 -05:00
Lars Bergstrom
0f1107baef Remove rustc wrapper script for gold in favor of using RUSTFLAGS 2016-03-25 10:50:21 -05:00
Lars Bergstrom
dbd25fc41a Update Cargo to pick up RUSTFLAGS support 2016-03-25 10:49:37 -05:00
Matt Brubeck
db2c1841cb Fix delete_char when selection range is empty
An empty selection range should be treated the same as no selection.
Fixes browserhtml/browserhtml#930.
2016-03-25 08:39:53 -07:00
bors-servo
59ba00ed84 Auto merge of #9353 - nox:domtokenlist-replace, r=asajeffrey
Implement and test DOMTokenList.replace (fixes #8511)

Thanks to @sankha93 for the original work in #8525.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9353)
<!-- Reviewable:end -->
2016-03-25 18:26:27 +05:30
Ms2ger
dbc65d1da7 Update xml5ever. 2016-03-25 09:58:58 +01:00
bors-servo
38e8c923b5 Auto merge of #10154 - stjepang:fix-local-urls-only-10147, r=KiChjang
Fix #10147: Correctly handle flag local_urls_only

In function Request::fetch_main, flag local_urls_only (if set)
should allow fetching local urls only. Before this change, the flag had
the inverse behaviour.

Fixes #10147.
Test with: `./mach test-unit -p net fetch::test_fetch_with_local_urls_only`

<!-- 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/10154)
<!-- Reviewable:end -->
2016-03-25 12:42:48 +05:30
bors-servo
9a8d62286c Auto merge of #9887 - schuster:HTMLHyperlinkElementUtils, r=jdm
Implement HTMLHyperlinkElementUtils for HTMLAnchorElement

Fixes #7857

Origin is omitted since it's still not available in rust-url, but since the previous PR also left it out, I'm assuming that's okay.

Please let me know if there are any style issues. There might be more concise ways to do the pattern matching that I don't know about, I guessed at the indentation style in one or two places.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9887)
<!-- Reviewable:end -->
2016-03-25 11:36:35 +05:30
Matthias Krüger
3b6afb31c6 fix #10184, remove backspace-to-navigate. 2016-03-25 02:53:46 +01:00
Matt Brubeck
08caf7412f Convert ScannedTextFragment fields into bitflags 2016-03-24 18:33:27 -07:00
Matt Brubeck
6171000875 Highlight selected text in input fields
Fixes #9993.  This does not yet allow stylesheets to set the selection colors;
instead it uses a hard-coded orange background and white foreground.
2016-03-24 18:33:26 -07:00
Matthias Krüger
3a372bc122 fix #10183, forward navigation key should not require shift to work. 2016-03-25 02:31:20 +01:00
Jaydeep
c96c26b4f7 Implement HTMLHyperlinkElementUtils for HTMLAnchorElement 2016-03-24 21:14:28 -04:00
bors-servo
2f6388c301 Auto merge of #10174 - larsbergstrom:update_egl, r=zmike
Update servo-egl to fix CEF linkage

Fixes #10130
r? @zmike

<!-- 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/10174)
<!-- Reviewable:end -->
2016-03-25 06:30:30 +05:30
bors-servo
605842f193 Auto merge of #10155 - bholley:generalize_style_structs, r=SimonSapin
Generalize the style structs

This allows geckolib to pass gecko style structs and have the style system write to them directly, provided we implement all the traits.

<!-- 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/10155)
<!-- Reviewable:end -->
2016-03-25 03:27:33 +05:30
Bobby Holley
e82aa66245 Implement more glue methods. 2016-03-24 11:50:59 -07:00
Bobby Holley
3c44dbae21 Add a skeleton implementation of TComputedValues in geckolib. 2016-03-24 11:50:58 -07:00
Bobby Holley
c2daea2c9c Parameterize the rest of the style system on TNode. 2016-03-24 11:50:57 -07:00
Bobby Holley
5c749127cc Introduce traits for style structs and computed values. 2016-03-24 11:49:46 -07:00
bors-servo
7f944afee8 Auto merge of #10111 - DDEFISHER:master, r=jdm
add auth cache to resources + set auth header from it if url does not have creds

initial attempt of

- in resource_thread.rs, define an HTTP authorization cache storage (username, password, URL) and instantiate it like the cookie_storage member (inside an Arc<Rwlock<>> value, to enable sharing it between threads)
- in modify_request_headers in http_loader.rs, implement the remaining pieces of step 12(13?) of the appropriate specification using this new authorization cache.

 for the NCSU student project Implement HTTP authorization UI and persistent sessions.

<!-- 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/10111)
<!-- Reviewable:end -->
2016-03-24 23:54:13 +05:30
Michael Howell
a5a299ea88 Disable template-contents-owner-test-002.html
https://github.com/servo/servo/issues/9723
2016-03-24 11:19:11 -07: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
Lars Bergstrom
a3818cf574 Update servo-egl to fix CEF linkage 2016-03-24 12:03:01 -05:00
Daniel
d49d3b01f2 add auth cache to resources + set auth header if url does not have creds 2016-03-24 12:24:08 -04:00
bors-servo
f2f05869d6 Auto merge of #10171 - frewsxcv:parse-length-style, r=mbrubeck
Move `util::str::parse_length` into 'style' component.

The function is only used in the 'style' component, so we'll move it
there alongside other relevant parse functions.

<!-- 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/10171)
<!-- Reviewable:end -->
2016-03-24 20:49:50 +05:30
Corey Farwell
5efbf0fa8f Move util::str::parse_length into 'style' component.
The function is only used in the 'style' component, so we'll move it
there alongside other relevant parse functions.
2016-03-24 10:45:33 -04:00
bors-servo
f56062b069 Auto merge of #10169 - jdm:formvalidation, r=jdm
Implement initial pieces of form validation.

Rebase of #10108.

<!-- 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/10169)
<!-- Reviewable:end -->
2016-03-24 19:13:02 +05:30
Sagar Muchhal
051ffba0e5 Implement initial pieces of form validation. 2016-03-24 09:07:38 -04:00
bors-servo
a8264ecc1f Auto merge of #10168 - Ms2ger:gaol, r=nox
Update gaol.

<!-- 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/10168)
<!-- Reviewable:end -->
2016-03-24 18:22:23 +05:30
Stjepan Glavina
4965c93d16 Merge branch 'master' into fix-local-urls-only-10147 2016-03-24 13:45:25 +01:00
Stjepan Glavina
3ec4515a73 Address PR comments
- Remove fn `url_is_local`
- Remove fn `set_local_urls_only`
- Fix `test_fetch_with_local_urls_only`
2016-03-24 13:42:40 +01:00
Ms2ger
69f0d85e39 Update gaol. 2016-03-24 12:32:10 +01:00
bors-servo
446783f7b6 Auto merge of #10167 - stjepang:fix-aboutblank-body, r=KiChjang
Fix fetching about:blank

When fetching about:blank, response body should be the empty byte
sequence.
Spec: https://fetch.spec.whatwg.org/#concept-basic-fetch

Before this change, response body would be set to `ResponseBody::Empty`,
and then fetching would result in an infinite loop at step 19 in fn
`main_fetch` (methods.rs).

r? @KiChjang

<!-- 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/10167)
<!-- Reviewable:end -->
2016-03-24 16:40:19 +05:30