Commit graph

12333 commits

Author SHA1 Message Date
bors-servo
d77f9415c5 Auto merge of #6937 - mbrubeck:hb_funcs, r=glennw
Store Harfbuzz callback functions in a static var

r? gw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6937)
<!-- Reviewable:end -->
2015-08-03 22:40:35 -06:00
r0e
3e2e9b8715 Fix for issue #6768.
Merged common fields of BlobBody and ReadData into a new struct to
avoid passing redundant information
2015-08-03 21:13:10 -07:00
David Zbarsky
9e5c2e22d8 Clean up some methods in CanvasRendeingContext2D 2015-08-03 23:32:11 -04:00
bors-servo
84e25befdd Auto merge of #6874 - jdm:domreporting, r=njn
Start reporting memory usage for Window and all nodes in all DOM tree…

…s for frame treese in script tasks.

This underreports by a significant amount, since only Document, Window and CharacterData (ie. text) nodes are fully represented. That being said, every HTML element in the tree is measured, but only counted as a Node. It's easy to improve this, it just requires adding the appropriate HeapSizeOf derives and increasing the granularity of `measure_memory_for_eventtarget`. google.com shows a dom-tree value of 0.24 MB for me at the moment.

r? @nnethercote

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6874)
<!-- Reviewable:end -->
2015-08-03 21:24:41 -06:00
Josh Matthews
8620fe5995 Start reporting memory usage for Window and all nodes in all DOM trees for frame treese in script tasks. 2015-08-03 23:05:00 -04:00
Patrick Walton
3d9cc784d0 layout: If the container of a block formatting context has margins in
the inline direction, subtract those from the inline size of preceding
floats.

Makes the content area on http://reddit.com/r/rust visible.
2015-08-03 19:22:50 -07:00
bors-servo
c2497fcd49 Auto merge of #6932 - boghison:memrs, r=SimonSapin
Implement HeapSizeOf for Url. Fixes #6912

Fixes #6912
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6932)
<!-- Reviewable:end -->
2015-08-03 19:31:26 -06:00
bors-servo
d66c59a152 Auto merge of #6784 - glennw:offset-ext, r=pcwalton
Implement offsetParent/Top/Left/Width/Height.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6784)
<!-- Reviewable:end -->
2015-08-03 18:39:43 -06:00
bors-servo
3c5d24dbf4 Auto merge of #6926 - Ms2ger:dwgs-args, r=jdm
Implement a WorkerGlobalScopeInit struct to pass arguments to WorkerGlobalScope::new_inherited more easily.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6926)
<!-- Reviewable:end -->
2015-08-03 17:42:15 -06:00
Glenn Watson
39972a174e Fix panic when called on root node, and update test expectations.
The three tests that are marked as failures are because they use offsetWidth as a dummy to force a layout flush. Now that these exist, they expose an unrelated bug with reflow.
2015-08-04 08:59:27 +10:00
bors-servo
ae3aadd656 Auto merge of #6920 - Wafflespeanut:NIT, r=jdm
Removed an invalid FIXME and fixed some doc comments...

There are some bad module-level doc comments in `flow.rs` which has directly affected [Servo's docs](http://doc.servo.org/layout/flow/index.html) and so, this fixes that. Oh, and #6728 is having a hard time getting closed and so I've also removed the `FIXME` comment related to it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6920)
<!-- Reviewable:end -->
2015-08-03 16:46:12 -06:00
Patrick Walton
ac5e7ec035 construct: When repairing styles for incremental reflow, only repair
styles of nodes that represent the dirty node.

Fixes jumpiness on many pages; e.g. the WPT results pages.

For some reason, this would not reproduce with an automated test.
2015-08-03 15:35:39 -07:00
Matt Brubeck
47a0d494ec Make Harfbuzz font_funcs static 2015-08-03 15:30:46 -07:00
Matt Brubeck
f1e268b1e8 Sort gfx crates.io dependencies and move to top 2015-08-03 15:30:46 -07:00
bors-servo
5922ac606c Auto merge of #6721 - mbrubeck:unicode-bidi, r=pcwalton
Implement the unicode-bidi CSS property

r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6721)
<!-- Reviewable:end -->
2015-08-03 15:37:12 -06:00
Matt Brubeck
f8e92b2b01 Implement the unicode-bidi property 2015-08-03 14:12:33 -07:00
bors-servo
86476804ca Auto merge of #6917 - Ms2ger:lock-alert, r=metajack
Lock and flush stdout in Window#alert.

We use alert() to communicate test results to wptrunner. Unfortunately,
sometimes the alert output is interleaved with other output on stdout,
causing wptrunner to classify the test result as a timeout. I hope this will
avoid that scenario.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6917)
<!-- Reviewable:end -->
2015-08-03 13:17:47 -06:00
Bogdan Cuza
46442d28fa Implement HeapSizeOf for Url. Fixes #6912 2015-08-03 22:02:56 +03:00
Ms2ger
6b61564f6d Pass WorkerGlobalScopeInit to DedicatedWorkerGlobalScope::run_worker_scope. 2015-08-03 19:54:04 +02:00
Ms2ger
0da0fcbe9b Implement a WorkerGlobalScopeInit struct to pass arguments to WorkerGlobalScope::new_inherited more easily. 2015-08-03 19:53:57 +02:00
bors-servo
028707f5cd Auto merge of #6903 - glennw:fix-height-again, r=pcwalton
Fix percentage height calculation, absolute containing block height calculations.

It's not possible to correctly determine during the css cascade whether the container height
is explicitly specified. Additionally, the spec https://drafts.csswg.org/css2/visudet.html#the-height-property says this should affect the *used* height, rather than the computed height.

This significantly improves the layout in #6643.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6903)
<!-- Reviewable:end -->
2015-08-03 10:38:21 -06:00
Ms2ger
bd04cecceb Take WorkerGlobalScope's worker_id out of its Option.
Unsurprisingly, every worker has an id, so there is no need to wrap it in an
Option.
2015-08-03 18:28:48 +02:00
Ravi Shankar
5260e64847 Removed an invalid FIXME and fixed a doc comment 2015-08-03 21:51:35 +05:30
bors-servo
2ce811ffb8 Auto merge of #6902 - khflab:master, r=jdm
[FIX] Bug fix #6756

fixes #6756 waiting for review.

Signed-off-by: Kayo Hamid <kayo@bvcupons.com.br>

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6902)
<!-- Reviewable:end -->
2015-08-03 09:18:05 -06:00
Ms2ger
2a7f262b7d Lock and flush stdout in Window#alert.
We use alert() to communicate test results to wptrunner. Unfortunately,
sometimes the alert output is interleaved with other output on stdout,
causing wptrunner to classify the test result as a timeout. I hope this will
avoid that scenario.
2015-08-03 15:01:23 +02:00
Glenn Watson
9e5687e3e7 Implement offsetParent/Top/Left/Width/Height. 2015-08-03 11:55:38 +10:00
Glenn Watson
b9fea3deb3 Fix percentage height calculation, absolute containing block height calculations.
It's not possible to correctly determine during the css cascade whether the container height
is explicitly specified. Additionally, the spec https://drafts.csswg.org/css2/visudet.html#the-height-property
says this should affect the *used* height, rather than the computed height.

This significantly improves the layout in #6643.
2015-08-03 10:47:56 +10:00
Kayo Hamid
c6ccb85378 [FIX] Bug fix #6756
Signed-off-by: Kayo Hamid <kayo@bvcupons.com.br>
2015-08-02 19:31:41 -04:00
bors-servo
1809748dc1 Auto merge of #6893 - HarryLovesCode:master, r=jdm
Fixes Issue #6866



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6893)
<!-- Reviewable:end -->
2015-08-02 16:05:14 -06:00
bors-servo
ffe4bd25a4 Auto merge of #6895 - pcwalton:better-transitions, r=glennw
layout: Tie transitions to the DOM node and finish them instantly when new styles are set.

Tying transitions to the DOM node avoids quadratic complexity when
updating them.

Finishing transitions instantly when styles are updated makes our
behavior more correct.

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6895)
<!-- Reviewable:end -->
2015-08-02 15:04:54 -06:00
Harrison G
49c5408e65 Fixes issue #6866 2015-08-02 16:55:42 -04:00
bors-servo
f1c26c59f1 Auto merge of #6722 - samfoo:sts-headers, r=jdm
Obey Strict-Transport-Security header

Resolves #6703.

Done:

* [x] When STS headers received, add the host to the HSTS list

Todo:

* [ ] Persist the in-memory list so that it's reloaded on the next browser boot
* [ ] Add tests to `http_loader::load` - it's pretty well completely untested right now, but it's a bit gnarly to untangle and without mocking, it's hard to deal with the dependency on making a real network request. Writing a mock request object should be doable for testing, but there's a lot going on in the function right now.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6722)
<!-- Reviewable:end -->
2015-08-02 11:14:02 -06:00
bors-servo
0c6e271cd3 Auto merge of #6896 - pcwalton:fix-particles-crash, r=SimonSapin
script: Use `Arc::make_unique` instead of `Arc::get_mut` when updating inline styles.

Transitions make the reasoning in the comment in the relevant sections
not true.

r? @SimonSapin

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6896)
<!-- Reviewable:end -->
2015-08-02 10:10:39 -06:00
Patrick Walton
9bd8edea4a script: Use Arc::make_unique instead of Arc::get_mut when updating
inline styles.

Transitions make the reasoning in the comment in the relevant sections
not true.
2015-08-02 09:10:17 -07:00
Sam Gibson
0d94ee917d Ensure STS headers are only honoured when they come from an HTTPS host 2015-08-02 21:18:24 +12:00
Sam Gibson
c44579018a Obey Strict-Transport-Security header 2015-08-02 21:17:58 +12:00
bors-servo
42a9756df0 Auto merge of #6890 - zmike:hashtag_tooltip, r=metajack
implement display_handler::on_status_message for cef

r+? @jdm @larsbergstrom @metajack @pcwalton @anyone with r+

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6890)
<!-- Reviewable:end -->
2015-08-02 01:02:58 -06:00
Patrick Walton
7349b6ac28 layout: Tie transitions to the DOM node and finish them instantly when
new styles are set.

Tying transitions to the DOM node avoids quadratic complexity when
updating them.

Finishing transitions instantly when styles are updated makes our
behavior more correct.
2015-08-01 23:01:43 -07:00
bors-servo
92cbb93684 Auto merge of #6894 - pcwalton:double-precision-timestamps, r=metajack
style: Switch animation timestamps to be doubles instead of floats.

32-bit floats are not enough to hold timestamps since the epoch and
result in jank.

r? @metajack

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6894)
<!-- Reviewable:end -->
2015-08-01 22:01:39 -06:00
bors-servo
b7261a2073 Auto merge of #6714 - boghison:filelist, r=jdm
Implement a FileList



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6714)
<!-- Reviewable:end -->
2015-08-01 20:16:14 -06:00
Patrick Walton
cac01edf80 style: Switch animation timestamps to be doubles instead of floats.
32-bit floats are not enough to hold timestamps since the epoch and
result in jank.
2015-08-01 17:46:39 -07:00
bors-servo
c6b043582b Auto merge of #6741 - servo:fix-setpropertypriority, r=pcwalton
Fix CSSStyleDeclaration::setPropertyPriority and some refactoring

r? @Ms2ger

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6741)
<!-- Reviewable:end -->
2015-08-01 15:00:06 -06:00
Bogdan Cuza
8bc66f97f8 Implement the FileList interface. Fixes #6708 2015-08-01 19:31:20 +02:00
bors-servo
1b06031ccc Auto merge of #6889 - pcwalton:transition-left, r=metajack
style: Fix misdirected animation properties.

left redirected to top, and padding redirected to margin.

r? @mbrubeck (or whoever)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6889)
<!-- Reviewable:end -->
2015-08-01 11:29:01 -06:00
zmike
a03a0cb929 implement display_handler::on_status_message for cef 2015-08-01 13:26:25 -04:00
Patrick Walton
ad7bfa2289 style: Fix misdirected animation properties.
left redirected to top, and padding redirected to margin.
2015-08-01 10:23:41 -07:00
bors-servo
effb17b336 Auto merge of #6829 - Wafflespeanut:devtools, r=jdm
Persuading devtools to communicate with the workers; r=jdm

For now, this just gives some purpose to the abandoned receiver and later selects over the two receivers (for #6767). (oh wait, forgot to check the local build - there are still a few errors)...

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6829)
<!-- Reviewable:end -->
2015-08-01 10:04:07 -06:00
Ravi Shankar
79b65402d7 Persuading devtools to communicate with the workers; r=jdm 2015-08-01 21:25:49 +05:30
bors-servo
4de6e699b2 Auto merge of #6882 - notriddle:master, r=jdm
Automate Dromaeo

Closes #6759.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6882)
<!-- Reviewable:end -->
2015-08-01 08:50:14 -06:00
Michael Howell
ac65817d2e Make output results valid Markdown tables. 2015-07-31 21:57:26 -07:00