Commit graph

283 commits

Author SHA1 Message Date
Boris Chiou
b89286e8e7 Use CSSPixelLength in LengthOrPercentage{*}.
Replace Au with CSSPixelLength in LengthOrPercentage,
LengthOrPercentageOrAuto, and LengthOrPercentageOrNone.
2017-09-13 18:10:46 +08:00
Boris Chiou
a949e2a057 Introduce CSSPixelLength and update NonNegativeLength.
First, we define computed::CSSPixelLength which contains a CSSFloat, a
pixel value, and then we replace computed::Length with CSSPixelLength.
Therefore, the |ComputedValue| of NoCalcLength, AbsoluteLength,
FontRelativeLength, ViewportPercentageLength, CharacterWidth, and
PhysicalLength is CSSPixelLength.

Besides, we drop NonNegativeAu, and replace computed::NonNegativeLength
with NonNegative<computed::Length>. (i.e. NonNegative<CSSPixelLength>)
2017-09-13 18:05:14 +08:00
Emilio Cobos Álvarez
d8234fef82
style: update bindings. 2017-09-06 13:20:00 +02:00
bors-servo
21c9ef3c6d Auto merge of #18373 - canaltinova:font-feature-vals, r=xidorn
Don't unnecessarily construct gfxFontFeatureValueSet

This is reviewed by xidorn in bugzilla.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1394551](https://bugzilla.mozilla.org/show_bug.cgi?id=1394551)

<!-- 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/18373)
<!-- Reviewable:end -->
2017-09-05 18:35:55 -05:00
Nicholas Nethercote
d880efcab3
Measure the stylist during memory reporting. 2017-09-05 19:43:50 +02:00
bors-servo
f648e12935 Auto merge of #18365 - chenpighead:stylo-keyframe-location, r=upsuper,emilio
stylo: Store location information for keyframe rules.

So far, we only store location info for the whole Keyframes block, not for each
of the keyframe rule. Without this info, the devtool can't present the rules
on the devtool panel properly.

In this patch, we collect the source location info while parsing keyframe selector.
The binding function, Servo_KeyframesRule_GetKeyframe, is also fixed (and renamed
to Servo_KeyframesRule_GetKeyframeAt to match the fix) to accept line and column
parameters from Gecko, so we can pass/set them with the source location from Servo.

This is the servo part of [Bug 1394994](https://bugzilla.mozilla.org/show_bug.cgi?id=1394994).

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1394994](https://bugzilla.mozilla.org/show_bug.cgi?id=1394994)

<!-- 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/18365)
<!-- Reviewable:end -->
2017-09-05 11:22:20 -05:00
Nazım Can Altınova
dd8af182c1 Don't unnecessarily construct gfxFontFeatureValueSet
If there is no font feature values inside document we should avoid creating
unnecessary objects.
2017-09-04 15:48:39 -07:00
Jeremy Chen
28d48242d3 stylo: Store location information for keyframe rules.
So far, we only store location info for the whole Keyframes block, not for each
of the keyframe rule. Without this info, the devtool can't present the rules
on the devtool panel properly.

In this patch, we collect the source location info while parsing keyframe selector.
The binding function, Servo_KeyframesRule_GetKeyframe, is also fixed (and renamed
to Servo_KeyframesRule_GetKeyframeAt to match the fix) to accept line and column
parameters from Gecko, so we can pass/set them with the source location from Servo.
2017-09-04 23:16:43 +08:00
Ting-Yu Lin
4b096486e7 style: Expose stylist::set_device() for gecko
MozReview-Commit-ID: L655tvOwyKH
2017-09-04 21:07:15 +08:00
Xidorn Quan
42411eba66 Update binding files from autoland 2017-09-04 11:37:46 +10:00
Henri Sivonen
35eb9e2152 Take a u8 pointer and a length instead of nsACString pointer from Gecko.
This is the Servo side change of [bug 1354989](https://bugzilla.mozilla.org/show_bug.cgi?id=1354989).
2017-09-01 19:45:57 +03:00
Emilio Cobos Álvarez
3da3eb9be1
style: Update bindings. 2017-08-31 20:58:02 +02:00
bors-servo
12ca7d9e96 Auto merge of #18320 - upsuper:counter-style-clone, r=heycam
Rewrite CounterStyleOrNone::from_gecko_value to use fewer binding functions

This is the Servo side change of [bug 1393189](https://bugzilla.mozilla.org/show_bug.cgi?id=1393189).

<!-- 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/18320)
<!-- Reviewable:end -->
2017-08-31 01:31:52 -05:00
bors-servo
d795ceae17 Auto merge of #18310 - nnethercote:bug-1394729, r=heycam
Measure memory usage of Stylo's Rule Tree.

<!-- Please describe your changes on the following line: -->
This is for https://bugzilla.mozilla.org/show_bug.cgi?id=1394729, which was r=heycam.

---
<!-- 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 tests exist in Gecko.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/18310)
<!-- Reviewable:end -->
2017-08-31 00:31:31 -05:00
Xidorn Quan
673c4f6420 Rewrite CounterStyleOrNone::from_gecko_value to use fewer binding functions 2017-08-31 14:03:59 +10:00
Emilio Cobos Álvarez
c69f769285
Revert "Rewrite CounterStyleOrNone::from_gecko_value to use fewer binding functions"
This reverts commit 65c2047df2.
2017-08-30 14:21:13 +02:00
Nicholas Nethercote
e08829703a Measure memory usage of Stylo's Rule Tree. 2017-08-30 21:46:15 +10:00
Xidorn Quan
65c2047df2 Rewrite CounterStyleOrNone::from_gecko_value to use fewer binding functions 2017-08-30 13:52:19 +10:00
bors-servo
dc8f26432f Auto merge of #18241 - canaltinova:font-feature-values-lookup, r=emilio,xidorn
stylo: Implement font feature values lookup

This PR reviewed by emilio and xidorn on bugzilla. That is backed out because of Windows build problems. Fixed and landing it again.

---
<!-- 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 [Bug 1355721](https://bugzilla.mozilla.org/show_bug.cgi?id=1355721)

<!-- 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/18241)
<!-- Reviewable:end -->
2017-08-25 15:45:03 -05:00
Nazım Can Altınova
d1f5140c2b Update bindings 2017-08-25 12:03:40 -07:00
Gecko Backout
12b02ce9d5 Backed out changeset 01348a3860f7 for build bustage
CLOSED TREE

Backs out https://github.com/servo/servo/pull/18222
2017-08-25 03:45:31 +00:00
bors-servo
76e77be041 Auto merge of #18222 - canaltinova:font-feature-values-lookup, r=emilo,xidorn
stylo: Implement font feature values lookup

This PR reviewed by emilio and xidorn on bugzilla

---
<!-- 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 [Bug 1355721](https://bugzilla.mozilla.org/show_bug.cgi?id=1355721)

<!-- 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/18222)
<!-- Reviewable:end -->
2017-08-24 17:36:44 -05:00
Nazım Can Altınova
984463fdcb Update bindings 2017-08-24 13:33:55 -07:00
Brad Werth
cdcd7edb01 Add a reusable sheets parameter to Servo_StyleSheet_FromUTF8Bytes.
MozReview-Commit-ID: DdMQpUY1WcJ
2017-08-24 10:38:52 -07:00
Bobby Holley
0534f72925 Update bindings. 2017-08-22 18:08:17 -07:00
J. Ryan Stinnett
d76abed401 Update Stylo bindings 2017-08-22 11:00:56 -05:00
Brian Birtles
4f53ca2e39 Expand var() references in single_value_to_css
This is a temporary step needed to support Gecko's getKeyframes() API
until we implement bug 1391537. It only takes effect when
a ComputedValues object is supplied and only for longhand declarations.
2017-08-21 12:59:53 +09:00
Bobby Holley
d2842daa2d Avoid creating a stylo thread pool in e10s parent processes.
MozReview-Commit-ID: LW92yNDKZf4
2017-08-17 19:14:16 -07:00
Tom Tromey
7224a5617f Expose the source map URL on a style sheet
This changes Servo to track the source map URL of a style sheet.  This
parallels a change going in to Gecko:
https://bugzilla.mozilla.org/show_bug.cgi?id=1388855
2017-08-17 06:51:30 -06:00
Nazım Can Altınova
46adb0f0a7 Update bindings 2017-08-16 13:23:15 -07:00
Emilio Cobos Álvarez
4c80cccbd2
stylo: Cleanup a bit of the Stylist clear setup.
This moves us to clear on rebuild, which allows us to remove yet another place
where we track stylist dirtiness.

Bug: 1390255
Reviewed-by: heycam
MozReview-Commit-ID: nihQbUAbh8
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-16 08:49:41 +02:00
J. Ryan Stinnett
711adba0ce Update Stylo bindings 2017-08-15 22:09:08 -05:00
Emilio Cobos Álvarez
6b6ab991fd
stylo: Remove some unused FFI functions.
Bug: 1390650
Reviewed-by: bholley
MozReview-Commit-ID: K9fXGRmgkr4
2017-08-15 23:57:59 +02:00
Emilio Cobos Álvarez
bd74d7fd1d
style: Update bindings. 2017-08-14 12:46:45 +02:00
Nicholas Nethercote
1a40101d2f Overhaul ComputedValues measurement, and add style structs measurement. 2017-08-14 10:49:48 +10:00
Cameron McCormack
d6856c0020 style: Update Gecko bindings. 2017-08-13 19:39:01 +08:00
Bobby Holley
657878d8a5 Update bindings. 2017-08-11 19:14:33 -07:00
Bobby Holley
57d8ec95b7 Update bindings. 2017-08-11 17:00:40 -07:00
Xidorn Quan
888012dcf6 Make nsStylePosition::mGridTemplate{Columns,Rows} a UniquePtr. 2017-08-11 21:17:38 +10:00
Daisuke Akatsuka
b50f2d6bc9 update auto generated file 2017-08-07 14:22:52 +09:00
bors-servo
ac37f81c1f Auto merge of #17972 - heycam:ignore-existing, r=bholley
style: Allow styles to be computed ignoring existing element data.

From https://bugzilla.mozilla.org/show_bug.cgi?id=1384824.

<!-- 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/17972)
<!-- Reviewable:end -->
2017-08-04 21:33:59 -05:00
Cameron McCormack
bb44c0a6bc style: Allow styles to be computed ignoring existing element data. 2017-08-05 10:33:31 +08:00
Manish Goregaokar
3947e2f698 Update stylo code to work on nightly 2017-08-03 14:26:55 -07:00
Emilio Cobos Álvarez
48ea7a29e0
style: Update bindings. 2017-08-03 16:35:34 +02:00
Ting-Yu Lin
c9e2396f3b style: Update gecko bindings
MozReview-Commit-ID: 3jRR36CYAUg
2017-08-03 16:30:18 +08:00
Nicholas Nethercote
526e9691f8 stylo: Measure Elements and ComputedValues.
The patch provides FFI access to Gecko's SeenPtrs type from Rust, in
order to record what has already been measured when measuring Arcs. (The
SeenPtrs must be initialized on the Gecko side because the same table is
reused for measuring all Elements within a window, because Elements can
share ComputedValues.) I have confirmed with DMD that this is working
correctly.

The patch also introduces MallocSizeOfRepeats, which is like
MallocSizeOf but takes a SizeOfState, which holds a SeenPtrs table.
2017-08-03 09:15:38 +10:00
Xidorn Quan
7a642dc952 Update binding files. 2017-08-02 10:35:20 +10:00
Josh Matthews
4b736354c4 Report an error for invalid CSS color values (bug 1381143). 2017-07-31 16:49:53 -04:00
Xidorn Quan
fbb569b0f2 Update binding files. 2017-07-31 14:32:08 +10:00
Xidorn Quan
dd2b851f93 Remove Gecko_GetMediaFeatures and access nsMediaFeatures::features directly. 2017-07-29 20:20:33 +10:00