Commit graph

16964 commits

Author SHA1 Message Date
Corey Farwell
d3b8b6472b Move UTF8 bytes handling into generic constructor.
Separate from Servo specific logic.
2016-04-17 12:39:50 -04:00
Corey Farwell
52b3226d54 Rename constructor to match convention, add doc comment. 2016-04-17 12:38:29 -04:00
bors-servo
b00c2740e3 Auto merge of #10612 - autrilla:textdir, r=emilio
Implement HTMLTextArea.setSelectionRange (continuation of #10007)

Tests on `tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html` all pass and the other tests don't panic due to double borrows anymore.

cc: @KiChjang

Fixes #9994.

<!-- 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/10612)
<!-- Reviewable:end -->
2016-04-17 21:58:31 +05:30
bors-servo
bae2ab0771 Auto merge of #10664 - zwn:os-path-basename, r=Wafflespeanut
Use os.path.basename instead of split('/')[-1]

Fixes #10596. I have split up this commit from  #10618 as it seem the easiest to review.

<!-- 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/10664)
<!-- Reviewable:end -->
2016-04-17 21:16:08 +05:30
Zbynek Winkler
b6dc34862a Use os.path.basename instead of split('/')[-1]
Fixes #10596.
2016-04-17 17:37:29 +02:00
Alberto Corona
5e863f2eb8
Implement HTMLTextArea.setSelectionRange 2016-04-17 17:27:26 +02:00
bors-servo
a87fa103b8 Auto merge of #10620 - autrilla:mach-command-improvements, r=Wafflespeanut
Improved readability of ensure_bootstrapped

<!-- 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/10620)
<!-- Reviewable:end -->
2016-04-17 11:21:41 +05:30
bors-servo
9935e82de6 Auto merge of #10662 - frewsxcv:resource-param, r=jdm
Make `read_resource_file` param simpler and more idiomatic.

`<P: AsRef<Path>>` is also what `File::open` uses as a generic type for
the parameter.

<!-- 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/10662)
<!-- Reviewable:end -->
2016-04-17 10:40:30 +05:30
Corey Farwell
c37ab1facd Make read_resource_file param simpler and more idiomatic.
`<P: AsRef<Path>>` is also what `File::open` uses as a generic type for
the parameter.
2016-04-16 23:06:59 -04:00
bors-servo
fd994c457e Auto merge of #10655 - mbrubeck:merge-margin, r=SimonSapin
Update margins when merging inline fragments

Fixes #10633.  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/10655)
<!-- Reviewable:end -->
2016-04-17 08:18:04 +05:30
bors-servo
15e76eb6e2 Auto merge of #10643 - mbrubeck:empty-span-border, r=pcwalton
Fix handling of borders and padding for empty/stripped inline flows

This forces fragment generation for empty inline flows, if they have borders or padding.  Fixes #10533 and #2001.  Also includes fixes for other bugs that were uncovered by this change; see the individual commit messages for detailed explanations.  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/10643)
<!-- Reviewable:end -->
2016-04-17 03:31:12 +05:30
bors-servo
cc290c6e8a Auto merge of #10650 - jdm:disabletfd, r=KiChjang
Disable tinyfiledialogs on non-OS X and Linux platforms.

I haven't been able to fix the appveyor build yet, so this gives us back a usable Windows build.

<!-- 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/10650)
<!-- Reviewable:end -->
2016-04-17 02:50:19 +05:30
Matt Brubeck
782e713472 Update margins when merging inline fragments
Fixes #10633.
2016-04-16 14:13:16 -07:00
Matt Brubeck
1695d14a9e Don't strip out all empty fragments
Empty fragments may need to be layed out to draw borders, padding/background,
and insertion points.  (Fragments that consist of discardable whitespace and
control characters, on the other hand, can still be discarded.)

This ends up preserving some useless empty fragments.  It's possible we could
avoid this by storing some sort of flag on "important" empty fragments, so we
can discard the rest.
2016-04-16 13:13:07 -07:00
bors-servo
cc32c66e28 Auto merge of #10628 - KiChjang:extra-gecko-values, r=bholley
Add missing gecko keyword values to styles

Not sure if I caught them all.
Part of #10408.

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/10628)
<!-- Reviewable:end -->
2016-04-17 01:28:31 +05:30
askeing
f5754b102c Remove "python/tidy_self_test/speclink.rs"
- it already move to "python/tidy/servo_tidy_tests/speclink.rs"
2016-04-17 04:44:28 +09:00
askeing
eb9a7e5c11 bump the minor version of servo_tidy
- and add clean folder into Makefile
2016-04-17 04:33:24 +09:00
askeing
27bac667b2 Modified test_spec_link of test_tidy for packaged tidy 2016-04-17 04:20:24 +09:00
Maciej Skrzypkowski
22d991d4e0 Test for check_spec function, for tidy.py #9152 2016-04-17 04:12:54 +09:00
bors-servo
a373bd10cc Auto merge of #10373 - dzbarsky:enable_webgl, r=dzbarsky
Enable WebGL tests

<!-- 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/10373)
<!-- Reviewable:end -->
2016-04-17 00:34:23 +05:30
Josh Matthews
d09a497aa5 Disable tinyfiledialogs on non-OS X and Linux platforms. 2016-04-16 15:00:31 -04:00
David Zbarsky
1ee11ec669 Enable WebGL tests 2016-04-16 11:43:57 -07:00
askeing
88c94f285e Check the "tests/wpt/web-platform-tests" folder before loading "tools.lint" module 2016-04-17 03:27:50 +09:00
Keith Yeung
f5021fc0c5 Add missing gecko keyword values to styles 2016-04-16 14:06:02 -04:00
Matt Brubeck
1807fd3cc5 Generate a fragment for an empty elements with borders or padding 2016-04-16 11:01:40 -07:00
askeing
922840852a Add "servo-tidy" entry point
- also update requriements "pyflakes" from 0.8 to 0.8.1 due to following issue
```
Traceback (most recent call last):
  File "/Users/Askeing/software/servo/python/_virtualenv/bin/servo-tidy", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3084, in <module>
    @_call_aside
  File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3070, in _call_aside
    f(*args, **kwargs)
  File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3097, in
_initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 653, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 666, in
_build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 839, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pyflakes==0.8.1' distribution was not found and is required by servo-tidy
```
2016-04-17 02:58:01 +09:00
Matt Brubeck
fbef2724bf Fix up inline context flags during text fragment scanning
This fixes two problems that could cause scanned text fragments to end up with
incorrect LAST_FRAGMENT_OF_ELEMENT or FIRST_FRAGMENT_OF_ELEMENT flags:

1. If a single unscanned fragment was split into multiple scanned fragments,
   then all of them would inherit its flags.  We need to clear these flags,
   except for the first and last scanned fragment.

2. When an unscanned fragment generated zero scanned fragments, we correctly
   called `meld_with_next_inline_fragment` to transfer LAST_FRAGMENT flags to
   the preceding fragment, but we didn't do anything to transfer
   FIRST_FRAGMENT flags to the following fragment.  We can fix this by calling
   `meld_with_prev_inline_fragment` on the following fragment.
2016-04-16 10:30:03 -07:00
Matt Brubeck
b607b3a932 Fix meld_with_next_inline_fragment and add meld_with_prev_inline_fragment
Factor out a new `meld_with_prev_inline_fragment` method that mirrors the
existing `meld_with_next_inline_fragment`.

This also fixes a bug in `meld_with_next` that was already fixed in the
`meld_with_prev` by @notriddle in #10419.  The bug is that it was traversing
the inline context nodes in the wrong order.  It should start at the outermost
enclosing node, since the fragments might be at different nesting levels under
some common ancestor.
2016-04-16 10:30:01 -07:00
Matt Brubeck
587314e52b Improve debug logging of non-printable chars 2016-04-16 10:30:00 -07:00
askeing
c723ac6401 Add dependency on toml base on python/requirements.txt 2016-04-17 02:12:28 +09:00
askeing
1eab6ca02d Add dependency on flake8 base on python/requirements.txt 2016-04-17 02:00:13 +09:00
bors-servo
e0a100cacb Auto merge of #10649 - rilut:fix-elementFromPoint-no-viewport-available-test, r=nox
Fix Document#elementFromPoint no viewport available 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/10649)
<!-- Reviewable:end -->
2016-04-16 16:39:06 +05:30
Rizky Luthfianto
5ad312cb8e Fix Document#elementFromPoint no viewport available test 2016-04-16 17:16:27 +07:00
Adrian Utrilla
ec58332699
Improved readability of ensure_bootstrapped 2016-04-16 11:55:20 +02:00
bors-servo
86778a0d71 Auto merge of #10644 - pcwalton:absolute-ib-split, r=mbrubeck
layout: Make absolutely-positioned blocks not generate {ib} splits.

Improves YouTube.

Closes #10642.

r? @mbrubeck

<!-- 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/10644)
<!-- Reviewable:end -->
2016-04-16 06:58:47 +05:30
bors-servo
9d23d7c0d9 Auto merge of #10635 - edunham:tidy-cleanup, r=larsbergstrom
Docs and cleanup after moving tidy

Missed a couple things in https://github.com/servo/servo/pull/10590

`licenseck.py` was moved into `tidy/servo_tidy/licenseck.py` by the prior PR

r? @larsbergstrom (sorry for PR spamming today)

<!-- 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/10635)
<!-- Reviewable:end -->
2016-04-16 06:05:09 +05:30
Patrick Walton
e840c7aaa0 layout: Make absolutely-positioned blocks not generate {ib} splits.
Improves YouTube.

Closes #10642.
2016-04-15 17:27:25 -07:00
bors-servo
812c4ad699 Auto merge of #10637 - notriddle:absolute_float_line_height, r=pcwalton
layout: Do not propagate floats in or out of absolutely positioned flows

Fixes #10625

<!-- 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/10637)
<!-- Reviewable:end -->
2016-04-16 05:25:12 +05:30
Michael Howell
2ecadc913a Add reftest for #10625 2016-04-15 16:01:32 -07:00
Michael Howell
03be4583e0 Do not propagate floats in or out of absolutely positioned flows.
Fixes #10625
2016-04-15 16:01:23 -07:00
bors-servo
ccfd768c4b Auto merge of #10572 - Manishearth:and-now-his-watch-is-ended, r=asajeffrey
Replace watcher threads with panic handlers

<!-- 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/10572)
<!-- Reviewable:end -->
2016-04-16 04:03:41 +05:30
Corey Farwell
da34d469cf Cleanup retrieval of last slice item. 2016-04-15 18:14:16 -04:00
Corey Farwell
540e5ce6ad Use constructor pattern for ApacheFlag enum. 2016-04-15 18:10:33 -04:00
Corey Farwell
6c0927c289 Add relevant sepc link for 'apache bug' mimesniff. 2016-04-15 18:07:55 -04:00
edunham
fe4c314002 Docs and cleanup after moving tidy 2016-04-15 13:59:34 -07:00
bors-servo
f736d8a261 Auto merge of #10482 - matthiaskrgr:readme, r=jdm
readme: add build status badges

Preview can be seen here:

https://github.com/matthiaskrgr/servo/tree/readme#the-servo-parallel-browser-engine-project

<!-- 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/10482)
<!-- Reviewable:end -->
2016-04-16 02:02:49 +05:30
Arnaud Marant
77f52d2eab Issue #10574 Use the document base url in img
add a test with base path set to the resources path and an img with a cat and the reference directly to the image
2016-04-15 21:37:25 +02:00
bors-servo
7c615233d8 Auto merge of #10616 - autrilla:10614, r=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/10616)
<!-- Reviewable:end -->
2016-04-16 00:42:04 +05:30
bors-servo
44d7657487 Auto merge of #10426 - rilut:fix-elementsFromPoint-no-viewport-available-test, r=nox
Fix Document#elementsFromPoint no viewport available test

Fixes #10093 and improves #10034.

<!-- 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/10426)
<!-- Reviewable:end -->
2016-04-16 00:01:23 +05:30
Rizky Luthfianto
5a3ce597d3 Fix Document#elementsFromPoint no viewport available test 2016-04-16 01:05:32 +07:00