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

Side by Side Diff: Source/core/rendering/shapes/PolygonShape.h

Issue 640593002: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/core/[css|rendering|clipboard] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased the patch Created 6 years, 2 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 | « Source/core/rendering/shapes/BoxShape.h ('k') | Source/core/rendering/shapes/RasterShape.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 18 matching lines...) Expand all
29 29
30 #ifndef PolygonShape_h 30 #ifndef PolygonShape_h
31 #define PolygonShape_h 31 #define PolygonShape_h
32 32
33 #include "core/rendering/shapes/Shape.h" 33 #include "core/rendering/shapes/Shape.h"
34 #include "core/rendering/shapes/ShapeInterval.h" 34 #include "core/rendering/shapes/ShapeInterval.h"
35 #include "platform/geometry/FloatPolygon.h" 35 #include "platform/geometry/FloatPolygon.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class OffsetPolygonEdge FINAL : public VertexPair { 39 class OffsetPolygonEdge final : public VertexPair {
40 public: 40 public:
41 OffsetPolygonEdge(const FloatPolygonEdge& edge, const FloatSize& offset) 41 OffsetPolygonEdge(const FloatPolygonEdge& edge, const FloatSize& offset)
42 : m_vertex1(edge.vertex1() + offset) 42 : m_vertex1(edge.vertex1() + offset)
43 , m_vertex2(edge.vertex2() + offset) 43 , m_vertex2(edge.vertex2() + offset)
44 { 44 {
45 } 45 }
46 46
47 virtual const FloatPoint& vertex1() const OVERRIDE { return m_vertex1; } 47 virtual const FloatPoint& vertex1() const override { return m_vertex1; }
48 virtual const FloatPoint& vertex2() const OVERRIDE { return m_vertex2; } 48 virtual const FloatPoint& vertex2() const override { return m_vertex2; }
49 49
50 bool isWithinYRange(float y1, float y2) const { return y1 <= minY() && y2 >= maxY(); } 50 bool isWithinYRange(float y1, float y2) const { return y1 <= minY() && y2 >= maxY(); }
51 bool overlapsYRange(float y1, float y2) const { return y2 >= minY() && y1 <= maxY(); } 51 bool overlapsYRange(float y1, float y2) const { return y2 >= minY() && y1 <= maxY(); }
52 float xIntercept(float y) const; 52 float xIntercept(float y) const;
53 FloatShapeInterval clippedEdgeXRange(float y1, float y2) const; 53 FloatShapeInterval clippedEdgeXRange(float y1, float y2) const;
54 54
55 private: 55 private:
56 FloatPoint m_vertex1; 56 FloatPoint m_vertex1;
57 FloatPoint m_vertex2; 57 FloatPoint m_vertex2;
58 }; 58 };
59 59
60 class PolygonShape FINAL : public Shape { 60 class PolygonShape final : public Shape {
61 WTF_MAKE_NONCOPYABLE(PolygonShape); 61 WTF_MAKE_NONCOPYABLE(PolygonShape);
62 public: 62 public:
63 PolygonShape(PassOwnPtr<Vector<FloatPoint> > vertices, WindRule fillRule) 63 PolygonShape(PassOwnPtr<Vector<FloatPoint> > vertices, WindRule fillRule)
64 : Shape() 64 : Shape()
65 , m_polygon(vertices, fillRule) 65 , m_polygon(vertices, fillRule)
66 { 66 {
67 } 67 }
68 68
69 virtual LayoutRect shapeMarginLogicalBoundingBox() const OVERRIDE; 69 virtual LayoutRect shapeMarginLogicalBoundingBox() const override;
70 virtual bool isEmpty() const OVERRIDE { return m_polygon.isEmpty(); } 70 virtual bool isEmpty() const override { return m_polygon.isEmpty(); }
71 virtual LineSegment getExcludedInterval(LayoutUnit logicalTop, LayoutUnit lo gicalHeight) const OVERRIDE; 71 virtual LineSegment getExcludedInterval(LayoutUnit logicalTop, LayoutUnit lo gicalHeight) const override;
72 virtual void buildDisplayPaths(DisplayPaths&) const OVERRIDE; 72 virtual void buildDisplayPaths(DisplayPaths&) const override;
73 73
74 private: 74 private:
75 FloatPolygon m_polygon; 75 FloatPolygon m_polygon;
76 }; 76 };
77 77
78 } // namespace blink 78 } // namespace blink
79 79
80 #endif // PolygonShape_h 80 #endif // PolygonShape_h
OLDNEW
« no previous file with comments | « Source/core/rendering/shapes/BoxShape.h ('k') | Source/core/rendering/shapes/RasterShape.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698