31
edits
Tschneider (talk | contribs) (Created page with "<big>'''Linking steps:'''</big> ''DOMIntersectionObserver::observe(Element& aTarget)'' adds ''aTarget'' to ''DOMIntersectionObserver::mObservationTargets'' and calls ''Elemen...") |
Tschneider (talk | contribs) (Update) |
||
| (6 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<big><big>'''Lifetime (as in FF < 58)'''</big></big> | |||
[[File:Intersection observer lifetime.png|thumbnail]] | |||
<big>'''Linking steps:'''</big> | <big>'''Linking steps:'''</big> | ||
| Line 20: | Line 24: | ||
''nsSlots::mRegisteredIntersectionObservers''. | ''nsSlots::mRegisteredIntersectionObservers''. | ||
''nsDomSlots::Unlink'' calls ''DOMIntersectionObserver:: | ''nsDomSlots::Unlink'' calls ''DOMIntersectionObserver::UnlinkTarget'' for every observer in | ||
''nsSlots::mRegisteredIntersectionObservers''. | ''nsSlots::mRegisteredIntersectionObservers''. | ||
<big><big>'''Lifetime (as in FF >= 58)'''</big></big> | |||
<big>'''Linking steps:'''</big> | |||
''DOMIntersectionObserver::observe(Element& aTarget)'' adds ''aTarget'' to ''DOMIntersectionObserver::mObservationTargets'' and calls ''Element::RegisterIntersectionObsever'' on ''aTarget''. If ''aTarget'' is the first item in ''DOMIntersectionObserver::mObservationTargets'', ''nsDocument::AddIntersectionObserver'' is called and the observer gets added to ''nsDocument::mIntersectionObservers''. | |||
''Element::RegisterIntersectionObserver(DOMIntersectionObserver* aObserver)'' adds ''aObserver'' to ''Property(nsGkAtoms::intersectionobserverlist)''. | |||
<big>'''Unlinking steps:'''</big> | |||
''DOMIntersectionObserver::unobserve(Element& aTarget)'' removes aTarget from ''DOMIntersectionObserver::mObservationTargets'' and calls ''Element::UnregisterIntersectionObsever'' on ''aTarget''. If aTarget is the last item in ''DOMIntersectionObserver::mObservationTargets'', ''nsDocument::RemoveIntersectionObserver'' is called and the observer gets removed from ''nsDocument::mIntersectionObservers''. | |||
''DOMIntersectionObserver::Disconnect()'' calls ''Element::UnregisterIntersectionObsever'' for every item in ''DOMIntersectionObserver::mObservationTargets''. | |||
''Element::UnregisterIntersectionObserver(DOMIntersectionObserver* aObserver)'' removes ''aObserver'' from ''Property(nsGkAtoms::intersectionobserverlist)''. | |||
''DOMIntersectionObserver::~DOMIntersectionObserver'' calls ''DOMIntersectionObserver::Disconnect()''. | |||
''DOMIntersectionObserver::Unlink'' calls ''DOMIntersectionObserver::Disconnect()''. | |||
''nsNodeUtils::LastRelease'' calls ''DOMIntersectionObserver::UnlinkElement'' for every observer in | |||
''Property(nsGkAtoms::intersectionobserverlist)''. | |||
edits