Commit 31bc6d1e authored by Sundoo Kim's avatar Sundoo Kim Committed by Commit Bot

Replace DISALLOW_COPY_AND_ASSIGN with =delete in blink/../layout/svg

Explicitly remove the copy constructor and assignment operator with
the delete keyword.

R=atotic@chromium.org, svillar@chromium.org

Bug: 1010217
Change-Id: I12a768919d9b5d5e4e9884a527296b2f7ad44b7e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2358711Reviewed-by: default avatarAleks Totic <atotic@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#798633}
parent 2da2b873
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_LAYOUT_SVG_SHAPE_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_LAYOUT_SVG_SHAPE_H_
#include <memory> #include <memory>
#include "base/macros.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_model_object.h" #include "third_party/blink/renderer/core/layout/svg/layout_svg_model_object.h"
#include "third_party/blink/renderer/core/layout/svg/svg_marker_data.h" #include "third_party/blink/renderer/core/layout/svg/svg_marker_data.h"
#include "third_party/blink/renderer/platform/geometry/float_rect.h" #include "third_party/blink/renderer/platform/geometry/float_rect.h"
...@@ -50,9 +49,10 @@ struct LayoutSVGShapeRareData { ...@@ -50,9 +49,10 @@ struct LayoutSVGShapeRareData {
public: public:
LayoutSVGShapeRareData() = default; LayoutSVGShapeRareData() = default;
LayoutSVGShapeRareData(const LayoutSVGShapeRareData&) = delete;
LayoutSVGShapeRareData& operator=(const LayoutSVGShapeRareData) = delete;
Path non_scaling_stroke_path_; Path non_scaling_stroke_path_;
AffineTransform non_scaling_stroke_transform_; AffineTransform non_scaling_stroke_transform_;
DISALLOW_COPY_AND_ASSIGN(LayoutSVGShapeRareData);
}; };
class LayoutSVGShape : public LayoutSVGModelObject { class LayoutSVGShape : public LayoutSVGModelObject {
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <memory> #include <memory>
#include "base/macros.h"
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_container.h" #include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_container.h"
#include "third_party/blink/renderer/core/svg/svg_resource_client.h" #include "third_party/blink/renderer/core/svg/svg_resource_client.h"
...@@ -49,6 +48,8 @@ class SVGResources { ...@@ -49,6 +48,8 @@ class SVGResources {
public: public:
SVGResources(); SVGResources();
SVGResources(const SVGResources&) = delete;
SVGResources& operator=(const SVGResources&) = delete;
static SVGElementResourceClient* GetClient(const LayoutObject&); static SVGElementResourceClient* GetClient(const LayoutObject&);
static FloatRect ReferenceBoxForEffects(const LayoutObject&); static FloatRect ReferenceBoxForEffects(const LayoutObject&);
...@@ -190,7 +191,6 @@ class SVGResources { ...@@ -190,7 +191,6 @@ class SVGResources {
std::unique_ptr<MarkerData> marker_data_; std::unique_ptr<MarkerData> marker_data_;
std::unique_ptr<FillStrokeData> fill_stroke_data_; std::unique_ptr<FillStrokeData> fill_stroke_data_;
LayoutSVGResourceContainer* linked_resource_; LayoutSVGResourceContainer* linked_resource_;
DISALLOW_COPY_AND_ASSIGN(SVGResources);
}; };
class FilterData final : public GarbageCollected<FilterData> { class FilterData final : public GarbageCollected<FilterData> {
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_RESOURCES_CACHE_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_RESOURCES_CACHE_H_
#include <memory> #include <memory>
#include "base/macros.h"
#include "third_party/blink/renderer/core/style/style_difference.h" #include "third_party/blink/renderer/core/style/style_difference.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/hash_map.h" #include "third_party/blink/renderer/platform/wtf/hash_map.h"
...@@ -37,6 +36,8 @@ class SVGResourcesCache { ...@@ -37,6 +36,8 @@ class SVGResourcesCache {
public: public:
SVGResourcesCache(); SVGResourcesCache();
SVGResourcesCache(const SVGResourcesCache&) = delete;
SVGResourcesCache& operator=(const SVGResourcesCache&) = delete;
~SVGResourcesCache(); ~SVGResourcesCache();
static SVGResources* CachedResourcesForLayoutObject(const LayoutObject&); static SVGResources* CachedResourcesForLayoutObject(const LayoutObject&);
...@@ -70,6 +71,8 @@ class SVGResourcesCache { ...@@ -70,6 +71,8 @@ class SVGResourcesCache {
TemporaryStyleScope(LayoutObject&, TemporaryStyleScope(LayoutObject&,
const ComputedStyle& original_style, const ComputedStyle& original_style,
const ComputedStyle& temporary_style); const ComputedStyle& temporary_style);
TemporaryStyleScope(const TemporaryStyleScope&) = delete;
TemporaryStyleScope& operator=(const TemporaryStyleScope) = delete;
~TemporaryStyleScope(); ~TemporaryStyleScope();
private: private:
...@@ -79,7 +82,6 @@ class SVGResourcesCache { ...@@ -79,7 +82,6 @@ class SVGResourcesCache {
const ComputedStyle& original_style_; const ComputedStyle& original_style_;
const ComputedStyle& temporary_style_; const ComputedStyle& temporary_style_;
const bool styles_are_equal_; const bool styles_are_equal_;
DISALLOW_COPY_AND_ASSIGN(TemporaryStyleScope);
}; };
private: private:
...@@ -97,7 +99,6 @@ class SVGResourcesCache { ...@@ -97,7 +99,6 @@ class SVGResourcesCache {
typedef HashMap<const LayoutObject*, std::unique_ptr<SVGResources>> CacheMap; typedef HashMap<const LayoutObject*, std::unique_ptr<SVGResources>> CacheMap;
CacheMap cache_; CacheMap cache_;
DISALLOW_COPY_AND_ASSIGN(SVGResourcesCache);
}; };
} // namespace blink } // namespace blink
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_RESOURCES_CYCLE_SOLVER_H_ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_RESOURCES_CYCLE_SOLVER_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_RESOURCES_CYCLE_SOLVER_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_RESOURCES_CYCLE_SOLVER_H_
#include "base/macros.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_container.h" #include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_container.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/hash_set.h" #include "third_party/blink/renderer/platform/wtf/hash_set.h"
...@@ -36,6 +35,8 @@ class SVGResourcesCycleSolver { ...@@ -36,6 +35,8 @@ class SVGResourcesCycleSolver {
public: public:
SVGResourcesCycleSolver(); SVGResourcesCycleSolver();
SVGResourcesCycleSolver(const SVGResourcesCycleSolver&) = delete;
SVGResourcesCycleSolver& operator=(const SVGResourcesCycleSolver&) = delete;
~SVGResourcesCycleSolver(); ~SVGResourcesCycleSolver();
bool IsKnownAcyclic(const LayoutSVGResourceContainer*) const; bool IsKnownAcyclic(const LayoutSVGResourceContainer*) const;
...@@ -71,7 +72,6 @@ class SVGResourcesCycleSolver { ...@@ -71,7 +72,6 @@ class SVGResourcesCycleSolver {
using ResourceSet = HashSet<const LayoutSVGResourceContainer*>; using ResourceSet = HashSet<const LayoutSVGResourceContainer*>;
ResourceSet active_resources_; ResourceSet active_resources_;
ResourceSet dag_cache_; ResourceSet dag_cache_;
DISALLOW_COPY_AND_ASSIGN(SVGResourcesCycleSolver);
}; };
} // namespace blink } // namespace blink
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_CHUNK_BUILDER_H_ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_CHUNK_BUILDER_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_CHUNK_BUILDER_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_CHUNK_BUILDER_H_
#include "base/macros.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/vector.h" #include "third_party/blink/renderer/platform/wtf/vector.h"
...@@ -45,6 +44,8 @@ class SVGTextChunkBuilder { ...@@ -45,6 +44,8 @@ class SVGTextChunkBuilder {
public: public:
SVGTextChunkBuilder(); SVGTextChunkBuilder();
SVGTextChunkBuilder(const SVGTextChunkBuilder&) = delete;
SVGTextChunkBuilder& operator=(const SVGTextChunkBuilder&) = delete;
void ProcessTextChunks(const Vector<SVGInlineTextBox*>&); void ProcessTextChunks(const Vector<SVGInlineTextBox*>&);
...@@ -65,8 +66,6 @@ class SVGTextChunkBuilder { ...@@ -65,8 +66,6 @@ class SVGTextChunkBuilder {
void ProcessTextAnchorCorrection(bool is_vertical_text, void ProcessTextAnchorCorrection(bool is_vertical_text,
float text_anchor_shift, float text_anchor_shift,
Vector<SVGTextFragment>&); Vector<SVGTextFragment>&);
DISALLOW_COPY_AND_ASSIGN(SVGTextChunkBuilder);
}; };
class SVGTextPathChunkBuilder final : public SVGTextChunkBuilder { class SVGTextPathChunkBuilder final : public SVGTextChunkBuilder {
...@@ -74,6 +73,8 @@ class SVGTextPathChunkBuilder final : public SVGTextChunkBuilder { ...@@ -74,6 +73,8 @@ class SVGTextPathChunkBuilder final : public SVGTextChunkBuilder {
public: public:
SVGTextPathChunkBuilder(); SVGTextPathChunkBuilder();
SVGTextPathChunkBuilder(const SVGTextPathChunkBuilder&) = delete;
SVGTextPathChunkBuilder& operator=(const SVGTextPathChunkBuilder&) = delete;
float TotalLength() const { return total_length_; } float TotalLength() const { return total_length_; }
unsigned TotalCharacters() const { return total_characters_; } unsigned TotalCharacters() const { return total_characters_; }
...@@ -84,8 +85,6 @@ class SVGTextPathChunkBuilder final : public SVGTextChunkBuilder { ...@@ -84,8 +85,6 @@ class SVGTextPathChunkBuilder final : public SVGTextChunkBuilder {
float total_length_; float total_length_;
unsigned total_characters_; unsigned total_characters_;
DISALLOW_COPY_AND_ASSIGN(SVGTextPathChunkBuilder);
}; };
// Compute the "shift" induced by the 'text-anchor' property. // Compute the "shift" induced by the 'text-anchor' property.
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_LAYOUT_ATTRIBUTES_BUILDER_H_ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_LAYOUT_ATTRIBUTES_BUILDER_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_LAYOUT_ATTRIBUTES_BUILDER_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_LAYOUT_ATTRIBUTES_BUILDER_H_
#include "base/macros.h"
#include "third_party/blink/renderer/core/layout/svg/svg_character_data.h" #include "third_party/blink/renderer/core/layout/svg/svg_character_data.h"
#include "third_party/blink/renderer/platform/heap/handle.h" #include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
...@@ -46,6 +45,10 @@ class SVGTextLayoutAttributesBuilder { ...@@ -46,6 +45,10 @@ class SVGTextLayoutAttributesBuilder {
public: public:
explicit SVGTextLayoutAttributesBuilder(LayoutSVGText&); explicit SVGTextLayoutAttributesBuilder(LayoutSVGText&);
SVGTextLayoutAttributesBuilder(const SVGTextLayoutAttributesBuilder&) =
delete;
SVGTextLayoutAttributesBuilder& operator=(
const SVGTextLayoutAttributesBuilder&) = delete;
void BuildLayoutAttributes(); void BuildLayoutAttributes();
...@@ -75,8 +78,6 @@ class SVGTextLayoutAttributesBuilder { ...@@ -75,8 +78,6 @@ class SVGTextLayoutAttributesBuilder {
unsigned character_count_; unsigned character_count_;
HeapVector<TextPosition> text_positions_; HeapVector<TextPosition> text_positions_;
SVGCharacterDataMap character_data_map_; SVGCharacterDataMap character_data_map_;
DISALLOW_COPY_AND_ASSIGN(SVGTextLayoutAttributesBuilder);
}; };
} // namespace blink } // namespace blink
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_LAYOUT_ENGINE_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_LAYOUT_ENGINE_H_
#include <memory> #include <memory>
#include "base/macros.h"
#include "third_party/blink/renderer/core/layout/api/line_layout_svg_inline_text.h" #include "third_party/blink/renderer/core/layout/api/line_layout_svg_inline_text.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_inline_text.h" #include "third_party/blink/renderer/core/layout/svg/layout_svg_inline_text.h"
#include "third_party/blink/renderer/core/layout/svg/svg_text_fragment.h" #include "third_party/blink/renderer/core/layout/svg/svg_text_fragment.h"
...@@ -51,6 +50,8 @@ class SVGTextLayoutEngine { ...@@ -51,6 +50,8 @@ class SVGTextLayoutEngine {
public: public:
SVGTextLayoutEngine(const Vector<LayoutSVGInlineText*>&); SVGTextLayoutEngine(const Vector<LayoutSVGInlineText*>&);
SVGTextLayoutEngine(const SVGTextLayoutEngine&) = delete;
SVGTextLayoutEngine& operator=(const SVGTextLayoutEngine&) = delete;
~SVGTextLayoutEngine(); ~SVGTextLayoutEngine();
void LayoutCharactersInTextBoxes(InlineFlowBox* start); void LayoutCharactersInTextBoxes(InlineFlowBox* start);
...@@ -98,7 +99,6 @@ class SVGTextLayoutEngine { ...@@ -98,7 +99,6 @@ class SVGTextLayoutEngine {
float text_path_displacement_; float text_path_displacement_;
float text_path_spacing_; float text_path_spacing_;
float text_path_scaling_; float text_path_scaling_;
DISALLOW_COPY_AND_ASSIGN(SVGTextLayoutEngine);
}; };
} // namespace blink } // namespace blink
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_LAYOUT_ENGINE_BASELINE_H_ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_LAYOUT_ENGINE_BASELINE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_LAYOUT_ENGINE_BASELINE_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_LAYOUT_ENGINE_BASELINE_H_
#include "base/macros.h"
#include "third_party/blink/renderer/core/layout/api/line_layout_item.h" #include "third_party/blink/renderer/core/layout/api/line_layout_item.h"
#include "third_party/blink/renderer/core/style/svg_computed_style_defs.h" #include "third_party/blink/renderer/core/style/svg_computed_style_defs.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
...@@ -38,6 +37,9 @@ class SVGTextLayoutEngineBaseline { ...@@ -38,6 +37,9 @@ class SVGTextLayoutEngineBaseline {
public: public:
SVGTextLayoutEngineBaseline(const Font&, float effective_zoom); SVGTextLayoutEngineBaseline(const Font&, float effective_zoom);
SVGTextLayoutEngineBaseline(const SVGTextLayoutEngineBaseline&) = delete;
SVGTextLayoutEngineBaseline& operator=(const SVGTextLayoutEngineBaseline&) =
delete;
float CalculateBaselineShift(const ComputedStyle&) const; float CalculateBaselineShift(const ComputedStyle&) const;
float CalculateAlignmentBaselineShift(bool is_vertical_text, float CalculateAlignmentBaselineShift(bool is_vertical_text,
...@@ -54,7 +56,6 @@ class SVGTextLayoutEngineBaseline { ...@@ -54,7 +56,6 @@ class SVGTextLayoutEngineBaseline {
// layout inside SVG takes place in unzoomed coordinates we have to compensate // layout inside SVG takes place in unzoomed coordinates we have to compensate
// for zoom when reading values from the font descriptor. // for zoom when reading values from the font descriptor.
float effective_zoom_; float effective_zoom_;
DISALLOW_COPY_AND_ASSIGN(SVGTextLayoutEngineBaseline);
}; };
} // namespace blink } // namespace blink
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_LAYOUT_ENGINE_SPACING_H_ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_LAYOUT_ENGINE_SPACING_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_LAYOUT_ENGINE_SPACING_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_SVG_TEXT_LAYOUT_ENGINE_SPACING_H_
#include "base/macros.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/text/unicode.h" #include "third_party/blink/renderer/platform/wtf/text/unicode.h"
...@@ -35,6 +34,9 @@ class SVGTextLayoutEngineSpacing { ...@@ -35,6 +34,9 @@ class SVGTextLayoutEngineSpacing {
public: public:
SVGTextLayoutEngineSpacing(const Font&, float effective_zoom); SVGTextLayoutEngineSpacing(const Font&, float effective_zoom);
SVGTextLayoutEngineSpacing(const SVGTextLayoutEngineSpacing&) = delete;
SVGTextLayoutEngineSpacing& operator=(const SVGTextLayoutEngineSpacing&) =
delete;
float CalculateCSSSpacing(UChar current_character); float CalculateCSSSpacing(UChar current_character);
...@@ -42,7 +44,6 @@ class SVGTextLayoutEngineSpacing { ...@@ -42,7 +44,6 @@ class SVGTextLayoutEngineSpacing {
const Font& font_; const Font& font_;
UChar last_character_; UChar last_character_;
float effective_zoom_; float effective_zoom_;
DISALLOW_COPY_AND_ASSIGN(SVGTextLayoutEngineSpacing);
}; };
} // namespace blink } // namespace blink
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment