#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/frame/frame_serializer.h"
#include "third_party/blink/renderer/core/css/css_font_face_rule.h"
#include "third_party/blink/renderer/core/css/css_font_face_src_value.h"
#include "third_party/blink/renderer/core/css/css_image_value.h"
#include "third_party/blink/renderer/core/css/css_import_rule.h"
#include "third_party/blink/renderer/core/css/css_property_value_set.h"
#include "third_party/blink/renderer/core/css/css_rule_list.h"
#include "third_party/blink/renderer/core/css/css_style_declaration.h"
#include "third_party/blink/renderer/core/css/css_style_rule.h"
#include "third_party/blink/renderer/core/css/css_style_sheet.h"
#include "third_party/blink/renderer/core/css/css_value_list.h"
#include "third_party/blink/renderer/core/css/style_rule.h"
#include "third_party/blink/renderer/core/css/style_sheet_contents.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/dom/text.h"
#include "third_party/blink/renderer/core/editing/serializers/markup_accumulator.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/html/forms/html_input_element.h"
#include "third_party/blink/renderer/core/html/html_frame_element_base.h"
#include "third_party/blink/renderer/core/html/html_head_element.h"
#include "third_party/blink/renderer/core/html/html_image_element.h"
#include "third_party/blink/renderer/core/html/html_image_loader.h"
#include "third_party/blink/renderer/core/html/html_link_element.h"
#include "third_party/blink/renderer/core/html/html_meta_element.h"
#include "third_party/blink/renderer/core/html/html_no_script_element.h"
#include "third_party/blink/renderer/core/html/html_picture_element.h"
#include "third_party/blink/renderer/core/html/html_plugin_element.h"
#include "third_party/blink/renderer/core/html/html_script_element.h"
#include "third_party/blink/renderer/core/html/html_style_element.h"
#include "third_party/blink/renderer/core/html/image_document.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/input_type_names.h"
#include "third_party/blink/renderer/core/loader/resource/font_resource.h"
#include "third_party/blink/renderer/core/loader/resource/image_resource_content.h"
#include "third_party/blink/renderer/core/style/style_fetched_image.h"
#include "third_party/blink/renderer/core/style/style_image.h"
#include "third_party/blink/renderer/platform/graphics/image.h"
#include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_set.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/mhtml/serialized_resource.h"
#include "third_party/blink/renderer/platform/wtf/hash_set.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
#include "third_party/blink/renderer/platform/wtf/text/text_encoding.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/blink/renderer/platform/wtf/uuid.h"
namespace blink {
FormControlType;
class SerializerMarkupAccumulator : public MarkupAccumulator { … };
SerializerMarkupAccumulator::SerializerMarkupAccumulator(
FrameSerializer::Delegate& delegate,
FrameSerializerResourceDelegate& resource_delegate,
Document& document)
: … { … }
SerializerMarkupAccumulator::~SerializerMarkupAccumulator() = default;
void SerializerMarkupAccumulator::AppendCustomAttributes(
const Element& element) { … }
bool SerializerMarkupAccumulator::ShouldIgnoreAttribute(
const Element& element,
const Attribute& attribute) const { … }
bool SerializerMarkupAccumulator::ShouldIgnoreElement(
const Element& element) const { … }
AtomicString SerializerMarkupAccumulator::AppendElement(
const Element& element) { … }
void SerializerMarkupAccumulator::AppendExtraForHeadElement(
const Element& element) { … }
void SerializerMarkupAccumulator::AppendStylesheets(Document* document,
bool style_element_only) { … }
void SerializerMarkupAccumulator::AppendAttribute(const Element& element,
const Attribute& attribute) { … }
std::pair<ShadowRoot*, HTMLTemplateElement*>
SerializerMarkupAccumulator::GetShadowTree(const Element& element) const { … }
void SerializerMarkupAccumulator::AppendAttributeValue(
const String& attribute_value) { … }
void SerializerMarkupAccumulator::AppendRewrittenAttribute(
const Element& element,
const String& attribute_name,
const String& attribute_value) { … }
FrameSerializer::FrameSerializer(Deque<SerializedResource>& resources,
Delegate& delegate)
: … { … }
void FrameSerializer::SerializeFrame(const LocalFrame& frame) { … }
void FrameSerializer::AddResourceForElement(Document& document,
const Element& element) { … }
void FrameSerializer::SerializeCSSStyleSheet(CSSStyleSheet& style_sheet,
const KURL& url) { … }
void FrameSerializer::SerializeCSSRule(CSSRule* rule) { … }
bool FrameSerializer::ShouldAddURL(const KURL& url) { … }
void FrameSerializer::AddToResources(
const String& mime_type,
scoped_refptr<const SharedBuffer> data,
const KURL& url) { … }
void FrameSerializer::AddImageToResources(ImageResourceContent* image,
const KURL& url) { … }
void FrameSerializer::AddFontToResources(FontResource& font) { … }
void FrameSerializer::RetrieveResourcesForProperties(
const CSSPropertyValueSet* style_declaration,
Document& document) { … }
void FrameSerializer::RetrieveResourcesForCSSValue(const CSSValue& css_value,
Document& document) { … }
String FrameSerializer::MarkOfTheWebDeclaration(const KURL& url) { … }
}