Commit graph

3197 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
a57aa561c1 servo: Clean up unused variables and imports 2016-04-02 16:30:18 +02:00
bors-servo
0489280ded Auto merge of #10347 - mbrubeck:incremental-selection, r=pcwalton
Fix incremental reflow of text selection changes

r? @emilio or @pcwalton

CC @paulrouget: This fixes a bug in the browser.html URL bar auto-completion.

<!-- 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/10347)
<!-- Reviewable:end -->
2016-04-02 19:54:50 +05:30
bors-servo
d0f692b2c5 Auto merge of #10317 - jgraham:update-wptrunner, r=jdm
Update to latest wptrunner

<!-- 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/10317)
<!-- Reviewable:end -->
2016-04-02 18:58:56 +05:30
Matt Brubeck
776aae6399 Fix incremental reflow of text selection changes
Also replace force_relayout methods with direct Node::dirty calls, for
clarity.
2016-04-01 22:00:05 -07:00
Dongie Agnir
6f2bce779d Update expected outcomes for data-uri.htm 2016-04-01 18:27:05 -10:00
bors-servo
ea24389b85 Auto merge of #10114 - matthewbentley:master, r=Manishearth
Load prefs.json from profile-dir if --profile-dir is specified at launch

In response to #10098
Tries to load `prefs.json` from the profile-dir and merge them into the preferences if `--profile-dir` is specified at launch.  The profile-dir preferences take precedence over the default preferences, but command line preferences still take precedence over everything.

Also adds some tests for `prefs.rs`.  These rely on the contents of `resources/prefs.json` (at least `test_get_set_reset_extend()` does), so they may need to be re-worked a bit.

<!-- 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/10114)
<!-- Reviewable:end -->
2016-04-02 08:33:42 +05:30
Matthew Bentley
d06def01ff Add testing for prefs
Also, spelling fix in opts.rs

Fix order of imports to satisfy the lint
Fix split line in test
Fix multi-line string
2016-04-01 21:39:56 -04:00
bors-servo
4e21517796 Auto merge of #10331 - pcwalton:simplify-complex-clipping-regions, r=glennw
gfx: Simplify complex clipping regions as we construct them.

This allows WebRender to correctly render complex clipping regions that
can be reduced to single rounded rectangles. WebRender still can't
render rounded rectangles with arbitrary intersections yet, but this
allows it to handle many more cases.

Closes servo/webrender#241.

r? @glennw

<!-- 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/10331)
<!-- Reviewable:end -->
2016-04-02 05:03:07 +05:30
Matt Brubeck
29fb3f1150 Find the correct column index in adjust_vertical 2016-04-01 14:00:50 -07:00
Matt Brubeck
d7e6f8b0f1 Use correct byte indices in replace_selection 2016-04-01 13:54:02 -07:00
bors-servo
4e4a213c73 Auto merge of #9911 - magni-:dont_use_lookup_tables, r=michaelwu
Do not use lookup tables for put_image_data

Fixes #9599

"This is the first Rust code I have ever written" (and also my first time writing real browser code, it's been quite the learning experience).

Some questions:

> For really fast CPU results, use integer SIMD instructions to handle more than one pixel at a time.

This was out of the scope of #9599, right? I started looking into doing that, but it seems to be a lot more work than the `E-easy` label would suggest. [`std::simd`](https://doc.rust-lang.org/1.0.0/std/simd/index.html) is marked as "unstable", is that a blocker?

> 128 can be added before dividing to round more accurately.

@michaelwu, what did you mean by that?

Also, the #9599 is `Do not use lookup tables for {Get,Put}ImageData operations`, but we only use lookup tables for the `Put`, not the `Get`, right?

Sorry for all the noobish questions.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9911)
<!-- Reviewable:end -->
2016-04-01 23:57:19 +05:30
bors-servo
7d79df4a05 Auto merge of #10304 - Ms2ger:cookie-averse, r=nox
Implement Document::cookie correctly for cookie-averse documents.

<!-- 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/10304)
<!-- Reviewable:end -->
2016-04-01 22:51:51 +05:30
James Graham
78369e95cf Update web-platform-tests to 5582e4d2bfcfd1fa9f105406b143170ee2af7db1 2016-04-01 13:38:57 +02:00
bors-servo
9f892edd87 Auto merge of #10272 - creativcoder:implement-data-url-fetch, r=jdm
implements data-url fetching

Fixes #10165
jdm mentioned of decoupling the, payload loading mechanism to data_loader.rs. So accordingly a `decoder` method has been added to data_loader.

<!-- 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/10272)
<!-- Reviewable:end -->
2016-04-01 15:12:30 +05:30
Rahul Sharma
3e74164e5f implements data-url fetching 2016-04-01 09:49:08 +05:30
Patrick Walton
22a1c112d5 gfx: Simplify complex clipping regions as we construct them.
This allows WebRender to correctly render complex clipping regions that
can be reduced to single rounded rectangles. WebRender still can't
render rounded rectangles with arbitrary intersections yet, but this
allows it to handle many more cases.

Closes servo/webrender#241.
2016-03-31 19:36:40 -07:00
bors-servo
f335586ff5 Auto merge of #10292 - jdm:cssom, r=jdm
Initial steps for CSSOM

Squashed and rebased #10133.

<!-- 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/10292)
<!-- Reviewable:end -->
2016-04-01 04:29:08 +05:30
Mohamed Albashir
b7a57ef487 Initial steps for CSSOM API 2016-03-31 18:17:30 -04:00
James Graham
06da4412f6 Update to latest wptrunner 2016-03-31 18:29:28 +01:00
bors-servo
f10c01cd39 Auto merge of #10249 - canaltinova:master, r=jdm
Make input elements not inherit parent containers alignment

Fixes  #10234 .

<!-- 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/10249)
<!-- Reviewable:end -->
2016-03-31 22:50:29 +05:30
Ms2ger
3c6cc642ee Implement Document::cookie correctly for cookie-averse documents. 2016-03-31 10:40:10 +02:00
Paul Padier
30555812dc Skip failing test 2016-03-31 14:20:36 +09:00
Nazım Can Altınova
c13ea8a253 Make input elements not inherit parent containers alignment
Added a reftest for input element's alignment

Added float: left beacause text-align: center centers the input's itself.

Removed 'rtl' alignment
2016-03-31 01:35:36 +03:00
bors-servo
723989b9dd Auto merge of #10252 - emilio:selection, r=mbrubeck
Implement ::selection pseudo-element

It only supports `color` and `background`, for now, but it shouldn't be hard to add more properties (like text-shadow).

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/10252)
<!-- Reviewable:end -->
2016-03-31 00:47:07 +05:30
bors-servo
e148571812 Auto merge of #10238 - jdm:winunit, r=larsbergstrom
Run unit tests on appveyor

<!-- 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/10238)
<!-- Reviewable:end -->
2016-03-30 19:58:30 +05:30
Emilio Cobos Álvarez
46829bd53c tests: Fix warning in unit tests 2016-03-30 14:28:13 +02:00
Emilio Cobos Álvarez
92f39ea5cf Implement ::selection pseudo-element 2016-03-30 14:28:11 +02:00
bors-servo
77444d00be Auto merge of #10279 - notriddle:issue_10258, r=mbrubeck
Fix #10258

Respect border-box when computing the relative sizes of children.

<!-- 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/10279)
<!-- Reviewable:end -->
2016-03-30 12:48:40 +05:30
bors-servo
0ec96ac02a Auto merge of #10277 - perlun:rename-tcomputedvalues-to-computedvalues, r=SimonSapin
Renamed TComputedValues to ComputedValues

This is a followup to #10210, and a continuation of #10185.

<!-- 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/10277)
<!-- Reviewable:end -->
2016-03-30 11:04:57 +05:30
bors-servo
44b2ba2547 Auto merge of #10255 - mbrubeck:box-unscanned, r=pcwalton
Reduce size of layout::fragment::Fragment struct

This reduces the size of the SpecificFragmentInfo enum from 48 to 24.

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/10255)
<!-- Reviewable:end -->
2016-03-30 07:49:25 +05:30
bors-servo
80d903a897 Auto merge of #10019 - rebstar6:htmllabelclick, r=jdm
Fix htmllabelelement click to activate correct element

Address https://github.com/servo/servo/issues/9928

Pass on label click to the label element's labeled control

<!-- 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/10019)
<!-- Reviewable:end -->
2016-03-30 05:41:00 +05:30
Rebecca
e813f4a85a Add test for HtmlLabelElement clicks 2016-03-29 18:49:56 -04:00
Michael Howell
38f683fcbc Add test case for #10258 2016-03-29 14:37:53 -07:00
Per Lundberg
4cb4cc93e4 Renamed TComputedValues to ComputedValues
This is a followup to #10210, and a continuation of #10185.
2016-03-29 23:30:13 +03:00
Michael Howell
ef571ef507 Add @SimonSapin's test case for #8443 2016-03-29 10:20:56 -07:00
Matt Brubeck
33b9aa49db Update path in script_tests::size_of error messages 2016-03-29 08:41:12 -07:00
Matt Brubeck
31261f045e Put UnscannedTextFragmentInfo in a Box
This reduces the size of the SpecificFragmentInfo enum from 48 to 24.
2016-03-29 08:40:05 -07:00
Matt Brubeck
14e945f09a Add a unit test for Fragment size 2016-03-29 08:37:58 -07:00
bors-servo
c4e112a3be Auto merge of #10247 - eddyb:document-base-url, r=Ms2ger
Use <base> in resolving url attributes (like "href").

Second take of #6303, now that the `base_url` infrastructure is in place.

<!-- 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/10247)
<!-- Reviewable:end -->
2016-03-29 17:11:12 +05:30
Eduard Burtescu
1060c42225 Use <base> in resolving url attributes (like "href"). 2016-03-29 13:44:38 +03:00
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
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
Josh Matthews
97f25456ef Fix HTTP unit test warnings. 2016-03-28 23:16:12 -04:00
Josh Matthews
04df5decee Avoid testing impossible file paths on Windows. 2016-03-28 23:16:10 -04:00
Josh Matthews
50a7a34294 Make cookie comparator test pass on Windows. 2016-03-28 23:16:05 -04: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
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