Commit 4ee0fd38 authored by Eve Martin-Jones's avatar Eve Martin-Jones Committed by Commit Bot

Replace WTF_MAKE_NONCOPYABLE with DISALLOW_CORE_AND_ASSIGN in core/paint/*

This change is for files in the path
//third_party/WebKit/Source/core/paint/.

Added the include for base/macros.h where needed and moved the macro to the
end of the class as per the code guidelines enforced by lint.

This CL introduces no logic changes.

Bug: 565932
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I6578f3d2d9e6bc22e33ef69a7e9fb69297e693a5
Reviewed-on: https://chromium-review.googlesource.com/813458
Commit-Queue: Eve Martin-Jones <evem@chromium.org>
Reviewed-by: default avatarSasha Morrissey <sashab@chromium.org>
Reviewed-by: default avatarChris Watkins <watk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523639}
parent 6c656e96
......@@ -5,11 +5,11 @@
#ifndef FirstMeaningfulPaintDetector_h
#define FirstMeaningfulPaintDetector_h
#include "base/macros.h"
#include "core/CoreExport.h"
#include "core/paint/PaintEvent.h"
#include "platform/Timer.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/Noncopyable.h"
#include "public/platform/WebLayerTreeView.h"
namespace blink {
......@@ -23,7 +23,6 @@ class PaintTiming;
// See https://goo.gl/vpaxv6 and http://goo.gl/TEiMi4 for more details.
class CORE_EXPORT FirstMeaningfulPaintDetector
: public GarbageCollectedFinalized<FirstMeaningfulPaintDetector> {
WTF_MAKE_NONCOPYABLE(FirstMeaningfulPaintDetector);
public:
// Used by FrameView to keep track of the number of layout objects created
......@@ -100,6 +99,7 @@ class CORE_EXPORT FirstMeaningfulPaintDetector
DeferFirstMeaningfulPaint defer_first_meaningful_paint_ = kDoNotDefer;
TaskRunnerTimer<FirstMeaningfulPaintDetector> network0_quiet_timer_;
TaskRunnerTimer<FirstMeaningfulPaintDetector> network2_quiet_timer_;
DISALLOW_COPY_AND_ASSIGN(FirstMeaningfulPaintDetector);
};
} // namespace blink
......
......@@ -5,17 +5,16 @@
#ifndef FloatClipRecorder_h
#define FloatClipRecorder_h
#include "base/macros.h"
#include "core/paint/PaintPhase.h"
#include "platform/geometry/FloatRect.h"
#include "platform/graphics/paint/DisplayItem.h"
#include "platform/wtf/Allocator.h"
#include "platform/wtf/Noncopyable.h"
namespace blink {
class FloatClipRecorder {
USING_FAST_MALLOC(FloatClipRecorder);
WTF_MAKE_NONCOPYABLE(FloatClipRecorder);
public:
FloatClipRecorder(GraphicsContext&,
......@@ -33,6 +32,7 @@ class FloatClipRecorder {
GraphicsContext& context_;
const DisplayItemClient& client_;
DisplayItem::Type clip_type_;
DISALLOW_COPY_AND_ASSIGN(FloatClipRecorder);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef FramePaintTiming_h
#define FramePaintTiming_h
#include "base/macros.h"
#include "core/frame/LocalFrame.h"
#include "core/paint/PaintTiming.h"
#include "platform/graphics/GraphicsContext.h"
......@@ -15,7 +16,6 @@ namespace blink {
class FramePaintTiming {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(FramePaintTiming);
public:
FramePaintTiming(GraphicsContext& context, const LocalFrame* frame)
......@@ -34,6 +34,7 @@ class FramePaintTiming {
private:
GraphicsContext& context_;
Member<const LocalFrame> frame_;
DISALLOW_COPY_AND_ASSIGN(FramePaintTiming);
};
} // namespace blink
......
......@@ -6,6 +6,7 @@
#define ObjectPaintProperties_h
#include <memory>
#include "base/macros.h"
#include "base/memory/scoped_refptr.h"
#include "core/CoreExport.h"
#include "platform/graphics/paint/ClipPaintPropertyNode.h"
......@@ -33,7 +34,6 @@ namespace blink {
// are important for catching property tree structure changes which require
// updating descendant's parent pointers.
class CORE_EXPORT ObjectPaintProperties {
WTF_MAKE_NONCOPYABLE(ObjectPaintProperties);
USING_FAST_MALLOC(ObjectPaintProperties);
public:
......@@ -317,6 +317,8 @@ class CORE_EXPORT ObjectPaintProperties {
scoped_refptr<TransformPaintPropertyNode> svg_local_to_border_box_transform_;
scoped_refptr<ScrollPaintPropertyNode> scroll_;
scoped_refptr<TransformPaintPropertyNode> scroll_translation_;
DISALLOW_COPY_AND_ASSIGN(ObjectPaintProperties);
};
} // namespace blink
......
......@@ -46,6 +46,7 @@
#define PaintLayer_h
#include <memory>
#include "base/macros.h"
#include "core/CoreExport.h"
#include "core/layout/LayoutBox.h"
#include "core/paint/ClipRectsCache.h"
......@@ -86,18 +87,17 @@ enum CompositingQueryMode {
// FIXME: remove this once the compositing query DCHECKS are no longer hit.
class CORE_EXPORT DisableCompositingQueryAsserts {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(DisableCompositingQueryAsserts);
public:
DisableCompositingQueryAsserts();
private:
AutoReset<CompositingQueryMode> disabler_;
DISALLOW_COPY_AND_ASSIGN(DisableCompositingQueryAsserts);
};
struct PaintLayerRareData {
USING_FAST_MALLOC(PaintLayerRareData);
WTF_MAKE_NONCOPYABLE(PaintLayerRareData);
public:
PaintLayerRareData();
......@@ -148,6 +148,8 @@ struct PaintLayerRareData {
// The accumulated subpixel offset of a composited layer's composited bounds
// compared to absolute coordinates.
LayoutSize subpixel_accumulation;
DISALLOW_COPY_AND_ASSIGN(PaintLayerRareData);
};
// PaintLayer is an old object that handles lots of unrelated operations.
......@@ -218,7 +220,6 @@ struct PaintLayerRareData {
// be instanciated for LayoutBoxes. With the current design, it's hard to know
// that by reading the code.
class CORE_EXPORT PaintLayer : public DisplayItemClient {
WTF_MAKE_NONCOPYABLE(PaintLayer);
public:
PaintLayer(LayoutBoxModelObject&);
......@@ -1314,6 +1315,8 @@ class CORE_EXPORT PaintLayer : public DisplayItemClient {
DescendantDependentFlagsStopsAtThrottledFrames);
FRIEND_TEST_ALL_PREFIXES(PaintLayerTest,
PaintLayerTransformUpdatedOnStyleTransformAnimation);
DISALLOW_COPY_AND_ASSIGN(PaintLayer);
};
} // namespace blink
......
......@@ -30,9 +30,9 @@
#ifndef PaintLayerResourceInfo_h
#define PaintLayerResourceInfo_h
#include "base/macros.h"
#include "core/svg/SVGResourceClient.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/Noncopyable.h"
namespace blink {
......@@ -51,7 +51,6 @@ class PaintLayer;
class PaintLayerResourceInfo final
: public GarbageCollectedFinalized<PaintLayerResourceInfo>,
public SVGResourceClient {
WTF_MAKE_NONCOPYABLE(PaintLayerResourceInfo);
USING_GARBAGE_COLLECTED_MIXIN(PaintLayerResourceInfo);
public:
......@@ -75,6 +74,7 @@ class PaintLayerResourceInfo final
// |clearLayer| must be called before *m_layer becomes invalid.
PaintLayer* layer_;
Member<FilterEffect> last_effect_;
DISALLOW_COPY_AND_ASSIGN(PaintLayerResourceInfo);
};
} // namespace blink
......
......@@ -45,6 +45,7 @@
#define PaintLayerScrollableArea_h
#include <memory>
#include "base/macros.h"
#include "core/CoreExport.h"
#include "core/layout/ScrollAnchor.h"
#include "core/page/scrolling/StickyPositionScrollingConstraints.h"
......@@ -68,13 +69,13 @@ class StickyPositionScrollingConstraints;
class SubtreeLayoutScope;
struct CORE_EXPORT PaintLayerScrollableAreaRareData {
WTF_MAKE_NONCOPYABLE(PaintLayerScrollableAreaRareData);
USING_FAST_MALLOC(PaintLayerScrollableAreaRareData);
public:
PaintLayerScrollableAreaRareData();
StickyConstraintsMap sticky_constraints_map_;
DISALLOW_COPY_AND_ASSIGN(PaintLayerScrollableAreaRareData);
};
// PaintLayerScrollableArea represents the scrollable area of a LayoutBox.
......
......@@ -46,9 +46,9 @@
#define PaintLayerStackingNode_h
#include <memory>
#include "base/macros.h"
#include "core/CoreExport.h"
#include "core/layout/LayoutBoxModelObject.h"
#include "platform/wtf/Noncopyable.h"
#include "platform/wtf/Vector.h"
namespace blink {
......@@ -92,7 +92,6 @@ class LayoutBoxModelObject;
// elements.
class CORE_EXPORT PaintLayerStackingNode {
USING_FAST_MALLOC(PaintLayerStackingNode);
WTF_MAKE_NONCOPYABLE(PaintLayerStackingNode);
public:
explicit PaintLayerStackingNode(PaintLayer*);
......@@ -203,6 +202,8 @@ class CORE_EXPORT PaintLayerStackingNode {
bool layer_list_mutation_allowed_ : 1;
PaintLayerStackingNode* stacking_parent_;
#endif
DISALLOW_COPY_AND_ASSIGN(PaintLayerStackingNode);
};
inline void PaintLayerStackingNode::ClearZOrderLists() {
......
......@@ -31,8 +31,8 @@
#ifndef PaintLayerStackingNodeIterator_h
#define PaintLayerStackingNodeIterator_h
#include "base/macros.h"
#include "platform/wtf/Allocator.h"
#include "platform/wtf/Noncopyable.h"
namespace blink {
......@@ -55,7 +55,6 @@ class PaintLayer;
// NegativeZOrderChildren -> NormalFlowChildren -> PositiveZOrderChildren.
class PaintLayerStackingNodeIterator {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(PaintLayerStackingNodeIterator);
public:
PaintLayerStackingNodeIterator(const PaintLayerStackingNode& root,
......@@ -68,13 +67,13 @@ class PaintLayerStackingNodeIterator {
unsigned remaining_children_;
unsigned index_;
PaintLayer* current_normal_flow_child_;
DISALLOW_COPY_AND_ASSIGN(PaintLayerStackingNodeIterator);
};
// This iterator is similar to PaintLayerStackingNodeIterator but it walks the
// lists in reverse order (from the last item to the first one).
class PaintLayerStackingNodeReverseIterator {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(PaintLayerStackingNodeReverseIterator);
public:
PaintLayerStackingNodeReverseIterator(const PaintLayerStackingNode& root,
......@@ -92,6 +91,7 @@ class PaintLayerStackingNodeReverseIterator {
unsigned remaining_children_;
int index_;
PaintLayer* current_normal_flow_child_;
DISALLOW_COPY_AND_ASSIGN(PaintLayerStackingNodeReverseIterator);
};
} // namespace blink
......
......@@ -7,13 +7,13 @@
#include <memory>
#include "base/macros.h"
#include "core/dom/Document.h"
#include "core/paint/FirstMeaningfulPaintDetector.h"
#include "core/paint/PaintEvent.h"
#include "platform/Supplementable.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/Functional.h"
#include "platform/wtf/Noncopyable.h"
#include "public/platform/WebLayerTreeView.h"
namespace blink {
......@@ -25,7 +25,6 @@ class LocalFrame;
class CORE_EXPORT PaintTiming final
: public GarbageCollectedFinalized<PaintTiming>,
public Supplement<Document> {
WTF_MAKE_NONCOPYABLE(PaintTiming);
USING_GARBAGE_COLLECTED_MIXIN(PaintTiming);
friend class FirstMeaningfulPaintDetector;
using ReportTimeCallback =
......@@ -200,6 +199,8 @@ class CORE_EXPORT PaintTiming final
FRIEND_TEST_ALL_PREFIXES(
FirstMeaningfulPaintDetectorTest,
ProvisionalTimestampChangesAfterNetworkQuietWithOutstandingSwapPromise);
DISALLOW_COPY_AND_ASSIGN(PaintTiming);
};
} // namespace blink
......
......@@ -6,6 +6,7 @@
#define SVGFilterPainter_h
#include <memory>
#include "base/macros.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/paint/PaintController.h"
#include "platform/wtf/Allocator.h"
......@@ -17,7 +18,6 @@ class LayoutSVGResourceFilter;
class SVGFilterRecordingContext {
USING_FAST_MALLOC(SVGFilterRecordingContext);
WTF_MAKE_NONCOPYABLE(SVGFilterRecordingContext);
public:
explicit SVGFilterRecordingContext(GraphicsContext& initial_context)
......@@ -33,6 +33,7 @@ class SVGFilterRecordingContext {
std::unique_ptr<PaintController> paint_controller_;
std::unique_ptr<GraphicsContext> context_;
GraphicsContext& initial_context_;
DISALLOW_COPY_AND_ASSIGN(SVGFilterRecordingContext);
};
class SVGFilterPainter {
......
......@@ -27,6 +27,7 @@
#define CompositedLayerMapping_h
#include <memory>
#include "base/macros.h"
#include "core/paint/PaintLayer.h"
#include "core/paint/PaintLayerPaintingInfo.h"
#include "core/paint/compositing/GraphicsLayerUpdater.h"
......@@ -84,7 +85,6 @@ enum GraphicsLayerUpdateScope {
// - Otherwise the PaintLayer doesn't own or directly reference any
// CompositedLayerMapping.
class CORE_EXPORT CompositedLayerMapping final : public GraphicsLayerClient {
WTF_MAKE_NONCOPYABLE(CompositedLayerMapping);
USING_FAST_MALLOC(CompositedLayerMapping);
public:
......@@ -738,6 +738,7 @@ class CORE_EXPORT CompositedLayerMapping final : public GraphicsLayerClient {
bool draws_background_onto_content_layer_;
friend class CompositedLayerMappingTest;
DISALLOW_COPY_AND_ASSIGN(CompositedLayerMapping);
};
} // namespace blink
......
......@@ -5,11 +5,11 @@
#ifndef CompositingReasonFinder_h
#define CompositingReasonFinder_h
#include "base/macros.h"
#include "core/CoreExport.h"
#include "core/paint/compositing/CompositingTriggers.h"
#include "platform/graphics/CompositingReasons.h"
#include "platform/wtf/Allocator.h"
#include "platform/wtf/Noncopyable.h"
namespace blink {
......@@ -20,7 +20,6 @@ class LayoutView;
class CORE_EXPORT CompositingReasonFinder {
DISALLOW_NEW();
WTF_MAKE_NONCOPYABLE(CompositingReasonFinder);
public:
explicit CompositingReasonFinder(LayoutView&);
......@@ -57,6 +56,7 @@ class CORE_EXPORT CompositingReasonFinder {
bool ignore_lcd_text) const;
LayoutView& layout_view_;
CompositingTriggerFlags compositing_triggers_;
DISALLOW_COPY_AND_ASSIGN(CompositingReasonFinder);
};
} // namespace blink
......
......@@ -26,6 +26,7 @@
#include "core/paint/compositing/CompositingRequirementsUpdater.h"
#include "base/macros.h"
#include "core/layout/LayoutEmbeddedContent.h"
#include "core/layout/LayoutView.h"
#include "core/layout/api/LayoutViewItem.h"
......@@ -73,7 +74,6 @@ struct OverlapMapContainers {
};
class CompositingRequirementsUpdater::OverlapMap {
WTF_MAKE_NONCOPYABLE(OverlapMap);
public:
OverlapMap() {
......@@ -140,6 +140,7 @@ class CompositingRequirementsUpdater::OverlapMap {
private:
Vector<OverlapMapContainers> overlap_stack_;
DISALLOW_COPY_AND_ASSIGN(OverlapMap);
};
class CompositingRequirementsUpdater::RecursionData {
......
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