#include "third_party/blink/renderer/core/view_transition/view_transition.h"
#include <vector>
#include "base/ranges/algorithm.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "cc/trees/layer_tree_host.h"
#include "cc/trees/paint_holding_reason.h"
#include "third_party/blink/public/platform/web_content_settings_client.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_sync_iterator_view_transition_type_set.h"
#include "third_party/blink/renderer/core/css/css_rule.h"
#include "third_party/blink/renderer/core/css/style_change_reason.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/dom_node_ids.h"
#include "third_party/blink/renderer/core/dom/pseudo_element.h"
#include "third_party/blink/renderer/core/frame/browser_controls.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.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/layout/layout_box_model_object.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/layout/layout_view_transition_root.h"
#include "third_party/blink/renderer/core/page/chrome_client.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/paint/paint_layer.h"
#include "third_party/blink/renderer/core/view_transition/dom_view_transition.h"
#include "third_party/blink/renderer/core/view_transition/view_transition_pseudo_element_base.h"
#include "third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.h"
#include "third_party/blink/renderer/platform/graphics/compositor_element_id.h"
#include "third_party/blink/renderer/platform/graphics/paint/clip_paint_property_node.h"
#include "third_party/blink/renderer/platform/heap/cross_thread_handle.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/blink/renderer/platform/wtf/wtf_size_t.h"
#include "v8-microtask-queue.h"
namespace blink {
ViewTransition::ScopedPauseRendering::ScopedPauseRendering(
const Document& document) { … }
ViewTransition::ScopedPauseRendering::~ScopedPauseRendering() = default;
bool ViewTransition::ScopedPauseRendering::ShouldThrottleRendering() const { … }
void ViewTransition::UpdateSnapshotContainingBlockStyle() { … }
const char* ViewTransition::StateToString(State state) { … }
ViewTransition* ViewTransition::CreateFromScript(
Document* document,
V8ViewTransitionCallback* callback,
const std::optional<Vector<String>>& types,
Delegate* delegate) { … }
ViewTransition* ViewTransition::CreateSkipped(
Document* document,
V8ViewTransitionCallback* callback) { … }
ViewTransition::ViewTransition(PassKey,
Document* document,
V8ViewTransitionCallback* update_dom_callback,
const std::optional<Vector<String>>& types,
Delegate* delegate)
: … { … }
ViewTransition::ViewTransition(PassKey,
Document* document,
V8ViewTransitionCallback* update_dom_callback)
: … { … }
ViewTransition* ViewTransition::CreateForSnapshotForNavigation(
Document* document,
const ViewTransitionToken& transition_token,
ViewTransitionStateCallback callback,
const Vector<String>& types,
Delegate* delegate) { … }
ViewTransition::ViewTransition(PassKey,
Document* document,
const ViewTransitionToken& transition_token,
ViewTransitionStateCallback callback,
const Vector<String>& types,
Delegate* delegate)
: … { … }
ViewTransition* ViewTransition::CreateFromSnapshotForNavigation(
Document* document,
ViewTransitionState transition_state,
Delegate* delegate) { … }
ViewTransition::ViewTransition(PassKey,
Document* document,
ViewTransitionState transition_state,
Delegate* delegate)
: … { … }
void ViewTransition::SkipTransition(PromiseResponse response) { … }
bool ViewTransition::AdvanceTo(State state) { … }
bool ViewTransition::CanAdvanceTo(State state) const { … }
bool ViewTransition::StateRunsInViewTransitionStepsDuringMainFrame(
State state) { … }
bool ViewTransition::WaitsForNotification(State state) { … }
bool ViewTransition::IsTerminalState(State state) { … }
void ViewTransition::ProcessCurrentState() { … }
ViewTransitionTypeSet* ViewTransition::Types() { … }
void ViewTransition::InitTypes(const Vector<String>& types) { … }
void ViewTransition::Trace(Visitor* visitor) const { … }
bool ViewTransition::MatchForOnlyChild(
PseudoId pseudo_id,
const AtomicString& view_transition_name) const { … }
bool ViewTransition::MatchForActiveViewTransition() { … }
bool ViewTransition::MatchForActiveViewTransitionType(
const Vector<AtomicString>& pseudo_types) { … }
void ViewTransition::ContextDestroyed() { … }
void ViewTransition::NotifyCaptureFinished() { … }
void ViewTransition::NotifyDOMCallbackFinished(bool success) { … }
bool ViewTransition::NeedsViewTransitionEffectNode(
const LayoutObject& object) const { … }
bool ViewTransition::NeedsViewTransitionClipNode(
const LayoutObject& object) const { … }
bool ViewTransition::IsRepresentedViaPseudoElements(
const LayoutObject& object) const { … }
bool ViewTransition::IsTransitionElementExcludingRoot(
const Element& node) const { … }
viz::ViewTransitionElementResourceId ViewTransition::GetSnapshotId(
const LayoutObject& object) const { … }
const scoped_refptr<cc::ViewTransitionContentLayer>&
ViewTransition::GetSubframeSnapshotLayer() const { … }
PaintPropertyChangeType ViewTransition::UpdateCaptureClip(
const LayoutObject& object,
const ClipPaintPropertyNodeOrAlias* current_clip,
const TransformPaintPropertyNodeOrAlias* current_transform) { … }
const ClipPaintPropertyNode* ViewTransition::GetCaptureClip(
const LayoutObject& object) const { … }
void ViewTransition::RunViewTransitionStepsOutsideMainFrame() { … }
void ViewTransition::RunViewTransitionStepsDuringMainFrame() { … }
bool ViewTransition::NeedsUpToDateTags() const { … }
PseudoElement* ViewTransition::CreatePseudoElement(
Element* parent,
PseudoId pseudo_id,
const AtomicString& view_transition_name) { … }
CSSStyleSheet* ViewTransition::UAStyleSheet() const { … }
void ViewTransition::WillCommitCompositorFrame() { … }
gfx::Size ViewTransition::GetSnapshotRootSize() const { … }
gfx::Vector2d ViewTransition::GetFrameToSnapshotRootOffset() const { … }
void ViewTransition::PauseRendering() { … }
void ViewTransition::OnRenderingPausedTimeout() { … }
void ViewTransition::ResumeRendering() { … }
void ViewTransition::ActivateFromSnapshot() { … }
bool ViewTransition::MaybeCrossFrameSink() const { … }
bool ViewTransition::IsGeneratingPseudo(
const ViewTransitionPseudoElementBase& pseudo_element) const { … }
}