Closed
Bug 320799
Opened 19 years ago
Closed 13 years ago
.clientWidth reports different width for two <select> fields of exactly the same width if one has a scrollbar on the dropdown and the other does not
Categories
(Core :: DOM: CSS Object Model, defect, P2)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: mdonatas, Assigned: bzbarsky)
Details
Attachments
(2 files)
1.66 KB,
text/html
|
Details | |
3.78 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 It's weird but .clientWidth returns different widths for <select>s that are of the same width. The only difference is number of options in each of them. Testcase speaks for itself. Reproducible: Always Steps to Reproduce: Actual Results: Second <select> field has wrong .clientWidth set Expected Results: Correct .clientWidth value for second <select> element
Attachment #206296 -
Flags: approval1.8.1?
Attachment #206296 -
Flags: approval1.8.1?
Updated•19 years ago
|
Component: DOM → DOM: Mozilla Extensions
OS: Windows XP → All
Hardware: PC → All
Updated•15 years ago
|
Assignee: general → nobody
QA Contact: ian → general
Updated•13 years ago
|
Component: DOM: Mozilla Extensions → DOM: CSS Object Model
QA Contact: general → style-system
Assignee | ||
Comment 2•13 years ago
|
||
This is an interesting case.... The spec says: the width of the padding edge (excluding the width of any rendered scrollbar between the padding edge and the border edge) We implement that by getting the frame for the element, calling GetScrollTargetFrame, then using the size of that (minus scrollbar as needed). For a combobox, the scroll target frame is the dropdown. And the two selects differ in that one has a scrollbar in the dropdown and the other does not; the scrollbar width is exactly the difference between the two numbers returned. roc, should we be skipping the GetScrollTargetFrame call for combobox here like we do for menuframes?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: .clientWidth reports different width for two <select> fields of exactly the same width → .clientWidth reports different width for two <select> fields of exactly the same width if one has a scrollbar on the dropdown and the other does not
Assignee | ||
Comment 3•13 years ago
|
||
Or would this confuse other GetScrollFrame callers?
I think that's probably fine. None of the GetScrollFrame callers in nsGenericElement should be expecting to see the popup.
Assignee | ||
Comment 5•13 years ago
|
||
Attachment #567481 -
Flags: review?(roc)
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → bzbarsky
Priority: -- → P2
Whiteboard: [need review]
Attachment #567481 -
Flags: review?(roc) → review+
Assignee | ||
Comment 6•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/56726a8fedea
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla10
Comment 7•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/56726a8fedea
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•