Commit graph

12333 commits

Author SHA1 Message Date
bors-servo
def249b67a Auto merge of #7371 - frewsxcv:enable-ref-test, r=SimonSapin
Enable commented out inline_text_align_* ref test

At some point this test did not work, but now it does

Closes #1575

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7371)
<!-- Reviewable:end -->
2015-08-26 03:20:58 -06:00
Corey Farwell
574e11d70a Enable commented out inline_text_align_* ref test
At some point this test did not work, but now it does

Closes #1575
2015-08-25 23:25:23 -04:00
bors-servo
a1cd27e6a3 Auto merge of #7369 - pcwalton:relative-layer-overflow, r=glennw
layout: Fix calculation of overflow for stacking contexts that contain `position: relative` fragments.

Fixes placement of the header on espn.go.com.

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7369)
<!-- Reviewable:end -->
2015-08-25 17:16:34 -06:00
Patrick Walton
5c51a6214e layout: Fix calculation of overflow for stacking contexts that contain
`position: relative` fragments.

Fixes placement of the header on espn.go.com.
2015-08-25 15:08:28 -07:00
Matt Brubeck
54e8374b6c Quit when the glutin window closes 2015-08-25 13:32:35 -07:00
bors-servo
ab55e3ec10 Auto merge of #7364 - aweinstock314:update-clipboard-20140825, r=jdm
Update rust-clipboard to a version that works on Windows and Mac.

Possibly completes #5376.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7364)
<!-- Reviewable:end -->
2015-08-25 13:59:45 -06:00
Avi Weinstock
09a20bb0a5 Update rust-clipboard to a version that works on Windows and Mac. 2015-08-25 15:29:29 -04:00
wilmoz
363183d12a Make handle_potential_webgl_error more ergonomic 2015-08-25 13:04:55 -05:00
bors-servo
121110a52a Auto merge of #7362 - wilmoz:ForbidMultilineImports, r=jdm
Forbid multiline imports

https://github.com/servo/servo/issues/7356
2015-08-25 11:29:56 -06:00
wilmoz
63851f2650 Forbid multiline imports 2015-08-25 12:27:42 -05:00
bors-servo
f79220f1a8 Auto merge of #7355 - servo:iframe_size_attributes_vertical_writing_mode, r=pcwalton
Refactor tests/ref/iframe/size_attributes_vertical_writing_mode.html

… to not use an arbitrary 104px offset that just happens to match the reference and relies on incorrect behavior.

See discussion in #7313.

r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7355)
<!-- Reviewable:end -->
2015-08-25 10:04:39 -06:00
bors-servo
a109a333f1 Auto merge of #6770 - ecoal95:webgl-again, r=jdm
Add multiple WebGL calls and improve error detection

Since it probably won't merge until multiprocess lands, I plan to use this PR to keep improving WebGL support until it can land.

Main TODOs are integration of tests, since it seems https://github.com/KhronosGroup/WebGL/issues/1105 is going nowhere, adding missing calls and proper painting via native surfaces instead of readback.

I can't resolve conflicts right now because of time but I will do it soon.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6770)
<!-- Reviewable:end -->
2015-08-25 09:23:00 -06:00
ecoal95
6341c77700 webgl: Implement multiple calls and improve error detection
This commit implements WebGL's:
 * cullFace
 * frontFace
 * enable
 * disable
 * depthMask
 * colorMask
 * clearDepth
 * clearStencil
 * depthFunc
 * depthRange
 * hint
 * lineWidth
 * pixelStorei
 * polygonOffset
 * texParameteri
 * texParameterf
 * texImage2D (partially)

It inlines a lot of OpenGL calls to keep the file
`components/canvas/webgl_paint_task.rs` as small as possible while
keeping readability.

It also improves error detection on previous calls, and sets node damage
on the canvas in the drawing calls.

It adds a `TexImage2D` reftest, even though it's not enabled because:
 * WebGL paints the image when it loads (asynchronously), so the reftest doesn't wait for it and it finishes early
 * If we change the source for the base64 src of the image it works as expected in non-headless mode, but the test harness locks
2015-08-25 17:16:46 +02:00
ecoal95
af3310f149 Update gleam to 0.1.9 2015-08-25 17:16:46 +02:00
bors-servo
4d0b4a7b8c Auto merge of #7359 - servo:build, r=jdm
Fix the build.
2015-08-25 08:34:13 -06:00
Ms2ger
13086abfdc Check the return code of cargo build (except on Android). 2015-08-25 16:32:51 +02:00
Ms2ger
bd53792269 Fix the CEF build. 2015-08-25 16:31:58 +02:00
Simon Sapin
97f71bb257 Refactor tests/ref/iframe/size_attributes_vertical_writing_mode.html
… to not use an arbitrary 104px offset that just happens to match the reference
and relies on incorrect behavior.
2015-08-25 12:39:49 +02:00
Sara Tang
8c39e968cd Fixed mismatched type error 2015-08-24 23:11:31 -04:00
Sara Tang
f80ae3402a Fixes for issue #7347 2015-08-24 21:32:16 -04:00
bors-servo
842112c0f3 Auto merge of #7350 - frewsxcv:fix-tidy, r=mbrubeck
Make tidy search for files recursively again

In #7348 `os.walk` was replaced with `os.listdir`. The latter is not
recursive, which results in only the root directory files getting linted

The changes to `ignored_files` are needed because calling `os.walk(".")`
results in `./` getting prefixed before each path

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7350)
<!-- Reviewable:end -->
2015-08-24 18:39:22 -06:00
Corey Farwell
662b64ffe4 Make tidy search for files recursively again
In #7348 `os.walk` was replaced with `os.listdir`. The latter is not
recursive, which results in only the root directory files getting linted

The changes to `ignored_files` are needed because calling `os.walk(".")`
results in `./` getting prefixed before each path
2015-08-24 20:34:01 -04:00
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