/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
// An input suitable to compute intersections with multiple targets. struct IntersectionInput { // Whether the root is implicit (null, originally). constbool mIsImplicitRoot = false; // The computed root node. For the implicit root, this will be the in-process // root document we can compute coordinates against (along with the remote // document visible rect if appropriate). const nsINode* mRootNode = nullptr;
nsIFrame* mRootFrame = nullptr; // The rect of mRootFrame in client coordinates.
nsRect mRootRect; // The root margin computed against the root rect.
nsMargin mRootMargin; // If this is in an OOP iframe, the visible rect of the OOP frame.
Maybe<nsRect> mRemoteDocumentVisibleRect;
};
// These hold raw pointers which are explicitly cleared by UnlinkTarget(). // // We keep a set and an array because we need ordered access, but also // constant time lookup.
nsTArray<Element*> mObservationTargets;
// Value can be: // -2: Makes sure next calculated threshold always differs, leading to a // notification task being scheduled. // -1: Non-intersecting. // >= 0: Intersecting, valid index of aObserver->mThresholds. enum ObservationState : int32_t { Uninitialized = -2, NotIntersecting = -1 };
nsTHashMap<Element*, int32_t> mObservationTargetMap;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.