Last Comment Bug 702375 - Element with -moz-transform-style preserve-3d is not rendered at all
: Element with -moz-transform-style preserve-3d is not rendered at all
Product: Core
Classification: Components
Component: Layout (show other bugs)
: 11 Branch
: x86 Windows 7
-- normal (vote)
: mozilla11
Assigned To: Matt Woodrow (:mattwoodrow)
: Jet Villegas (:jet)
: 724363 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2011-11-14 11:43 PST by Michael Putters
Modified: 2012-02-23 23:37 PST (History)
7 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Include the current frame bounds in preserve-3d overflow calculations (3.97 KB, patch)
2011-11-14 14:43 PST, Matt Woodrow (:mattwoodrow)
roc: review+
Details | Diff | Splinter Review
Reduced test case (252 bytes, text/html)
2011-11-14 16:23 PST, Matt Woodrow (:mattwoodrow)
no flags Details

Description User image Michael Putters 2011-11-14 11:43:21 PST
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:

CSS applied to that page is:

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).
Comment 1 User image Jet Villegas (:jet) 2011-11-14 12:36:54 PST
Reproduced on Mac OSX using Nightly
Comment 2 User image Matt Woodrow (:mattwoodrow) 2011-11-14 14:43:19 PST
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.
Comment 3 User image Michael Putters 2011-11-14 15:28:56 PST
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?
Comment 4 User image Robert O'Callahan (:roc) (email my personal email if necessary) 2011-11-14 15:55:25 PST
The spec says
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.
Comment 5 User image Robert O'Callahan (:roc) (email my personal email if necessary) 2011-11-14 15:56:00 PST
(Maybe perspective inherits in Webkit?)
Comment 6 User image Matt Woodrow (:mattwoodrow) 2011-11-14 16:23:39 PST
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.
Comment 7 User image Matt Woodrow (:mattwoodrow) 2011-11-16 19:49:44 PST
Comment 8 User image Marco Bonardo [::mak] 2011-11-17 03:07:12 PST
Comment 9 User image Alexandru Chiculita 2012-01-13 12:51:21 PST looks similar to this one, although, still reproduces the issue.
Comment 10 User image Boris Zbarsky [:bz] (still a bit busy) 2012-02-05 06:04:11 PST
*** Bug 724363 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.