Closed Bug 1122253 Opened 9 years ago Closed 9 years ago

adjust nsRuleNode hack so that height:min-content etc. keywords work in vertical writing modes

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: heycam, Assigned: heycam)

References

(Depends on 2 open bugs, Blocks 2 open bugs)

Details

Attachments

(1 file)

In bug 1117983 parts 1, 2 and 3, I make {inline,block}-size parse the keywords that width takes -- min-content, -moz-available, etc. -- but convert them to unset if they happen to get set on height.  We should undo this change to nsRuleNode::ComputePositionData once we support these keywords on height.
Blocks: writing-mode
No longer blocks: enable-writing-mode-dev
Blocks: 1150614
(In reply to Cameron McCormack (:heycam) (away April 3-6) from comment #0)
> We should undo
> this change to nsRuleNode::ComputePositionData once we support these
> keywords on height.

This isn't quite right IMHO: we don't want to support these keywords on height as such, but rather on inline-size (whether width or height) and not on block-size (whether height or width). Bug 1106669 already made nsLayoutUtils::IntrinsicForContainer work on inline-size instead of width, so I'm not sure that this hack was ever necessary.
Blocks: 1132308
So rather than remove the hack, I think we just need to adjust it.  Per some email conversation, I think we want to do this:

> 1. adjust the “hack” to allow the keywords to be set on
>    nsStylePosition::mHeight (and prevent them being set on mWidth)
>    depending on the writing mode, rather than always allowing them on
>    mWidth and not on mheight
> 
> 2. allow the keywords to be parsed as ‘height’ property values
> 
> 3. disallow the keywords on ‘block-size’
Summary: remove nsRuleNode hack that ignores computed height:min-content etc. keywords → adjust nsRuleNode hack so that height:min-content etc. keywords work in vertical writing modes
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #8624596 - Flags: review?(dholbert)
(heads-up: I'm backlogged on reviews at the moment [catching up, but still have some big grid ones to get through].  If you can find another reviewer, you may have have a faster review turnaround.)
Flags: needinfo?(cam)
Comment on attachment 8624596 [details] [diff] [review]
Support -moz-min-content etc. keywords in {,min-,max-}inline-size and their physical equivalents.

OK, thanks for the heads up Daniel.  bz you good to take this one?
Attachment #8624596 - Flags: review?(dholbert) → review?(bzbarsky)
Flags: needinfo?(cam)
Comment on attachment 8624596 [details] [diff] [review]
Support -moz-min-content etc. keywords in {,min-,max-}inline-size and their physical equivalents.

>+  const bool vertical = aContext->StyleVisibility()->mWritingMode !=
>+                          NS_STYLE_WRITING_MODE_HORIZONTAL_TB;

Could you MOZ_ASSERT that the value is one of the ones we know about (so we'll catch it if we add a new value)?

r=me with that.
Attachment #8624596 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/faf18dc3d5a1
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
See Also: → 1496558
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: