chromium/third_party/blink/renderer/core/display_lock/display_lock_context.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/core/display_lock/display_lock_context.h"

#include <string>

#include "base/auto_reset.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "third_party/blink/renderer/core/accessibility/ax_object_cache.h"
#include "third_party/blink/renderer/core/css/style_change_reason.h"
#include "third_party/blink/renderer/core/css/style_engine.h"
#include "third_party/blink/renderer/core/display_lock/content_visibility_auto_state_change_event.h"
#include "third_party/blink/renderer/core/display_lock/display_lock_document_state.h"
#include "third_party/blink/renderer/core/display_lock/display_lock_utilities.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/dom/node_computed_style.h"
#include "third_party/blink/renderer/core/editing/frame_selection.h"
#include "third_party/blink/renderer/core/editing/selection_template.h"
#include "third_party/blink/renderer/core/execution_context/agent.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/html/canvas/html_canvas_element.h"
#include "third_party/blink/renderer/core/html/html_image_element.h"
#include "third_party/blink/renderer/core/html/html_object_element.h"
#include "third_party/blink/renderer/core/html_element_type_helpers.h"
#include "third_party/blink/renderer/core/inspector/inspector_trace_events.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/layout/layout_result.h"
#include "third_party/blink/renderer/core/layout/oof_positioned_node.h"
#include "third_party/blink/renderer/core/layout/physical_box_fragment.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/page/page_animator.h"
#include "third_party/blink/renderer/core/paint/paint_layer.h"
#include "third_party/blink/renderer/core/paint/pre_paint_tree_walk.h"
#include "third_party/blink/renderer/core/speculation_rules/document_speculation_rules.h"
#include "third_party/blink/renderer/core/view_transition/view_transition_utils.h"
#include "third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"

namespace blink {

namespace {
namespace rejection_names {
const char* kContainmentNotSatisfied =;
const char* kUnsupportedDisplay =;
}  // namespace rejection_names

ScrollableArea* GetScrollableArea(Node* node) {}

}  // namespace

DisplayLockContext::DisplayLockContext(Element* element)
    :{}

void DisplayLockContext::SetRequestedState(EContentVisibility state) {}

const ComputedStyle* DisplayLockContext::AdjustElementStyle(
    const ComputedStyle* style) const {}

void DisplayLockContext::RequestLock(uint16_t activation_mask) {}

void DisplayLockContext::RequestUnlock() {}

void DisplayLockContext::UpdateActivationMask(uint16_t activatable_mask) {}

void DisplayLockContext::UpdateDocumentBookkeeping(
    bool was_locked,
    bool all_activation_was_blocked,
    bool is_locked,
    bool all_activation_is_blocked) {}

void DisplayLockContext::UpdateActivationObservationIfNeeded() {}

bool DisplayLockContext::NeedsLifecycleNotifications() const {}

void DisplayLockContext::UpdateLifecycleNotificationRegistration() {}

void DisplayLockContext::Lock() {}

// Did* function for the lifecycle phases. These functions, along with
// Should* functions in the header, control whether or not to process the
// lifecycle for self or for children.
// =============================================================================
void DisplayLockContext::DidStyleSelf() {}

void DisplayLockContext::DidStyleChildren() {}

void DisplayLockContext::DidLayoutChildren() {}
// End Did* functions ==============================================

void DisplayLockContext::CommitForActivation(
    DisplayLockActivationReason reason) {}

void DisplayLockContext::SetKeepUnlockedUntilLifecycleCount(int count) {}

void DisplayLockContext::NotifyIsIntersectingViewport() {}

void DisplayLockContext::NotifyIsNotIntersectingViewport() {}

bool DisplayLockContext::ShouldCommitForActivation(
    DisplayLockActivationReason reason) const {}

void DisplayLockContext::UpgradeForcedScope(ForcedPhase old_phase,
                                            ForcedPhase new_phase,
                                            bool emit_warnings) {}

void DisplayLockContext::ScheduleStateChangeEventIfNeeded() {}

void DisplayLockContext::DispatchStateChangeEventIfNeeded() {}

void DisplayLockContext::NotifyForcedUpdateScopeEnded(ForcedPhase phase) {}

void DisplayLockContext::Unlock() {}

bool DisplayLockContext::CanDirtyStyle() const {}

bool DisplayLockContext::MarkForStyleRecalcIfNeeded() {}

bool DisplayLockContext::MarkForLayoutIfNeeded() {}

bool DisplayLockContext::MarkAncestorsForPrePaintIfNeeded() {}

bool DisplayLockContext::MarkNeedsRepaintAndPaintArtifactCompositorUpdate() {}

bool DisplayLockContext::MarkNeedsCullRectUpdate() {}

bool DisplayLockContext::MarkForCompositingUpdatesIfNeeded() {}

bool DisplayLockContext::IsElementDirtyForStyleRecalc() const {}

bool DisplayLockContext::IsElementDirtyForLayout() const {}

bool DisplayLockContext::IsElementDirtyForPrePaint() const {}

void DisplayLockContext::DidMoveToNewDocument(Document& old_document) {}

void DisplayLockContext::WillStartLifecycleUpdate(const LocalFrameView& view) {}

void DisplayLockContext::DidFinishLayout() {}

void DisplayLockContext::SetAnchorPositioningRenderStateMayHaveChanged() {}

void DisplayLockContext::NotifyWillDisconnect() {}

void DisplayLockContext::ElementDisconnected() {}

void DisplayLockContext::ElementConnected() {}

void DisplayLockContext::DetachLayoutTree() {}

void DisplayLockContext::ScheduleTopLayerCheck() {}

void DisplayLockContext::ScheduleAnimation() {}

const char* DisplayLockContext::ShouldForceUnlock() const {}

bool DisplayLockContext::ForceUnlockIfNeeded() {}

bool DisplayLockContext::ConnectedToView() const {}

void DisplayLockContext::NotifySubtreeLostFocus() {}

void DisplayLockContext::NotifySubtreeGainedFocus() {}

void DisplayLockContext::DetermineIfSubtreeHasFocus() {}

void DisplayLockContext::DetermineIfSubtreeHasTopLayerElement() {}

void DisplayLockContext::DetermineIfDescendantIsViewTransitionElement() {}

void DisplayLockContext::ResetDescendantIsViewTransitionElement() {}

void DisplayLockContext::SetDescendantIsViewTransitionElement() {}

void DisplayLockContext::ClearHasTopLayerElement() {}

void DisplayLockContext::NotifyHasTopLayerElement() {}

bool DisplayLockContext::SubtreeHasTopLayerElement() const {}

void DisplayLockContext::DetachDescendantTopLayerElements() {}

void DisplayLockContext::NotifySubtreeGainedSelection() {}

void DisplayLockContext::NotifySubtreeLostSelection() {}

void DisplayLockContext::DetermineIfSubtreeHasSelection() {}

void DisplayLockContext::SetRenderAffectingState(RenderAffectingState state,
                                                 bool new_flag) {}

void DisplayLockContext::NotifyRenderAffectingStateChanged() {}

bool DisplayLockContext::DescendantIsAnchorTargetFromOutsideDisplayLock() {}

void DisplayLockContext::Trace(Visitor* visitor) const {}

void DisplayLockContext::SetShouldUnlockAutoForPrint(bool flag) {}

const char* DisplayLockContext::RenderAffectingStateName(int state) const {}

String DisplayLockContext::RenderAffectingStateToString() const {}

void DisplayLockContext::StashScrollOffsetIfAvailable() {}

void DisplayLockContext::RestoreScrollOffsetIfStashed() {}

bool DisplayLockContext::HasStashedScrollOffset() const {}

bool DisplayLockContext::ActivatableDisplayLocksForced() const {}

void DisplayLockContext::SetAffectedByAnchorPositioning(bool val) {}

}  // namespace blink