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

RESOLVED FIXED in mozilla12

Status

()

Core
Layout
P2
normal
RESOLVED FIXED
6 years ago
4 years ago

People

(Reporter: Dirk, Assigned: mattwoodrow)

Tracking

(Depends on: 1 bug)

10 Branch
mozilla12
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
Created attachment 576140 [details]
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/

Updated

6 years ago
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).
(Assignee)

Updated

6 years ago
Attachment #576140 - Attachment mime type: text/plain → text/html
(Assignee)

Comment 3

6 years ago
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.
Attachment #585545 - Flags: review?(roc)
Attachment #585545 - Flags: approval-mozilla-beta?
Attachment #585545 - Flags: approval-mozilla-aurora?
Attachment #585545 - Flags: review?(roc) → review+

Comment 4

6 years ago
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-
(Assignee)

Comment 5

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/7d6b4a1557f4
https://hg.mozilla.org/mozilla-central/rev/7d6b4a1557f4
Status: NEW → RESOLVED
Last Resolved: 6 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-

Updated

5 years ago
Attachment #585545 - Flags: approval-mozilla-beta?
Attachment #585545 - Flags: approval-mozilla-beta+
Attachment #585545 - Flags: approval-mozilla-aurora?
Attachment #585545 - Flags: approval-mozilla-aurora+
(Assignee)

Comment 8

5 years ago
https://hg.mozilla.org/releases/mozilla-beta/rev/0dfaeb9d662a
https://hg.mozilla.org/releases/mozilla-aurora/rev/89407d03f983
Depends on: 723643

Updated

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