Commit graph

12161 commits

Author SHA1 Message Date
bors-servo
e97d8bd25c Auto merge of #7340 - pcwalton:quotes-none-crash, r=mbrubeck
layout: Don't crash if `quotes: none` is specified and generated content uses quotes.

Avoids a crash on The Verge.

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7340)
<!-- Reviewable:end -->
2015-08-24 18:01:39 -06:00
Patrick Walton
35c67b22e5 layout: Don't crash if quotes: none is specified and generated content
uses quotes.

Avoids a crash on The Verge.
2015-08-24 17:00:23 -07:00
bors-servo
c790c4d4cd Auto merge of #7348 - jxs:master, r=jdm
update tidy.py remove collect_file_names:

call python os functions inline

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7348)
<!-- Reviewable:end -->
2015-08-24 17:19:02 -06:00
João Oliveira
69ddedc568 update tidy.py remove collect_file_names:
call python os functions inline
2015-08-25 00:05:37 +01:00
bors-servo
b1f0357fce Auto merge of #7118 - g-k:tidy-check-unused-html-files, r=jdm
Add tidy check for unused reftest html files

Refs: https://github.com/servo/servo/issues/7078

Sample output:

```
$ time ./mach test-tidy
tests/ref/background_image_a.html not used or commented out in basic.list
tests/ref/background_image_ref.html not used or commented out in basic.list
tests/ref/canvas_linear_gradient_a.html not used or commented out in basic.list
tests/ref/canvas_linear_gradient_ref.html not used or commented out in basic.list
tests/ref/canvas_radial_gradient_a.html not used or commented out in basic.list
tests/ref/canvas_radial_gradient_ref.html not used or commented out in basic.list
tests/ref/inline_border_a.html not used or commented out in basic.list
tests/ref/inline_border_b.html not used or commented out in basic.list
tests/ref/inline_text_align_a.html not used or commented out in basic.list
tests/ref/inline_text_align_b.html not used or commented out in basic.list
tests/ref/link_style_dynamic_addition.html not used or commented out in basic.list
tests/ref/link_style_dynamic_addition_ref.html not used or commented out in basic.list
tests/ref/overflow_position_abs_inside_normal_a.html not used or commented out in basic.list
tests/ref/overflow_position_abs_inside_normal_b.html not used or commented out in basic.list
tests/ref/overflow_position_abs_simple_a.html not used or commented out in basic.list
tests/ref/overflow_position_abs_simple_b.html not used or commented out in basic.list
tests/ref/position_fixed_a.html not used or commented out in basic.list
tests/ref/position_fixed_b.html not used or commented out in basic.list
tests/ref/position_fixed_simple_a.html not used or commented out in basic.list
tests/ref/position_fixed_simple_b.html not used or commented out in basic.list
tests/ref/position_fixed_static_y_a.html not used or commented out in basic.list
tests/ref/position_fixed_static_y_b.html not used or commented out in basic.list
tests/ref/style_is_in_doc.html not used or commented out in basic.list
tests/ref/style_is_in_doc_ref.html not used or commented out in basic.list
tests/ref/table_specified_width_a.html not used or commented out in basic.list
tests/ref/table_specified_width_ref.html not used or commented out in basic.list
tests/ref/text_decoration_propagation_a.html not used or commented out in basic.list
tests/ref/text_decoration_propagation_b.html not used or commented out in basic.list
tests/ref/text_shadow_multiple_shadows_a.html not used or commented out in basic.list
tests/ref/text_shadow_multiple_shadows_ref.html not used or commented out in basic.list
tests/ref/viewport_percentage_vmin_vmax_b.html not used or commented out in basic.list
tests/ref/viewport_percentage_vw_vh_b.html not used or commented out in basic.list
tests/ref/white_space_intrinsic_sizes_a.html not used or commented out in basic.list
tests/ref/white_space_intrinsic_sizes_ref.html not used or commented out in basic.list
tests/ref/fonts/takao-p-gothic/COPYING.html not used or commented out in basic.list
tests/ref/iframe/multiple_external_child.html not used or commented out in basic.list
...
```

I thought it might be helpful to say which files aren't used in `basic.list`.

`./mach test-tidy` is a second or two slower on my laptop.
Not sure if this counts as a warning or an error that should return 1.
Not sure whether unused file output should go before or after the line specific errors.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7118)
<!-- Reviewable:end -->
2015-08-24 16:03:05 -06:00
bors-servo
abb57c3579 Auto merge of #7342 - connorimes:fix-heartbeats-build, r=larsbergstrom
Fix heartbeats build with new -sys version. Fixes #7328

Updated -sys packages to build from a local copy of the native library source rather than using git submodules.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7342)
<!-- Reviewable:end -->
2015-08-24 15:05:56 -06:00
Connor Imes
bb96710cbf Fix heartbeats build with new -sys version. Fixes #7328 2015-08-24 15:38:45 -05:00
bors-servo
9bb97319a2 Auto merge of #7338 - jxs:master, r=Ms2ger
Move RegisterBindings::RegisterProxyHandlers call into script::init

closes #7336
2015-08-24 11:52:03 -06:00
João Oliveira
77e8d3071c Move RegisterBindings::RegisterProxyHandlers call into script::init
closes #7336
2015-08-24 18:41:39 +01:00
bors-servo
524b02dbf7 Auto merge of #7331 - paulrouget:issue-7316, r=SimonSapin
prevent division by 0

Fix #7316

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7331)
<!-- Reviewable:end -->
2015-08-24 05:08:41 -06:00
bors-servo
fa06a96f8a Auto merge of #7334 - servo:active, r=SimonSapin
Parse :active pseudo-class selector.

This is #7258 with a spec link added in doc-comment.

The pseudo-class is never matched, but this can still help with stylesheets like `a:hover, a:active { color: something }` where failing to parse one pseudo-class makes the entire selector list invalid.

I filed #7333 about actually making it match.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7334)
<!-- Reviewable:end -->
2015-08-24 04:23:13 -06:00
Simon Sapin
daedee844f Add spec link for the IN_ACTIVE_STATE flag. 2015-08-24 11:45:41 +02:00
bors-servo
1600303231 Auto merge of #7329 - servo:flexbox, r=nox
Enable flexbox tests.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7329)
<!-- Reviewable:end -->
2015-08-24 01:29:53 -06:00
Ms2ger
8d1a6feca0 Enable flexbox tests. 2015-08-24 09:29:31 +02:00
Paul Rouget
4987e320d4 prevent division by 0
Fix 7316
2015-08-24 08:53:37 +02:00
bors-servo
f63d35662e Auto merge of #7330 - jxs:master, r=nox
remove PrivateCSSStyleDeclarationHelpers trait from Element,

call get_inline_style_declaration and
get_important_inline_style_declaration inline
closes #7319

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7330)
<!-- Reviewable:end -->
2015-08-23 17:39:12 -06:00
João Oliveira
1829c72061 remove PrivateCSSStyleDeclarationHelpers trait from Element,
call get_inline_style_declaration and
get_important_inline_style_declaration inline
closes #7319
2015-08-23 14:15:21 +01:00
bors-servo
4606956120 Auto merge of #7325 - dvberkel:remove-time-from-ORGANIZATION, r=Ms2ger
Remove unused support/time from ORGANIZATION.md

As detailed in the explanation of `support/time`, it should be temporarily. In this case the documentation lags behind the reality. `support/time` was removed in commit e2912a8552 so it seems appropriate to remove it from `ORGANIZATION.md` as well.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7325)
<!-- Reviewable:end -->
2015-08-23 02:45:21 -06:00
dvberkel
8d08fdab96 Remove unused support/time from ORGANIZATION.md
As detailed in the explanation of `support/time`, it should be
temporarily. In this case the documentation lags behind the
reality. `support/time` was removed in commit
e2912a8552 so it seems appropriate to
remove it from `ORGANIZATION.md` as well.
2015-08-23 09:13:42 +02:00
bors-servo
35bbe51daf Auto merge of #7321 - kindersung:fix_typos, r=jdm
Fix typos in servobuild.example



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7321)
<!-- Reviewable:end -->
2015-08-22 23:03:53 -06:00
Kinder Sung
bdb2485807 Fix typos in servobuild.example 2015-08-23 12:21:43 +08:00
bors-servo
6e06cae44a Auto merge of #7288 - mdibaiee:computedstyle-element, r=Ms2ger
Fix #7268 - getComputedStyle should take `Element`, not `HTMLElement`

This is my first patch, I hope I'm doing it right.

About the test, do you think this is enough and reliable?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7288)
<!-- Reviewable:end -->
2015-08-22 20:43:45 -06:00
bors-servo
d89e4f7991 Auto merge of #7179 - connorimes:add-heartbeats, r=larsbergstrom
Integrate with simple Heartbeats

This PR adds Heartbeats capability to servo.  Heartbeats are used for detailed performance and power/energy profiling.  We will add the power/energy readings in the future.

New dependencies are introduced which need in-depth reviews.  I'm the only one who has had eyes on any of this, and I have limited resources for testing cross-platform compatibility.
* https://github.com/libheartbeats/heartbeats-simple - provides native C libraries from a shared code base:
 * hbs[-static] - performance monitoring
 * hbs-acc[-static] - performance with accuracy monitoring
 * hbs-pow[-static] - performance with power/energy monitoring (the one we're using)
 * hbs-acc-pow[-static] - performance with accuracy and power/energy monitoring 
* https://github.com/connorimes/heartbeats-simple-sys provides rust wrappers for the native C libraries above - one crate for each + a common crate.  These link with the *-static versions of the heartbeats libraries.
* https://github.com/connorimes/heartbeats-simple-rust provides rust abstractions over the -sys crates above - one crate for each.

The new `heartbeats` module in the `profile` crate looks for environment variables telling it to use heartbeats for each ProfilerCategory and where to put log files.  (Of course, if somebody knows how to iterate over the enum instead of hardcoding each one, that would be fantastic.)  If the environment variables aren't set for particular categories, heartbeats aren't created or used.

An interface change is made in the `profile_traits` crate to pass both the start and end time in a `ProfilerMsg` instead of just the elapsed time.  Later we will add energy readings as well.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7179)
<!-- Reviewable:end -->
2015-08-22 17:23:50 -06:00
bors-servo
7945c174a6 Auto merge of #7291 - pcwalton:has-layer-flag, r=mbrubeck
layout: Centralize the logic that determines whether fragments get layers in the fragment.

…so that it can be activated when we're forcing
the creation of extra layers due to positioned descendants that
themselves have layers.

The newly failing tests were tests that accidentally passed due to
incorrect stacking order.

Closes #7281.

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7291)
<!-- Reviewable:end -->
2015-08-22 15:56:05 -06:00
bors-servo
23657484ad Auto merge of #7277 - pcwalton:position-relative-stacking-context, r=glennw
layout: Make `position: relative` with non-auto `z-index` create a stacking context.

Improves imgur.com and Fast Company articles.

This change made `min-height-106.htm.ini` fail because the thing it was testing
for never worked: we were relying on the incorrect stacking order of `position:
relative` to get the green square to show up.

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7277)
<!-- Reviewable:end -->
2015-08-22 14:04:07 -06:00
Patrick Walton
ec1c90df41 layout: Centralize the logic that determines whether fragments get
layers in the fragment, so that it can be activated when we're forcing
the creation of extra layers due to positioned descendants that
themselves have layers.

The newly failing tests were tests that accidentally passed due to
incorrect stacking order.

Closes #7281.
2015-08-22 12:41:33 -07:00
Patrick Walton
fed904fff5 layout: Make position: relative with non-auto z-index create a
stacking context.

Improves imgur.com and Fast Company articles.
2015-08-22 12:22:33 -07:00
bors-servo
d78527feb6 Auto merge of #7314 - pcwalton:minor-form-beautification, r=mbrubeck
resources: Improve the look of form widgets a bit.

* Don't display unselected `<option>` elements inside `<select>`
  dropdowns.

* Use CSS triangles to give `<select>` dropdowns a down arrow in order
  to make them look as intended.

* Use borders instead of `( )` and `[ ]` for radio buttons and check
  boxes, respectively.

Improves facebook.com and IMDB.

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7314)
<!-- Reviewable:end -->
2015-08-22 13:20:11 -06:00
Patrick Walton
4e0fb1ed61 resources: Improve the look of form widgets a bit.
* Don't display unselected `<option>` elements inside `<select>`
  dropdowns.

* Use CSS triangles to give `<select>` dropdowns a down arrow in order
  to make them look as intended.

* Use borders instead of `( )` and `[ ]` for radio buttons and check
  boxes, respectively.

Improves facebook.com and IMDB.
2015-08-22 12:19:28 -07:00
bors-servo
d48f6ffbad Auto merge of #7318 - dvberkel:link-to-components, r=Manishearth
Link organisation reference to source tree

I was going over the `ORGANIZATION.md` to learn about the servo project and I found myself looking up the directories that are mentioned. In order to facilitate this mode of exploration, I linked the various components to their corresponding directories.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7318)
<!-- Reviewable:end -->
2015-08-22 11:42:38 -06:00
dvberkel
19bb26fa3e Link organisation reference to source tree 2015-08-22 19:34:08 +02:00
bors-servo
60140ad294 Auto merge of #7315 - frewsxcv:python-is, r=SimonSapin
Don't use `is` operatory to compare Python strings

`is` checks identity. `==` checks value. I can't think of a reason why
we would want the former in these scenarios.

More info:

* http://stackoverflow.com/a/1504742
* https://docs.python.org/2/reference/expressions.html#is

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7315)
<!-- Reviewable:end -->
2015-08-22 09:26:34 -06:00
Corey Farwell
5bf262770f Don't use is operatory to compare Python strings
`is` checks identity. `==` checks value. I can't think of a reason why
we would want the former in these scenarios.

More info:

* http://stackoverflow.com/a/1504742
* https://docs.python.org/2/reference/expressions.html#is
2015-08-22 10:22:47 -04:00
bors-servo
12c44d69f6 Auto merge of #7096 - paulrouget:glutin-update, r=glennw
Glutin update

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7096)
<!-- Reviewable:end -->
2015-08-22 05:20:09 -06:00
Mahdi Dibaiee
b7d25159d3 Fix #7268 - getComputedStyle should take Element, not HTMLElement 2015-08-22 15:16:15 +04:30
Paul Rouget
0209bf1199 Update glutin window port after glutin update 2015-08-22 12:12:26 +02:00
Connor Imes
054cbf2dce Integrate with simple Heartbeats 2015-08-22 07:45:20 +08:00
bors-servo
5e83a3f0a3 Auto merge of #7312 - servo:flex-experimental, r=SimonSapin
Initial (very rudimentary) flexbox implementation.

This is #7154 with two additional commits (that I did rather than ask @zentner-kyle to do it because it was a bit tricky.)

r? @pcwalton for the last two commit

r=me+pcwalton in #7154 for earlier commits.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7312)
<!-- Reviewable:end -->
2015-08-21 17:19:20 -06:00
Patrick Walton
930dfbb7ad layout: Fix merge fallout. 2015-08-21 16:08:13 -07:00
Simon Sapin
2fa2a3b5a9 Sort imports. 2015-08-21 15:59:20 -07:00
Simon Sapin
133d7c14a8 Make display: flex experimental. 2015-08-21 15:59:20 -07:00
Kyle Zentner
e3bbcb50d2 Add reftests for basic flexbox functionality.
These tests (flex_row_direction.html and flex_column_direction.html) are
correct, but only test the small amount of current flexbox
functionality.
2015-08-21 15:59:19 -07:00
Kyle Zentner
0e18f645f4 Implement FlexFlow::assign_block_size(). 2015-08-21 15:59:19 -07:00
Kyle Zentner
e95c15816d Implement FlexFlow::assign_inline_sizes(). 2015-08-21 15:59:18 -07:00
Kyle Zentner
0488a36862 Create FlexFlow's for 'display: flex' nodes.
This commit doesn't implement any flexbox behavior at all.
It just constructs FlexFlow's, which act just like the BlockFlow from
which they "inherit."
2015-08-21 15:59:18 -07:00
Kyle Zentner
45b7ee9bdb Parse flex-direction CSS property. 2015-08-21 15:59:16 -07:00
bors-servo
1f9778fad9 Auto merge of #7237 - servo:arc-flow, r=pcwalton
Replace FlowRef with Arc<Flow>, now that Arc supports DST.

… and `WeakFlowRef` with `Weak<Flow>`.

r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7237)
<!-- Reviewable:end -->
2015-08-21 15:29:35 -06:00
Simon Sapin
21d69314d4 Don’t mark flow_ref::deref_mut as unsafe.
See discussion in https://github.com/servo/servo/pull/7237
2015-08-21 21:16:25 +02:00
bors-servo
a8c62f0f28 Auto merge of #7310 - OneKorg:bug-7309, r=SimonSapin
Mention max length in tidy check_length. Fixes #7309



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7310)
<!-- Reviewable:end -->
2015-08-21 13:01:05 -06:00
OneKorg
07cde59535 Mention max length in tidy check_length. Fixes #7309 2015-08-21 11:26:13 -07:00