Closed
Bug 747857
Opened 13 years ago
Closed 12 years ago
Text input suddenly grows in size after typing certain amount of characters
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: martijn.martijn, Assigned: dbaron)
References
(Depends on 1 open bug, )
Details
(Keywords: regression, testcase, Whiteboard: readability)
Attachments
(2 files, 1 obsolete file)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
roc
:
review+
mfinkle
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Steps to reproduce:
- Visit testcase
- Type a letter (for example 'q') a couple of times
Expected result:
- The text input stays at the same size
Actual result:
- The text input suddenly grows in size after typing 8 times the letter 'q'.
Reproduce this on the Samsung Galaxy Nexus and the Samsung Galaxy SII
See also video:
http://www.youtube.com/watch?v=IgrpchjAtWQ
This regressed between 2012-04-17 and 2012-04-18, regression from bug 706193, I think.
Reporter | ||
Comment 1•13 years ago
|
||
I'm also seeing the link suddenly grow when tapping somewhere on this page:
http://people.mozilla.org/~mwargers/tests/tapping/681640_tapevents.html
Updated•13 years ago
|
Whiteboard: readability
Updated•13 years ago
|
blocking-fennec1.0: ? → +
Updated•13 years ago
|
tracking-firefox14:
--- → ?
Keywords: regression
Updated•13 years ago
|
Assignee | ||
Comment 2•13 years ago
|
||
I wrote a patch for this on the airplane a few days ago, but then forgot to test that the tests pass and post it. Hopefully I'll get back to that soon.
https://hg.mozilla.org/users/dbaron_mozilla.com/patches/raw-file/d87bc5f40a15/line-threshold-form-controls
Assignee | ||
Comment 3•13 years ago
|
||
Attachment #620436 -
Flags: review?(roc)
Comment on attachment 620436 [details] [diff] [review]
patch
Review of attachment 620436 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/generic/nsFontInflationData.cpp
@@ +316,5 @@
> + nsIFrame *optionChild = option->GetFirstPrincipalChild();
> + if (optionChild && optionChild->GetType() == nsGkAtoms::textFrame) {
> + optionResult = nsTextFrameUtils::
> + ComputeApproximateLengthWithWhitespaceCompression(
> + optionChild->GetContent(), optionChild->GetStyleText());
Don't we need to iterate through the child frames of <option> in case there are multiple text nodes separated by comments?
@@ +380,5 @@
> + // need to exclude the display frame.
> + nscoord fontSize = kid->GetStyleFont()->mFont.size;
> + PRInt32 charCount = CharCountOfLargestOption(
> + static_cast<nsComboboxControlFrame*>(kid)->GetDropDown());
> + mTextAmount += charCount * fontSize;
Is this really the right thing to do for non-auto-width replaced elements?
Assignee | ||
Comment 5•13 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #4)
> ::: layout/generic/nsFontInflationData.cpp
> @@ +316,5 @@
> > + nsIFrame *optionChild = option->GetFirstPrincipalChild();
> > + if (optionChild && optionChild->GetType() == nsGkAtoms::textFrame) {
> > + optionResult = nsTextFrameUtils::
> > + ComputeApproximateLengthWithWhitespaceCompression(
> > + optionChild->GetContent(), optionChild->GetStyleText());
>
> Don't we need to iterate through the child frames of <option> in case there
> are multiple text nodes separated by comments?
I suppose so.
> @@ +380,5 @@
> > + // need to exclude the display frame.
> > + nscoord fontSize = kid->GetStyleFont()->mFont.size;
> > + PRInt32 charCount = CharCountOfLargestOption(
> > + static_cast<nsComboboxControlFrame*>(kid)->GetDropDown());
> > + mTextAmount += charCount * fontSize;
>
> Is this really the right thing to do for non-auto-width replaced elements?
I may at some future point want to try to consider widths on inline blocks and replaced elements, but for now I'm just trying to *not* consider form control inputs.
Assignee | ||
Comment 6•13 years ago
|
||
revised to iterate the children of <option>
Attachment #620436 -
Attachment is obsolete: true
Attachment #620436 -
Flags: review?(roc)
Attachment #620759 -
Flags: review?(roc)
Attachment #620759 -
Flags: review?(roc) → review+
Assignee | ||
Comment 7•13 years ago
|
||
Target Milestone: --- → mozilla15
Comment 8•13 years ago
|
||
Sorry, backed this out for test failures in 40-50% of the compilable pushes since this landed (which is too high for me to be happy merging inbound into mozilla-central):
https://hg.mozilla.org/integration/mozilla-inbound/rev/308f1163a388
See bug 751808 for logs :-)
Target Milestone: mozilla15 → ---
Comment 9•13 years ago
|
||
Comment 10•13 years ago
|
||
Just to help explain the crashes in bug 752168 - this had ended up being merged to mozilla-central for 3-4 hours before the backout was also merged (we had a 250+ changeset backlog on mozilla-inbound due to CPG, so it slipped through with the efforts to lower that as soon as possible), so ended up being included in the Nightly respin, which is how crashes were occurring in the wild. Today's Nightly will include the backout.
Assignee | ||
Comment 11•13 years ago
|
||
(In reply to Ed Morley [:edmorley] from comment #10)
> Just to help explain the crashes in bug 752168 - this had ended up being
> merged to mozilla-central for 3-4 hours before the backout was also merged
> (we had a 250+ changeset backlog on mozilla-inbound due to CPG, so it
> slipped through with the efforts to lower that as soon as possible), so
> ended up being included in the Nightly respin, which is how crashes were
> occurring in the wild. Today's Nightly will include the backout.
I don't think those crashes are at all related to this bug.
Comment 12•13 years ago
|
||
Ah sorry, I was just going by Scoobidiver's added dependency :-)
Comment 13•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
Assignee | ||
Comment 14•13 years ago
|
||
That was via a mozilla-inbound push that I forgot to note here:
https://hg.mozilla.org/integration/mozilla-inbound/rev/79f21117ea59
Assignee | ||
Comment 15•13 years ago
|
||
Comment on attachment 620759 [details] [diff] [review]
patch
[Approval Request Comment]
Regression caused by (bug #): bug 706193
User impact if declined: font inflation changes when typing in or selecting values in form controls
Testing completed (on m-c, etc.): on mozilla-central for a bit
Risk to taking this patch (and alternatives if risky): given the mozilla-central testing, reltaively low
String changes made by this patch: none
Attachment #620759 -
Flags: approval-mozilla-aurora?
Updated•12 years ago
|
Attachment #620759 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 16•12 years ago
|
||
status-firefox14:
--- → fixed
Comment 17•12 years ago
|
||
The test case in comment 1 is fixed the test case in the URL field still grows in size. Tested in Nightly, Aurora and 14 Beta 2.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 18•12 years ago
|
||
In triage I was asked to mark this bug fixed and open a new bug 757616.
Status: REOPENED → RESOLVED
Closed: 13 years ago → 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•