chromium/third_party/blink/renderer/core/frame/frame_serializer_delegate_impl.cc

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

#include "third_party/blink/renderer/core/frame/frame_serializer_delegate_impl.h"

#include "third_party/blink/public/web/web_frame_serializer.h"
#include "third_party/blink/renderer/core/dom/attribute.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/element_traversal.h"
#include "third_party/blink/renderer/core/dom/shadow_root.h"
#include "third_party/blink/renderer/core/frame/frame.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/html/forms/html_input_element.h"
#include "third_party/blink/renderer/core/html/html_anchor_element.h"
#include "third_party/blink/renderer/core/html/html_frame_element_base.h"
#include "third_party/blink/renderer/core/html/html_frame_owner_element.h"
#include "third_party/blink/renderer/core/html/html_head_element.h"
#include "third_party/blink/renderer/core/html/html_iframe_element.h"
#include "third_party/blink/renderer/core/html/html_image_element.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_template_element.h"
#include "third_party/blink/renderer/core/html/link_rel_attribute.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/layout/layout_box.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/loader/resource/image_resource_content.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/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/mhtml/mhtml_parser.h"
#include "third_party/blink/renderer/platform/weborigin/kurl.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"

namespace blink {

namespace {

const int kPopupOverlayZIndexThreshold =;
// Note that this is *not* the open web's declarative shadow DOM attribute,
// which is <template shadowrootmode>. This is a special attribute used by
// MHTML archive files to represent shadow roots.
const char kShadowModeAttributeName[] =;
const char kShadowDelegatesFocusAttributeName[] =;

}  // namespace

FormControlType;

// static
String FrameSerializerDelegateImpl::GetContentID(Frame* frame) {}

FrameSerializerDelegateImpl::FrameSerializerDelegateImpl(
    WebFrameSerializer::MHTMLPartsGenerationDelegate& web_delegate,
    HeapHashSet<WeakMember<const Element>>& shadow_template_elements)
    :{}

bool FrameSerializerDelegateImpl::ShouldIgnoreElement(const Element& element) {}

bool FrameSerializerDelegateImpl::ShouldIgnoreHiddenElement(
    const Element& element) {}

bool FrameSerializerDelegateImpl::ShouldIgnoreMetaElement(
    const Element& element) {}

bool FrameSerializerDelegateImpl::ShouldIgnorePopupOverlayElement(
    const Element& element) {}

bool FrameSerializerDelegateImpl::ShouldIgnoreAttribute(
    const Element& element,
    const Attribute& attribute) {}

bool FrameSerializerDelegateImpl::RewriteLink(const Element& element,
                                              String& rewritten_link) {}

bool FrameSerializerDelegateImpl::ShouldSkipResourceWithURL(const KURL& url) {}

Vector<Attribute> FrameSerializerDelegateImpl::GetCustomAttributes(
    const Element& element) {}

void FrameSerializerDelegateImpl::GetCustomAttributesForImageElement(
    const HTMLImageElement& element,
    Vector<Attribute>* attributes) {}

std::pair<ShadowRoot*, HTMLTemplateElement*>
FrameSerializerDelegateImpl::GetShadowTree(const Element& element) const {}

}  // namespace blink