Open Bug 893147 Opened 11 years ago Updated 2 years ago

select dropdown mispositioned when perspective is used

Categories

(Core :: Layout: Form Controls, defect)

20 Branch
x86
Windows 7
defect

Tracking

()

People

(Reporter: akuderka, Unassigned)

References

Details

Attachments

(2 files)

Attached file index.html
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20100101 Firefox/22.0 (Beta/Release)
Build ID: 20130618035212

Steps to reproduce:

Create an element with a select input inside it, give the element's parent "perspective" property in css, then use translate 3d on the element. 


Actual results:

 When the select dropdown is opened it will not be translated along with the dropdown header.


Expected results:

The dropdown menu should have been translated.
Timothy, is this different from bug 870518?
Flags: needinfo?(tnikkel)
Attachment #774832 - Attachment mime type: text/plain → text/html
(In reply to Boris Zbarsky (:bz) from comment #1)
> Timothy, is this different from bug 870518?

I think so. That bug is about scaling, this bug is a bit different.

The "perspective: 900px;" rule on the body means we get a 3d transform matrix on the body frame that isn't 2d (ie gfx3DMatrix::Is2D returns false). We currently only support select dropdowns that have been translated by transforms that are 2d (nsComboboxControlFrame::GetCSSTransformTranslation does this). Although perhaps we can improve this by just getting the whole transfrom from the select to the root frame and then check if it has CanDraw2D (instead of rejecting any non-2d transform we find along the way to the root).
Flags: needinfo?(tnikkel)
Status: UNCONFIRMED → NEW
Component: CSS Parsing and Computation → Layout: Form Controls
Ever confirmed: true
Summary: select box inside 3d transform element → select box inside 3d transform element that only does a 2d translate
Summary: select box inside 3d transform element that only does a 2d translate → select dropdown mispositioned when perspective is used
The translate3d part doesn't really matter, we correctly determine that it is a 2d-only transform and it works in that case, the perspective is the part that trips the 3d transform code.
Additionally I just found this bug affecting text boxes as well as select boxes.
Do you mean the auto complete drop down for text boxes?
No, the highlighted text field does not open in the right location, ie. focus on a text box and type into it and the text will appear in the un-translated position.
That sounds like a different bug, can you please file a new bug and cc me?
I'm sorry this was actually not a defect, I jumped to the conclusion since it was so similar, apologies.
Attached image input-translate-bug.png
(In reply to danieljb2 from comment #10)
> Created attachment 8425842 [details]
> input-translate-bug.png

As you can see, this bug affects text inputs as well (and presumably others). The resulting UI bug makes basic combinations of transform styles and inputs unusable.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: