Commit graph

1527 commits

Author SHA1 Message Date
Anthony Ramine
2c7d1ddfa1 Fix basic_shape warnings (fixes #12762) 2016-08-08 15:55:22 +02:00
Bobby Holley
8f991f76bd stylo: Use AtomicUsize to store our initial computed values. 2016-08-05 13:42:38 -07:00
bors-servo
414204c909 Auto merge of #12712 - servo:rustup, r=Ms2ger
Update Rust to 1.12.0-nightly (545a3a94f 2016-08-04)

<!-- 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/12712)
<!-- Reviewable:end -->
2016-08-05 07:46:27 -05:00
Anthony Ramine
f88302ebf3 Update Rust to 1.12.0-nightly (545a3a94f 2016-08-04) 2016-08-05 14:45:32 +02:00
bors-servo
0fc0db67c6 Auto merge of #12680 - Manishearth:basic-shape, r=SimonSapin
style: Add support for parsing and serialization of <basic-shape>s

Still WIP: I still need to use this somewhere and make serialization minimal. I'm not sure if I should do either in this PR.
The only other browser that handles basic shapes doesn't serialize correctly either (https://bugzilla.mozilla.org/show_bug.cgi?id=1290864), so that's not something we need to get done now.

As far as using this somewhere, I have the following options:

 - Merge this now, work on using it in stylo in a followup.
 - Just write extensive unit tests for parsing/serialization for now (stylo in a followup)
 - Use this for clip-path in stylo only (which I intend to do anyway, just not sure if I should do it in this PR)
 - Use this for clip-path in Servo (I'd rather not do this; this would be a huge change requiring a lot more layout knowledge than I currently have)

Thoughts? Review? @SimonSapin @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/12680)
<!-- Reviewable:end -->
2016-08-05 06:27:24 -05:00
Manish Goregaokar
234219cd84 Address review comments 2016-08-05 16:58:38 +05:30
bors-servo
54b3668431 Auto merge of #12728 - upsuper:fix-libc-unused, r=emilio
Remove unused libc dependency for windows in style

<!-- 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: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because its a trivial change to remove unused dependency

<!-- 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/12728)
<!-- Reviewable:end -->
2016-08-04 04:27:55 -05:00
bors-servo
939e0a5f89 Auto merge of #12725 - bholley:fix_leaks, r=emilio
stylo: fix leaks, and accept null in Servo_InheritComputedValues

This corresponds to changes in:

https://bugzilla.mozilla.org/show_bug.cgi?id=1291885
and
https://bugzilla.mozilla.org/show_bug.cgi?id=1291891

<!-- 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/12725)
<!-- Reviewable:end -->
2016-08-03 20:20:21 -05:00
Bobby Holley
b916ad0a85 Convert currentColor crash into a warning. 2016-08-03 17:55:02 -07:00
Bobby Holley
f0f39904a2 Explicitly allocate and deallocate our initial computed values.
This allows us to trigger style struct destructors before Gecko's leak checking
runs.
2016-08-03 17:20:21 -07:00
Xidorn Quan
ca3174f6f6 Remove unused libc dependency for windows in style 2016-08-04 10:09:34 +10:00
bors-servo
cbf71a2cf3 Auto merge of #12645 - emilio:stylo, r=bholley
stylo: Allow computing change hints during the traversal.

<!-- 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 geckolib :-(

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

r? @bholley
cc @heycam

<!-- 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/12645)
<!-- Reviewable:end -->
2016-08-03 19:02:26 -05:00
Emilio Cobos Álvarez
27b2bad256
stylo: Fix and ensure alignment of restyle hints. Test it on Travis.
Turns out eRestyle_LaterSiblings was not really matching, sigh...
2016-08-03 15:18:32 -07:00
Emilio Cobos Álvarez
6d67525172
style: Refactor TRestyleDamage and TNode to accept/provide a "style source"
In the Gecko case, this style source would be the style context. In the servo
case, it will be always the computed values.

We could optimise this further in the case of stylo (from three FFI calls to
one) if we use an API of the form CalcAndStore(node, new_cv). But that would
imply borrowing the data twice from Servo (we also have borrow_data_unchecked
fwiw, but...).
2016-08-03 13:31:11 -07:00
Emilio Cobos Álvarez
1470d5b174
stylo: Allow computing change hints during the traversal. 2016-08-03 13:31:11 -07:00
Emilio Cobos Álvarez
67ac81f440
style: Fix sequential traversal. 2016-08-03 13:31:11 -07:00
Steve Melia
04f5369577 Issue 7720: Add target selector and update when scrolling to fragment 2016-08-03 13:23:10 +01:00
Manish Goregaokar
d1e45f78af
Add serialize_four_sides, use for serializing BorderRadius 2016-08-02 19:22:03 +05:30
Manish Goregaokar
973796b989
Various fixes in basic-shape parsing/serialization found by unit tests 2016-08-02 15:57:34 +05:30
Manish Goregaokar
e69f6396e2
Remove unused imports 2016-08-02 15:57:32 +05:30
Manish Goregaokar
1e7973263f
Fix tidy 2016-08-02 15:57:30 +05:30
Manish Goregaokar
eb82cc25ef
Add Polygon to basic_shape.rs 2016-08-02 15:57:28 +05:30
Manish Goregaokar
78ce65d5a8
Add Ellipse to basic_shape.rs 2016-08-02 15:57:27 +05:30
Manish Goregaokar
77f345476f
Add Circle to basic_shape.rs 2016-08-02 15:57:25 +05:30
Manish Goregaokar
44e33bcdc5
Move Position into its own values module 2016-08-02 15:57:23 +05:30
Manish Goregaokar
88c1a67d89
Add ShapeRadius to basic_shape.rs 2016-08-02 15:57:22 +05:30
Manish Goregaokar
2580c1dc6e
Add InsetRect, move BorderRadius to basic_shape.rs 2016-08-02 15:57:20 +05:30
Cameron McCormack
4a8c181419 Fix unused variable warning. 2016-08-02 11:43:44 +08:00
bors-servo
f16aac0e5d Auto merge of #12651 - heycam:background-position, r=Manishearth
Add support for background-position in geckolib.

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

r? @Manishearth

---
<!-- 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 this is a geckolib-only change

<!-- 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/12651)
<!-- Reviewable:end -->
2016-08-01 20:41:56 -05:00
Manish Goregaokar
149246e96a
style: Split values.rs into specified/computed module files 2016-07-29 18:43:42 +05:30
Cameron McCormack
77e57aab5b Add support for background-position in geckolib. 2016-07-29 17:12:50 +08:00
bors-servo
7e39efa2df Auto merge of #12631 - Manishearth:stylo-unsafe-coord, r=bholley
stylo: Use unsafe accessors for coord data

depends on https://bugzilla.mozilla.org/show_bug.cgi?id=1290061

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/12631)
<!-- Reviewable:end -->
2016-07-29 03:38:14 -05:00
Manish Goregaokar
a0f203a3a8
stylo: Use unsafe accessors for coord data; regen bindings 2016-07-29 13:13:36 +05:30
Cameron McCormack
baa339f4af Store UrlExtraData in {specified,computed}::Image::Url. 2016-07-29 14:22:35 +08:00
Cameron McCormack
00677e27fd Pull UrlExtraData up to values.rs. 2016-07-29 13:16:04 +08:00
bors-servo
1f34d4f219 Auto merge of #12632 - bobthekingofegypt:signed_parse_double, r=KiChjang
account for sign in double parsing

<!-- Please describe your changes on the following line: -->
account for sign in double parsing inside styles attr.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
- [X] `./mach test-tidy` does not report any errors

<!-- 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. -->

When sign was present during double parsing correctly jump forward the
extra character when parsing fraction and exponent.

<!-- 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/12632)
<!-- Reviewable:end -->
2016-07-28 16:56:43 -05:00
bors-servo
27d8fb3807 Auto merge of #12623 - notriddle:master, r=emilio
Complete animations whether or not cascade needs done

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12554 (github issue number if applicable).
- [x] There are tests for these changes

<!-- 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/12623)
<!-- Reviewable:end -->
2016-07-28 14:54:36 -05:00
Michael Howell
6a37877734 Complete animations whether or not cascade is done
Fixes #12554
2016-07-28 11:22:20 -07:00
Bob
f3079e8728 account for sign in double parsing
When sign was present during double parsing correctly jump forward the
extra character when parsing fraction and exponent.
2016-07-28 18:56:14 +01:00
bors-servo
944d371b8f Auto merge of #12563 - emilio:stylo, r=bholley,jdm,pcwalton
stylo: Improve restyling performance

This commit adds hooks to the Servo style traversal to avoid traversing all the
DOM for every restyle. Additionally it changes the behavior of the dirty flag to
be propagated top down, to prevent extra overhead when an element is dirtied.

This commit doesn't aim to change the behavior on Servo just yet, since Servo does extra job when dirtying the node related with DOM revision counters that might be necessary.

CC @asajeffrey for the DOM revision counters stuff. When a node is dirty, do all its descendants really need to increment the revision counter, or is this an unintended effect? My intuition is that this is hurting performance quite a lot for servo.

r? @bholley

<!-- 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 no geckolib tests yet.

<!-- 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/12563)
<!-- Reviewable:end -->
2016-07-27 17:56:26 -05:00
Emilio Cobos Álvarez
572b3c31bd
style: Add a comment about pre_process_children_hook. 2016-07-27 11:14:46 -07:00
Emilio Cobos Álvarez
c3a727ebda
style: Remove a few more unuseful traversals now we can. 2016-07-27 11:14:45 -07:00
bors-servo
c1409af543 Auto merge of #12608 - bholley:sync_anon_box, r=emilio
Update anonymous box list

These have drifted since we introduced them. Adding a few other misc commits while I'm at it.

<!-- 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/12608)
<!-- Reviewable:end -->
2016-07-26 23:58:23 -05:00
Bobby Holley
2784f44488 Sync anonymous box list.
This handles the changes in bug 1277131 and bug 1097499, and should
allow us to remove the hacky fallback for anonymous boxes in stylo.
2016-07-26 16:32:50 -07:00
Eduard Burtescu
3d8eab424c Update Rust to 1.12.0-nightly (9316ae515 2016-07-24) 2016-07-26 19:35:51 +02:00
bors-servo
d6266c7cee Auto merge of #12599 - Manishearth:sync, r=heycam
Resync stylo bindings

Now at gecko-dev 13b9d03a21091cfcd797ab89decec2dde9114781

<!-- 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/12599)
<!-- Reviewable:end -->
2016-07-26 10:07:15 -05:00
bors-servo
a3e8199c97 Auto merge of #12388 - kilobtye:textarea2, r=pcwalton
Let textarea wrap lines

<!-- Please describe your changes on the following line: -->
1. Change textarea's style from white-space: pre to white-space: pre-wrap.
2. Display insertion point when a line is wrapped.

---
<!-- 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 #10053 (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/12388)
<!-- Reviewable:end -->
2016-07-26 08:31:49 -05:00
kilobtye
0a86543e6d Let textarea wrap lines 2016-07-26 20:38:11 +08:00
Manish Goregaokar
c8bff6151e
Resync stylo bindings
Now at gecko-dev acf1cc9adeffe040dcdf7b7cf454cdd9657761e5
2016-07-26 15:14:24 +05:30
Emilio Cobos Álvarez
d81fe27b11
style: Avoid propagating the restyle flag all through the dom when a node gets dirty.
This puts us in pair with stylo.
2016-07-25 10:50:04 -07:00