Closed Bug 261040 Opened 21 years ago Closed 21 years ago

Borders should not be included in GetActualScrollbarSizes

Categories

(Core :: Web Painting, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: roc)

References

Details

Attachments

(1 file, 1 obsolete file)

When implementing support for tabbability of css scrollable areas with scrollbars, I had trouble reliably knowing when there was a scrollbar. Robert O'callahan says this is partially due to margins being included in GetActualScrollbarSizes (hopefully I've got that right).
Attached patch fix (obsolete) — Splinter Review
fix
Attached patch correct patchSplinter Review
Sorry, the previous patch was the wrong patch. This is the right patch.
Attachment #160113 - Attachment is obsolete: true
Comment on attachment 160114 [details] [diff] [review] correct patch This moves GetActualScrollbarSizes to nsGfxScrollFrameInner and makes it use the scrollframe's content rect so that the scrollframe's border, if any, is not incorrectly included in the scrollbar sizes. (Yes, nsBox::GetClientRect actually returns the content rect --- and nsBox::GetContentRect returns the border rect!!!) I also deCOMtaminated GetScrolledSize because I simply couldn't resist.
Attachment #160114 - Flags: superreview?(dbaron)
Attachment #160114 - Flags: review?(dbaron)
Comment on attachment 160114 [details] [diff] [review] correct patch Shouldn't the summary of this bug say "padding and border", not "margins"?
Attachment #160114 - Flags: superreview?(dbaron)
Attachment #160114 - Flags: superreview+
Attachment #160114 - Flags: review?(dbaron)
Attachment #160114 - Flags: review+
Yeah, In fact really it should just say "borders" since padding is applied to the scrolled child, not the outer scrollframe. Thanks!
Fix checked in.
Summary: Margins should not be included in GetActualScrollbarSizes → Borders should not be included in GetActualScrollbarSizes
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: