Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 704469 - overflow: hidden, auto, or scroll removes css3-3d-transforms 'perspective'
: overflow: hidden, auto, or scroll removes css3-3d-transforms 'perspective'
Product: Core
Classification: Components
Component: Layout (show other bugs)
: 10 Branch
: All All
: P2 normal (vote)
: mozilla12
Assigned To: Matt Woodrow (:mattwoodrow)
: Jet Villegas (:jet)
Depends on: 723643 747664
Blocks: 505115
  Show dependency treegraph
Reported: 2011-11-22 06:31 PST by Dirk
Modified: 2013-08-02 10:00 PDT (History)
7 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

index.html (1.58 KB, text/html)
2011-11-22 06:31 PST, Dirk
no flags Details
Check style parent, instead of frame parent (3.41 KB, patch)
2012-01-03 13:33 PST, Matt Woodrow (:mattwoodrow)
roc: review+
jpr: approval‑mozilla‑aurora+
jpr: approval‑mozilla‑beta+
Details | Diff | Splinter Review

Description Dirk 2011-11-22 06:31:23 PST
Created attachment 576140 [details]

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22

Steps to reproduce:

Apply CSS3 3D "-moz-perspective" and "overflow: hidden" to block level element

Actual results:

Child elements are rendered as if parent would not have a "perspective" attribute.

Expected results:

Perspective distortion should be applied to child elements. See Demo at
Comment 1 David Baron :dbaron: ⌚️UTC-7 2011-12-26 13:39:14 PST
This seems likely to be related to the fact that overflow:hidden creates two frames, one nested inside the other (the inner one having an anonymous box style).

I think the problem here is that nsDisplayTransform::GetResultingTransformMatrix (in layout/base/nsDisplayList.cpp) should replace:

2539   const nsStyleDisplay* parentDisp = nsnull;
2540   if (aFrame->GetParent()) {
2541     parentDisp = aFrame->GetParent()->GetStyleDisplay();
2542   }


const nsStyleDisplay *parentDisp = nsnull;
nsStyleContext *parentStyleContext = aFrame->GetStyleContext()->GetParent();
if (parentStyleContext) {
  parentDisp = parentStyleContext->GetStyleDisplay();

so that it gets the perspective from the style parent.
Comment 2 David Baron :dbaron: ⌚️UTC-7 2011-12-29 09:54:43 PST
I think it would be good to get this fixed for Firefox 10 (where, if my memory is correct, 3-D transforms are a new feature).
Comment 3 Matt Woodrow (:mattwoodrow) 2012-01-03 13:33:30 PST
Created attachment 585545 [details] [diff] [review]
Check style parent, instead of frame parent

Thanks for looking into this dbaron

Requesting aurora/beta approval since this fixes a bug with our implementation of 3d transforms. Should be very low risk, and well covered by tests.
Comment 4 Alex Keybl [:akeybl] 2012-01-03 14:57:40 PST
Comment on attachment 585545 [details] [diff] [review]
Check style parent, instead of frame parent

[Triage Comment]
Please re-nominate once this has landed on m-c and gotten some bake time.
Comment 5 Matt Woodrow (:mattwoodrow) 2012-01-03 16:40:16 PST
Comment 6 Marco Bonardo [::mak] 2012-01-04 04:50:22 PST
Comment 7 David Baron :dbaron: ⌚️UTC-7 2012-01-10 11:15:30 PST
Comment on attachment 585545 [details] [diff] [review]
Check style parent, instead of frame parent

renominating per comment 4

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