chromium/third_party/blink/renderer/core/svg/graphics/svg_image.cc

/*
 * Copyright (C) 2006 Eric Seidel <[email protected]>
 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "third_party/blink/renderer/core/svg/graphics/svg_image.h"

#include "base/memory/scoped_refptr.h"
#include "third_party/blink/renderer/core/animation/document_animations.h"
#include "third_party/blink/renderer/core/animation/document_timeline.h"
#include "third_party/blink/renderer/core/dom/flat_tree_traversal.h"
#include "third_party/blink/renderer/core/dom/node_traversal.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/frame/settings.h"
#include "third_party/blink/renderer/core/frame/visual_viewport.h"
#include "third_party/blink/renderer/core/layout/intrinsic_sizing_info.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_root.h"
#include "third_party/blink/renderer/core/page/page_animator.h"
#include "third_party/blink/renderer/core/paint/paint_auto_dark_mode.h"
#include "third_party/blink/renderer/core/svg/animation/smil_time_container.h"
#include "third_party/blink/renderer/core/svg/graphics/isolated_svg_document_host.h"
#include "third_party/blink/renderer/core/svg/graphics/svg_image_chrome_client.h"
#include "third_party/blink/renderer/core/svg/svg_animated_preserve_aspect_ratio.h"
#include "third_party/blink/renderer/core/svg/svg_document_extensions.h"
#include "third_party/blink/renderer/core/svg/svg_fe_image_element.h"
#include "third_party/blink/renderer/core/svg/svg_foreign_object_element.h"
#include "third_party/blink/renderer/core/svg/svg_image_element.h"
#include "third_party/blink/renderer/core/svg/svg_svg_element.h"
#include "third_party/blink/renderer/core/svg/svg_view_spec.h"
#include "third_party/blink/renderer/platform/bindings/script_forbidden_scope.h"
#include "third_party/blink/renderer/platform/graphics/graphics_context.h"
#include "third_party/blink/renderer/platform/graphics/image_observer.h"
#include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_canvas.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_record.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_shader.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/scheduler/public/main_thread.h"
#include "third_party/blink/renderer/platform/scheduler/public/main_thread_scheduler.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/size_conversions.h"
#include "ui/gfx/geometry/skia_conversions.h"

namespace blink {

namespace {

bool HasSmilAnimations(const Document& document) {}

}  // namespace

void SVGImageViewInfo::Trace(Visitor* visitor) const {}

SVGImage::SVGImage(ImageObserver* observer, bool is_multipart)
    :{}

SVGImage::~SVGImage() {}

bool SVGImage::IsInSVGImage(const Node* node) {}

LocalFrame* SVGImage::GetFrame() const {}

SVGSVGElement* SVGImage::RootElement() const {}

LayoutSVGRoot* SVGImage::LayoutRoot() const {}

Page* SVGImage::GetPageForTesting() {}

void SVGImage::CheckLoaded() const {}

bool SVGImage::CurrentFrameHasSingleSecurityOrigin() const {}

gfx::Size SVGImage::SizeWithConfig(SizeConfig) const {}

const SVGImageViewInfo* SVGImage::CreateViewInfo(const String& fragment) const {}

void SVGImage::ApplyViewInfo(const SVGImageViewInfo* viewinfo) {}

bool SVGImage::GetIntrinsicSizingInfo(
    const SVGViewSpec* override_viewspec,
    IntrinsicSizingInfo& intrinsic_sizing_info) const {}

SVGImage::DrawInfo::DrawInfo(const gfx::SizeF& container_size,
                             float zoom,
                             const SVGImageViewInfo* viewinfo,
                             bool is_dark_mode_enabled)
    :{}

gfx::SizeF SVGImage::DrawInfo::CalculateResidualScale() const {}

void SVGImage::DrawForContainer(const DrawInfo& draw_info,
                                cc::PaintCanvas* canvas,
                                const cc::PaintFlags& flags,
                                const gfx::RectF& dst_rect,
                                const gfx::RectF& src_rect) {}

PaintImage SVGImage::PaintImageForCurrentFrame() {}

void SVGImage::SetPreferredColorScheme(
    mojom::blink::PreferredColorScheme preferred_color_scheme) {}

void SVGImage::DrawPatternForContainer(const DrawInfo& draw_info,
                                       GraphicsContext& context,
                                       const cc::PaintFlags& base_flags,
                                       const gfx::RectF& dst_rect,
                                       const ImageTilingInfo& tiling_info) {}

void SVGImage::PopulatePaintRecordForCurrentFrameForContainer(
    const DrawInfo& draw_info,
    PaintImageBuilder& builder) {}

bool SVGImage::ApplyShaderInternal(const DrawInfo& draw_info,
                                   cc::PaintFlags& flags,
                                   const gfx::RectF& unzoomed_src_rect,
                                   const SkMatrix& local_matrix) {}

bool SVGImage::ApplyShader(cc::PaintFlags& flags,
                           const SkMatrix& local_matrix,
                           const gfx::RectF& src_rect,
                           const ImageDrawOptions& draw_options) {}

bool SVGImage::ApplyShaderForContainer(const DrawInfo& draw_info,
                                       cc::PaintFlags& flags,
                                       const gfx::RectF& src_rect,
                                       const SkMatrix& local_matrix) {}

void SVGImage::Draw(cc::PaintCanvas* canvas,
                    const cc::PaintFlags& flags,
                    const gfx::RectF& dst_rect,
                    const gfx::RectF& src_rect,
                    const ImageDrawOptions& draw_options) {}

std::optional<PaintRecord> SVGImage::PaintRecordForCurrentFrame(
    const DrawInfo& draw_info,
    const gfx::Rect* cull_rect) {}

static bool DrawNeedsLayer(const cc::PaintFlags& flags) {}

void SVGImage::DrawInternal(const DrawInfo& draw_info,
                            cc::PaintCanvas* canvas,
                            const cc::PaintFlags& flags,
                            const gfx::RectF& dst_rect,
                            const gfx::RectF& unzoomed_src_rect) {}

void SVGImage::ScheduleTimelineRewind() {}

void SVGImage::FlushPendingTimelineRewind() {}

void SVGImage::StartAnimation() {}

void SVGImage::StopAnimation() {}

void SVGImage::ResetAnimation() {}

void SVGImage::RestoreAnimation() {}

bool SVGImage::MaybeAnimated() {}

void SVGImage::ServiceAnimations(
    base::TimeTicks monotonic_animation_start_time) {}

void SVGImage::AdvanceAnimationForTesting() {}

SVGImageChromeClient& SVGImage::ChromeClientForTesting() {}

void SVGImage::UpdateUseCounters(const Document& document) const {}

void SVGImage::MaybeRecordSvgImageProcessingTime(const Document& document) {}

Element* SVGImage::GetResourceElement(const AtomicString& id) const {}

void SVGImage::NotifyAsyncLoadCompleted() {}

Image::SizeAvailability SVGImage::DataChanged(bool all_data_received) {}

bool SVGImage::IsSizeAvailable() {}

String SVGImage::FilenameExtension() const {}

const AtomicString& SVGImage::MimeType() const {}

}  // namespace blink