Incorrect scrollWidth value reported for single-line text controls if they require horizontal scrolling

RESOLVED DUPLICATE of bug 343143

Status

()

RESOLVED DUPLICATE of bug 343143
9 years ago
5 years ago

People

(Reporter: Ehsan, Unassigned)

Tracking

({testcase})

Trunk
x86
Mac OS X
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
The values alerted in the testcase in the URL field should not be the same, because the second text box can scroll horizontally.  Webkit and IE get this right, but Opera gets this wrong like us.

This seems to be because nsTextControlFrame only supports the nsIScrollableViewProvider frame type if it's not a single-line control (see <http://mxr.mozilla.org/mozilla-central/source/layout/forms/nsTextControlFrame.cpp#960> and <http://mxr.mozilla.org/mozilla-central/source/layout/forms/nsTextControlFrame.cpp#2779>.  This code dates back to this change: <http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&root=/cvsroot&subdir=mozilla/layout/forms&command=DIFF_FRAMESET&file=nsTextControlFrame.cpp&rev2=3.144&rev1=3.143> which was a fix to bug 209807.

Note that the fix here should be tested not to regress bug 62431, because bug 209807 was trying to fix a regression from bug 62431.

Comment 1

8 years ago
Created attachment 493135 [details]
testcase with non-input-control element

Is this a duplicate of bug 343143?

I'm running into this right now for <div> elements with css display: -moz-box set on them actually. Not sure if the css or the type of element is relevant. Not setting contenteditable="true" doesn't make a difference.
> Is this a duplicate of bug 343143?

Yes, imo.

> I'm running into this right now for <div> elements with css display: -moz-box

That sounds like a different issue.
Depends on: 343143
(Reporter)

Updated

8 years ago
Status: NEW → RESOLVED
Last Resolved: 8 years ago
No longer depends on: 343143
Resolution: --- → DUPLICATE
Duplicate of bug: 343143
You need to log in before you can comment on or make changes to this bug.