Commit graph

17187 commits

Author SHA1 Message Date
bors-servo
1177ef5869 Auto merge of #10891 - heycam:text-style, r=bholley
Specialize text node style resolution so geckolib can avoid inheriting non-inherited structs.

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/10891)
<!-- Reviewable:end -->
2016-04-28 18:00:48 -07:00
Cameron McCormack
dafc683aef Specialize text node style resolution so geckolib can avoid inheriting non-inherited structs. 2016-04-29 10:07:59 +10:00
bors-servo
f932db34c8 Auto merge of #10892 - CorcovadoMing:patch-1, r=Wafflespeanut
Pass --no-patch by default to update_css

fix #10884 according to #9666

<!-- 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/10892)
<!-- Reviewable:end -->
2016-04-28 16:19:35 -07:00
bors-servo
0b2c248042 Auto merge of #10888 - heycam:computed-node, r=bholley
Make Servo_GetComputedValues take a node rather than an element.

r? @bholley
https://bugzilla.mozilla.org/show_bug.cgi?id=1268392 is the Gecko side

<!-- 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/10888)
<!-- Reviewable:end -->
2016-04-28 15:25:00 -07:00
bors-servo
210803b4b2 Auto merge of #10887 - askeing:fix_10374, r=KiChjang
Dispatch error event when link elements get invalid response

fix #10374

<!-- 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/10887)
<!-- Reviewable:end -->
2016-04-28 14:30:04 -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
3836c2c4cb Auto merge of #10159 - pcwalton:iframes-know-their-pipelines, r=jdm
script: Make iframes know their pipeline IDs at all times, even after navigation.

Since WebRender uses the pipeline ID stored in the iframe element to
determine which pipeline to display, it had better be kept up to date!

Closes #9919.

r? @jdm

<!-- 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/10159)
<!-- Reviewable:end -->
2016-04-28 12:44:39 -07:00
Patrick Walton
7bd257089c script: Make iframes know their pipeline IDs at all times, even after
navigation.

Since WebRender uses the pipeline ID stored in the iframe element to
determine which pipeline to display, it had better be kept up to date!

Closes #9919.
2016-04-28 10:53:13 -07:00
bors-servo
fcb1352e97 Auto merge of #10623 - pcwalton:reddit-float-fix, r=mbrubeck
layout: Reset values appropriately for floats flowing out of blocks with nonzero inline margins.

These two commits correctly position the hamburger menu icons on http://reddit.com/r/rust.

<!-- 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/10623)
<!-- Reviewable:end -->
2016-04-28 10:24:38 -07:00
Patrick Walton
6b6587a73b layout: Translate floats flowing out of blocks to compensate for inline
direction margins.

Improves Reddit /r/rust.
2016-04-28 10:25:49 -07:00
Patrick Walton
97de2c2afa layout: Reset the speculated inline size of floats out to compensate for
margins for all blocks, not just block formatting contexts.

Partial fix for Reddit /r/rust.
2016-04-28 10:25:49 -07:00
bors-servo
c011c3197d Auto merge of #10894 - jdm:movetest, r=Ms2ger
Move canvas rendering test to WPT.

<!-- 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/10894)
<!-- Reviewable:end -->
2016-04-28 08:34:18 -07:00
Josh Matthews
be72363a32 Move canvas rendering test to WPT. 2016-04-28 11:26:06 -04: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
bors-servo
224bcd7057 Auto merge of #10880 - mbrubeck:char-at, r=nox
Code cleanup in gfx::text

* Fix deprecation warnings by replacing `str::char_at` and related functions with iterators.
* Replace some uses of `range::Range` with `std::ops::Range`.

<!-- 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/10880)
<!-- Reviewable:end -->
2016-04-28 05:01:24 -07:00
CorcovadoMing
08a20e3be9 pass --no-patch by default to update_css 2016-04-28 19:58:30 +08:00
bors-servo
b8e2fa58d6 Auto merge of #10694 - fitzgen:profile-traces-to-file, r=SimonSapin
Add a method for dumping profiles as self-contained HTML w/ timeline visualization

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 Gantt-chart style
timeline.

Example output HTML file: http://media.fitzgeraldnick.com/dumping-grounds/trace-reddit.html

Mostly I made this because I wanted to see what kind of data the profiler has, and thought that this might be useful for others as well. I'm happy to add tests if we can figure out how to integrate them into CI, but I'm not sure how that would work.

Thoughts?

<!-- 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/10694)
<!-- Reviewable:end -->
2016-04-28 02:47:35 -07:00
bors-servo
78e23f4c9b Auto merge of #10890 - servo:trusted, r=nox
Remove extraneous script_chan parameter from Trusted::new

<!-- 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/10890)
<!-- Reviewable:end -->
2016-04-28 01:57:52 -07:00
Keith Yeung
33acb1937c Remove extraneous script_chan parameter from Trusted::new 2016-04-28 10:52:44 +02:00
Cameron McCormack
b488e1d1d4 Make Servo_GetComputedValues take a node rather than an element. 2016-04-28 18:44:31 +10:00
askeing
d6863e6800 modified the code, following the suggestions from reviewer 2016-04-28 15:06:01 +08:00
askeing
71829c787d remove ini file due to test are expected to pass 2016-04-28 15:05:54 +08:00
askeing
80fd18676f Dispatch error event when link elements get invalid response 2016-04-28 13:06:16 +08:00
bors-servo
fbc575407d Auto merge of #10849 - shinglyu:yaml, r=aneeshusa
Move buildbot step to yaml

This is a step of https://github.com/servo/saltfs/issues/316

After this patch lands, we'll PR the saltfs code to read from this yaml file, and dynamically generate test steps at runtime.

cc @aneeshusa @edunham

<!-- 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/10849)
<!-- Reviewable:end -->
2016-04-27 21:23:04 -07:00
Shing Lyu
c01aa9cce8 Move buildbot step to yaml 2016-04-28 10:46:15 +08: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
bors-servo
14de06aef0 Auto merge of #10871 - daoshengmu:canvasWithoutContexts, r=jdm
Fix issue #10755 Canvas without contexts

While canvas without contexts, we just need to return the function without drawing any pixel.

Fixes #10755.
<!-- 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/10871)
<!-- Reviewable:end -->
2016-04-27 16:40:43 -07:00
Daosheng Mu
f97e6ab9ca Add test for canvases without contexts. 2016-04-28 07:04:34 +08:00
Daosheng Mu
b7e05b4a9d Avoid drawing while canvases without contexts. 2016-04-28 07:03:45 +08: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
Daniel Robertson
153059c55c
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."
2016-04-27 16:39:57 -04:00
Matt Brubeck
4d05bf23b8 Get rid of unnecessary clamping in text shaping 2016-04-27 10:58:16 -07:00
Matt Brubeck
83feda3ac2 Stop using deprecated str::char_* methods
Fixes deprecation warnings in the gfx crate.
2016-04-27 10:57:11 -07:00
bors-servo
311dd0f930 Auto merge of #10816 - SunyDays:errorevent_argument, r=frewsxcv
Implement the errorevent argument to Document::createEvent

new_uninitialized function on ErrorEvent has already been in components/script/dom/errorevent.rs

close #10738

<!-- 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/10816)
<!-- Reviewable:end -->
2016-04-27 10:52:41 -07:00
SunyDays
7d24426172 Implement the errorevent argument to Document::createEvent 2016-04-27 20:49:25 +03:00
Matt Brubeck
7e67bb788c Replace range::Range with std::ops::Range in text shaping code 2016-04-27 10:17:21 -07:00
bors-servo
daa1a2a0a8 Auto merge of #10647 - ConnorGBrewster:parse_xml, r=jdm
Finish hooking up XML parser

This is a work in progress PR for #10581. I just want to make sure I am headed in the right direction.

cc @jdm

<!-- 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/10647)
<!-- Reviewable:end -->
2016-04-27 07:50:54 -07:00
Connor Brewster
3389c497c0 Finish hooking up XML parser
added script integration with xml5ever

Updated test expectations

Removed timeout test expectation

Refactors

application/xhtml+xml is treated as HTML

Updated xml5ever

Updated Text Expectations
2016-04-27 08:44:13 -06:00
bors-servo
ce54234262 Auto merge of #10872 - servo:unused-ini, r=nox
Remove an unused .ini file.

The subtest listed here was renamed, so the section no longer applies.

<!-- 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/10872)
<!-- Reviewable:end -->
2016-04-27 05:18:30 -07:00
bors-servo
88020e9151 Auto merge of #10869 - frewsxcv:dry, r=jdm
DRY out `StreamedResponse::from_http_response`.

<!-- 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/10869)
<!-- Reviewable:end -->
2016-04-27 04:23:34 -07:00
bors-servo
5fd93de7be Auto merge of #10866 - broesamle:issue10856-a, r=Ms2ger
Move abstract parser infrastructure from servohtmlparser.rs to parse

Fixes #10856

<!-- 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/10866)
<!-- Reviewable:end -->
2016-04-27 03:29:50 -07:00
bors-servo
e079e01320 Auto merge of #10848 - heycam:struct-accessor, r=bholley
Add Servo_GetStyleFoo functions to get style structs from GeckoComputedValues

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/10848)
<!-- Reviewable:end -->
2016-04-27 02:20:17 -07:00
Martin Broesamle
7c4489b193 Move abstract parser infrastructure from servohtmlparser.rs to parse 2016-04-27 10:32:59 +02:00
bors-servo
ad77d40360 Auto merge of #10868 - frewsxcv:loadcancelled, r=Ms2ger
Add `NetworkError::LoadCancelled` variant.

<!-- 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/10868)
<!-- Reviewable:end -->
2016-04-27 01:26:05 -07:00
Ms2ger
026cf3e8e3 Remove an unused .ini file.
The subtest listed here was renamed, so the section no longer applies.
2016-04-27 09:32:10 +02:00
bors-servo
21c1773115 Auto merge of #10838 - bd339:iss9551, r=KiChjang
Implement step 3 according to spec

Goes towards fixing #9551

<!-- 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/10838)
<!-- Reviewable:end -->
2016-04-27 00:16:08 -07:00
Cameron McCormack
88f51af3f8 Add Servo_GetStyleFoo functions to get style structs from GeckoComputedValues.
While we're here we also:

* remove any code conditional on style_struct.gecko_ffi_name, since all
  style structs now do have a corresponding Geckos struct

* add new UIReset and XUL style structs, so that all Gecko structs are
  now present (apart from Variables, which is special)
2016-04-27 17:13:26 +10:00
bors-servo
55ea0d1133 Auto merge of #10870 - axitkhurana:do-parse-integer-return-value, r=KiChjang
Return a Result<i64, ()> from do_parse_integer

Fixes #10860

<!-- 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/10870)
<!-- Reviewable:end -->
2016-04-26 23:26:29 -07:00
Akshit Khurana
4a3addb72f Return a Result<i64, ()> from do_parse_integer
Fixes #10860
2016-04-26 23:03:16 -07:00