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

Side by Side Diff: Source/core/rendering/exclusions/ExclusionPolygon.h

Issue 14892005: [CSS Exclusions] ExclusionShape bounding box methods should return LayoutRects (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: reverted LineSegment logicalLeft,Right type change Created 7 years, 7 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/exclusions/ExclusionPolygon.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) 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 WTF_MAKE_NONCOPYABLE(ExclusionPolygon); 84 WTF_MAKE_NONCOPYABLE(ExclusionPolygon);
85 public: 85 public:
86 ExclusionPolygon(PassOwnPtr<Vector<FloatPoint> > vertices, WindRule fillRule ) 86 ExclusionPolygon(PassOwnPtr<Vector<FloatPoint> > vertices, WindRule fillRule )
87 : ExclusionShape() 87 : ExclusionShape()
88 , m_polygon(vertices, fillRule) 88 , m_polygon(vertices, fillRule)
89 , m_marginBounds(nullptr) 89 , m_marginBounds(nullptr)
90 , m_paddingBounds(nullptr) 90 , m_paddingBounds(nullptr)
91 { 91 {
92 } 92 }
93 93
94 virtual FloatRect shapeMarginLogicalBoundingBox() const OVERRIDE { return sh apeMarginBounds().boundingBox(); } 94 virtual LayoutRect shapeMarginLogicalBoundingBox() const OVERRIDE { return s tatic_cast<LayoutRect>(shapeMarginBounds().boundingBox()); }
95 virtual FloatRect shapePaddingLogicalBoundingBox() const OVERRIDE { return s hapePaddingBounds().boundingBox(); } 95 virtual LayoutRect shapePaddingLogicalBoundingBox() const OVERRIDE { return static_cast<LayoutRect>(shapePaddingBounds().boundingBox()); }
96 virtual bool isEmpty() const OVERRIDE { return m_polygon.isEmpty(); } 96 virtual bool isEmpty() const OVERRIDE { return m_polygon.isEmpty(); }
97 virtual void getExcludedIntervals(float logicalTop, float logicalHeight, Seg mentList&) const OVERRIDE; 97 virtual void getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalH eight, SegmentList&) const OVERRIDE;
98 virtual void getIncludedIntervals(float logicalTop, float logicalHeight, Seg mentList&) const OVERRIDE; 98 virtual void getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalH eight, SegmentList&) const OVERRIDE;
99 virtual bool firstIncludedIntervalLogicalTop(float minLogicalIntervalTop, co nst FloatSize& minLogicalIntervalSize, float&) const OVERRIDE; 99 virtual bool firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTo p, const LayoutSize& minLogicalIntervalSize, LayoutUnit&) const OVERRIDE;
100 100
101 private:
101 const FloatPolygon& shapeMarginBounds() const; 102 const FloatPolygon& shapeMarginBounds() const;
102 const FloatPolygon& shapePaddingBounds() const; 103 const FloatPolygon& shapePaddingBounds() const;
103 104
104 private:
105 FloatPolygon m_polygon; 105 FloatPolygon m_polygon;
106 mutable OwnPtr<FloatPolygon> m_marginBounds; 106 mutable OwnPtr<FloatPolygon> m_marginBounds;
107 mutable OwnPtr<FloatPolygon> m_paddingBounds; 107 mutable OwnPtr<FloatPolygon> m_paddingBounds;
108 }; 108 };
109 109
110 } // namespace WebCore 110 } // namespace WebCore
111 111
112 #endif // ExclusionPolygon_h 112 #endif // ExclusionPolygon_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/exclusions/ExclusionPolygon.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698