#include "third_party/blink/renderer/core/display_lock/display_lock_utilities.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/core/display_lock/display_lock_context.h"
#include "third_party/blink/renderer/core/display_lock/display_lock_document_state.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/dom/flat_tree_traversal.h"
#include "third_party/blink/renderer/core/dom/node.h"
#include "third_party/blink/renderer/core/dom/node_computed_style.h"
#include "third_party/blink/renderer/core/dom/slot_assignment_engine.h"
#include "third_party/blink/renderer/core/dom/text.h"
#include "third_party/blink/renderer/core/editing/editing_boundary.h"
#include "third_party/blink/renderer/core/editing/editing_utilities.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/inspector/inspector_trace_events.h"
#include "third_party/blink/renderer/core/layout/layout_embedded_content.h"
#include "third_party/blink/renderer/core/layout/layout_shift_tracker.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_set.h"
#include "third_party/blink/renderer/platform/heap/member.h"
namespace blink {
DisplayLockUtilities::LockCheckMemoizationScope*
DisplayLockUtilities::memoizer_ = …;
namespace {
Element* NearestLockedExclusiveAncestor(const Node& node) { … }
const Element* NearestLockedInclusiveAncestor(const Node& node) { … }
Element* NearestLockedInclusiveAncestor(Node& node) { … }
Element* NearestLockedInclusiveAncestor(const LayoutObject& object) { … }
Element* NearestLockedExclusiveAncestor(const LayoutObject& object) { … }
Node* GetFrameOwnerNode(const Node* child) { … }
void PopulateAncestorContexts(
Node& node,
HeapHashSet<Member<DisplayLockContext>>& contexts) { … }
template <typename Lambda>
Element* LockedAncestorPreventingUpdate(const Node& node,
Lambda update_is_prevented) { … }
template <typename Lambda>
const Element* LockedInclusiveAncestorPreventingUpdate(
const Node& node,
Lambda update_is_prevented) { … }
template <typename Lambda>
Element* LockedAncestorPreventingUpdate(const LayoutObject& object,
Lambda update_is_prevented) { … }
template <typename Lambda>
Element* LockedInclusiveAncestorPreventingUpdate(const LayoutObject& object,
Lambda update_is_prevented) { … }
}
bool DisplayLockUtilities::ActivateFindInPageMatchRangeIfNeeded(
const EphemeralRangeInFlatTree& range) { … }
bool DisplayLockUtilities::NeedsActivationForFindInPage(
const EphemeralRangeInFlatTree& range) { … }
const HeapVector<Member<Element>>
DisplayLockUtilities::ActivatableLockedInclusiveAncestors(
const Node& node,
DisplayLockActivationReason reason) { … }
DisplayLockUtilities::ScopedForcedUpdate::Impl::Impl(
const Range* range,
DisplayLockContext::ForcedPhase phase,
bool only_cv_auto,
bool emit_warnings)
: … { … }
DisplayLockUtilities::ScopedForcedUpdate::Impl::Impl(
const Node* node,
DisplayLockContext::ForcedPhase phase,
bool include_self,
bool only_cv_auto,
bool emit_warnings)
: … { … }
void DisplayLockUtilities::ScopedForcedUpdate::Impl::EnsureMinimumForcedPhase(
DisplayLockContext::ForcedPhase phase) { … }
void DisplayLockUtilities::ScopedForcedUpdate::Impl::Destroy() { … }
void DisplayLockUtilities::ScopedForcedUpdate::Impl::
AddForcedUpdateScopeForContext(DisplayLockContext* context) { … }
void DisplayLockUtilities::ScopedForcedUpdate::Impl::ForceDisplayLockIfNeeded(
DisplayLockContext* context) { … }
Element*
DisplayLockUtilities::LockedInclusiveAncestorPreventingStyleWithinTreeScope(
const Node& node) { … }
const Element* DisplayLockUtilities::LockedInclusiveAncestorPreventingLayout(
const Node& node) { … }
const Element* DisplayLockUtilities::LockedInclusiveAncestorPreventingPaint(
const Node& node) { … }
const Element* DisplayLockUtilities::LockedInclusiveAncestorPreventingPaint(
const LayoutObject& object) { … }
Element* DisplayLockUtilities::HighestLockedInclusiveAncestor(
const Node& node) { … }
Element* DisplayLockUtilities::HighestLockedExclusiveAncestor(
const Node& node) { … }
bool DisplayLockUtilities::IsInUnlockedOrActivatableSubtree(
const Node& node,
DisplayLockActivationReason activation_reason) { … }
bool DisplayLockUtilities::IsLockedForAccessibility(const Node& node) { … }
bool DisplayLockUtilities::IsInLockedSubtreeCrossingFrames(
const Node& source_node,
IncludeSelfOrNot self) { … }
void DisplayLockUtilities::ElementLostFocus(Element* element) { … }
void DisplayLockUtilities::ElementGainedFocus(Element* element) { … }
bool DisplayLockUtilities::NeedsSelectionChangedUpdate(
const Document& document) { … }
void DisplayLockUtilities::SelectionChanged(
const EphemeralRangeInFlatTree& old_selection,
const EphemeralRangeInFlatTree& new_selection) { … }
void DisplayLockUtilities::SelectionRemovedFromDocument(Document& document) { … }
Element* DisplayLockUtilities::LockedAncestorPreventingPaint(
const LayoutObject& object) { … }
Element* DisplayLockUtilities::LockedAncestorPreventingPaint(const Node& node) { … }
Element* DisplayLockUtilities::LockedAncestorPreventingPrePaint(
const LayoutObject& object) { … }
Element* DisplayLockUtilities::LockedAncestorPreventingLayout(
const LayoutObject& object) { … }
Element* DisplayLockUtilities::LockedAncestorPreventingLayout(
const Node& node) { … }
Element* DisplayLockUtilities::LockedAncestorPreventingStyle(const Node& node) { … }
#if DCHECK_IS_ON()
bool DisplayLockUtilities::AssertStyleAllowed(const Node& node) { … }
#endif
bool DisplayLockUtilities::PrePaintBlockedInParentFrame(LayoutView* view) { … }
bool DisplayLockUtilities::IsAutoWithoutLayout(const LayoutObject& object) { … }
bool DisplayLockUtilities::RevealHiddenUntilFoundAncestors(const Node& node) { … }
static bool CheckSelf(const Node* node) { … }
bool DisplayLockUtilities::IsDisplayLockedPreventingPaintUnmemoized(
const Node& node,
bool inclusive_check) { … }
bool DisplayLockUtilities::IsDisplayLockedPreventingPaint(
const Node* node,
bool inclusive_check) { … }
bool DisplayLockUtilities::IsDisplayLockedPreventingPaint(
const LayoutObject* object) { … }
bool DisplayLockUtilities::IsUnlockedQuickCheck(const Node& node) { … }
bool DisplayLockUtilities::IsPotentialStyleRecalcRoot(const Node& node) { … }
}