Ship support for the 'transform-box' property

RESOLVED FIXED in Firefox 55

Status

()

Core
Layout
--
enhancement
RESOLVED FIXED
2 years ago
2 months ago

People

(Reporter: dbaron, Assigned: Robert Longson)

Tracking

(Depends on: 1 bug, {dev-doc-complete})

Trunk
mozilla55
dev-doc-complete
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox44 affected, firefox55 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
Bug 923193 implemented support for the 'transform-box' property, and bug 1175492 changed the pref added in the first bug so that it covered only transform-box.

This bug covers actually shipping our support for 'transform-box' on the release channel.

(I'm filing since I noticed there wasn't such a bug.)

Spec is at https://drafts.csswg.org/css-transforms/#transform-box

What needs to happen before we ship this?  Is the concern about shipping over state of the specification or about other things?
(Reporter)

Updated

2 years ago
Flags: needinfo?(jwatt)
Severity: normal → enhancement
Keywords: dev-doc-needed
Summary: ship support for the 'transform-box' property → Ship support for the 'transform-box' property
As far as I can tell, the issue here is bug 1209061, specifically bug 1209061 comment 6. Specifically the spec says,

  "For SVG elements without an associated CSS layout box, the used value for border-box is view-box."[1]

And Erik points out that,

  "It seems to me that a used value of 'fill-box' in this case would lead to  
more easily understood behavior than 'view-box'."[2]

I believe Chrome ships with a used value of fill-box so we are waiting to see if Chrome or the spec changes.

[1] https://drafts.csswg.org/css-transforms/#transform-box
[2] https://lists.w3.org/Archives/Public/public-fx/2015JulSep/0075.html
I chased up some Chrome folk at TPAC about this to ask them to fix Chrome to match the spec (or push back on the spec). Might need some more follow up though.

Comment 3

7 months ago
Nasty bug in the current implementation of `transform-box` shipped in Firefox 53 (Dev edition): https://bugzilla.mozilla.org/show_bug.cgi?id=1335876 


Ideally, do not ship this to stable until fixed! However, realistically the web compat impact is low: the impact is only shown when `transform-box` is set to a non-default value, and no one else supports it, so there shouldn't be much content affected.  But please correct any docs that suggest Firefox now supports transform-box: we don't want devs testing it out & getting even more confused.

PS: As for the spec vs Chrome behavior. Please follow the spec. It makes sense, Chrome doesn't. Chrome's behavior is equivalent to transform-box: fill-box for percentage values (of translate or transform-origin) and equivalent to transform-box: view-box for absolute values.  

Using `transform-box: fill-box` as the universal default is not an option, as it would break all backwards compatibility with the SVG `transform` attribute.
(In reply to Amelia Bellamy-Royds from comment #3)
> Nasty bug in the current implementation of `transform-box` shipped in
> Firefox 53 (Dev edition):
> https://bugzilla.mozilla.org/show_bug.cgi?id=1335876 
> 
> 
> Ideally, do not ship this to stable until fixed!

transform-box is still disabled on Beta and Release builds (even in 53, once 53 becomes Beta):
http://searchfox.org/mozilla-central/rev/e95e4ed8b5229a29dacc32c0b90968df5e7a6ff3/modules/libpref/init/all.js#2933-2937

I've added bug 1335876 to this bug's dependency list, so that we remember not to remove this #ifdef until that bug is fixed.
Depends on: 1335876
(In reply to Amelia Bellamy-Royds from comment #3)
> PS: As for the spec vs Chrome behavior. Please follow the spec. It makes
> sense, Chrome doesn't.

Agreed. If we're not making headway in getting that addressed then let's ship the sane, spec compliant behavior and dev pressure will hopefully then get them to act.

Bug 1335876 is close to being fixed so I'll send out an intent to ship for this shortly.
Flags: needinfo?(jwatt)

Comment 6

6 months ago
Jonathan, it seems all blockers were fixed now and good to go.
Would you please send out intent to ship and pref on on beta and release channel from Firefox 54 cycle(2 weeks left)?
Flags: needinfo?(jwatt)
(Assignee)

Comment 7

6 months ago
Created attachment 8841079 [details] [diff] [review]
transform-box.txt
Attachment #8841079 - Flags: review?(jwatt)

Updated

6 months ago
Flags: needinfo?(jwatt)
Attachment #8841079 - Flags: review?(jwatt) → review+
(In reply to Astley Chen [:astley] (UTC+8) from comment #6)
> Would you please send out intent to ship

https://groups.google.com/forum/#!topic/mozilla.dev.platform/ssV6H4_3WGU

Comment 9

5 months ago
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b5d48fabfc27
Enable support for transform-box r=jwatt

Comment 10

5 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/b5d48fabfc27
Status: NEW → RESOLVED
Last Resolved: 5 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55

Updated

5 months ago
Blocks: 1337853
Updated compatibility info at https://developer.mozilla.org/en-US/docs/Web/CSS/transform-box and added release note to https://developer.mozilla.org/en-US/Firefox/Releases/55.

Sebastian
Keywords: dev-doc-needed → dev-doc-complete
(Assignee)

Updated

4 months ago
Assignee: nobody → longsonr

Comment 12

2 months ago
I created a new issue for updating transform-box to match the latest spec resolutions: https://bugzilla.mozilla.org/show_bug.cgi?id=1371943

Still waiting on final spec text for those resolutions, but most of the discussion can be found in this CSS WG issue:
https://github.com/w3c/csswg-drafts/issues/857

Thanks for pushing this forward everyone.  Unfortunately, the cost of being first is that you are building on unsteady ground.
Depends on: 1371943
You need to log in before you can comment on or make changes to this bug.