Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Side by Side Diff: Source/core/rendering/ClipPathOperation.h

Issue 129173004: Update rendering classes to use OVERRIDE / FINAL when needed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/rendering/CompositedLayerMapping.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 protected: 57 protected:
58 ClipPathOperation(OperationType type) 58 ClipPathOperation(OperationType type)
59 : m_type(type) 59 : m_type(type)
60 { 60 {
61 } 61 }
62 62
63 OperationType m_type; 63 OperationType m_type;
64 }; 64 };
65 65
66 class ReferenceClipPathOperation : public ClipPathOperation { 66 class ReferenceClipPathOperation FINAL : public ClipPathOperation {
67 public: 67 public:
68 static PassRefPtr<ReferenceClipPathOperation> create(const String& url, cons t AtomicString& fragment) 68 static PassRefPtr<ReferenceClipPathOperation> create(const String& url, cons t AtomicString& fragment)
69 { 69 {
70 return adoptRef(new ReferenceClipPathOperation(url, fragment)); 70 return adoptRef(new ReferenceClipPathOperation(url, fragment));
71 } 71 }
72 72
73 const String& url() const { return m_url; } 73 const String& url() const { return m_url; }
74 const AtomicString& fragment() const { return m_fragment; } 74 const AtomicString& fragment() const { return m_fragment; }
75 75
76 private: 76 private:
77 virtual bool operator==(const ClipPathOperation& o) const OVERRIDE 77 virtual bool operator==(const ClipPathOperation& o) const OVERRIDE
78 { 78 {
79 return isSameType(o) && m_url == static_cast<const ReferenceClipPathOper ation&>(o).m_url; 79 return isSameType(o) && m_url == static_cast<const ReferenceClipPathOper ation&>(o).m_url;
80 } 80 }
81 81
82 ReferenceClipPathOperation(const String& url, const AtomicString& fragment) 82 ReferenceClipPathOperation(const String& url, const AtomicString& fragment)
83 : ClipPathOperation(REFERENCE) 83 : ClipPathOperation(REFERENCE)
84 , m_url(url) 84 , m_url(url)
85 , m_fragment(fragment) 85 , m_fragment(fragment)
86 { 86 {
87 } 87 }
88 88
89 String m_url; 89 String m_url;
90 AtomicString m_fragment; 90 AtomicString m_fragment;
91 }; 91 };
92 92
93 DEFINE_TYPE_CASTS(ReferenceClipPathOperation, ClipPathOperation, op, op->type() == ClipPathOperation::REFERENCE, op.type() == ClipPathOperation::REFERENCE); 93 DEFINE_TYPE_CASTS(ReferenceClipPathOperation, ClipPathOperation, op, op->type() == ClipPathOperation::REFERENCE, op.type() == ClipPathOperation::REFERENCE);
94 94
95 class ShapeClipPathOperation : public ClipPathOperation { 95 class ShapeClipPathOperation FINAL : public ClipPathOperation {
96 public: 96 public:
97 static PassRefPtr<ShapeClipPathOperation> create(PassRefPtr<BasicShape> shap e) 97 static PassRefPtr<ShapeClipPathOperation> create(PassRefPtr<BasicShape> shap e)
98 { 98 {
99 return adoptRef(new ShapeClipPathOperation(shape)); 99 return adoptRef(new ShapeClipPathOperation(shape));
100 } 100 }
101 101
102 const BasicShape* basicShape() const { return m_shape.get(); } 102 const BasicShape* basicShape() const { return m_shape.get(); }
103 WindRule windRule() const { return m_shape->windRule(); } 103 WindRule windRule() const { return m_shape->windRule(); }
104 const Path& path(const FloatRect& boundingRect) 104 const Path& path(const FloatRect& boundingRect)
105 { 105 {
(...skipping 20 matching lines...) Expand all
126 DEFINE_TYPE_CASTS(ShapeClipPathOperation, ClipPathOperation, op, op->type() == C lipPathOperation::SHAPE, op.type() == ClipPathOperation::SHAPE); 126 DEFINE_TYPE_CASTS(ShapeClipPathOperation, ClipPathOperation, op, op->type() == C lipPathOperation::SHAPE, op.type() == ClipPathOperation::SHAPE);
127 127
128 inline bool ShapeClipPathOperation::operator==(const ClipPathOperation& o) const 128 inline bool ShapeClipPathOperation::operator==(const ClipPathOperation& o) const
129 { 129 {
130 return isSameType(o) && *m_shape == *toShapeClipPathOperation(o).m_shape; 130 return isSameType(o) && *m_shape == *toShapeClipPathOperation(o).m_shape;
131 } 131 }
132 132
133 } 133 }
134 134
135 #endif // ClipPathOperation_h 135 #endif // ClipPathOperation_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/CompositedLayerMapping.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698