Element with -moz-transform-style preserve-3d is not rendered at all

RESOLVED FIXED in mozilla11

Status

()

Core
Layout
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: Michael Putters, Assigned: mattwoodrow)

Tracking

11 Branch
mozilla11
x86
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:11.0a1) Gecko/20111113 Firefox/11.0a1
Build ID: 20111113031758

Steps to reproduce:

Render a page with -moz-transform-style : preserve3d; style

Example can be found here:
http://www.pcx360.com/games/169-Deus_Ex__Human_Revolution.htm

CSS applied to that page is:
http://www.pcx360.com/css/generic/games.css

The body also has a -moz-perspective : 1000px;
In case it might help, I tried making the direct parent have the perspective, and also tried making it not float, but this didn't seem to affect the behavior.


Actual results:

The element with that style is not rendered.


Expected results:

The element should be rendered, preserving its 3D properties. The equivalent -webkit-* styles are applied as well, so a webkit browser can be used for comparison (works with Chrome and Safari/iOS).
(Assignee)

Updated

6 years ago
Assignee: nobody → matt.woodrow

Comment 1

6 years ago
Reproduced on Mac OSX using Nightly
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
(Assignee)

Comment 2

6 years ago
Created attachment 574432 [details] [diff] [review]
Include the current frame bounds in preserve-3d overflow calculations

This fixes the image being invisible, but doesn't cause the perspective to be applied.

As far as I can tell the perspective frame (the <body> element) isn't a parent of the transformed frame (the <img> element), so perspective shouldn't be applied.

I'll construct a reduced test case for this and ask for clarification on the spec.
Attachment #574432 - Flags: review?(roc)
(Reporter)

Comment 3

6 years ago
The <body> is not a parent because the direct parent of the <img> is float:right? Or because the perspective has to be set on a direct parent?
The spec says
http://dev.w3.org/csswg/css3-3d-transforms/#perspective-property
The ‘perspective’ property applies the same transform as the perspective(<length>) transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.

That property is not inherited. The "img" is not a child of the <body>. So the body's 'perspective' does not affect it.

If Webkit behaves differently, maybe we should change the spec to match Webkit. That would need to be discussed on www-style.
(Maybe perspective inherits in Webkit?)
Attachment #574432 - Flags: review?(roc) → review+
(Assignee)

Comment 6

6 years ago
Created attachment 574475 [details]
Reduced test case

Definitely looks like webkit is treating this as an inherit property, or they are interpreting 'children' as 'descendents'.

I'll take a look at the WebKit source code and post to www-style.
(Assignee)

Comment 7

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/e841ed10f4e9
https://hg.mozilla.org/mozilla-central/rev/e841ed10f4e9
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11

Comment 9

5 years ago
https://bugzilla.mozilla.org/show_bug.cgi?id=716524 looks similar to this one, although, still reproduces the issue.
Duplicate of this bug: 724363
You need to log in before you can comment on or make changes to this bug.