Commit graph

10247 commits

Author SHA1 Message Date
Cameron McCormack
333afb61f6 Use UrlExtraData::make_from to avoid manually cloning the ParserContextExtraData contents.
MozReview-Commit-ID: FoCmI6swp5Q
2016-10-16 11:31:57 +08:00
Patrick Walton
7df456e8ac layout: Rewrite clipping to be a two-phase process that takes physical
border box positions and transforms into account.

Clipping region computation now follows a simple process: (1) in the
parent's coordinate system, parents store appropriate clipping regions
into children; (2) each child moves its clipping region to its own
coordinate system if necessary.

Because clipping region computation is now based on stacking-relative
border box positions and the `transform_rect` method, it can handle
`position: relative` offsets and more types of transforms, such as
scaling.

Improves etsy.com.

Closes #13753.
2016-10-15 14:18:48 -07:00
bors-servo
759185abe0 Auto merge of #13765 - pcwalton:relative-position-vertical-percentage, r=emilio
layout: Make percentages in `top` and `bottom` for relative positions relative to height, not width.

Improves etsy.com.

Closes #13760.

r? @mbrubeck

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13765)
<!-- Reviewable:end -->
2016-10-14 23:47:24 -05:00
bors-servo
697e197985 Auto merge of #13703 - Rafagd:my_changes, r=Ms2ger
Replacing Node.rootNode for Node.getRootNode.

- Changed the specification for the Node element to reflect the new standard.
- Changed the implementation of the NodeMethod.

I'm still waiting for some answers for the questions I've posted on #13699, but I'm already doing the pull request so I can get some feedback as well.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #13699 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13703)
<!-- Reviewable:end -->
2016-10-14 14:07:12 -05:00
Patrick Walton
d5443ee450 layout: Make percentages in top and bottom for relative positions
relative to height, not width.

Improves etsy.com.

Closes #13760.
2016-10-14 11:15:39 -07:00
bors-servo
0f4209644c Auto merge of #13759 - bholley:owning_handle, r=SimonSapin
Implement OwningHandle in style

I've also PR-ed this against upstream [1], but I don't want to block on that in case it takes a while to be merged / published.

[1] https://github.com/Kimundi/owning-ref-rs/pull/15

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13759)
<!-- Reviewable:end -->
2016-10-14 10:42:10 -05:00
bors-servo
b94f074b52 Auto merge of #13751 - joewalker:font-kerning, r=Manishearth
Add support for 'font-kerning' in geckolib

Add support for 'font-kerning' in geckolib
These changes fix #13667

    $ ./mach build -d
    It looks like you passed an unrecognized argument into mach.

    $ ./mach test-tidy
    It looks like you are trying to run an unknown mach command: test-tidy

I'm clearly doing something wrong here, but I'm not sure what

- [x] These changes do not require tests because "[For stylo it's okay to not have tests since many of the reftests fail due to unrelated reasons](https://github.com/servo/servo/pull/13570#issuecomment-251354116)" :)

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13751)
<!-- Reviewable:end -->
2016-10-14 08:56:54 -05:00
Joe Walker
a2d3ea57dd Add support for 'font-kerning' in geckolib 2016-10-14 14:50:05 +01:00
Ms2ger
6eaef7c18a Update the bug number for Blob-XHR-revoke.html. 2016-10-14 14:18:04 +02:00
Ms2ger
e134871a95 Implement blob url support in the fetch stack. 2016-10-14 14:18:03 +02:00
Ms2ger
92f1cbcbe3 Stop spawning threads unnecessarily in FileManager.
The spawned threads remain for select_file and select_files, as those may
need to wait indefinitely for the user's response.
2016-10-14 14:12:24 +02:00
Ms2ger
c513b5f226 Avoid an unnecessary clone when calling FileManagerStore::try_read_file. 2016-10-14 11:30:10 +02:00
Ms2ger
fc68e0a6ca Add a FileManager to FetchContext. 2016-10-14 11:30:09 +02:00
Ms2ger
d820387758 Stop wrapping FileManager in an Arc.
It already contains an Arc internally.
2016-10-14 11:30:08 +02:00
bors-servo
41df705661 Auto merge of #13754 - Manishearth:refptr, r=emilio,mystor
Add sugar for RefPtr<T>; use for `quotes` property

Carry-over from https://bugzilla.mozilla.org/show_bug.cgi?id=1309848

r=mystor,emilio

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13754)
<!-- Reviewable:end -->
2016-10-13 22:31:20 -05:00
bors-servo
a80abf6c1d Auto merge of #13738 - pcwalton:table-vertical-align-absolute, r=mbrubeck
layout: Don't try to vertically align absolutely positioned children of table rows.

Improves http://reddit.com/r/aww.

r? @mbrubeck

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13738)
<!-- Reviewable:end -->
2016-10-13 18:12:17 -05:00
Bobby Holley
d73047584c Implement OwningHandle in style.
I've also PR-ed this against upstream [1], but I don't want to block on that
in case it takes a while to be merged / published.

[1] https://github.com/Kimundi/owning-ref-rs/pull/15
2016-10-13 16:53:37 -06:00
bors-servo
6e0d7326ab Auto merge of #13682 - mrobinson:push_pop, r=pcwalton
Integrate stacking contexts into the display list

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Integrate stacking contexts into the display list by adding two new
entry types, PushStackingContext and PopStackingContext. This allows us
to eliminate the ugly offsets map that DisplayList used to contain
and seems to speed up display list construction. With this approach
we are able to also completely prune pseudo-stacking contexts from the
final display list and remove their (minimal) overhead from display
list traversal Traversing the display list is also a bit simpler now.

Additionally, this will allow easier editing of the DisplayList to
properly support scrolling roots. The push/pop entries can be
duplicated to clone complex StackingContext trees between layers.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13682)
<!-- Reviewable:end -->
2016-10-13 17:25:03 -05:00
Patrick Walton
18cf103ee0 layout: Don't try to vertically align absolutely positioned children of
table rows.

Improves http://reddit.com/r/aww.
2016-10-13 14:52:10 -07:00
Rafael Gomes Dantas
0074d2a7a8 Replacing Node.prototype.rootNode for Node.prototype.getRootNode. 2016-10-13 22:40:27 +01:00
bors-servo
3e12af5815 Auto merge of #13755 - fhartwig:early-return, r=KiChjang
Invert conditional and return early from report_pending_exception

<!-- Please describe your changes on the following line: -->
Previously, almost the entire body of `report_pending_exception` was in a conditional branch. We now return early if the function body does not need to be executed.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13746 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they don't add any new functionality.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13755)
<!-- Reviewable:end -->
2016-10-13 16:40:16 -05:00
Florian Hartwig
f064d9ad83 Invert conditional and return early from report_pending_exception 2016-10-13 23:28:24 +02:00
Manish Goregaokar
bb736f41d3 implement |quotes| property
MozReview-Commit-ID: 5eAaJGXSkob
2016-10-14 00:44:08 +05:30
Manish Goregaokar
17a46418dc Add bindings for constructing nsStyleQuoteValues
MozReview-Commit-ID: EjuzgZKMpPp
2016-10-14 00:44:07 +05:30
Manish Goregaokar
2bde9462b1 Add safer bindings for RefPtr 2016-10-14 00:44:06 +05:30
bors-servo
bbcc743bb4 Auto merge of #13732 - pcwalton:inline-block-vertical-align-overflow, r=notriddle
layout: Use the margin box for vertical positioning of `inline-block` fragments if `overflow` is not `visible` per CSS 2.1 § 10.8.1.

Additionally, this patch reverts the change introduced in #12642 in
favor of the spec-compliant behavior described above. This patch also
removes the `inline_block_overflow.html` reftest introduced in #3725, as
the behavior it expected contradicted CSS 2.1 (and in fact the test
fails in Gecko).

The changes that this patch makes to `input_selection_a.html` and
`input_selection_incremental_a.html` are necessary workarounds to make
the tests pass in light of the fact that Servo's UA stylesheet applies
`overflow: hidden` to `<input>` elements. I believe that the changes are
not necessary in other rendering engines because they hard-code
`overflow: hidden`-like behavior for `<input>` elements, while Servo
uses the actual CSS `overflow: hidden` behavior. As far as I can tell,
Servo's behavior is arguably more spec-compliant, but it remains to be
seen how Web compatible it is.

Improves the Google results pages.

Closes #13707.

r? @notriddle

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13732)
<!-- Reviewable:end -->
2016-10-13 12:06:44 -05:00
Patrick Walton
c25dd2adf6 layout: Use the margin box for vertical positioning of inline-block
fragments if `overflow` is not `visible` per CSS 2.1 § 10.8.1.

Additionally, this patch reverts the change introduced in #12642 in
favor of the spec-compliant behavior described above. This patch also
removes the `inline_block_overflow.html` reftest introduced in #3725, as
the behavior it expected contradicted CSS 2.1 (and in fact the test
fails in Gecko).

The changes that this patch makes to `input_selection_a.html` and
`input_selection_incremental_a.html` are necessary workarounds to make
the tests pass in light of the fact that Servo's UA stylesheet applies
`overflow: hidden` to `<input>` elements. I believe that the changes are
not necessary in other rendering engines because they hard-code
`overflow: hidden`-like behavior for `<input>` elements, while Servo
uses the actual CSS `overflow: hidden` behavior. As far as I can tell,
Servo's behavior is arguably more spec-compliant, but it remains to be
seen how Web compatible it is.

Improves the Google results pages.

Closes #13707.
2016-10-13 09:36:02 -07:00
bors-servo
046a8f13ab Auto merge of #13743 - emilio:wayland-not-yet, r=larsbergstrom
servo: Update glutin to pick the wayland disabling.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because dependency bump.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @larsbergstrom

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13743)
<!-- Reviewable:end -->
2016-10-13 10:39:58 -05:00
bors-servo
740464df8a Auto merge of #13741 - servo:fetch-doc-unused, r=Manishearth
Remove some unused support for the legacy network stack in script.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13741)
<!-- Reviewable:end -->
2016-10-13 09:55:00 -05:00
bors-servo
3f31ffad2f Auto merge of #13739 - frewsxcv:pretty-enumerated, r=jdm
Make make_enumerated_getter prettier again.

Fixes https://github.com/servo/servo/issues/4723.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13739)
<!-- Reviewable:end -->
2016-10-13 08:38:19 -05:00
Emilio Cobos Álvarez
26ef1bba63
servo: Update glutin to pick the wayland disabling. 2016-10-13 13:07:40 +02:00
bors-servo
1a3287bef7 Auto merge of #13733 - jeenalee:request-clone, r=jdm
Fix Request's Headers to be cloned correctly

<!-- Please describe your changes on the following line: -->
Previously, when `Clone()` was called, Headers of the template Request did not get cloned properly. This commit fixes that issue, and updates the expected wpt results.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11894 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13733)
<!-- Reviewable:end -->
2016-10-13 05:33:36 -05:00
Ms2ger
d0323e3a50 Remove DocumentLoader::pipeline. 2016-10-13 11:10:39 +02:00
Ms2ger
7b905a5590 Remove Document::load_async. 2016-10-13 11:10:32 +02:00
bors-servo
bb75e2e727 Auto merge of #13728 - asajeffrey:devtools-set-timeline-marker-may-fail, r=fitzgen
Setting a devtools timeline marker may fail, due to pipeline lookup failure

<!-- Please describe your changes on the following line: -->

Allow setting a devtools timeline marker to fail, due to pipeline lookup failure. This is part of tidying up pipeline lookup.

cc @jdm

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because I'm not sure how to test devtools.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13728)
<!-- Reviewable:end -->
2016-10-13 03:21:47 -05:00
Martin Robinson
be62ad7117 Integrate stacking contexts into the display list
Integrate stacking contexts into the display list by adding two new
entry types, PushStackingContext and PopStackingContext. This allows us
to eliminate the ugly offsets map that DisplayList used to contain
and seems to speed up display list construction. With this approach
we are able to also completely prune pseudo-stacking contexts from the
final display list and remove their (minimal) overhead from display
list traversal Traversing the display list is also a bit simpler now.

Additionally, this will allow easier editing of the DisplayList to
properly support scrolling roots. The push/pop entries can be
duplicated to clone complex StackingContext trees between layers.
2016-10-13 09:50:45 +02:00
bors-servo
2bb7cc227b Auto merge of #13722 - Manishearth:test-stylo, r=jdm
Remove test-geckolib, run test-stylo on travis

test-geckolib used to do things, but almost all of geckolib has been moved to the style crate, with the tests in `tests/unit/stylo`. (`./mach test-stylo) Now test-geckolib does nothing.

Fixes #13721
r? @jdm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13722)
<!-- Reviewable:end -->
2016-10-13 01:50:37 -05:00
bors-servo
d9bb663421 Auto merge of #13723 - Manishearth:resync, r=bholley
Regen bindings, warning fix

The warning only happens on the latest stable (which we use in the incubator), so there's an `#[allow()]` there for now as well.

Don't signal r+ to bors, I'll do that myself when the incubator side lands.

r? @bholley

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13723)
<!-- Reviewable:end -->
2016-10-12 22:01:20 -05:00
Corey Farwell
2944c8d964 Make make_enumerated_getter prettier again.
Fixes https://github.com/servo/servo/issues/4723.
2016-10-12 23:00:07 -04:00
bors-servo
46fe1c320d Auto merge of #13724 - NamsooCho:font_variant_position, r=Manishearth
font_variant_position

<!-- Please describe your changes on the following line: -->

added 'font-variant-position' property to font.mako-rs
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #13669 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13724)
<!-- Reviewable:end -->
2016-10-12 20:05:11 -05:00
bors-servo
0ffbba94fa Auto merge of #13705 - pcwalton:incremental-float, r=notriddle
layout: Don't touch the inline positions of block children unless they are to be reflowed.

See the comment added to
`BlockFlow::propagate_assigned_inline_size_to_children()` for details.

Closes #13704.

r? @notriddle

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13705)
<!-- Reviewable:end -->
2016-10-12 16:00:37 -05:00
bors-servo
8c392dd3e7 Auto merge of #13698 - awesomeaniruddh:implement-moz-text-align-last, r=Wafflespeanut
Implement -moz-text-align-last property

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13638  (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

The test page in Firefox:
<img width="1392" alt="firefox" src="https://cloud.githubusercontent.com/assets/5279150/19276203/a43b486c-8fa3-11e6-9b56-a4cf45217e52.png">

The test page in Stylo:
<img width="1392" alt="servo" src="https://cloud.githubusercontent.com/assets/5279150/19276213/a9c7704e-8fa3-11e6-858b-d6e5f67d3a6c.png">

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13698)
<!-- Reviewable:end -->
2016-10-12 15:15:20 -05:00
Jeena Lee
d03167d980 Fix Request's Headers to be cloned correctly
Previously, when `Clone()` was called, Headers of the template Request
did not get cloned properly. This commit fixes that issue, and updates
the expected wpt results.
2016-10-12 12:49:02 -07:00
bors-servo
626d093245 Auto merge of #13640 - servo:CSSStyleDeclaration_in_style, r=mbrubeck
Move some of the CSSStyleDeclaration logic to the style crate

<!-- Please describe your changes on the following line: -->

… so that Stylo can re-use it.

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1295865

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because refator

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13640)
<!-- Reviewable:end -->
2016-10-12 14:21:34 -05:00
Alan Jeffrey
a6d83a38e5 Setting a devtools timeline marker may fail, due to pipeline lookup failure. 2016-10-12 12:56:23 -05:00
NamSoo Cho
b942e6c21c font_variant_position 2016-10-13 01:55:05 +09:00
Manish Goregaokar
647f8e9c5d Remove test functions from nsstring_vendor
These tests are run on the real nsstring anyway. They cause linux builds to
fail since the test functions are defined twice.
2016-10-12 21:51:06 +05:30
bors-servo
f80623fd93 Auto merge of #13694 - emilio:style-animation, r=Manishearth,birtles
Introduce AnimationValue to manage animated properties in Gecko.

<!-- Please describe your changes on the following line: -->

Doesn't compile because there are a bunch of `from_computed_value` missing, and I need to take care of fixing that before, but open for discussion.

@birtles: is an interface like this something like what you were looking for?

cc @Manishearth

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13694)
<!-- Reviewable:end -->
2016-10-12 10:34:10 -05:00
Manish Goregaokar
b74d07bc78 Use unsafe block on access of column count constant 2016-10-12 20:50:56 +05:30
Manish Goregaokar
cac0def060 Resync bindings 2016-10-12 20:49:16 +05:30