Closed Bug 1267560 Opened 9 years ago Closed 9 years ago

get style structs from ServoComputedValues rather than the rule node, when using the Servo-backed style system

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: heycam, Unassigned)

References

Details

Attachments

(1 file)

Attached patch patchSplinter Review
Attachment #8745240 - Flags: review?(bobbyholley)
Comment on attachment 8745240 [details] [diff] [review] patch Review of attachment 8745240 [details] [diff] [review]: ----------------------------------------------------------------- r=me with those fixes. ::: layout/style/nsStyleContext.h @@ +519,5 @@ > > void ApplyStyleFixups(bool aSkipParentDisplayBasedStyleFixup); > > const void* StyleStructFromServoComputedValues(nsStyleStructID aSID) { > +#ifdef MOZ_STYLO Why does this need to be ifdef MOZ_STYLO? I don't see any reason for it here, and it would be nice to minimize ifdefs. @@ +589,5 @@ > + } else { \ > + newData = \ > + Servo_GetStyle##name_(mSource.AsServoComputedValues()); \ > + /* the Servo-backed StyleContextSource owns the struct */ \ > + AddStyleBit(NS_STYLE_INHERIT_BIT(name_)); \ If this bit really just means "somebody else owns the struct", then can we get a second patch to rename it to NS_STYLE_STRUCT_BORROWED_BIT or something instead? Otherwise it's quite confusing, since servo will be using this bit for both inherit and reset structs.
Attachment #8745240 - Flags: review?(bobbyholley) → review+
It was to avoid link errors, but really I should add stubs to ServoBindings.cpp instead. I'll do that.
(In reply to Bobby Holley (busy) from comment #1) > If this bit really just means "somebody else owns the struct", then can we > get a second patch to rename it to NS_STYLE_STRUCT_BORROWED_BIT or something > instead? Otherwise it's quite confusing, since servo will be using this bit > for both inherit and reset structs. You're right, it is confusing. The use of those bits in nsStyleContext::mBits will disappear in bug 1188721, but I've filed bug 1267866 to rename it.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Target Milestone: mozilla48 → mozilla49
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: