Closed Bug 1174003 Opened 9 years ago Closed 7 years ago

Logicalize IsCrossAxisHorizontal()/IsMainAxisHorizontal() checks in flexbox layout

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(11 files)

(deleted), text/x-review-board-request
MatsPalmgren_bugz
: review+
Details
(deleted), text/x-review-board-request
MatsPalmgren_bugz
: review+
Details
(deleted), text/x-review-board-request
MatsPalmgren_bugz
: review+
Details
(deleted), text/x-review-board-request
MatsPalmgren_bugz
: review+
Details
(deleted), text/x-review-board-request
MatsPalmgren_bugz
: review+
Details
(deleted), text/x-review-board-request
MatsPalmgren_bugz
: review+
Details
(deleted), text/x-review-board-request
MatsPalmgren_bugz
: review+
Details
(deleted), text/x-review-board-request
MatsPalmgren_bugz
: review+
Details
(deleted), text/x-review-board-request
MatsPalmgren_bugz
: review+
Details
(deleted), text/x-review-board-request
MatsPalmgren_bugz
: review+
Details
(deleted), text/x-review-board-request
MatsPalmgren_bugz
: review+
Details
We've got some IsCrossAxisHorizontal() & IsMainAxisHorizontal() checks in flexbox layout code which need to be logicalized in order to fully support vertical writing-modes.
Blocks: 1384266
I've got a patch stack for this that I'll be posting shortly.
Comment on attachment 8954608 [details] Bug 1174003 part 1: [css-flexbox] Remove unused method nsFlexContainerFrame::IsHorizontal. https://reviewboard.mozilla.org/r/223636/#review229754
Attachment #8954608 - Flags: review?(mats) → review+
Comment on attachment 8954609 [details] Bug 1174003 part 2: [css-flexbox] Reformat code around GetMinimumWidgetSize call slightly. https://reviewboard.mozilla.org/r/223638/#review229756
Attachment #8954609 - Flags: review?(mats) → review+
Comment on attachment 8954610 [details] Bug 1174003 part 3: [css-flexbox] Make GetMarginSizeInMainAxis() take a LogicalMargin, instead of nsMargin. https://reviewboard.mozilla.org/r/223640/#review229758
Attachment #8954610 - Flags: review?(mats) → review+
Comment on attachment 8954611 [details] Bug 1174003 part 4: [css-flexbox] Remove IsMainAxisHorizontal() check from DoFlexLayout(). https://reviewboard.mozilla.org/r/223642/#review229836
Attachment #8954611 - Flags: review?(mats) → review+
Comment on attachment 8954612 [details] Bug 1174003 part 5: [css-flexbox] Remove is-{main,cross}-axis-horizontal checks from ReflowFlexItem. https://reviewboard.mozilla.org/r/223644/#review229838
Attachment #8954612 - Flags: review?(mats) → review+
Comment on attachment 8954613 [details] Bug 1174003 part 6: [css-flexbox] Replace ComputedCrossSize() helper with a new API that uses logical axes internally. https://reviewboard.mozilla.org/r/223646/#review229840
Attachment #8954613 - Flags: review?(mats) → review+
Comment on attachment 8954614 [details] Bug 1174003 part 7: [css-flexbox] Logicalize IsCrossAxisHorizontal() check in GetBaselineOffsetFromOuterCrossSize (and simplify a condition for baseline fallback). https://reviewboard.mozilla.org/r/223648/#review229966
Attachment #8954614 - Flags: review?(mats) → review+
Comment on attachment 8954615 [details] Bug 1174003 part 8: [css-flexbox] Change flex item intrinsic ratio calculations to use logical axes and a LogicalSize. https://reviewboard.mozilla.org/r/223650/#review229970
Attachment #8954615 - Flags: review?(mats) → review+
Comment on attachment 8954616 [details] Bug 1174003 part 9: [css-flexbox] Remove GET_MAIN_COMPONENT calls from CheckForMinSizeAuto(). https://reviewboard.mozilla.org/r/223652/#review229972 ::: commit-message-69780:6 (Diff revision 1) > +call to IsMainAxisHorizontal() under the hood. So I want to get rid of calls to this this macro, to get closer to killing that method. > + You probably intended to do a line break somewhere around "calls"? ::: layout/generic/nsFlexContainerFrame.cpp:1941 (Diff revision 1) > const nsStylePosition* pos = aFlexItemReflowInput.mStylePosition; > const nsStyleDisplay* disp = aFlexItemReflowInput.mStyleDisplay; Out-of-scope for this patch series, but this is probably wrong for tables, right? (I suspect you need the same fix I did in Grid)
Attachment #8954616 - Flags: review?(mats) → review+
Comment on attachment 8954617 [details] Bug 1174003 part 10: [css-flexbox] Remove GET_MAIN_COMPONENT/GET_CROSS_COMPONENT macros (expanding each at its only remaining callsite). https://reviewboard.mozilla.org/r/223654/#review229976
Attachment #8954617 - Flags: review?(mats) → review+
Comment on attachment 8954618 [details] Bug 1174003 part 11: [css-flexbox] Remove IsCrossAxisHorizontal(), and make IsMainAxisHorizontal() a private implementation detail. https://reviewboard.mozilla.org/r/223656/#review229980
Attachment #8954618 - Flags: review?(mats) → review+
Comment on attachment 8954616 [details] Bug 1174003 part 9: [css-flexbox] Remove GET_MAIN_COMPONENT calls from CheckForMinSizeAuto(). https://reviewboard.mozilla.org/r/223652/#review229972 > You probably intended to do a line break somewhere around "calls"? Indeed, thanks. > Out-of-scope for this patch series, but this is probably wrong for tables, right? (I suspect you need the same fix I did in Grid) I added a note about this over on bug 1306403 (which is about tables as flex items & various properties making it through the wrapper one way or another).
Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cacbcc051b29 part 1: [css-flexbox] Remove unused method nsFlexContainerFrame::IsHorizontal. r=mats https://hg.mozilla.org/integration/autoland/rev/0d797523af03 part 2: [css-flexbox] Reformat code around GetMinimumWidgetSize call slightly. r=mats https://hg.mozilla.org/integration/autoland/rev/934b53dafa35 part 3: [css-flexbox] Make GetMarginSizeInMainAxis() take a LogicalMargin, instead of nsMargin. r=mats https://hg.mozilla.org/integration/autoland/rev/201aadc96164 part 4: [css-flexbox] Remove IsMainAxisHorizontal() check from DoFlexLayout(). r=mats https://hg.mozilla.org/integration/autoland/rev/0653058864df part 5: [css-flexbox] Remove is-{main,cross}-axis-horizontal checks from ReflowFlexItem. r=mats https://hg.mozilla.org/integration/autoland/rev/88d72b7833f5 part 6: [css-flexbox] Replace ComputedCrossSize() helper with a new API that uses logical axes internally. r=mats https://hg.mozilla.org/integration/autoland/rev/af2524d9b0ab part 7: [css-flexbox] Logicalize IsCrossAxisHorizontal() check in GetBaselineOffsetFromOuterCrossSize (and simplify a condition for baseline fallback). r=mats https://hg.mozilla.org/integration/autoland/rev/dd08d793fa67 part 8: [css-flexbox] Change flex item intrinsic ratio calculations to use logical axes and a LogicalSize. r=mats https://hg.mozilla.org/integration/autoland/rev/ec67f4f9bb89 part 9: [css-flexbox] Remove GET_MAIN_COMPONENT calls from CheckForMinSizeAuto(). r=mats https://hg.mozilla.org/integration/autoland/rev/d0c4313e6d22 part 10: [css-flexbox] Remove GET_MAIN_COMPONENT/GET_CROSS_COMPONENT macros (expanding each at its only remaining callsite). r=mats https://hg.mozilla.org/integration/autoland/rev/c723ca78deaa part 11: [css-flexbox] Remove IsCrossAxisHorizontal(), and make IsMainAxisHorizontal() a private implementation detail. r=mats
Note: in part 7, I added a XXXdholbert comment about what 'align-self:baseline' falls back to when it's not applicable: https://hg.mozilla.org/mozilla-central/rev/af2524d9b0ab#l1.23 That spec text has now been clarified such that our code is correct on this point, in this github issue: https://github.com/w3c/csswg-drafts/issues/2316 So: I'll push a followup patch here to drop this code comment.
Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/34c6c2038fc7 late-breaking followup: remove obsolete comment about flex align-self:baseline behavior. (no review, comment-only, DONTBUILD)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: