Closed Bug 704469 Opened 13 years ago Closed 13 years ago

overflow: hidden, auto, or scroll removes css3-3d-transforms 'perspective'

Categories

(Core :: Layout, defect, P2)

10 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: waste, Assigned: mattwoodrow)

References

(Depends on 1 open bug)

Details

Attachments

(2 files)

Attached file index.html
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 http://www.eleqtriq.com/wp-content/static/demos/2011/mozbugs/
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
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   }

with:

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

so that it gets the perspective from the style parent.
Blocks: 505115
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Mac OS X → All
Priority: -- → P2
Hardware: x86 → All
Summary: "overflow: hidden" removes CSS3 3D "perspective" → overflow: hidden, auto, or scroll removes css3-3d-transforms 'perspective'
Assignee: nobody → matt.woodrow
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).
Attachment #576140 - Attachment mime type: text/plain → text/html
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.
Attachment #585545 - Flags: review?(roc)
Attachment #585545 - Flags: approval-mozilla-beta?
Attachment #585545 - Flags: approval-mozilla-aurora?
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.
Attachment #585545 - Flags: approval-mozilla-beta?
Attachment #585545 - Flags: approval-mozilla-beta-
Attachment #585545 - Flags: approval-mozilla-aurora?
Attachment #585545 - Flags: approval-mozilla-aurora-
https://hg.mozilla.org/mozilla-central/rev/7d6b4a1557f4
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
Comment on attachment 585545 [details] [diff] [review]
Check style parent, instead of frame parent

renominating per comment 4
Attachment #585545 - Flags: approval-mozilla-beta?
Attachment #585545 - Flags: approval-mozilla-beta-
Attachment #585545 - Flags: approval-mozilla-aurora?
Attachment #585545 - Flags: approval-mozilla-aurora-
Attachment #585545 - Flags: approval-mozilla-beta?
Attachment #585545 - Flags: approval-mozilla-beta+
Attachment #585545 - Flags: approval-mozilla-aurora?
Attachment #585545 - Flags: approval-mozilla-aurora+
Depends on: 747664
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: