Commit graph

7399 commits

Author SHA1 Message Date
Zbynek Winkler
b6dc34862a Use os.path.basename instead of split('/')[-1]
Fixes #10596.
2016-04-17 17:37:29 +02:00
bors-servo
9935e82de6 Auto merge of #10662 - frewsxcv:resource-param, r=jdm
Make `read_resource_file` param simpler and more idiomatic.

`<P: AsRef<Path>>` is also what `File::open` uses as a generic type for
the parameter.

<!-- 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/10662)
<!-- Reviewable:end -->
2016-04-17 10:40:30 +05:30
Corey Farwell
c37ab1facd Make read_resource_file param simpler and more idiomatic.
`<P: AsRef<Path>>` is also what `File::open` uses as a generic type for
the parameter.
2016-04-16 23:06:59 -04:00
bors-servo
fd994c457e Auto merge of #10655 - mbrubeck:merge-margin, r=SimonSapin
Update margins when merging inline fragments

Fixes #10633.  r? @pcwalton

<!-- 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/10655)
<!-- Reviewable:end -->
2016-04-17 08:18:04 +05:30
bors-servo
15e76eb6e2 Auto merge of #10643 - mbrubeck:empty-span-border, r=pcwalton
Fix handling of borders and padding for empty/stripped inline flows

This forces fragment generation for empty inline flows, if they have borders or padding.  Fixes #10533 and #2001.  Also includes fixes for other bugs that were uncovered by this change; see the individual commit messages for detailed explanations.  r? @pcwalton

<!-- 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/10643)
<!-- Reviewable:end -->
2016-04-17 03:31:12 +05:30
bors-servo
cc290c6e8a Auto merge of #10650 - jdm:disabletfd, r=KiChjang
Disable tinyfiledialogs on non-OS X and Linux platforms.

I haven't been able to fix the appveyor build yet, so this gives us back a usable Windows build.

<!-- 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/10650)
<!-- Reviewable:end -->
2016-04-17 02:50:19 +05:30
Matt Brubeck
782e713472 Update margins when merging inline fragments
Fixes #10633.
2016-04-16 14:13:16 -07:00
Matt Brubeck
1695d14a9e Don't strip out all empty fragments
Empty fragments may need to be layed out to draw borders, padding/background,
and insertion points.  (Fragments that consist of discardable whitespace and
control characters, on the other hand, can still be discarded.)

This ends up preserving some useless empty fragments.  It's possible we could
avoid this by storing some sort of flag on "important" empty fragments, so we
can discard the rest.
2016-04-16 13:13:07 -07:00
bors-servo
cc32c66e28 Auto merge of #10628 - KiChjang:extra-gecko-values, r=bholley
Add missing gecko keyword values to styles

Not sure if I caught them all.
Part of #10408.

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/10628)
<!-- Reviewable:end -->
2016-04-17 01:28:31 +05:30
Josh Matthews
d09a497aa5 Disable tinyfiledialogs on non-OS X and Linux platforms. 2016-04-16 15:00:31 -04:00
Keith Yeung
f5021fc0c5 Add missing gecko keyword values to styles 2016-04-16 14:06:02 -04:00
Matt Brubeck
1807fd3cc5 Generate a fragment for an empty elements with borders or padding 2016-04-16 11:01:40 -07:00
Matt Brubeck
fbef2724bf Fix up inline context flags during text fragment scanning
This fixes two problems that could cause scanned text fragments to end up with
incorrect LAST_FRAGMENT_OF_ELEMENT or FIRST_FRAGMENT_OF_ELEMENT flags:

1. If a single unscanned fragment was split into multiple scanned fragments,
   then all of them would inherit its flags.  We need to clear these flags,
   except for the first and last scanned fragment.

2. When an unscanned fragment generated zero scanned fragments, we correctly
   called `meld_with_next_inline_fragment` to transfer LAST_FRAGMENT flags to
   the preceding fragment, but we didn't do anything to transfer
   FIRST_FRAGMENT flags to the following fragment.  We can fix this by calling
   `meld_with_prev_inline_fragment` on the following fragment.
2016-04-16 10:30:03 -07:00
Matt Brubeck
b607b3a932 Fix meld_with_next_inline_fragment and add meld_with_prev_inline_fragment
Factor out a new `meld_with_prev_inline_fragment` method that mirrors the
existing `meld_with_next_inline_fragment`.

This also fixes a bug in `meld_with_next` that was already fixed in the
`meld_with_prev` by @notriddle in #10419.  The bug is that it was traversing
the inline context nodes in the wrong order.  It should start at the outermost
enclosing node, since the fragments might be at different nesting levels under
some common ancestor.
2016-04-16 10:30:01 -07:00
Matt Brubeck
587314e52b Improve debug logging of non-printable chars 2016-04-16 10:30:00 -07:00
Rizky Luthfianto
5ad312cb8e Fix Document#elementFromPoint no viewport available test 2016-04-16 17:16:27 +07:00
bors-servo
86778a0d71 Auto merge of #10644 - pcwalton:absolute-ib-split, r=mbrubeck
layout: Make absolutely-positioned blocks not generate {ib} splits.

Improves YouTube.

Closes #10642.

r? @mbrubeck

<!-- 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/10644)
<!-- Reviewable:end -->
2016-04-16 06:58:47 +05:30
Patrick Walton
e840c7aaa0 layout: Make absolutely-positioned blocks not generate {ib} splits.
Improves YouTube.

Closes #10642.
2016-04-15 17:27:25 -07:00
bors-servo
812c4ad699 Auto merge of #10637 - notriddle:absolute_float_line_height, r=pcwalton
layout: Do not propagate floats in or out of absolutely positioned flows

Fixes #10625

<!-- 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/10637)
<!-- Reviewable:end -->
2016-04-16 05:25:12 +05:30
Michael Howell
03be4583e0 Do not propagate floats in or out of absolutely positioned flows.
Fixes #10625
2016-04-15 16:01:23 -07:00
bors-servo
ccfd768c4b Auto merge of #10572 - Manishearth:and-now-his-watch-is-ended, r=asajeffrey
Replace watcher threads with panic handlers

<!-- 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/10572)
<!-- Reviewable:end -->
2016-04-16 04:03:41 +05:30
bors-servo
44d7657487 Auto merge of #10426 - rilut:fix-elementsFromPoint-no-viewport-available-test, r=nox
Fix Document#elementsFromPoint no viewport available test

Fixes #10093 and improves #10034.

<!-- 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/10426)
<!-- Reviewable:end -->
2016-04-16 00:01:23 +05:30
Rizky Luthfianto
5a3ce597d3 Fix Document#elementsFromPoint no viewport available test 2016-04-16 01:05:32 +07:00
Bobby Holley
38d2063a9d Make single_keyword take kwargs. 2016-04-15 10:08:57 -07:00
Bobby Holley
e4a8613f6d Make single_keyword_computed take kwargs. 2016-04-15 10:08:57 -07:00
Bobby Holley
dea08f4ca0 Make longhand take kwargs. 2016-04-15 10:08:57 -07:00
Bobby Holley
f58ff4a4f7 Make raw_longhand take kwargs. 2016-04-15 10:08:57 -07:00
Bobby Holley
0fe55f01b5 Alter the semantics of derived_from so that it is [] rather than None when the property is not derived.
This simplifies some logic in this patch and going forward. Note that the old code stored the
derived_from array as rust idents, but then used the parameter (not rust-ident-ified) to access
DERIVED_LONGHANDS. No other consumers actually seem to use the values in derived_from, so we
change the representation to the more natural thing.
2016-04-15 10:08:57 -07:00
Corey Farwell
12dfe6ff28 Flatten implementation of net::http_response::HttpResponse. 2016-04-15 09:13:47 -04:00
Corey Farwell
50c6d937a5 Flatten implementation of net::file_loader::factory. 2016-04-15 09:13:47 -04:00
bors-servo
6c5cfb738a Auto merge of #10345 - asajeffrey:make-nox-happy, r=nox
Replace side-effecting unwrap_or_else by if let in constellation.

This addresses @nox's comments in #10295.

<!-- 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/10345)
<!-- Reviewable:end -->
2016-04-15 17:35:45 +05:30
bors-servo
3b96bba1d5 Auto merge of #10585 - servo:rustup_20160414, r=Ms2ger
Rust upgrade to 2016-04-12

This currently spews out a ton of ld errors of the form

```
/home/manishearth/Mozilla/.cargo/git/checkouts/mozjs-06d7f04b6dbb8a8e/master/mozjs/js/src/jit/JitFrameIterator.h:455: error: undefined reference to 'js::jit::SnapshotReader::readAllocation()'
```

cc @nox

<!-- 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/10585)
<!-- Reviewable:end -->
2016-04-15 16:55:01 +05:30
Manish Goregaokar
e10c580768
Rust upgrade to 2016-04-12 2016-04-15 15:28:49 +05:30
bors-servo
eb78e21fbe Auto merge of #10555 - jdm:http_response_refactor, r=ms2ger
Remove unnecessary indirection in HTTP unit tests

Many of the HTTP unit tests use a custom request factory as well as a custom request that contained test logic. This is unnecessarily convoluted, and exists solely because the complete set of headers was unavailable until the request body was sent. These patches restructure the header manipulations so that the headers are available when the request object is created, allowing the test logic to move into the test factories, and enabling the deletion of almost all of the test request types.

<!-- 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/10555)
<!-- Reviewable:end -->
2016-04-15 12:44:59 +05:30
Josh Matthews
43369fa897 Rename create_with_headers to create. 2016-04-15 01:46:04 -04:00
Josh Matthews
a761f2bed4 Remove unused header manipulation facilities. 2016-04-15 01:46:03 -04:00
Josh Matthews
a315f8db9e Reorganize header manipulation that occurs before sending an HTTP request so we can provide the full set of headers while creating a request. 2016-04-15 01:45:56 -04:00
Josh Matthews
0e1703d747 Convert NetworkHttpRequestFactory. 2016-04-15 01:45:55 -04:00
Josh Matthews
80eaeac9f4 Make headers available when creating an HTTP request via a factory. 2016-04-15 01:45:48 -04:00
Josh Matthews
dc790048ec Remove unnecessary type annotations. 2016-04-15 01:00:44 -04:00
bors-servo
7faa3ed9cb Auto merge of #10626 - sliz1:10576, r=KiChjang
Use the document base url when resolving iframe URLs

Fixes #10576.

<!-- 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/10626)
<!-- Reviewable:end -->
2016-04-15 10:03:51 +05:30
Stephen (Ziyun) Li
52c6fd5b03
Use the document base url when resolving iframe URLs 2016-04-15 00:02:45 -04:00
bors-servo
7bd2381518 Auto merge of #10328 - DDEFISHER:master, r=jdm
401 authorization UI then restart request/save successful auth creds

Step 7 of the NCSU student project Implement HTTP authorization UI

> make an authorization UI appear when a 401 HTTP response is received (StatusCode::Unauthorized) - in load in http_loader.rs, right before trying to process an HTTP redirection, use the new tinyfiledialogs library to make two prompts appear (username and password), then restart the request with the new authorization value present applied. If an authorization value was present and the response is successful, add the credentials to the authorization cache.

<!-- 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/10328)
<!-- Reviewable:end -->
2016-04-15 08:01:23 +05:30
Daniel
b0e1f10ba5 401 authorization UI then restart request/save successful auth creds 2016-04-14 21:38:45 -04:00
bors-servo
9896e53094 Auto merge of #10591 - Liamsi:base_url_script_element, r=KiChjang
Use the document base url when resolving script URLs

Does this resolve #10578?

<!-- 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/10591)
<!-- Reviewable:end -->
2016-04-15 06:57:36 +05:30
bors-servo
7d7404333d Auto merge of #10458 - pcwalton:block-formatting-context-margin-collapse, r=mbrubeck
layout: Disallow margins from collapsing through block formatting contexts per CSS 2.1 § 8.3.1.

Closes #10449.

r? @mbrubeck

<!-- 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/10458)
<!-- Reviewable:end -->
2016-04-15 06:00:28 +05:30
Patrick Walton
f69931552b layout: Disallow margins from collapsing through block formatting
contexts per CSS 2.1 § 8.3.1.

Closes #10449.
2016-04-14 17:24:26 -07:00
Patrick Walton
a3fd226341 layout: Disallow margins from collapsing through blocks with clearance
per CSS 2.1 § 8.3.1.

Fixes the test failure in #10458.
2016-04-14 17:24:24 -07:00
bors-servo
0c51259e40 Auto merge of #10617 - perlun:extract-build-properties-script-to-py-files, r=bholley
Extracted Mako-based code generation invokation to separate .py files.

This breaks out some of the parts on #10586, that should be easily mergeable (hopefully pretty much a no-brainer really). The idea would be to let you review & merge it first, and then I'll complete the other PR rebase off of this stuff.

@bholley - I did like you suggested and broke it out for `geckolib` as well. The tests should also be running without problems (tested `./mach test-unit` locally).

<!-- 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/10617)
<!-- Reviewable:end -->
2016-04-15 04:50:47 +05:30
Liamsi
62182f9de9 Use the document base url when resolving script URLs 2016-04-15 00:25:56 +02:00