Commit graph

410 commits

Author SHA1 Message Date
Florian Duraffourg
dbef65129f Add mach command to update public domain list and use a HashSet instead of a Vec to lookup public domains 2016-06-09 09:14:01 +02:00
Ms2ger
aea03b2f92 Remove unused ByteString::bytes() and its unit test. 2016-06-07 14:20:44 +02:00
Ms2ger
80fc666734 Move trim_http_whitespace to net_traits. 2016-06-07 14:20:08 +02:00
Ms2ger
06a1d04ca6 Move LengthOrPercentageOrAuto to style::attr. 2016-06-06 08:54:34 +02:00
Josh Matthews
7bf2e19437 Make the net monitor panel in FF's devtools show meaningful output.
0) Advertise support for the network monitor in the initial protocol communication.
1) Only notify the developer tools server about the final request in an HTTP transaction.
2) Add timing information for connecting to the HTTP server and sending the HTTP request.
3) Reduce duplication between various networkEventUpdate structures by creating a helper function
that merges two JSON structures together. This also corrects the JSON structure so the devtools
client interprets the output correctly.
4) Calculate various header size fields correctly.
5) Remove unnecessary usize->u32 casts by making the appropriate fields usize.
6) Add header values to request and response header messages.
7) Support triggering page reloads via the devtools client.
2016-06-06 00:51:36 +01:00
bors-servo
351b851e21 Auto merge of #11497 - ab22:11467-resource-threads-race-with-shutdown-to-write-out-data, r=Ms2ger
send a reply when thread is done exiting

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #11467

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because: in this case if code compiles then it's good enough.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/11497)
<!-- Reviewable:end -->
2016-06-01 06:46:58 -05:00
Abelardo E. Mendoza
88980dc7a5 send a reply when thread is done exiting
fixed failing tests

fix tests

handle error instead of just unwrappng it

create a channel per thread and update tests with a call to rx.recv().unwrap()
2016-05-30 09:21:09 -06:00
Josh Matthews
074fc4a5e1 Process content blocker rules in the HTTP loader. 2016-05-30 13:17:42 +02:00
Anthony Ramine
19b1cb4f07 Reorder dependencies in net_tests' Cargo.toml 2016-05-30 10:37:51 +02:00
bors-servo
3ec20d9cf5 Auto merge of #11472 - jdm:wip, r=mbrubeck
Report blank lines that follow an open brace

This automates something that I find myself frequently commenting on in PRs.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes OR

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/11472)
<!-- Reviewable:end -->
2016-05-27 18:14:25 -05:00
Josh Matthews
3cb8af20c2 Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
Josh Matthews
555661ef1c Make script origins sendable and immutable. 2016-05-27 17:16:13 +02:00
Cullen Rhodes
40acd24e8f Report use statements that use {} with only one entry 2016-05-27 10:18:44 +01:00
bors-servo
2acb257a82 Auto merge of #11394 - mbrubeck:stacking-context-id, r=pcwalton
Reduce the size of StackingContextId

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/11394)
<!-- Reviewable:end -->
2016-05-26 07:25:58 -05:00
Matt Brubeck
550e304a21 Fix unused crate warning in script_tests 2016-05-25 07:03:46 -07:00
bors-servo
52f17a8814 Auto merge of #11377 - servo:style-attr-ser-rebase, r=SimonSapin
Update style attributes on CSSStyleDeclaration changes

Rebase of #9410. Fixes #9410, fixes #9307.

<!-- 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/11377)
<!-- Reviewable:end -->
2016-05-25 05:23:14 -05:00
bors-servo
affc110fa0 Auto merge of #10498 - creativcoder:default-profile-dir, r=SimonSapin
Adding default config directories.

Fixes #10338
<!-- 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/10498)
<!-- Reviewable:end -->
2016-05-25 02:52:10 -05:00
David Raifaizen
51e642e875 Converted serialization methods to implement the to_css trait, writing to string buffers to save string allocations for every result 2016-05-25 09:25:29 +02:00
David Raifaizen
47279179fa Added test for serialize method 2016-05-25 09:24:09 +02:00
Rahul Sharma
b4885fef9a adding default config dirs 2016-05-25 10:55:07 +05:30
bors-servo
0b64586bf5 Auto merge of #11368 - izgzhen:fix-filemanager-exit, r=asajeffrey
Fix FileManager thread panic and other misc improvements

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [x] There are tests for these changes

Changes:

- Add shut down logic for FileManager thread
- Add an unit test for filemanager_thread

<!-- 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/11368)
<!-- Reviewable:end -->
2016-05-24 22:17:15 -05:00
Matt Brubeck
f967d5a645 Reduce the size of StackingContextId 2016-05-24 15:50:38 -07:00
bors-servo
2a2b88f42c Auto merge of #11287 - heycam:moz-binding, r=bholley
Support -moz-binding in geckolib

Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy --faster` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because changes target stylo

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

<!-- 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/11287)
<!-- Reviewable:end -->
2016-05-24 14:41:04 -07:00
Zhen Zhang
96b2093121 Fix FileManager thread panic and other misc improvements
- Add shut down logic for FileManager thread
- Add an unit test for filemanager_thread
2016-05-24 22:32:36 +08:00
Anthony Ramine
cdc7bca944 Move DOMString back to script
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
Cameron McCormack
f2b1ef4e45 fixup! Add an extra data field to ParserContext. 2016-05-24 14:03:55 +10:00
Rahul Sharma
3766cd1673 adding interface for custom responses 2016-05-20 12:11:56 +05:30
Zhen Zhang
a51db4cfa8 Implement trait-based ResourceThreads and clean up related naming issues
Changes include:

- Introduce an IpcSend trait to abstract over a collection of IpcSenders
- Implement ResourceThreads collection to abstract the resource-related
  sub threads across the component
- Rename original ResourceThread and ControlMsg into an unifed CoreResource__
  to accommodate above changes and avoid confusions
2016-05-20 08:00:16 +08:00
bors-servo
e3be7184fb Auto merge of #11242 - bholley:gecko_atoms, r=emilio
Add basic support for Gecko atoms

This is a rough initial implementation of gecko atoms. This allows us to get rid of the custom rust-selectors branch we use to build stylo.

The gecko changes are at https://bugzilla.mozilla.org/show_bug.cgi?id=1273771

<!-- 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/11242)
<!-- Reviewable:end -->
2016-05-18 11:35:28 -07:00
Bobby Holley
b521c293dc Add string_cache override for geckolib based on gecko atoms.
The work in these patches is based on Ms2ger's gecko-atom crate.
2016-05-18 11:33:38 -07:00
Josh Matthews
9e8cf19e51 Add timeline markers for HTTP requests, JS evaluation, and HTML parsing. 2016-05-18 08:02:42 -05:00
Florian Duraffourg
8b9b36454c Add unit tests for cookies base on abarth/http-state github repo
- Add unit tests
- Add a mach command to update cookie's unit tests
2016-05-17 10:13:26 +02:00
Matt Brubeck
d2717c4475 Eliminate unneeded clones in find_or_create
...and use it to eliminate duplicate hash lookups and string copies in shape_text.
2016-05-13 18:20:25 -07:00
Matt Brubeck
96c69f852c Fix warnings in unit tests 2016-05-12 12:22:00 -07:00
Rohit Zambre
ca3084d241 added infrastructure to handle interval and CSV time profiling alongside html-timeline-profiling 2016-05-11 11:27:07 -07:00
bors-servo
20fc8b3c8d Auto merge of #10932 - jdm:401, r=SimonSapin
Add the requesting URL to the 401 prompt. Only show the 401 prompt wh…

…en the WWW-Authenticate header is present.

Fixes #10912.

<!-- 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/10932)
<!-- Reviewable:end -->
2016-05-04 11:37:16 -07:00
Josh Matthews
cb63ad6c87 Add the requesting URL to the 401 prompt. Only show the 401 prompt when the WWW-Authenticate header is present. 2016-05-03 13:19:42 -04:00
Joshua Holmer
8bb740e95e Remove CacheRequestDetails
Fixes #10904
2016-05-02 22:08:16 -04:00
Matt Brubeck
8d540d1f9e Upgrade bincode, pkg-config, regex, cmake, fnv 2016-04-30 15:19:38 -07:00
bors-servo
fbf98214c9 Auto merge of #10896 - vramana:basic_fetch_file, r=KiChjang
Implement fetching file URL's

closes #10166

<!-- 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/10896)
<!-- Reviewable:end -->
2016-04-29 22:54:20 -07:00
Emilio Cobos Álvarez
2e05190e68
layout: Add test for size of ServoThreadSafeLayoutNode 2016-04-29 22:54:50 +02:00
Emilio Cobos Álvarez
2dacbc6fb3
cargo: Bump selectors and string_cache 2016-04-29 22:54:44 +02:00
Ramana Venkata
7c14de6d4b Implement fetching file URL's 2016-04-29 16:06:07 +05:30
bors-servo
cf121ad8df Auto merge of #10895 - mbrubeck:byteindex, r=pcwalton
Use byte indices instead of char indices for text runs

Replace character indices with UTF-8 byte offsets throughout all code dealing with text runs.  This eliminates a lot of complexity when converting from one to the other, and interoperates better with the rest of the Rust ecosystem.

For most code this is just a simple replacement of char indices with byte indices.  In a few places like glyph storage and text fragment scanning, it also lets us get rid of code that existed only to map between bytes and chars.

Also includes some related fixes to text shaping, discovered while working on this conversion.  See the commit messages for details.

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/10895)
<!-- Reviewable:end -->
2016-04-28 20:22:09 -07:00
Matt Brubeck
659305fe0a Use byte indices instead of char indices for text runs
Replace character indices with UTF-8 byte offsets throughout the code dealing
with text shaping and breaking.  This eliminates a lot of complexity when
converting from one to the other, and interoperates better with the rest of
the Rust ecosystem.
2016-04-28 14:32:14 -07:00
bors-servo
3d38a60cee Auto merge of #10867 - danlrobertson:sandbox, r=KiChjang
Fix logic for cors cache match

The current logic for a cors cache match does not consider "credentials is false and request's credentials mode is not "include" or credentials is true."

I could have missed something, but `CacheRequestDetails::credentials` is set to true if credentials mode is "include", and false otherwise. So `(!cors_cache.credentials && !cors_req.credentials) || cors_cache.credentials` would be directly following the spec, but unless I'm mistaken `cors_cache.credentials || !cors_req.credentials` is logically the same.

Fixes: #10525

<!-- 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/10867)
<!-- Reviewable:end -->
2016-04-28 13:36:05 -07:00
bors-servo
55d14ffe00 Auto merge of #10855 - servo:unit, r=nox
Make css-properties.json checking a proper unit test.

<!-- 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/10855)
<!-- Reviewable:end -->
2016-04-28 07:16:57 -07:00
Simon Sapin
a3b271266c Make css-properties.json checking a proper unit test. 2016-04-28 15:41:30 +02:00
Nick Fitzgerald
9fbb5c720e Add a method for dumping self-contained HTML timeline profiles
This commit adds the `--profiler-trace-path` flag. When combined with `-p` to
enable profiling, it dumps a profile as a self-contained HTML file to the given
path. The profile visualizes the traced operations as a gant-chart style
timeline.
2016-04-27 18:35:17 -07:00
Daniel Robertson
483f07c8f0
Cleanup CORSCache
Remove the CORSCache trait, CORSCacheSender, CORSCacheThreadMsg, and
CORSCacheThread. Rename BasicCORSCache to CORSCache and keep its old
implementation of CORSCache.
2016-04-27 17:02:54 -04:00