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

Side by Side Diff: Source/core/css/CSSBasicShapes.h

Issue 1323483002: Remove unused CSSBasicShape::m_referenceBox (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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/css/CSSBasicShapes.cpp » ('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) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 CSSBasicShapeEllipseType, 45 CSSBasicShapeEllipseType,
46 CSSBasicShapePolygonType, 46 CSSBasicShapePolygonType,
47 CSSBasicShapeCircleType, 47 CSSBasicShapeCircleType,
48 CSSBasicShapeInsetType 48 CSSBasicShapeInsetType
49 }; 49 };
50 50
51 virtual Type type() const = 0; 51 virtual Type type() const = 0;
52 virtual String cssText() const = 0; 52 virtual String cssText() const = 0;
53 virtual bool equals(const CSSBasicShape&) const = 0; 53 virtual bool equals(const CSSBasicShape&) const = 0;
54 54
55 CSSPrimitiveValue* referenceBox() const { return m_referenceBox.get(); }
56 void setReferenceBox(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> referenceBox) { m_referenceBox = referenceBox; }
57
58 bool isEllipse() const { return type() == CSSBasicShapeEllipseType; } 55 bool isEllipse() const { return type() == CSSBasicShapeEllipseType; }
59 bool isPolygon() const { return type() == CSSBasicShapePolygonType; } 56 bool isPolygon() const { return type() == CSSBasicShapePolygonType; }
60 bool isCircle() const { return type() == CSSBasicShapeCircleType; } 57 bool isCircle() const { return type() == CSSBasicShapeCircleType; }
61 bool isInset() const { return type() == CSSBasicShapeInsetType; } 58 bool isInset() const { return type() == CSSBasicShapeInsetType; }
62 59
63 DEFINE_INLINE_VIRTUAL_TRACE() { visitor->trace(m_referenceBox); } 60 DEFINE_INLINE_VIRTUAL_TRACE() { }
64 61
65 protected: 62 protected:
66 CSSBasicShape() { } 63 CSSBasicShape() { }
67 RefPtrWillBeMember<CSSPrimitiveValue> m_referenceBox;
68 }; 64 };
69 65
70 class CSSBasicShapeCircle final : public CSSBasicShape { 66 class CSSBasicShapeCircle final : public CSSBasicShape {
71 public: 67 public:
72 static PassRefPtrWillBeRawPtr<CSSBasicShapeCircle> create() { return adoptRe fWillBeNoop(new CSSBasicShapeCircle); } 68 static PassRefPtrWillBeRawPtr<CSSBasicShapeCircle> create() { return adoptRe fWillBeNoop(new CSSBasicShapeCircle); }
73 69
74 String cssText() const override; 70 String cssText() const override;
75 bool equals(const CSSBasicShape&) const override; 71 bool equals(const CSSBasicShape&) const override;
76 72
77 CSSPrimitiveValue* centerX() const { return m_centerX.get(); } 73 CSSPrimitiveValue* centerX() const { return m_centerX.get(); }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 }; 224 };
229 225
230 DEFINE_TYPE_CASTS(CSSBasicShapeCircle, CSSBasicShape, shape, shape->isCircle(), shape.isCircle()); 226 DEFINE_TYPE_CASTS(CSSBasicShapeCircle, CSSBasicShape, shape, shape->isCircle(), shape.isCircle());
231 DEFINE_TYPE_CASTS(CSSBasicShapeEllipse, CSSBasicShape, shape, shape->isEllipse() , shape.isEllipse()); 227 DEFINE_TYPE_CASTS(CSSBasicShapeEllipse, CSSBasicShape, shape, shape->isEllipse() , shape.isEllipse());
232 DEFINE_TYPE_CASTS(CSSBasicShapePolygon, CSSBasicShape, shape, shape->isPolygon() , shape.isPolygon()); 228 DEFINE_TYPE_CASTS(CSSBasicShapePolygon, CSSBasicShape, shape, shape->isPolygon() , shape.isPolygon());
233 DEFINE_TYPE_CASTS(CSSBasicShapeInset, CSSBasicShape, shape, shape->isInset(), sh ape.isInset()); 229 DEFINE_TYPE_CASTS(CSSBasicShapeInset, CSSBasicShape, shape, shape->isInset(), sh ape.isInset());
234 230
235 } // namespace blink 231 } // namespace blink
236 232
237 #endif // CSSBasicShapes_h 233 #endif // CSSBasicShapes_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/CSSBasicShapes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698