Closed
Bug 1215977
Opened 9 years ago
Closed 9 years ago
make nsLayoutUtils::GetNearestScrollableFrame never return a proper descendant of the passed in frame
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: tnikkel, Assigned: tnikkel)
References
Details
Attachments
(2 files)
(deleted),
patch
|
botond
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
botond
:
review+
|
Details | Diff | Splinter Review |
If you are using nsLayoutUtils::GetNearestScrollableFrame to iterate up the frame tree, then returning a proper descendant would put you in an infinite loop.
This happens if you pass "always match root" and pass the root frame. It will return the root scroll frame, which is a child of the root frame.
This specific behaviour was added in http://hg.mozilla.org/mozilla-central/rev/cd8ecc2e1a2e (bug 1105823) so that fixed pos frames (which are children of the root frame, but not descendants of the root scroll frame) would find the root scroll frame APZC for their document. Otherwise they would find nothing, because there is no other scroll frame containing them in the document tree.
I propose to change this as follows: add a new flag that specifies this special behaviour for fixed pos frames, and use it. And then remove the quirk of GetNearestScrollableFrame with root frames.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8675452 -
Flags: review?(botond)
Assignee | ||
Comment 2•9 years ago
|
||
As I was implementing this I realized we may want to do this for all documents, not just the root document. We can do that in a followup bug if you agree it is something we want.
Attachment #8675454 -
Flags: review?(botond)
Assignee | ||
Comment 3•9 years ago
|
||
(In reply to Timothy Nikkel (:tn) from comment #0)
> I propose to change this as follows: add a new flag that specifies this
> special behaviour for fixed pos frames, and use it. And then remove the
> quirk of GetNearestScrollableFrame with root frames.
The patches do this in the reverse order.
Updated•9 years ago
|
Attachment #8675452 -
Flags: review?(botond) → review+
Updated•9 years ago
|
Attachment #8675454 -
Flags: review?(botond) → review+
Assignee | ||
Comment 4•9 years ago
|
||
Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Timothy Nikkel (:tn) from comment #2)
> As I was implementing this I realized we may want to do this for all
> documents, not just the root document. We can do that in a followup bug if
> you agree it is something we want.
Did you have an opinion on whether we should do this for all documents? Not just the root document?
Flags: needinfo?(botond)
Comment 6•9 years ago
|
||
(In reply to Timothy Nikkel (:tn) from comment #5)
> (In reply to Timothy Nikkel (:tn) from comment #2)
> > As I was implementing this I realized we may want to do this for all
> > documents, not just the root document. We can do that in a followup bug if
> > you agree it is something we want.
>
> Did you have an opinion on whether we should do this for all documents? Not
> just the root document?
I think that's a sensible change.
Flags: needinfo?(botond)
Assignee | ||
Comment 8•9 years ago
|
||
(In reply to Timothy Nikkel (:tn) from comment #2)
> As I was implementing this I realized we may want to do this for all
> documents, not just the root document. We can do that in a followup bug if
> you agree it is something we want.
This is bug 1221870.
Comment 9•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/60ed9b57b7d4
https://hg.mozilla.org/mozilla-central/rev/91a6134ea200
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in
before you can comment on or make changes to this bug.
Description
•