Closed
Bug 483552
Opened 16 years ago
Closed 16 years ago
ensureElementIsVisible on scrollBoxObject doesn't take border into account
Categories
(Toolkit :: UI Widgets, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: Natch, Assigned: dao)
References
Details
(Keywords: testcase)
Attachments
(2 files, 7 obsolete files)
2.65 KB,
application/vnd.mozilla.xul+xml
|
Details | |
16.44 KB,
patch
|
Details | Diff | Splinter Review |
Calling foo.scrollBoxObject.ensureElementIsVisible may still leave the borders out of the visible area. See bug 475203.
Reporter | ||
Comment 1•16 years ago
|
||
To be more precise, it seems that the scrollBoxObject itself is 2 pixels off to
the left, when testing a scroll-up the tab to the left has 2 pixels still
hidden, and when testing a scroll-down the tab to the right is scrolled 2
pixels too much.
Reporter | ||
Comment 3•16 years ago
|
||
Here's a testcase showing the off by 2 thing with a bunch of hbox'es in an arrowscrollbox, needs priveleges to get to the native anon stuff.
Reporter | ||
Updated•16 years ago
|
Keywords: testcase-wanted → testcase
Reporter | ||
Comment 4•16 years ago
|
||
Comment on attachment 367536 [details]
testcase
Scratch that, it doesn't actually need privileges.
:)
Attachment #367536 -
Attachment description: testcase - requires priveleges → testcase
Reporter | ||
Comment 5•16 years ago
|
||
Requesting blocking, because this makes it impossible to scroll the leftmost tab all the way (both when clicking on the tab itself and when using the mousewheel). This bug is only there when smoothScroll is set to false. The only way to scroll it all the way is by clicking on the left arrow button.
Flags: blocking1.9.1?
Reporter | ||
Comment 6•16 years ago
|
||
Is it generally bad that I can QueryInterface on a scrollbox to its' scrollBoxObject without any permission escalation? Or is QueryInterface harmless?
This is not a regression, right? It's always been broken?
Reporter | ||
Comment 8•16 years ago
|
||
(In reply to comment #7)
> This is not a regression, right? It's always been broken?
Right. At least since 3.0.
Flags: wanted1.9.1-
Flags: blocking1.9.1?
Flags: blocking1.9.1-
Assignee | ||
Comment 9•16 years ago
|
||
Attachment #367536 -
Attachment is obsolete: true
Assignee | ||
Comment 10•16 years ago
|
||
Assignee | ||
Comment 11•16 years ago
|
||
Attachment #370379 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 12•16 years ago
|
||
This fixes bug 485938 and bug 485841.
Assignee | ||
Comment 13•16 years ago
|
||
the previous patch removed a code block that shouldn't have been removed (but updated to not use the scrollBoxObject)
Attachment #370379 -
Attachment is obsolete: true
Attachment #370380 -
Flags: review?(gavin.sharp)
Attachment #370379 -
Flags: review?(gavin.sharp)
Comment 14•16 years ago
|
||
- <field name="_scrollBoxObject">null</field>
- <property name="scrollBoxObject" readonly="true">
Don't remove this. It's listed in the documentation.
Also, removing this caused you to change the tests to use internal properties which shouldn't be done if it isn't necessary.
+ <property name="visibleSize" readonly="true">
+ <getter><![CDATA[
+ return this.getAttribute("orient") == "horizontal" ?
+ this._scrollbox.clientWidth :
+ this._scrollbox.clientHeight;
The default orientation is horizontal though so if orient isn't specified this will be incorrect. Same with the other properties.
Also, this.orient should be ok here.
I'm not sure I like the idea of adding more properties, but I'm not as concerned as it only affects the arrowscrollbox which is fairly specialized. I assume you tested large menus too?
We should at least give the new properties names that correspond more with the source names.
scrollRect -> scrollClientRect or something.
Assignee | ||
Comment 15•16 years ago
|
||
I've tested this with the bookmarks menu.
Attachment #370378 -
Attachment is obsolete: true
Attachment #370448 -
Flags: review?(enndeakin)
Attachment #370378 -
Flags: review?(enndeakin)
Assignee | ||
Comment 16•16 years ago
|
||
s/scrollRect/scrollClientRect/
Attachment #370380 -
Attachment is obsolete: true
Attachment #370449 -
Flags: review?(gavin.sharp)
Attachment #370380 -
Flags: review?(gavin.sharp)
Comment 17•16 years ago
|
||
Comment on attachment 370448 [details] [diff] [review]
toolkit part, v2
I'd actually meant to change all the properties, so that it was clearer how they related to what they retrieved:
visibleSize -> scrollClientSize
scrolledSized -> scrollSize
I'm not too concerned about the first, but I think scrollSize should be used to mirror scrollPosition (rather that scrolled with an 'ed')
Attachment #370448 -
Flags: review?(enndeakin) → review+
Assignee | ||
Comment 18•16 years ago
|
||
changed the property names as suggested
Attachment #370448 -
Attachment is obsolete: true
Assignee | ||
Comment 19•16 years ago
|
||
Attachment #370449 -
Attachment is obsolete: true
Attachment #371725 -
Flags: review?(gavin.sharp)
Attachment #370449 -
Flags: review?(gavin.sharp)
Assignee | ||
Updated•16 years ago
|
Component: XUL → XUL Widgets
Flags: wanted1.9.1-
Product: Core → Toolkit
QA Contact: xptoolkit.widgets → xul.widgets
Assignee | ||
Comment 20•16 years ago
|
||
Comment on attachment 371723 [details] [diff] [review]
toolkit part, v3 (checked in)
http://hg.mozilla.org/mozilla-central/rev/510bd328a29d
Attachment #371723 -
Attachment description: toolkit part, v3 → toolkit part, v3 (checked in)
Comment 21•16 years ago
|
||
Backed out of m-c; the tree has unexplained leak orange.
Assignee | ||
Comment 22•16 years ago
|
||
Comment on attachment 371723 [details] [diff] [review]
toolkit part, v3 (checked in)
http://hg.mozilla.org/mozilla-central/rev/8d65c4e868ef
Comment 23•16 years ago
|
||
could this have caused Bug 487946 ?
Assignee | ||
Comment 24•16 years ago
|
||
Attachment #371725 -
Attachment is obsolete: true
Attachment #371725 -
Flags: review?(gavin.sharp)
Assignee | ||
Updated•16 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
You need to log in
before you can comment on or make changes to this bug.
Description
•