Closed Bug 1468089 Opened 2 years ago Closed 2 years ago
Add a few Writing
Mode convenience methods to simplify consumers that are parameterized on axis
In Grid layout code it's quite common for methods to be axis-neutral, e.g. methods that takes a LogicalAxis as a param which is then invoked once for each axis. Accessing the relevant axis-data from a LogicalSize or LogicalMargin etc is a bit tedious (and error prone) though since you have to write something like: size = aAxis == eLogicalAxisInline ? x.ISize(wm) : x.BSize(wm); It would convenient to write instead: size = x.Size(aAxis, wm);
These are methods that I'm using in my subgrid patches. We can add more later to simplify existing code...
Attachment #8984752 - Flags: review?(jfkthame)
FTR, CSSAlignUtils has a few existing uses that could be simplified, e.g.: https://searchfox.org/mozilla-central/source/layout/generic/CSSAlignUtils.cpp#18
Attachment #8984752 - Flags: review?(jfkthame) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/63daa6667de7 Add a few convenience methods to simplify consumers that are parameterized on axis. r=jfkthame
You need to log in before you can comment on or make changes to this bug.