Commit graph

30 commits

Author SHA1 Message Date
Simon Sapin
35282042bc geckolib: Fix some warnings (treated as error) new in Rust Nigthly 2017-08-17 15:59:33 +02:00
Simon Sapin
b5a4b8d6a0 Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10) 2017-08-15 14:10:44 +02:00
Emilio Cobos Álvarez
3e2d87d8db
style: Simplify the ruby text adjustment.
StyleBuilder keeps a reference to the parent style, so no need to get it as an
argument.
2017-08-15 07:49:54 +02:00
Xidorn Quan
89ba3553dc Apply line break suppression to text when in any ruby 2017-08-15 09:32:39 +10:00
Boris Chiou
191c2a282b Bug 1374233 - Part 2: Add NonNegativeAu.
Add values::computed::NonNegativeAu, so BorderSideWith could be computed
to this non-negative Au, for the following properties:
1. outline-width
2. border-{*}-width
3. column-rule-width
4. -webkit-text-stroke-width

MozReview-Commit-ID: ASHaB2F7VtM
2017-08-04 14:21:57 +08:00
Emilio Cobos Álvarez
6c5cf5e2ec
style: Move nsStyleContext::mParent to GeckoStyleContext.
Unfortunately this means that we lose the NS_STYLE_INHERIT_BIT optimization to
avoid posting changes if we had not requested the struct. In practice, I'm not
sure this optimization matters much, though, and we already compare all the
structs anyway.

We _could_ keep a weak parent pointer from the text style if needed, given we're
going to keep alive the text style at least until the parent style context goes
away, so should be safe, but I don't think the extra churn is worth it, to be
honest. Happy to do so as part of bug 1368290 if you think it's worth it.

Bug: 1385896
Reviewed-by: heycam
MozReview-Commit-ID: ka6tNwf4Ke
2017-08-03 12:46:51 +02:00
Emilio Cobos Álvarez
2d9255bff1
style: Get rid of GetParentAllowServo in implementation of CSS 'justify-items' property.
Bug: 1384542
Reviewed-by: heycam
MozReview-Commit-ID: 4qydjqSoVXs
2017-07-31 11:55:04 +02:00
Boris Zbarsky
648c0a3d0b Remove the inherited_style getter from StyleBuilder.
The concept of inherited style is about to get a bit more complicated, and this
will prevent consumers from doing it wrong.

Part 1 of Gecko bug1382806.  r=emilio
2017-07-26 13:40:02 -04:00
Emilio Cobos Álvarez
04e855c38d
style: Fix relevant-link-visited logic in presence of nested links.
MozReview-Commit-ID: LIjpTAgrPBY
2017-07-23 22:12:47 +02:00
Emilio Cobos Álvarez
4e0492c5d1
style: Move the RELEVANT_LINK_VISITED flag to servo.
And kill one GetParentAllowServo call while at it, and some other dumbness...

Bug: 1383307
Reviewed-by: Manishearth
2017-07-23 05:22:18 +02:00
Emilio Cobos Álvarez
b576229567
stylo: Set the NS_STYLE_IS_TEXT_COMBINED flag.
This should fix at least
layout/reftests/writing-mode/1135361-ruby-justify-1.html
2017-07-22 02:29:36 +02:00
Emilio Cobos Álvarez
3f323dde10
style: Move a conditional import to where it's used.
To avoid yet another cfg().
2017-07-21 17:41:56 +02:00
Emilio Cobos Álvarez
e374a54050
style: Cleanup the cascade a good bit. 2017-07-20 11:20:37 +02:00
Emilio Cobos Álvarez
fe8638a618
style: More ComputedValuesInner cleanup.
MozReview-Commit-ID: 8rkAP3pMEpD
2017-07-18 17:35:59 +02:00
Xidorn Quan
bae59d4520 Adjust display value for ::-moz-fieldset-content when parent is flex/grid. 2017-07-18 14:13:12 +10:00
Manish Goregaokar
808b1f509b stylo: Use ComputedValuesInner instead of ComputedValues when we don't need it 2017-07-17 18:02:25 -07:00
Xidorn Quan
6a12de1c1a Add style adjustments for ruby. 2017-07-14 10:53:58 +10:00
Xidorn Quan
fcf37b19fd Move HAS_TEXT_DECORATION_LINES setting into StyleAdjuster. 2017-07-14 10:53:50 +10:00
Xidorn Quan
8b842f5417 Use integer for specified and computed font-weight 2017-07-06 15:31:24 +10:00
Emilio Cobos Álvarez
1b2fd3fe85
style: Be more strict when setting the root font size.
Before this commit, we assumed that if the element had no parent element, it was
the root of the document, which is plain false, since we can arrive there from,
let's say, getComputedStyle on a detached node.

Bug: 1374062
Reviewed-By: heycam
MozReview-Commit-ID: 65DxdzXgd0J
2017-06-21 13:28:57 +02:00
Cameron McCormack
4315cecdf4 style: Tweak an import. 2017-06-16 11:31:45 +08:00
Cameron McCormack
36e4d0a511 style: Adjust display:contents to display:inline for NAC (including ::before/::after). 2017-06-16 09:37:57 +08:00
Boris Zbarsky
8125cf89b4 mathvariant attributes should affect computed font style and weight in stylo. 2017-05-24 16:29:50 -04:00
Emilio Cobos Álvarez
3ec2b4f486
style: Adjust text-align properly for -moz- values in tables.
Fixes bug 1363576.

Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-10 12:59:14 +02:00
Emilio Cobos Álvarez
3b857f1c4e
style: Add a StyleBuilder struct to avoid refcount and atomic CAS during the cascade.
This should fix most of the complaints that caused
https://bugzilla.mozilla.org/show_bug.cgi?id=1360889 to be open, and also fix a
bunch of other FIXMEs across the style system.
2017-04-30 23:45:40 +02:00
Emilio Cobos Álvarez
5cbc6a9b16
Bug 1360508: Adjust text-combine properly. r=jryans
Text style is always resolved via ServoStyleSet::ResolveStyleForText, either
from the frame constructor initially, or from
ServoRestyleManager::ProcessPostTraversalForText.

So text-only adjustments should go there instead. Since that doesn't call into
cascade(), all the code that passes `pseudo` there is dead code we can remove.

MozReview-Commit-ID: jpbBYpLlUL
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-28 17:21:10 +02:00
J. Ryan Stinnett
a5907e03c9 Tweak style adjust ordering to better match Gecko
To ease comparison between Gecko's `nsStyleContext::ApplyStyleFixups` and the
Servo equivalent, move them into a similar ordering.

MozReview-Commit-ID: GV89pbzA8IH
2017-04-27 11:40:00 -05:00
J. Ryan Stinnett
676d177f17 Extra spec comments for style adjustments
MozReview-Commit-ID: J6qxBpQ43Ax
2017-04-27 11:39:59 -05:00
J. Ryan Stinnett
978239927d Port text-combine-upright writing mode fixup to Servo
Ports the Gecko fixup for text-combine-upright writing mode to Servo.  In
addition, this passes the current pseudo element (if any) down to the cascade
for use during the fixup process.

MozReview-Commit-ID: BkHd4AvSsOt
2017-04-27 11:39:59 -05:00
Emilio Cobos Álvarez
ccf15c0a26
style: Move all the fixup code into a StyleAdjuster struct.
This will allow reusing it from text styles, which we need for some
corner cases, like text-align: -moz-center and similar stuff.
2017-04-26 03:22:24 +02:00