Commit graph

280 commits

Author SHA1 Message Date
bors-servo
c6f4ced45c Auto merge of #18667 - Manishearth:bindingsup, r=emilio
Update debug bindings for removal of mFrameRefCnt

r=emilio from https://bugzilla.mozilla.org/show_bug.cgi?id=1403808

<!-- 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/18667)
<!-- Reviewable:end -->
2017-09-28 20:15:51 -05:00
Bobby Holley
e2c0ca5110 Update bindings.
MozReview-Commit-ID: 8hyaJxfSi9L
2017-09-28 14:12:56 -07:00
Manish Goregaokar
b19b9b78db Update debug bindings for removal of mFrameRefCnt 2017-09-28 13:19:51 -07:00
Emilio Cobos Álvarez
f6a350b725
style: update bindings. 2017-09-28 10:03:58 +02:00
Hiroyuki Ikezoe
08574b8c4d Update bindings. 2017-09-27 18:27:58 +09:00
Nicholas Nethercote
67e62f49fd Update Gecko bindings. 2017-09-27 13:48:12 +10:00
Cameron McCormack
b1671f1282 style: Regenerate Gecko bindings. 2017-09-26 15:08:13 +08:00
Manish Goregaokar
e1a39a2012 stylo: Remove FontComputationData, switch over to using the new font tracking 2017-09-23 10:51:55 -07:00
Manish Goregaokar
c73dc5704b stylo: Add font keyword info fields on nsStyleFont 2017-09-23 10:51:44 -07:00
Xidorn Quan
8cac727f92 Use array instead of linked list for -moz-border-*-colors 2017-09-21 11:37:57 +10:00
Gecko Backout
7bcd57d3c6 Backed out changeset 5b56ebe80e22 (bug 1400438) for heap write hazard. r=backout
Backs out https://github.com/servo/servo/pull/18574
2017-09-20 14:53:59 +00:00
bors-servo
b49fe47b7d Auto merge of #18574 - upsuper:moz-border-colors-array, r=heycam
Use array instead of linked list for -moz-border-*-colors

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

<!-- 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/18574)
<!-- Reviewable:end -->
2017-09-20 06:40:48 -05:00
Xidorn Quan
4c24ae8d30 Use array instead of linked list for -moz-border-*-colors 2017-09-20 19:05:59 +10:00
Bobby Holley
8000d42582 Bug 1401317 - Disable lazy pseudo caching when the originating element's primary style was reused via the rule node. r=emilio
MozReview-Commit-ID: IkBa39E1bR1
2017-09-19 23:10:21 -07:00
Nicholas Nethercote
f7023a120e Measure the UA cache.
ServoStyleSetSizes now has two uses, one for the Stylist, and one for the UA
cache, and so the patch removes 'Stylist' from the field names.

Example output from about:memory:

> +----1,359,608 B (00.55%) -- layout
> |    +----756,488 B (00.31%) -- style-sheet-cache [2]
> |    +----393,968 B (00.16%) -- servo-ua-cache
> |    |    +--234,496 B (00.10%) -- element-and-pseudos-maps
> |    |    +---59,648 B (00.02%) -- revalidation-selectors
> |    |    +---58,320 B (00.02%) -- invalidation-map
> |    |    +---30,752 B (00.01%) -- other
> |    |    +---10,752 B (00.00%) -- precomputed-pseudos
2017-09-20 08:50:21 +10:00
Gecko Backout
cff911dd36 Backed out changeset 5d3fe46e02cc (bug 1400438) for crashing chrome test mobile/android/components/extensions/test/mochitest/test_ext_options_ui.html on Android. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/18557
2017-09-19 14:36:25 +00:00
bors-servo
0cec629a93 Auto merge of #18557 - upsuper:moz-border-colors-array, r=heycam
Use array instead of linked list for -moz-border-*-colors

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

<!-- 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/18557)
<!-- Reviewable:end -->
2017-09-19 02:10:25 -05:00
Xidorn Quan
18a555eaeb Use array instead of linked list for -moz-border-*-colors 2017-09-19 16:48:00 +10:00
Bobby Holley
bc1d91e584 Add a Servo_IsWorkerThread API. 2017-09-18 21:58:04 -07:00
bors-servo
8397c5b0a2 Auto merge of #18550 - nnethercote:bug-1399758-take-2, r=heycam
Measure ImageValue objects (take 2).

We have about 11,500 of these when loading gmail in a Stylo-enabled build, from
SpecifiedUrls; the objects themselves account for about 1.3 MiB of memory, and
the strings within them about 2.9 MiB.

We also have a very small number of them on the Gecko side.

<!-- 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 testing is on the Gecko side.

<!-- 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/18550)
<!-- Reviewable:end -->
2017-09-18 01:03:46 -05:00
Nicholas Nethercote
0f7b40e90a Measure ImageValue objects (take 2).
We have about 11,500 of these when loading gmail in a Stylo-enabled build, from
SpecifiedUrls; the objects themselves account for about 1.3 MiB of memory, and
the strings within them about 2.9 MiB.

We also have a very small number of them on the Gecko side.
2017-09-18 15:37:31 +10:00
Nicholas Nethercote
09143e627b Fix a panic in Stylo memory reporting.
`MallocSizeOfOps::enclosing_size_of_op` is an `Option<>` type, and the panic in
question is caused by not providing a value in a case where it's needed for
measuring a HashSet.

HashMaps and HashSets are common enough that it makes sense to make
`enclosing_size_of_op` non-optional, which this patch does.
2017-09-18 13:37:53 +10:00
Emilio Cobos Álvarez
bd314747da
style: Implement the body text color quirk in a more straight-forward way.
This avoids grabbing the document when values that inherit from the body,
whatever that means, aren't under the body.

In that case we'll get a semi-random value, but that's also mishandled by Gecko
anyways (and probably Blink, though haven't tested), and doesn't really make
much sense.
2017-09-16 02:44:56 +02:00
Gecko Backout
558e357216 Backed out changeset 67769dac78c4 for busting builds CLOSED TREE
Backs out https://github.com/servo/servo/pull/18519
2017-09-15 20:47:46 +00:00
Matt Brubeck
1c23cacdfb Revert "Measure ImageValue objects."
This reverts commit a185393cee (#18515).
2017-09-15 10:53:26 -07:00
bors-servo
7cc0af37cf Auto merge of #18512 - tromey:preserve-style-sheet-source-url, r=SimonSapin
Preserve sourceURL comment on style sheets

In addition to the sourceMappingURL comment, there is a second special
comment, "sourceURL", that can be used to set the "display name" of a
style sheet for developer tools.  This name is also used as the base
URL for the source-map URL resolution algorithm.  sourceURL is
described here:
https://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/
The devtools feature bug is here:
https://bugzilla.mozilla.org/show_bug.cgi?id=880831

This patch changes servo to preserve and expose this value for use in M-C.

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

<!-- 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/18512)
<!-- Reviewable:end -->
2017-09-15 08:07:49 -05:00
bors-servo
89d5780570 Auto merge of #18519 - emilio:body-quirk, r=heycam
style: Implement the body text color quirk in a more straight-forward way.

This avoids grabbing the body when values that inherit from the body,
whatever that means, aren't under the body.

In that case we'll get a semi-random value, but that's also mishandled by Gecko
anyways (and probably Blink, though haven't tested), and doesn't really make
much sense.

<!-- 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/18519)
<!-- Reviewable:end -->
2017-09-15 06:37:20 -05:00
bors-servo
70a6b2fa91 Auto merge of #18516 - jdm:stringshare, r=heycam
Share specified URLs with Gecko

This makes use of our Arc offset machinery to allow Gecko to store Arc<String> values and ensure there are used appropriately.

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

<!-- 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/18516)
<!-- Reviewable:end -->
2017-09-15 04:05:20 -05:00
Emilio Cobos Álvarez
8c3c56909e
style: Implement the body text color quirk in a more straight-forward way.
This avoids grabbing the document when values that inherit from the body,
whatever that means, aren't under the body.

In that case we'll get a semi-random value, but that's also mishandled by Gecko
anyways (and probably Blink, though haven't tested), and doesn't really make
much sense.
2017-09-15 10:34:42 +02:00
Josh Matthews
1a57bad2a1 Add Rust APIs for interacting with Arc<String> (bug 1397971). 2017-09-15 02:39:09 -04:00
Nicholas Nethercote
a185393cee Measure ImageValue objects.
We have about 11,500 of these when loading gmail in a Stylo-enabled build, from
SpecifiedUrls; the objects themselves account for about 1.3 MiB of memory, and
the strings within them about 2.9 MiB.

We also have a very small number of them on the Gecko side.
2017-09-15 09:43:35 +10:00
Tom Tromey
c48226ff6f Preserve sourceURL comment on style sheets
In addition to the sourceMappingURL comment, there is a second special
comment, "sourceURL", that can be used to set the "display name" of a
style sheet for developer tools.  This name is also used as the base
URL for the source-map URL resolution algorithm.  sourceURL is
described here:
https://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/
The devtools feature bug is here:
https://bugzilla.mozilla.org/show_bug.cgi?id=880831

This patch changes servo to preserve and expose this value for use in M-C.
2017-09-14 12:39:18 -06:00
Markus Stange
82012cbf2b
style: Re-import generated Gecko bindings. 2017-09-14 20:28:14 +02:00
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
Manish Goregaokar
1ad9463558 stylo: Add (unused) absolute offset to FontComputationData 2017-09-11 16:05:37 -07: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