#include "third_party/blink/renderer/core/view_transition/view_transition_supplement.h"
#include "cc/trees/layer_tree_host.h"
#include "cc/view_transition/view_transition_request.h"
#include "third_party/blink/public/mojom/frame/frame.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_view_transition_callback.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_view_transition_options.h"
#include "third_party/blink/renderer/core/dom/document.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/style/computed_style.h"
#include "third_party/blink/renderer/core/view_transition/dom_view_transition.h"
#include "third_party/blink/renderer/core/view_transition/page_swap_event.h"
#include "third_party/blink/renderer/core/view_transition/view_transition.h"
#include "third_party/blink/renderer/core/view_transition/view_transition_utils.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.h"
#include "third_party/blink/renderer/platform/scheduler/public/task_attribution_tracker.h"
namespace blink {
namespace {
bool HasActiveTransitionInAncestorFrame(LocalFrame* frame) { … }
void SkipTransitionInAllLocalFrames(LocalFrame* curr_frame) { … }
}
const char ViewTransitionSupplement::kSupplementName[] = …;
ViewTransitionSupplement* ViewTransitionSupplement::FromIfExists(
const Document& document) { … }
ViewTransitionSupplement* ViewTransitionSupplement::From(Document& document) { … }
DOMViewTransition* ViewTransitionSupplement::StartViewTransitionInternal(
ScriptState* script_state,
Document& document,
V8ViewTransitionCallback* callback,
const std::optional<Vector<String>>& types,
ExceptionState& exception_state) { … }
DOMViewTransition* ViewTransitionSupplement::startViewTransition(
ScriptState* script_state,
Document& document,
V8ViewTransitionCallback* callback,
ExceptionState& exception_state) { … }
DOMViewTransition* ViewTransitionSupplement::startViewTransition(
ScriptState* script_state,
Document& document,
ViewTransitionOptions* options,
ExceptionState& exception_state) { … }
DOMViewTransition* ViewTransitionSupplement::startViewTransition(
ScriptState* script_state,
Document& document,
ExceptionState& exception_state) { … }
DOMViewTransition* ViewTransitionSupplement::StartTransition(
Document& document,
V8ViewTransitionCallback* callback,
const std::optional<Vector<String>>& types,
ExceptionState& exception_state) { … }
void ViewTransitionSupplement::DidChangeVisibilityState() { … }
void ViewTransitionSupplement::SendOptInStatusToHost() { … }
void ViewTransitionSupplement::SetCrossDocumentOptIn(
mojom::blink::ViewTransitionSameOriginOptIn cross_document_opt_in) { … }
void ViewTransitionSupplement::SnapshotDocumentForNavigation(
Document& document,
const blink::ViewTransitionToken& navigation_id,
mojom::blink::PageSwapEventParamsPtr params,
ViewTransition::ViewTransitionStateCallback callback) { … }
void ViewTransitionSupplement::StartTransition(
Document& document,
const blink::ViewTransitionToken& navigation_id,
mojom::blink::PageSwapEventParamsPtr params,
ViewTransition::ViewTransitionStateCallback callback) { … }
void ViewTransitionSupplement::CreateFromSnapshotForNavigation(
Document& document,
ViewTransitionState transition_state) { … }
void ViewTransitionSupplement::AbortTransition(Document& document) { … }
void ViewTransitionSupplement::StartTransition(
Document& document,
ViewTransitionState transition_state) { … }
void ViewTransitionSupplement::OnTransitionFinished(
ViewTransition* transition) { … }
ViewTransition* ViewTransitionSupplement::GetTransition() { … }
ViewTransitionSupplement::ViewTransitionSupplement(Document& document)
: … { … }
ViewTransitionSupplement::~ViewTransitionSupplement() = default;
void ViewTransitionSupplement::Trace(Visitor* visitor) const { … }
void ViewTransitionSupplement::AddPendingRequest(
std::unique_ptr<ViewTransitionRequest> request) { … }
VectorOf<std::unique_ptr<ViewTransitionRequest>>
ViewTransitionSupplement::TakePendingRequests() { … }
void ViewTransitionSupplement::OnViewTransitionsStyleUpdated(
bool cross_document_enabled,
const Vector<String>& types) { … }
void ViewTransitionSupplement::WillInsertBody() { … }
DOMViewTransition*
ViewTransitionSupplement::ResolveCrossDocumentViewTransition() { … }
viz::ViewTransitionElementResourceId
ViewTransitionSupplement::GenerateResourceId(
const blink::ViewTransitionToken& transition_token) { … }
void ViewTransitionSupplement::InitializeResourceIdSequence(
uint32_t next_local_id) { … }
}