Closed
Bug 698291
Opened 13 years ago
Closed 13 years ago
[dir=auto] changing window size doesn't re-renders textarea with dynamic widths
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
RESOLVED
FIXED
mozilla11
People
(Reporter: tomer, Assigned: smontagu)
References
()
Details
(Keywords: rtl)
Attachments
(2 files, 2 obsolete files)
1.36 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
2.20 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
Steps to reproduce:
a. Unmaximize window.
b. Load a page with dir=auto[1]
c. Maximize browser window.
Expected result:
The textarea content should be at the right side of the textarea but instead is at the center.
[1] data:text/html,<meta%20charset="utf-8"/><textarea%20dir="auto"%20style="width:100%;font-size:200%;">%D7%91%D7%93%D7%99%D7%A7%D7%94</textarea></div>
Note that it doesn't reproduce if we emit the dynamic width from the style, as it needs less recalculations.
Reporter | ||
Comment 1•13 years ago
|
||
Tested with: Mozilla/5.0 (X11; Linux i686; rv:10.0a1) Gecko/20111030 Firefox/10.0a1
Version: unspecified → 10 Branch
Reporter | ||
Comment 2•13 years ago
|
||
This doesn't reproduce if setting dir=rtl outside of the textarea element.
data:text/html,<html%20dir="ltr"><meta%20charset="utf-8"/><textarea%20dir="auto"%20style="width:100%;font-size:200%;">%D7%91%D7%93%D7%99%D7%A7%D7%94</textarea></html>
Please note that I had a small typo in the previous testcase. There should be not </div> at the end.
Assignee | ||
Comment 3•13 years ago
|
||
I bet this happens because there is an optimization somewhere which only realigns the text to the right edge of the textarea when dir=rtl or align=right, and therefore not when dir=auto. I haven't found where that is, though.
Assignee: nobody → smontagu
OS: Linux → All
Hardware: x86 → All
Assignee | ||
Comment 4•13 years ago
|
||
Attachment #570603 -
Flags: review?(roc)
Assignee | ||
Comment 5•13 years ago
|
||
Attachment #570605 -
Flags: review?(roc)
Comment on attachment 570603 [details] [diff] [review]
Patch
Shouldn't this be a bitmask check on nsStyleTextReset::mUnicodeBidi?
Otherwise looks right.
Assignee | ||
Comment 7•13 years ago
|
||
Comment on attachment 570603 [details] [diff] [review]
Patch
(In reply to David Baron [:dbaron] from comment #6)
> Comment on attachment 570603 [details] [diff] [review] [diff] [details] [review]
> Patch
>
> Shouldn't this be a bitmask check on nsStyleTextReset::mUnicodeBidi?
Yes it should.
Attachment #570603 -
Attachment is obsolete: true
Attachment #570603 -
Flags: review?(roc)
Assignee | ||
Comment 8•13 years ago
|
||
Attachment #570610 -
Flags: review?(dbaron)
Comment on attachment 570605 [details] [diff] [review]
Reftest
Review of attachment 570605 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/reftests/bidi/698291-1.html
@@ +9,5 @@
> + document.getElementById("f").style.width="100%";
> +}
> + </script>
> + </head>
> + <body onload="boom()">
This should be a MozReftestInvalidate handler, I think.
Assignee | ||
Comment 10•13 years ago
|
||
Attachment #570605 -
Attachment is obsolete: true
Attachment #570605 -
Flags: review?(roc)
Attachment #570626 -
Flags: review?(roc)
Attachment #570626 -
Flags: review?(roc) → review+
Assignee | ||
Comment 11•13 years ago
|
||
Comment on attachment 570610 [details] [diff] [review]
Patch v.2
dbaron, I moved the review request over to you because I thought from comment 6 that you had already looked over the patch and it would be trivial for you to review it. If that was wrong, please feel free to transfer the request back to roc.
Comment on attachment 570610 [details] [diff] [review]
Patch v.2
r=dbaron
(This makes me wonder whether 'plaintext' should be a value for 'direction' rather than 'unicode-bidi'...)
Attachment #570610 -
Flags: review?(dbaron) → review+
Assignee | ||
Comment 13•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4f9095c87c18
https://hg.mozilla.org/integration/mozilla-inbound/rev/0396b6250613
Assignee: smontagu → nobody
Component: Layout: Text → Layout: Form Controls
Flags: in-testsuite+
QA Contact: layout.fonts-and-text → layout.form-controls
Comment 14•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4f9095c87c18
https://hg.mozilla.org/mozilla-central/rev/0396b6250613
Assignee: nobody → smontagu
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in
before you can comment on or make changes to this bug.
Description
•