Transforms should not work on non-replaced inline elements

RESOLVED FIXED in mozilla13

Status

()

Core
Layout: Block and Inline
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: ayg, Assigned: ayg)

Tracking

Trunk
mozilla13
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

The spec says:

"""
Name:	transform
. . .
Applies to:	transformable elements
"""
http://dev.w3.org/csswg/css3-transforms/#transform-property

"""
transformable element
A transformable element in the HTML namespace which is either be a block-level or atomic inline-level element, or an element the SVG namespace (see [SVG11]) which has the attributes ‘transform’, ‘patternTransform’ or ‘gradientTransform’.
"""
http://dev.w3.org/csswg/css3-transforms/#TermTransformableElement

This only allows atomic inline-level elements.  Test-case:

data:text/html,<!doctype html>
This is some <span style=-moz-transform:rotate(180deg)>text<br>
that is</span> not transformed

Chrome 17 dev matches the spec, so the text isn't rotated.  IE9, Firefox 12.0a1 (2012-01-24), and Opera Next 12.00 alpha all rotate the text in some fashion -- but they all disagree on how to do it.  It's not clear what authors would want here -- do they want to transform all the line boxes as one big box, or as individual lines?  What's the transform-origin?  Are there any strong use-cases that can't be emulated using inline-block or such?  See discussion here:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=15755

IMO, we should follow the spec and WebKit.  If we don't, we need to propose spec text that says exactly what should happen here.

This bug causes Firefox to fail one of the tests in the reftest suite I'm working on for the CSS Transforms spec.
Looks like the spec has been revised here in response to our feedback (and that of others).  I could have sworn we had a bug on fixing our behavior to match the old spec, but I can't find it (other than a good bit of discussion about the issue in bug 435293 -- mostly between bug 435293 comment 19 and bug 435293 comment 43).
Created attachment 597137 [details] [diff] [review]
Patch v1

This just copy-pastes nsTableFrame::Init to nsInlineFrame::Init and deletes the irrelevant parts, based on the patch for bug 722777.
Assignee: nobody → ayg
Attachment #597137 - Flags: review?(roc)
Whiteboard: [autoland]

Updated

5 years ago
Whiteboard: [autoland] → [autoland-in-queue]

Comment 3

5 years ago
Autoland Patchset:
	Patches: 597137
	Branch: mozilla-central => try
	Destination: http://hg.mozilla.org/try/pushloghtml?changeset=040240ed30b9
Try run started, revision 040240ed30b9. To cancel or monitor the job, see: https://tbpl.mozilla.org/?tree=Try&rev=040240ed30b9
Attachment #597137 - Flags: review?(roc) → review+

Comment 4

5 years ago
Try run for 040240ed30b9 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=040240ed30b9
Results (out of 211 total builds):
    exception: 2
    success: 175
    warnings: 20
    failure: 14
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/autolanduser@mozilla.com-040240ed30b9

Updated

5 years ago
Whiteboard: [autoland-in-queue]
Keywords: checkin-needed
http://hg.mozilla.org/integration/mozilla-inbound/rev/d2852f3e1399
Flags: in-testsuite+
Keywords: checkin-needed
OS: Linux → All
Hardware: x86 → All

Comment 6

5 years ago
https://hg.mozilla.org/mozilla-central/rev/d2852f3e1399
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13

Updated

5 years ago
Depends on: 802581
You need to log in before you can comment on or make changes to this bug.