Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  IAPZHitTester.h

  Sprache: C
 

/* 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/. */


#ifndef mozilla_layers_IAPZHitTester_h
#define mozilla_layers_IAPZHitTester_h

#include "HitTestingTreeNode.h"  // for HitTestingTreeNodeAutoLock
#include "mozilla/RefPtr.h"
#include "mozilla/gfx/CompositorHitTestInfo.h"
#include "mozilla/layers/LayersTypes.h"

namespace mozilla {
namespace layers {

class AsyncPanZoomController;
class APZCTreeManager;

class IAPZHitTester {
 public:
  virtual ~IAPZHitTester() = default;

  // Not a constructor because we want external code to be able to pass a hit
  // tester to the APZCTreeManager constructor, which will then initialize it.
  void Initialize(APZCTreeManager* aTreeManager) {
    mTreeManager = aTreeManager;
  }

  // Represents the results of an APZ hit test.
  struct HitTestResult {
    // The APZC targeted by the hit test.
    RefPtr<AsyncPanZoomController> mTargetApzc;
    // The applicable hit test flags.
    gfx::CompositorHitTestInfo mHitResult;
    // The layers id of the content that was hit.
    // This effectively identifiers the process that was hit for
    // Fission purposes.
    LayersId mLayersId;
    // If a scrollbar was hit, this will be populated with the
    // scrollbar node. The AutoLock allows accessing the scrollbar
    // node without having to hold the tree lock.
    HitTestingTreeNodeAutoLock mScrollbarNode;
    // If content that is fixed to the root-content APZC was hit,
    // the sides of the viewport to which the content is fixed.
    SideBits mFixedPosSides = SideBits::eNone;
    // If a fixed/sticky position element was hit, this will be populated with
    // the hit-testing tree node. The AutoLock allows accessing the node
    // without having to hold the tree lock.
    HitTestingTreeNodeAutoLock mNode;
    // This is set to true If mTargetApzc is overscrolled and the
    // event targeted the gap space ("gutter") created by the overscroll.
    bool mHitOverscrollGutter = false;

    HitTestResult() = default;
    // Make it move-only.
    HitTestResult(HitTestResult&&) = default;
    HitTestResult& operator=(HitTestResult&&) = default;
  };

  virtual HitTestResult GetAPZCAtPoint(
      const ScreenPoint& aHitTestPoint,
      const RecursiveMutexAutoLock& aProofOfTreeLock) = 0;

  HitTestResult CloneHitTestResult(RecursiveMutexAutoLock& aProofOfTreeLock,
                                   const HitTestResult& aHitTestResult) const;

 protected:
  APZCTreeManager* mTreeManager = nullptr;

  // We are a friend of APZCTreeManager but our derived classes
  // are not. Wrap a few private members of APZCTreeManager for
  // use by derived classes.
  RecursiveMutex& GetTreeLock();
  LayersId GetRootLayersId() const;
  HitTestingTreeNode* GetRootNode() const;
  HitTestingTreeNode* FindRootNodeForLayersId(LayersId aLayersId) const;
  AsyncPanZoomController* FindRootApzcForLayersId(LayersId aLayersId) const;
  already_AddRefed<HitTestingTreeNode> GetTargetNode(
      const ScrollableLayerGuid& aGuid,
      ScrollableLayerGuid::Comparator aComparator);
  void InitializeHitTestingTreeNodeAutoLock(
      HitTestingTreeNodeAutoLock& aAutoLock,
      const RecursiveMutexAutoLock& aProofOfTreeLock,
      RefPtr<HitTestingTreeNode>& aNode) const;
};

}  // namespace layers
}  // namespace mozilla

#endif  // mozilla_layers_IAPZHitTester_h

Messung V0.5 in Prozent
C=71 H=100 G=86

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-08-24) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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 und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002