Commit graph

6848 commits

Author SHA1 Message Date
Daniel
d49d3b01f2 add auth cache to resources + set auth header if url does not have creds 2016-03-24 12:24:08 -04:00
Daniel
ddc96dca82 add a new command line flag --profile-dir [path] 2016-03-19 21:20:30 -04:00
bors-servo
a4251c832d Auto merge of #9876 - mbrubeck:seen-viewport-percentages, r=SimonSapin
Recompute styles on viewport size change if they contain viewport percentages

Fixes #8754.  Depends on servo/rust-cssparser#99.  r? @SimonSapin

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9876)
<!-- Reviewable:end -->
2016-03-20 02:20:54 +05:30
Matt Brubeck
25c1bce9f6 Recompute viewport-dependent styles on viewport size change
Fixes #8754.
2016-03-19 13:23:39 -07:00
bors-servo
8120fb5c2d Auto merge of #10064 - pcwalton:overflow-bottom-up, r=mbrubeck
layout: Move overflow calculation to be a separate, sequential, bottom-up pass.

Right now, the only reason that overflow calculation works is that we
rely on script inducing extra reflows that are sent for display. This
was preventing #10021 from landing.

This change regresses layout performance by about 1% in my tests.

Fixes #7797 properly.

r? @mbrubeck
cc @glennw

<!-- 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/10064)
<!-- Reviewable:end -->
2016-03-20 00:53:27 +05:30
bors-servo
4df7975ed3 Auto merge of #10066 - apopiak:fromBool, r=asajeffrey
implement and use From<bool> for enum and back

as discussed in the #servo channel on IRC:

implement and use  `From<bool>` for `EventBubbles` (and back direction)
implement and use `From<bool>` for `EventCancelable` (and back direction)

<!-- 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/10066)
<!-- Reviewable:end -->
2016-03-19 22:58:21 +05:30
Patrick Walton
5ea8c34276 layout: Move overflow calculation to be a separate, sequential,
bottom-up pass.

Right now, the only reason that overflow calculation works is that we
rely on script inducing extra reflows that are sent for display. This
was preventing #10021 from landing.

This change regresses layout performance by about 1% in my tests.

Fixes #7797 properly.
2016-03-18 22:11:51 -07:00
bors-servo
2d6283c64b Auto merge of #9929 - servo:cascade, r=pcwalton
Refactor the cascade

Converting the specified value of some properties into a computed value depends on the value of other properties. For example, the `em` unit of any length depends on the `font-size` property.

Previously, we would do a first pass over applicable declarations to build up a `values::computed::Context` struct with a number of fields for each such piece of data from other properties.

This simplies the struct by instead having it contain the set of computed values (for a given element) that is being populated and classify properties into "early" and "other", such that the only dependencies can be from "other" to "early". We iterate applicable_declarations twice, first cascading "early" properties then "other". Unfortunately, it’s not easy to check that this classification is correct.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9929)
<!-- Reviewable:end -->
2016-03-19 08:08:56 +05:30
Simon Sapin
529164e4a5 Refactor the cascade
Converting the specified value of some properties into a computed value
depends on the value of other properties. For example, the `em` unit
of any length depends on the `font-size` property.

Previously, we would do a first pass over applicable declarations
to build up a `values::computed::Context` struct with a number of fields
for each such piece of data from other properties.

This simplies the struct by instead having it contain the
set of computed values (for a given element) that is being populated
and classify properties into "early" and "other",
such that the only dependencies can be from "other" to "early".
We iterate applicable_declarations twice, first cascading "early" properties
then "other".
Unfortunately, it’s not easy to check that this classification is correct.
2016-03-18 17:09:16 +01:00
Corey Farwell
182b9b1e4f Use external 'threadpool' crate, remove in-tree utility. 2016-03-18 11:05:49 -04:00
bors-servo
e551ea7322 Auto merge of #10070 - Ms2ger:unsafe-net, r=KiChjang
Disallow unsafe code in net and net_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/10070)
<!-- Reviewable:end -->
2016-03-18 17:09:24 +05:30
bors-servo
20eb81c00a Auto merge of #10009 - creativcoder:impl-navigator-language, r=Ms2ger
implements NavigatorLanguage

Fixes #9992

<!-- 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/10009)
<!-- Reviewable:end -->
2016-03-18 15:29:46 +05:30
Ms2ger
e8db43ce50 Disallow unsafe code in net and net_traits. 2016-03-18 10:30:07 +01:00
Alexander Popiak
0a5ac3b207 implement and use From<bool> for enum and back
implement and use  From<bool> for EventBubbles (and back direction)
implement and use From<bool> for EventCancelable (and back direction)
2016-03-17 22:50:22 +01:00
bors-servo
ce2da28a00 Auto merge of #10061 - DavidBM:clean_code_removing_overflow_in_assign_bsizes, r=Manishearth
Remove overflow references on AssignBSizesAndStoreOverflow code

<!-- 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/10061)
<!-- Reviewable:end -->
2016-03-18 02:14:22 +05:30
David Bonet
57df260f9d Removed overflow references on AssignBSizesAndStoreOverflow code 2016-03-17 21:14:50 +01:00
bors-servo
0008c07dc3 Auto merge of #10014 - saurvs:pr1, r=KiChjang
Update WebSocket blocked ports to match the Fetch spec

Adresses #9949.

This adds a function that tests whether a request should be blocked or not based on it's url's scheme and port. It also adds testing for port restriction to the `main_fetch` method. More info in eb07418c83.

@Ms2ger In https://github.com/whatwg/html/issues/841, @annevk proposes to remove port restrictions from websockets. Should we go ahead do that, given that the spec hasn't been changed yet?

<!-- 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/10014)
<!-- Reviewable:end -->
2016-03-18 00:31:24 +05:30
Anthony Ramine
46c505e47b Bump serde to 0.7 2016-03-17 13:52:39 +01:00
Saurav Sachidanand
4ddf4e7bdc Update WebSocket blocked ports to match the Fetch spec 2016-03-17 18:21:20 +05:30
Rahul Sharma
facf59177c implements NavigatorLanguage 2016-03-17 16:13:37 +05:30
Anthony Ramine
7214fba45b Bump openssl to 0.7.6 2016-03-16 23:42:21 -07:00
Anthony Ramine
a4d6d41665 Reorder dependencies in net/Cargo.toml 2016-03-16 23:36:04 -07:00
Anthony Ramine
f7af675861 Update log to 0.3.5 2016-03-16 23:36:04 -07:00
bors-servo
e273517fe0 Auto merge of #10039 - pcwalton:update-webrender-again, r=glennw
servo: Update WebRender to pick up the blend mode fix.

Closes #9877.

r? @glennw

<!-- 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/10039)
<!-- Reviewable:end -->
2016-03-17 05:13:58 +05:30
bors-servo
b7304f1152 Auto merge of #10037 - pcwalton:update-glutin, r=mbrubeck
servo: Update Glutin.

Closes #9855.
Closes #9878.

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/10037)
<!-- Reviewable:end -->
2016-03-17 02:55:41 +05:30
Patrick Walton
74e5d901eb servo: Update WebRender to pick up the blend mode fix.
Closes #9877.
2016-03-16 13:26:20 -07:00
bors-servo
909ff4446a Auto merge of #10035 - saurvs:master, r=jdm
Resets selection in textinput when its content is changed.

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

<!-- 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/10035)
<!-- Reviewable:end -->
2016-03-17 01:32:58 +05:30
Patrick Walton
7df52a0144 servo: Update Glutin.
Closes #9855.
Closes #9878.
2016-03-16 11:21:19 -07:00
bors-servo
84d3ba0759 Auto merge of #10026 - pcwalton:no-browserhtml-flash, r=metajack
compositing: In borderless mode, don't show the window until the page has loaded.

This avoids a flash of unstyled content, which looks especially bad in
browser.html since unstyled content is white and browser.html has a
transparent background.

Closes #9996.

r? @metajack
cc @jdm since you had some concerns

<!-- 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/10026)
<!-- Reviewable:end -->
2016-03-16 23:46:59 +05:30
Saurav Sachidanand
0b593759df Resets selection in textinput when its content is changed.
Adds a wpt test as well.
2016-03-16 22:20:22 +05:30
bors-servo
37574065e0 Auto merge of #9838 - szeged:webbluetooth, r=jdm
WebBluetooth API classes

Basic implementation of WebBluetooth API
API spec.: https://webbluetoothcg.github.io/web-bluetooth/

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9838)
<!-- Reviewable:end -->
2016-03-16 21:01:18 +05:30
Attila Dusnoki
e7d70cfabf WebBluetooth API classes 2016-03-16 10:34:48 +01:00
bors-servo
ad47c093ad Auto merge of #10025 - pcwalton:upgrade-webrender, r=glennw
servo: Upgrade WebRender.

Closes #9867.

r? @glennw

<!-- 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/10025)
<!-- Reviewable:end -->
2016-03-16 10:55:41 +05:30
Patrick Walton
c2581d5cef compositing: In borderless mode, don't show the window until the page
has loaded.

This avoids a flash of unstyled content, which looks especially bad in
browser.html since unstyled content is white and browser.html has a
transparent background.

Closes #9996.
2016-03-15 22:07:21 -07:00
Patrick Walton
10e948e1b6 servo: Upgrade WebRender.
Closes #9867.
2016-03-15 21:42:45 -07:00
bors-servo
437e875c2e Auto merge of #9997 - pcwalton:text-node-damage, r=mbrubeck
style: Compute damage for text nodes.

They have styles just like elements do.

Allows a dynamic change of `display: none` to `display: inline` to work.

Closes #9868.

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/9997)
<!-- Reviewable:end -->
2016-03-16 10:01:49 +05:30
Patrick Walton
d59dee0c65 style: Compute damage for text nodes.
They have styles just like elements do.

Allows a dynamic change of `display: none` to `display: inline` to work.

Closes #9868.
2016-03-15 21:32:16 -07:00
Simon Sapin
bab28e5070 Fix up overflow_x and _y after the fact rather than have their values in computed::Context. 2016-03-15 18:10:17 +01:00
Simon Sapin
54790d0ae5 Fix the rem unit.
(I think it’s never worked in over a year since it was implemented…)
2016-03-15 18:10:16 +01:00
bors-servo
78b16bcc1d Auto merge of #9987 - larsbergstrom:codegen_units, r=metajack
Test using 4 parallel codegen units on release builds

Do not merge yet! Doing a test run first.

Note that `codegen-units` had very little effect on our dev builds (saved ~12 seconds http://logs.glob.uno/?c=mozilla%23servo&s=6+Aug+2015&e=6+Aug+2015#c252485).

@bors-servo try

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9987)
<!-- Reviewable:end -->
2016-03-15 20:50:44 +05:30
bors-servo
183772583f Auto merge of #9988 - Ms2ger:lazy-static-host-table, r=Manishearth
Use lazy_static for HOST_TABLE.

This might change behaviour if the file is changed between Servo startup and
the moment HOST_TABLE is first accessed. I don't think we care.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9988)
<!-- Reviewable:end -->
2016-03-15 16:33:03 +05:30
Ms2ger
ec1f720662 Use lazy_static for HOST_TABLE.
This might change behaviour if the file is changed between Servo startup and
the moment HOST_TABLE is first accessed. I don't think we care.
2016-03-15 12:02:45 +01:00
Patrick Walton
28a71c4820 Make border radii clip their contents.
Needed for browser.html rounded corners.
2016-03-14 18:32:55 -07:00
Bobby Holley
539f839958 Remove lifetimes from LayoutNode and friends. 2016-03-14 14:31:57 -07:00
Bobby Holley
7c4dcaa677 Inline ObjectElement::get_type_and_data into the consumers.
The usage here doesn't quite work without the lifetimes.
2016-03-14 14:31:57 -07:00
Bobby Holley
b1878bd925 Remove lifetimes from T{Node,Element,Document}. 2016-03-14 14:31:57 -07:00
bors-servo
881d6b4220 Auto merge of #9851 - pcwalton:overscroll, r=glennw
Implement support for overscrolling on the Mac.

Requires tomaka/glutin#734, servo/webrender_traits#14, and
servo/webrender#217.

r? whoever (waiting on the landing of the above)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9851)
<!-- Reviewable:end -->
2016-03-15 00:18:05 +05:30
Patrick Walton
8eb2cda438 Implement support for overscrolling on the Mac.
Requires tomaka/glutin#734, servo/webrender_traits#14, and
servo/webrender#217.
2016-03-14 11:38:10 -07:00
Lars Bergstrom
363ef4a6d7 Test using 4 parallel codegen units on release builds 2016-03-14 10:45:02 -05:00
bors-servo
d330ecdafc Auto merge of #9964 - mbrubeck:incremental-damage, r=pcwalton
Compute damage even when incremental layout is disabled

This fixes traversals that use the damage flags to decide which nodes to process, such as `resolve_generated_content`, which was broken in non-incremental mode. r? @pcwalton

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9964)
<!-- Reviewable:end -->
2016-03-12 05:00:17 +05:30