Closed
Bug 1194493
Opened 10 years ago
Closed 10 years ago
the filename field of <input type=file> renders incorrectly in vertical writing mode with dir=rtl
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
Testcase:
data:text/html,<div style="writing-mode:vertical-rl" dir=rtl><input type=file>
Result:
The text "No file selected." should be shown (vertically) as a placeholder, but it actually renders horizontally and is clipped so that only the first letter (and a bit) is visible.
Note that without dir=rtl, it renders as expected.
Assignee | ||
Comment 1•10 years ago
|
||
This was a bug in the (rudimentary) vertical-drawing support in nsTextBoxFrame that was added in bug 1123284: it fails to set the mVertical flag on the nsFontMetrics before using it to draw, so we end up drawing in whatever direction the last user of these metrics had set. (Eventually, we should aim to get rid of nsTextBoxFrame and use nsTextFrame everywhere, with its more fully-developed bidi and vertical support, but for now this fixes the glaring bug.)
Attachment #8648007 -
Flags: review?(smontagu)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•10 years ago
|
||
Oops, failed to refresh the patch before uploading, sorry for the noise.
Attachment #8648017 -
Flags: review?(smontagu)
Assignee | ||
Updated•10 years ago
|
Attachment #8648007 -
Attachment is obsolete: true
Attachment #8648007 -
Flags: review?(smontagu)
Assignee | ||
Comment 3•10 years ago
|
||
Comment 4•10 years ago
|
||
Comment on attachment 8648017 [details] [diff] [review]
Ensure the 'mVertical' flag is set appropriately on the nsFontMetrics we use to draw text for an nsTextBoxFrame
Review of attachment 8648017 [details] [diff] [review]:
-----------------------------------------------------------------
The patch makes sense, but if this was the problem I don't understand why it worked before without dir=rtl.
Attachment #8648017 -
Flags: review?(smontagu) → review+
Assignee | ||
Comment 5•10 years ago
|
||
(In reply to Simon Montagu :smontagu from comment #4)
> Comment on attachment 8648017 [details] [diff] [review]
> Ensure the 'mVertical' flag is set appropriately on the nsFontMetrics we use
> to draw text for an nsTextBoxFrame
>
> Review of attachment 8648017 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> The patch makes sense, but if this was the problem I don't understand why it
> worked before without dir=rtl.
Because the button and the textbox use the same nsFontMetrics; so in the case where the button is drawn first (ltr), the vertical flag has been set by that, and the textbox doesn't change it.
Assignee | ||
Comment 6•10 years ago
|
||
url: https://hg.mozilla.org/integration/mozilla-inbound/rev/22b685186a10600851a8a6f1d05608eb13e68baf
changeset: 22b685186a10600851a8a6f1d05608eb13e68baf
user: Jonathan Kew <jkew@mozilla.com>
date: Sun Aug 16 15:09:08 2015 +0100
description:
Bug 1194493 - Ensure the 'mVertical' flag is set appropriately on the nsFontMetrics we use to draw text for an nsTextBoxFrame. r=smontagu
Comment 7•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•