Closed
Bug 372797
Opened 19 years ago
Closed 19 years ago
Convert ScrollFrameIntoView users to use ScrollContentIntoView
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: smaug, Assigned: smaug)
References
Details
Attachments
(1 file, 1 obsolete file)
|
34.62 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
See bug 372665.
Better to handle scrolling into view consistently.
So, if possible, only ScrollContentIntoView should be used, and
ScrollFrameIntoView and ScrollContentIntoView could be then merged together.
| Assignee | ||
Comment 1•19 years ago
|
||
The a bit ugly part is in nsAccessNode::ScrollTo.
I basically inlined part of nsAccessNode::GetFrame to get the right
content easily.
nsGenericHTMLElement::GetFormControlFrameFor should do at least as
"powerful" flush as ScrollContentIntoView to ensure everything is ok.
With the patch nsLayoutUtils::ScrollIntoView isn't needed anymore, because nsGenericHTMLFormElement::SetFocusAndScrollIntoView does
the scrolling.
Why don't you just have nsAccessNode call GetFrame() and then use that frame's GetContent()?
Are you fixing a bug where nsAccessNode::ScrollTo needed to flush before calling GetFrame, but wasn't?
nsIFrame* frame = presShell->GetPrimaryFrameFor(c);
Can you just remove this (from nsSpatialNavigation::setFocusedContent) and the "if (frame)" test?
Otherwise looks good.
| Assignee | ||
Comment 3•19 years ago
|
||
Attachment #257663 -
Flags: review?(roc)
| Assignee | ||
Updated•19 years ago
|
Attachment #257498 -
Attachment is obsolete: true
Attachment #257498 -
Flags: review?(roc)
Attachment #257663 -
Flags: superreview+
Attachment #257663 -
Flags: review?(roc)
Attachment #257663 -
Flags: review+
| Assignee | ||
Updated•19 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Didn't you already land this?
| Assignee | ||
Comment 5•19 years ago
|
||
Yes. "RESOLVED FIXED" ;)
Comment 6•19 years ago
|
||
For the nsAccessNode change, it would have been better to do:
nsCOMPtr<nsIContent> content = do_QueryInterface(mDOMNode);
It avoids a GetPrimaryFrameFor() -- no big deal though.
Comment 7•17 years ago
|
||
So I'm a little confused here. What was the reason for the GetFormControlFrameFor change (to flush layout, not just frames)?
| Assignee | ||
Comment 8•17 years ago
|
||
IIRC, (my memory isn't too good when trying to remember things I did 22 months ago) it was because the old ScrollContentIntoView used to flush
layout.
Comment 9•17 years ago
|
||
Yes, but this function is called for things other than scrolling, and some of those are perf-sensitive. Shouldn't SetFocusAndScrollIntoView handle the flushing itself if that's what it needs?
Comment 10•17 years ago
|
||
OK, so I'm going to back out that change in bug 67752.
You need to log in
before you can comment on or make changes to this bug.
Description
•