Closed Bug 1079314 Opened 10 years ago Closed 10 years ago

In non-debug builds, logical-coordinate classes should not have an mWritingMode member at all

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The intended design of the logical-coordinate geometry classes in WritingModes.h was that the mWritingMode field should only be present in debug builds, for validation by CHECK_WRITING_MODE, but in non-debug builds we'd avoid the overhead of tagging these classes with the mode.

However, the mWritingMode field was inadvertently not guarded by #ifdef DEBUG, and so it is present in all builds, even though we don't actually set it in non-debug builds.

And then we've got a couple of places where non-debug code actually refers to the mWritingMode field, which it should never do. In the LogicalSize [in]equality operators, we can't make equality depend on comparing the writing modes of the operands; rather, we need to mandate that these operators (like others) are only valid when writing modes match.
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Attachment #8501125 - Flags: review?(smontagu) → review+
https://hg.mozilla.org/mozilla-central/rev/681c4450639e
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.