#include "third_party/blink/renderer/core/loader/history_item.h"
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/containers/span.h"
#include "base/ranges/algorithm.h"
#include "third_party/blink/public/common/page_state/page_state.h"
#include "third_party/blink/public/common/page_state/page_state_serialization.h"
#include "third_party/blink/public/platform/web_http_body.h"
#include "third_party/blink/public/platform/web_url_request_util.h"
#include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h"
#include "third_party/blink/renderer/core/html/forms/form_controller.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_request.h"
#include "third_party/blink/renderer/platform/network/encoded_form_data.h"
#include "third_party/blink/renderer/platform/weborigin/security_policy.h"
#include "third_party/blink/renderer/platform/wtf/uuid.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/point_conversions.h"
namespace blink {
namespace {
std::vector<std::optional<std::u16string>> ToOptionalString16Vector(
base::span<const String> input) { … }
}
static int64_t GenerateSequenceNumber() { … }
HistoryItem* HistoryItem::Create(const PageState& page_state) { … }
HistoryItem::HistoryItem()
: … { … }
HistoryItem::~HistoryItem() = default;
const String& HistoryItem::UrlString() const { … }
KURL HistoryItem::Url() const { … }
const String& HistoryItem::GetReferrer() const { … }
network::mojom::ReferrerPolicy HistoryItem::GetReferrerPolicy() const { … }
void HistoryItem::SetURLString(const String& url_string) { … }
void HistoryItem::SetURL(const KURL& url) { … }
void HistoryItem::SetReferrer(const String& referrer) { … }
void HistoryItem::SetReferrerPolicy(network::mojom::ReferrerPolicy policy) { … }
HistoryItem::ViewState& HistoryItem::GetOrCreateViewState() { … }
void HistoryItem::SetVisualViewportScrollOffset(const ScrollOffset& offset) { … }
void HistoryItem::SetScrollOffset(const ScrollOffset& offset) { … }
void HistoryItem::SetPageScaleFactor(float scale_factor) { … }
void HistoryItem::SetScrollAnchorData(
const ScrollAnchorData& scroll_anchor_data) { … }
void HistoryItem::SetDocumentState(const Vector<String>& state) { … }
void HistoryItem::SetDocumentState(DocumentState* state) { … }
const Vector<String>& HistoryItem::GetDocumentState() const { … }
Vector<String> HistoryItem::GetReferencedFilePaths() const { … }
void HistoryItem::ClearDocumentState() { … }
void HistoryItem::SetStateObject(scoped_refptr<SerializedScriptValue> object) { … }
const AtomicString& HistoryItem::FormContentType() const { … }
void HistoryItem::SetFormData(scoped_refptr<EncodedFormData> form_data) { … }
void HistoryItem::SetFormContentType(const AtomicString& form_content_type) { … }
EncodedFormData* HistoryItem::FormData() const { … }
void HistoryItem::SetNavigationApiState(
scoped_refptr<SerializedScriptValue> value) { … }
ResourceRequest HistoryItem::GenerateResourceRequest(
mojom::FetchCacheMode cache_mode) { … }
void HistoryItem::Trace(Visitor* visitor) const { … }
PageState HistoryItem::ToPageState() const { … }
std::vector<std::optional<std::u16string>>
HistoryItem::GetReferencedFilePathsForSerialization() const { … }
}