[windows] Dropdown arrow in vertical writing modes should point in the appropriate (sideways) direction
Categories
(Core :: Widget: Win32, defect, P5)
Tracking
()
People
(Reporter: jfkthame, Assigned: rkraesig, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, helpwanted, testcase, Whiteboard: [lang=c++])
Attachments
(4 files, 1 obsolete file)
+++ This bug was initially created as a clone of Bug #1187605 +++ Bug 1187605 made the dropdown arrow point sideways by adding orientation-specific selectors in layout/style/forms.css. But on Windows, they remain stubbornly downward-pointing. I assume this means the Windows theme code is overriding the rendering of the arrows, so a similar fix will be needed there.
Reporter | ||
Comment 1•9 years ago
|
||
It looks like the dropdown arrow is drawn by widget code using Windows APIs (DrawThemeBackground). But that API doesn't support drawing it sideways for vertical elements. So to fix this, we'll need to avoid using the native theme API here in vertical mode, and draw the dropdown button ourselves instead.
Reporter | ||
Comment 2•9 years ago
|
||
This works around the limitation of the Windows API here, and gives us the arrow pointing in the right direction. If we want to make it look more like the default horizontal-mode rendering, I suppose we could do that at the toolkit/themes/windows CSS level, but at least this fixes the basic functionality.
Reporter | ||
Updated•9 years ago
|
Comment 3•9 years ago
|
||
Comment on attachment 8667174 [details] [diff] [review] Can't use Windows theme APIs to draw the dropdown arrow in vertical writing-mode <select> elements There's nothing in this patch.
Reporter | ||
Comment 4•9 years ago
|
||
Oops, sorry about that! Try this one.
Reporter | ||
Updated•9 years ago
|
Comment 5•9 years ago
|
||
Can you post a screen shot or test case I can load to see what this does? I'm wondering if we can still use the themed api and just rotate what it draws. I guess it depends on how the classic rendering looks.
Reporter | ||
Comment 6•9 years ago
|
||
With current Nightly, a testcase such as data:text/html,<div style="writing-mode:vertical-rl"><select><option>One<option>Two<option>Three should work to show the behavior. (The trouble with applying a rotate transform to the themed APIs rendering would be that there's a background gradient when the button is activated, and I don't think we'd want that gradient to rotate for vertical modes.)
Reporter | ||
Comment 7•9 years ago
|
||
Oh, I forgot to mention: for testing purposes, be sure to DISABLE e10s, due to bug 1170129.
Comment 8•9 years ago
|
||
Comment on attachment 8667204 [details] [diff] [review] Can't use Windows theme APIs to draw the dropdown arrow in vertical writing-mode <select> elements This isn't going to cut it, what you're doing is bring up the old classic themed widgets from windows 95. We need to figure out how to use the existing themed background and rotate it, or just stuck with the down arrow as is.
Comment 9•9 years ago
|
||
Comment 10•9 years ago
|
||
also note the design of this glyph changes between xp, win7, and win8+ so it can't be a single glyph.
Reporter | ||
Comment 11•9 years ago
|
||
Fair enough; but note the problem with rotating the DrawThemeBackground rendering, which will presumably result in a gradient that runs in the wrong direction (comment 6). I'm not going to have time to look into this further for the time being.
Comment 12•9 years ago
|
||
(In reply to Jonathan Kew (:jfkthame) from comment #11) > Fair enough; but note the problem with rotating the DrawThemeBackground > rendering, which will presumably result in a gradient that runs in the wrong > direction (comment 6). > > I'm not going to have time to look into this further for the time being. It might be possible to render the arrow alone without the background using different theme constants, we should look into that. Regardless I think UX would agree rendering the old classic themed button in modern versions of the os isn't an acceptable trade off.
Updated•9 years ago
|
Comment 13•8 years ago
•
|
||
(In reply to Jim Mathies [:jimm] from comment #5) > Can you post a screen shot or test case I can load to see what this does? Tests for this bug report ------------------------- http://test.csswg.org/suites/css-writing-modes-3_dev/nightly-unstable/html/form-controls-vrl-004.htm http://test.csswg.org/suites/css-writing-modes-3_dev/nightly-unstable/html/form-controls-vlr-004.htm [updated] http://wpt.live/css/css-writing-modes/form-controls-srl-004.xht http://wpt.live/css/css-writing-modes/form-controls-slr-004.xht [/updated]
Updated•8 years ago
|
Comment 14•7 years ago
|
||
hi, is this bug still exists? can i work on it as my first bug!
Updated•4 years ago
|
Comment 15•2 years ago
|
||
Other platforms are also affected since the switch to non-native theming in bug 1535761. We should detect the orientation and adjust the non-native dropdown arrow here: https://searchfox.org/mozilla-central/rev/d107bc8aeadcc816ba85cb21c1a6a1aac1d4ef9f/widget/nsNativeBasicTheme.cpp#713
Assigning myself as mentor.
Updated•2 years ago
|
Assignee | ||
Comment 16•2 years ago
|
||
Adjust the dropdown-arrow to take into account the orientation of the
dropdown itself, so as to point in the direction the dropdown should
emerge from.
Assignee | ||
Comment 17•2 years ago
|
||
The attached image shows the state of affairs with the above patch (incomplete due to lack of tests).
It's a bit awkward that the arrow now points in a different direction than the dropdown actually appears in. (Fixing that is bug 1170129.)
Comment 18•2 years ago
|
||
This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Comment 19•2 years ago
|
||
Pushed by rkraesig@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/da7f58f21ff0 adjust dropdown-arrow orientation r=emilio
Comment 20•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•