chromium/third_party/blink/renderer/core/layout/svg/svg_layout_tree_as_text.cc

/*
 * Copyright (C) 2004, 2005, 2007, 2009 Apple Inc. All rights reserved.
 *           (C) 2005 Rob Buis <[email protected]>
 *           (C) 2006 Alexander Kellett <[email protected]>
 * Copyright (C) Research In Motion Limited 2010. 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 COMPUTER, 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 COMPUTER, 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/layout/svg/svg_layout_tree_as_text.h"

#include "third_party/blink/renderer/core/css/properties/longhands.h"
#include "third_party/blink/renderer/core/layout/layout_tree_as_text.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_image.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_inline.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_inline_text.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_clipper.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_filter.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_linear_gradient.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_marker.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_masker.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_pattern.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_radial_gradient.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_root.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_shape.h"
#include "third_party/blink/renderer/core/layout/svg/svg_layout_support.h"
#include "third_party/blink/renderer/core/layout/svg/svg_resources.h"
#include "third_party/blink/renderer/core/paint/paint_layer.h"
#include "third_party/blink/renderer/core/style/reference_clip_path_operation.h"
#include "third_party/blink/renderer/core/style/style_svg_resource.h"
#include "third_party/blink/renderer/core/svg/graphics/filters/svg_filter_builder.h"
#include "third_party/blink/renderer/core/svg/linear_gradient_attributes.h"
#include "third_party/blink/renderer/core/svg/pattern_attributes.h"
#include "third_party/blink/renderer/core/svg/radial_gradient_attributes.h"
#include "third_party/blink/renderer/core/svg/svg_animated_angle.h"
#include "third_party/blink/renderer/core/svg/svg_animated_length.h"
#include "third_party/blink/renderer/core/svg/svg_animated_point_list.h"
#include "third_party/blink/renderer/core/svg/svg_circle_element.h"
#include "third_party/blink/renderer/core/svg/svg_ellipse_element.h"
#include "third_party/blink/renderer/core/svg/svg_enumeration_map.h"
#include "third_party/blink/renderer/core/svg/svg_filter_element.h"
#include "third_party/blink/renderer/core/svg/svg_length_context.h"
#include "third_party/blink/renderer/core/svg/svg_length_functions.h"
#include "third_party/blink/renderer/core/svg/svg_line_element.h"
#include "third_party/blink/renderer/core/svg/svg_linear_gradient_element.h"
#include "third_party/blink/renderer/core/svg/svg_path_element.h"
#include "third_party/blink/renderer/core/svg/svg_path_utilities.h"
#include "third_party/blink/renderer/core/svg/svg_pattern_element.h"
#include "third_party/blink/renderer/core/svg/svg_point_list.h"
#include "third_party/blink/renderer/core/svg/svg_poly_element.h"
#include "third_party/blink/renderer/core/svg/svg_radial_gradient_element.h"
#include "third_party/blink/renderer/core/svg/svg_rect_element.h"
#include "third_party/blink/renderer/platform/graphics/dash_array.h"
#include "third_party/blink/renderer/platform/graphics/filters/filter.h"
#include "third_party/blink/renderer/platform/graphics/filters/source_graphic.h"
#include "third_party/blink/renderer/platform/graphics/graphics_types.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"

namespace blink {

/** class + iomanip to help streaming list separators, i.e. ", " in string "a,
 * b, c, d"
 * Can be used in cases where you don't know which item in the list is the first
 * one to be printed, but still want to avoid strings like ", b, c".
 */
class TextStreamSeparator {};

WTF::TextStream& operator<<(WTF::TextStream& ts, TextStreamSeparator& sep) {}

template <typename ValueType>
static void WriteNameValuePair(WTF::TextStream& ts,
                               const char* name,
                               ValueType value) {}

static void WriteSVGResourceIfNotNull(WTF::TextStream& ts,
                                      const char* name,
                                      const StyleSVGResource* value,
                                      TreeScope& tree_scope) {}

template <typename ValueType>
static void WriteNameAndQuotedValue(WTF::TextStream& ts,
                                    const char* name,
                                    ValueType value) {}

template <typename ValueType>
static void WriteIfNotDefault(WTF::TextStream& ts,
                              const char* name,
                              ValueType value,
                              ValueType default_value) {}

WTF::TextStream& operator<<(WTF::TextStream& ts,
                            const AffineTransform& transform) {}

static WTF::TextStream& operator<<(WTF::TextStream& ts, const WindRule rule) {}

static WTF::TextStream& operator<<(WTF::TextStream& ts,
                                   const SVGUnitTypes::SVGUnitType& unit_type) {}

static WTF::TextStream& operator<<(WTF::TextStream& ts,
                                   const SVGMarkerUnitsType& marker_unit) {}

static WTF::TextStream& operator<<(WTF::TextStream& ts,
                                   const SVGMarkerOrientType& orient_type) {}

// FIXME: Maybe this should be in platform/graphics/graphics_types.cc
static WTF::TextStream& operator<<(WTF::TextStream& ts, LineCap style) {}

// FIXME: Maybe this should be in platform/graphics/graphics_types.cc
static WTF::TextStream& operator<<(WTF::TextStream& ts, LineJoin style) {}

static WTF::TextStream& operator<<(WTF::TextStream& ts,
                                   const SVGSpreadMethodType& type) {}

static void WriteSVGPaintingResource(WTF::TextStream& ts,
                                     const SVGResource& resource) {}

static bool WriteSVGPaint(WTF::TextStream& ts,
                          const LayoutObject& object,
                          const SVGPaint& paint,
                          const Longhand& property,
                          const char* paint_name) {}

static void WriteStyle(WTF::TextStream& ts, const LayoutObject& object) {}

static WTF::TextStream& WritePositionAndStyle(WTF::TextStream& ts,
                                              const LayoutObject& object) {}

static WTF::TextStream& operator<<(WTF::TextStream& ts,
                                   const LayoutSVGShape& shape) {}

static WTF::TextStream& operator<<(WTF::TextStream& ts,
                                   const LayoutSVGRoot& root) {}

static void WriteStandardPrefix(WTF::TextStream& ts,
                                const LayoutObject& object,
                                int indent) {}

static void WriteChildren(WTF::TextStream& ts,
                          const LayoutObject& object,
                          int indent) {}

static inline void WriteCommonGradientProperties(
    WTF::TextStream& ts,
    const GradientAttributes& attrs) {}

void WriteSVGResourceContainer(WTF::TextStream& ts,
                               const LayoutObject& object,
                               int indent) {}

void WriteSVGContainer(WTF::TextStream& ts,
                       const LayoutObject& container,
                       int indent) {}

void Write(WTF::TextStream& ts, const LayoutSVGRoot& root, int indent) {}

void WriteSVGInline(WTF::TextStream& ts,
                    const LayoutSVGInline& text,
                    int indent) {}

void WriteSVGInlineText(WTF::TextStream& ts,
                        const LayoutSVGInlineText& text,
                        int indent) {}

void WriteSVGImage(WTF::TextStream& ts,
                   const LayoutSVGImage& image,
                   int indent) {}

void Write(WTF::TextStream& ts, const LayoutSVGShape& shape, int indent) {}

// Get the LayoutSVGResourceFilter from the 'filter' property iff the 'filter'
// is a single url(...) reference.
static LayoutSVGResourceFilter* GetFilterResourceForSVG(
    SVGResourceClient& client,
    const ComputedStyle& style) {}

static void WriteSVGResourceReferencePrefix(
    WTF::TextStream& ts,
    const char* resource_name,
    const LayoutSVGResourceContainer* resource_object,
    const AtomicString& url,
    const TreeScope& tree_scope,
    int indent) {}

void WriteResources(WTF::TextStream& ts,
                    const LayoutObject& object,
                    int indent) {}

}  // namespace blink