Commit graph

6993 commits

Author SHA1 Message Date
bors-servo
3f73321710 Auto merge of #10248 - pcwalton:float-speculation-with-negative-margins, r=mbrubeck
layout: Only take nonnegative margins into account when estimating inline placement of floats.

Otherwise, the heuristics can pass even when there are no floats,
causing block formatting contexts to be speculated to be flowing around
floats that don't exist!

Closes #10237.

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/10248)
<!-- Reviewable:end -->
2016-03-29 16:04:01 +05:30
bors-servo
159be44193 Auto merge of #10246 - mbrubeck:strip-leading, r=pcwalton
Restore stripped whitespace before reflowing text fragments

Fixes #10200. r? @pcwalton

Note: The reftest uses a transition of non-zero duration, because I couldn't find any other way to reproduce the bug.  Unfortunately this makes it unreliable in debug builds. I tried to fix this using reftest-wait with setTimeout and requestAnimationFrame, but it still wouldn't complete the animation consistently.  To make the test work in debug builds we may need `transitionend` events (#10245) or a different way to reproduce the bug.

<!-- 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/10246)
<!-- Reviewable:end -->
2016-03-29 14:30:40 +05:30
bors-servo
df73a18a61 Auto merge of #10208 - jrasanen:jr/issue10196, r=SimonSapin
Generate html and json of supported css properties.

Fixes #10196. Outputs html and json of supported css properties to `target/doc/` directory when deploying github-pages.

<!-- 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/10208)
<!-- Reviewable:end -->
2016-03-29 13:34:08 +05:30
bors-servo
aac2da75f4 Auto merge of #8641 - notriddle:no_headless, r=glennw
No more headless compositor. Just the normal one.

Fixes #8573

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8641)
<!-- Reviewable:end -->
2016-03-29 12:42:01 +05:30
bors-servo
ddc57fe641 Auto merge of #10253 - eddyb:ipc-update, r=pcwalton
Update ipc-channel to fix leaks and spurious ENOBUFS.

Supersedes #10241 (fixes #10029).
Also fixes #9555 (hopefully for good).

<!-- 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/10253)
<!-- Reviewable:end -->
2016-03-29 11:38:13 +05:30
bors-servo
074c7e8aa0 Auto merge of #10240 - servo:websocket, r=jdm
Bump websocket to 0.16.1

<!-- 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/10240)
<!-- Reviewable:end -->
2016-03-29 09:55:17 +05:30
Eduard Burtescu
a2eecaae82 Update ipc-channel to fix leaks and spurious ENOBUFS. 2016-03-29 03:59:05 +03:00
Patrick Walton
6eb58e2c54 layout: Only take nonnegative margins into account when estimating
inline placement of floats.

Otherwise, the heuristics can pass even when there are no floats,
causing block formatting contexts to be speculated to be flowing around
floats that don't exist!

Closes #10237.
2016-03-28 17:37:57 -07:00
Matt Brubeck
99885b1950 Restore stripped whitespace before reflowing text fragments
Fixes #10200.
2016-03-28 14:04:35 -07:00
bors-servo
cf4fa0a9f4 Auto merge of #10231 - paulrouget:selectionColor, r=mbrubeck
Make selection blue instead of orange

PR https://github.com/servo/servo/pull/10176 add a background color for selected text. It uses a builtin color until `::selection` is supported. ~~Orange makes sense for Linux. Let's make it blue for windows and mac.~~ See https://github.com/servo/servo/pull/10231#issuecomment-202335065

<!-- 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/10231)
<!-- Reviewable:end -->
2016-03-28 23:23:25 +05:30
Anthony Ramine
e29beb10a8 Bump websocket to 0.16.1 2016-03-28 19:45:20 +02:00
bors-servo
db95de6e58 Auto merge of #10182 - mbrubeck:delete_char, r=jdm
Fix delete_char when selection range is empty

An empty selection range should be treated the same as no selection.  Fixes browserhtml/browserhtml#930.

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/10182)
<!-- Reviewable:end -->
2016-03-28 20:43:11 +05:30
Jussi Räsänen
5098ad7d93 Changed mach test to use generated json file of properties 2016-03-28 17:19:04 +03:00
Jussi Räsänen
8e2af4cf05 Fixed script to output the JSON and create doc directory. 2016-03-28 16:32:14 +03:00
Jussi Räsänen
dbb5d11dd3 HTML generation with Mako instead of JS 2016-03-28 16:32:14 +03:00
Jussi Räsänen
e576fe94b2 Generate html and json of supported css properties.
Outputs html and json file of supported css properties to target/doc/
directory when deploying github-pages.
2016-03-28 16:32:14 +03:00
Paul Rouget
2bbf35f2aa Use black on blue color for default selection color 2016-03-28 18:26:17 +08:00
Paul Rouget
63a0851b94 Selection is blue on Windows and Mac, orange on Linux 2016-03-28 11:11:24 +02:00
Paul Rouget
dd08e904eb Disable cross origin check for mozbrowser-enabled top level pipelines 2016-03-28 10:29:31 +02:00
bors-servo
b97ffffb48 Auto merge of #10222 - faineance:master, r=KiChjang
Use self.0 instead of destructuring single item tuple structs.

Closes #9698.

<!-- 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/10222)
<!-- Reviewable:end -->
2016-03-28 04:12:31 +05:30
bors-servo
0826a5b454 Auto merge of #10219 - GuillaumeGomez:adjacent, r=nox
Add insert_adjacent methods into Element

Fixes #10205

<!-- 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/10219)
<!-- Reviewable:end -->
2016-03-27 23:43:04 +05:30
Guillaume Gomez
c05a9b039e Add insert_adjacent methods into Element 2016-03-27 18:32:55 +02:00
faineance
7c45a4fea0 change changes effecting verbosity 2016-03-27 13:54:41 +01:00
bors-servo
61c2358819 Auto merge of #10214 - emilio:angleup, r=KiChjang
Update angle to trunk

Related angle PR: https://github.com/emilio/angle/pull/7

I've tested this locally on Linux, and on Mac and Linux via Travis. It should keep working on windows but who knows... Let appveyor do its work.

<!-- 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/10214)
<!-- Reviewable:end -->
2016-03-27 17:13:05 +05:30
faineance
418842faf9 use self.0 instead of destructing single item tuple structs 2016-03-27 11:50:08 +01:00
MovingtoMars
4e40fecbdd Fail cleanly instead of panicking for incorrect option arguments 2016-03-27 22:00:02 +13:00
Emilio Cobos Álvarez
015c69db56 Update angle to trunk
Related angle PR: https://github.com/emilio/angle/pull/7
2016-03-26 23:38:07 +01:00
bors-servo
4cb626ae29 Auto merge of #10204 - awalGarg:fix10161, r=Manishearth
Allow setting preferences to false in WPT tests

First patch to servo - apologies if I did something stupid :)

This is a fix for #10161. I have squashed the commits into one.

<!-- 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/10204)
<!-- Reviewable:end -->
2016-03-27 00:46:55 +05:30
Awal Garg
b1ff30f752 Allow setting preferences to false in WPT tests. closes #10161 2016-03-26 23:53:56 +05:30
bors-servo
db13ec48b1 Auto merge of #10191 - servo:xml, r=KiChjang
Update xml5ever.

<!-- 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/10191)
<!-- Reviewable:end -->
2016-03-26 23:22:24 +05:30
bors-servo
dc0e541747 Auto merge of #10179 - asajeffrey:chaotic-good, r=emilio
Added ability to randomly kill pipelines to the constellation.

Added flags:

* `--random-pipeline-closure-probability`: probability of each event triggering a forced exit of a randomly chosen pipeline.
* `--random-pipeline-closure-seed`: seed to use for the RNG (to remove a source of intermittent failure).

These are designed for testing the hardness of the constellation.

<!-- 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/10179)
<!-- Reviewable:end -->
2016-03-26 21:15:59 +05:30
Alan Jeffrey
32c72f0925 Added ability to randomly kill pipelines to the constellation. 2016-03-26 09:11:28 -05:00
bors-servo
d82f97a9cd Auto merge of #10188 - ConnorGBrewster:http-global-state, r=jdm
Add Http Global State Object

This adds a new HttpState object which holds common http state(#10175). This reduces the amount of work that is required to add extra things to the Http state.

The HttpState object currently holds:
```
hsts_list: Arc::new(RwLock::new(HSTSList::new())),
cookie_jar: Arc::new(RwLock::new(CookieStorage::new())),
auth_cache: Arc::new(RwLock::new(HashMap::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/10188)
<!-- Reviewable:end -->
2016-03-26 19:06:52 +05:30
bors-servo
bed91b3334 Auto merge of #10176 - mbrubeck:selection-range, r=pcwalton
Highlight selected text in input fields

Fixes #9993.  This does not yet allow stylesheets to set the selection colors; instead it uses a hard-coded orange background and white foreground.

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/10176)
<!-- Reviewable:end -->
2016-03-26 08:16:20 +05:30
Patrick Walton
b29719e36b layout: Rewrite the block formatting context/float inline-size
speculation code.

The old code tried to do the speculation as a single bottom-up pass
after intrinsic inline-size calculation, which was unable to handle
cases like this:

    <div>
        <div style="float: left">Foo</div>
    </div>
    <div>
        <div style="overflow: hidden">Bar</div>
    </div>

No single bottom-up pass could possibly handle this case, because the
inline-size of the float flowing out of the "Foo" block could never make
it down to the "Bar" block, where it is needed for speculation.

On the pages I tried, this regresses layout performance by 1%-2%.

I first noticed this breaking some pages, like the Google SERPs, several
months ago.
2016-03-25 18:39:16 -07:00
bors-servo
9b2ae3a62f Auto merge of #10198 - pcwalton:negative-ceiling, r=mbrubeck
layout: Allow floats to have negative ceilings due to negative margins.

This fixes `margin-collapse-104.htm`, which is currently accidentally
passing due to lack of #10085. When that PR lands, then that will become
a representative test case.

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/10198)
<!-- Reviewable:end -->
2016-03-26 05:48:25 +05:30
Patrick Walton
aee0c44509 layout: Minor whitespace cleanup. 2016-03-25 15:29:18 -07:00
Patrick Walton
24d81e95b4 layout: Allow floats to have negative ceilings due to negative margins.
This fixes `margin-collapse-104.htm`, which is currently accidentally
passing due to lack of #10085. When that PR lands, then that will become
a representative test case.
2016-03-25 15:29:17 -07:00
Matt Brubeck
afb36ec8de Fix forced repaint on image load
After #10021, `LayoutThread::repaint` no longer forced a repaint because of
the `restyle_damage` check.  This patch adds the correct restyle damage and
fixes #10163.
2016-03-25 14:54:00 -07:00
Connor Brewster
b09570b2b6 Added global state struct
Replace hsts_list, auth_cache, and cookie_jar with http_state

Reverted a few changes

Moved http_state back to factory
Removed unnecessary Arc

Removed Arc for http_state
2016-03-25 12:35:40 -06:00
Matt Brubeck
db2c1841cb Fix delete_char when selection range is empty
An empty selection range should be treated the same as no selection.
Fixes browserhtml/browserhtml#930.
2016-03-25 08:39:53 -07:00
bors-servo
59ba00ed84 Auto merge of #9353 - nox:domtokenlist-replace, r=asajeffrey
Implement and test DOMTokenList.replace (fixes #8511)

Thanks to @sankha93 for the original work in #8525.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9353)
<!-- Reviewable:end -->
2016-03-25 18:26:27 +05:30
Ms2ger
dbc65d1da7 Update xml5ever. 2016-03-25 09:58:58 +01:00
bors-servo
38e8c923b5 Auto merge of #10154 - stjepang:fix-local-urls-only-10147, r=KiChjang
Fix #10147: Correctly handle flag local_urls_only

In function Request::fetch_main, flag local_urls_only (if set)
should allow fetching local urls only. Before this change, the flag had
the inverse behaviour.

Fixes #10147.
Test with: `./mach test-unit -p net fetch::test_fetch_with_local_urls_only`

<!-- 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/10154)
<!-- Reviewable:end -->
2016-03-25 12:42:48 +05:30
bors-servo
9a8d62286c Auto merge of #9887 - schuster:HTMLHyperlinkElementUtils, r=jdm
Implement HTMLHyperlinkElementUtils for HTMLAnchorElement

Fixes #7857

Origin is omitted since it's still not available in rust-url, but since the previous PR also left it out, I'm assuming that's okay.

Please let me know if there are any style issues. There might be more concise ways to do the pattern matching that I don't know about, I guessed at the indentation style in one or two places.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9887)
<!-- Reviewable:end -->
2016-03-25 11:36:35 +05:30
Matt Brubeck
08caf7412f Convert ScannedTextFragment fields into bitflags 2016-03-24 18:33:27 -07:00
Matt Brubeck
6171000875 Highlight selected text in input fields
Fixes #9993.  This does not yet allow stylesheets to set the selection colors;
instead it uses a hard-coded orange background and white foreground.
2016-03-24 18:33:26 -07:00
Jaydeep
c96c26b4f7 Implement HTMLHyperlinkElementUtils for HTMLAnchorElement 2016-03-24 21:14:28 -04:00
bors-servo
2f6388c301 Auto merge of #10174 - larsbergstrom:update_egl, r=zmike
Update servo-egl to fix CEF linkage

Fixes #10130
r? @zmike

<!-- 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/10174)
<!-- Reviewable:end -->
2016-03-25 06:30:30 +05:30
bors-servo
605842f193 Auto merge of #10155 - bholley:generalize_style_structs, r=SimonSapin
Generalize the style structs

This allows geckolib to pass gecko style structs and have the style system write to them directly, provided we implement all the traits.

<!-- 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/10155)
<!-- Reviewable:end -->
2016-03-25 03:27:33 +05:30