Closed Bug 1216747 Opened 4 years ago Closed 4 years ago

nsRuleNode::ComputePositionData caches writing-mode-specific data in the rule tree

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: dbaron, Assigned: dbaron)

References

Details

Attachments

(3 files)

Bug 1122253 added code that computes an nsStylePosition struct in ways that depend on the writing mode, and then caches that struct in the rule tree.  This causes the cached struct to be used incorrectly.
Assignee: nobody → dbaron
Without the patch, both reftests fail; with it, both pass.
Attachment #8676490 - Flags: review?(cam)
Attachment #8676490 - Flags: review?(cam) → review+
I wonder if it would be worth trying to add assertions that fire if mWritingMode or mFont.size are used and conditions isn't updated appropriately.  (It would need some trickiness like exposing those values only through methods on style structs, and also returning them as an object that supports conversion to their actual type, so that we could know when their values are actually used, as opposed to just retrieved.)
(In reply to Cameron McCormack (:heycam) from comment #3)
> I wonder if it would be worth trying to add assertions that fire if

At first glance, it sounds like more trouble than it's worth.
Attachment #8676691 - Flags: review?(cam) → review+
You need to log in before you can comment on or make changes to this bug.