Closed
Bug 601352
Opened 15 years ago
Closed 15 years ago
Console does not scroll expression result into view
Categories
(DevTools :: General, defect)
DevTools
General
Tracking
(blocking2.0 final+)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | final+ |
People
(Reporter: dangoor, Assigned: msucan)
References
Details
(Whiteboard: [patchclean:1021])
Attachments
(1 file, 3 obsolete files)
30.02 KB,
patch
|
roc
:
approval2.0+
|
Details | Diff | Splinter Review |
If the log output fills the console output area and you type an expression (eg 1+1), the 1+1 is scrolled into view but the 2 is just below the view.
Reporter | ||
Updated•15 years ago
|
Blocks: devtools4b8
Reporter | ||
Comment 1•15 years ago
|
||
blocking requested, as this bug makes the JS command line very annoying in practice.
blocking2.0: --- → ?
Assignee | ||
Comment 2•15 years ago
|
||
Proposed fix and test code.
Attachment #481255 -
Flags: feedback?(rcampbell)
Assignee | ||
Updated•15 years ago
|
Status: NEW → ASSIGNED
OS: Mac OS X → All
Hardware: x86 → All
Whiteboard: [patchclean:1006]
Version: unspecified → Trunk
Comment 3•15 years ago
|
||
Comment on attachment 481255 [details] [diff] [review]
proposed fix and test code
I don't know. I'd try a full run of content mochitests with this patch before signing off on it. Ask a layout peer.
Attachment #481255 -
Flags: feedback?(rcampbell)
Assignee | ||
Comment 4•15 years ago
|
||
I ran all browser-chrome-tests (9000+ of them). No failures related to this change. Shall I ask a layout peer then?
Assignee | ||
Comment 5•15 years ago
|
||
Comment on attachment 481255 [details] [diff] [review]
proposed fix and test code
Asking for review from Simon Montagu.
Attachment #481255 -
Flags: review?(smontagu)
Comment 6•15 years ago
|
||
Comment on attachment 481255 [details] [diff] [review]
proposed fix and test code
Is there any reason not to make the same change in nsScrollBoxObject::ScrollToElement?
Assignee | ||
Comment 7•15 years ago
|
||
(In reply to comment #6)
> Comment on attachment 481255 [details] [diff] [review]
> proposed fix and test code
>
> Is there any reason not to make the same change in
> nsScrollBoxObject::ScrollToElement?
Thanks for looking into the patch!
Given it's my first patch for Gecko itself, I tried to keep changes minimal. If the change is fine, then I can do the same for ScrollToElement. Shall I do that?
Assignee | ||
Comment 8•15 years ago
|
||
Updated patch. Changes:
- did the same change in ScrollToElement as in EnsureElementIsVisible - as requested by Simon. Thanks for your comment!
- rebased the patch on top of the latest mozilla-central. This required fixes for mochitest.
Asking for review from Robert O'Callahan as suggested by Simon.
Attachment #481255 -
Attachment is obsolete: true
Attachment #484320 -
Flags: review?(roc)
Attachment #481255 -
Flags: review?(smontagu)
Assignee | ||
Updated•15 years ago
|
Whiteboard: [patchclean:1006] → [patchclean:1019]
I think rect.x/y are relative to the top-left of the document, ignoring scrolling, but crect is relative to the top-left of the scrollbox border-box. So this doesn't seem right.
How about you just rip out the guts of ScrollToElement and make it call nsIPresShell::ScrollContentIntoView? EnsureElementIsVisible can probably do that too (just pass NS_PRESSHELL_SCROLL_ANYWHERE).
You might want to extend ScrollContentIntoView to accept the SCROLL_FIRST_ANCESTOR_ONLY and SCROLL_OVERFLOW_HIDDEN flags, since to preserve current scrollbox behavior we'd need to pass those flags. (A call to scrollToElement does not currently cause any ancestors of the scrollbox to scroll.)
Assignee | ||
Comment 11•15 years ago
|
||
Updated patch with the changes requested. Thanks a lot for your comments!
Changes:
- added a new aFlags argument to PresShell::ScrollContentIntoView() which takes the SCROLL_FIRST_ANCESTOR_ONLY SCROLL_OVERFLOW_HIDDEN flags (same as ScrollFrameRectIntoView()).
- added the same aFlags argument to DoScrollContentIntoView().
- updated accordingly all the code that calls the two methods.
- changed nsScrollBoxObject::ScrollToElement() to use PresShell::ScrollContentIntoView().
- changed nsScrollBoxObject::EnsureElementIsVisible() to use PresShell::ScrollContentIntoView().
- updated the mochitest file to better check if the last logged message is visible.
All mochitests pass, no failures on my system.
I am not sure if the new aFlags function argument is fine... or if I should add a new ScrollContentIntoView() function that takes four arguments - such that all other calls wouldn't need to be changed. Perhaps this is only a matter of preference.
Please let me know if I have to make further changes. Thanks again!
Attachment #484320 -
Attachment is obsolete: true
Attachment #485125 -
Flags: review?(roc)
Attachment #484320 -
Flags: review?(roc)
Assignee | ||
Updated•15 years ago
|
Whiteboard: [patchclean:1019] → [patchclean:1021]
Comment on attachment 485125 [details] [diff] [review]
patch update 3
Need to bump IID on nsIPresShell.
This may need to land on beta7 branch due to the IID bump. I'm not sure. Please ask #developers or elsewhere.
Great patch! I love to see all that nasty code being removed :-)
Attachment #485125 -
Flags: review?(roc) → review+
Assignee | ||
Comment 13•15 years ago
|
||
Bumped IID as requested.
Thanks for the review+ Robert!
Asking for approval2.0+ to get this patch checked into beta7 and into mozilla-central default branch.
Attachment #485125 -
Attachment is obsolete: true
Attachment #485248 -
Flags: approval2.0?
Attachment #485248 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Updated•15 years ago
|
Keywords: checkin-needed
Comment 14•15 years ago
|
||
Can go in over the b7 freeze, checkin with a=roc/beltzner for b7 or whatever. Post b7 if you need to make these sorts of changes, you'll have to create new and exciting interfaces.
Comment 15•15 years ago
|
||
Comment on attachment 485248 [details] [diff] [review]
[checked-in] patch update 4
http://hg.mozilla.org/mozilla-central/rev/0046c811c921
Attachment #485248 -
Attachment description: patch update 4 → [checked-in] patch update 4
Updated•15 years ago
|
Keywords: checkin-needed
Updated•15 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
blocking2.0: ? → final+
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•