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

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

Issue 208423003: [CSS Shapes] clamp RasterShape shapeMargin to reference box size (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix sqrt problem Created 6 years, 9 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/RasterShape.cpp ('k') | no next file » | 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 56
57 // A representation of a BasicShape that enables layout code to determine how to break a line up into segments 57 // A representation of a BasicShape that enables layout code to determine how to break a line up into segments
58 // that will fit within or around a shape. The line is defined by a pair of logi cal Y coordinates and the 58 // that will fit within or around a shape. The line is defined by a pair of logi cal Y coordinates and the
59 // computed segments are returned as pairs of logical X coordinates. The BasicSh ape itself is defined in 59 // computed segments are returned as pairs of logical X coordinates. The BasicSh ape itself is defined in
60 // physical coordinates. 60 // physical coordinates.
61 61
62 class Shape { 62 class Shape {
63 public: 63 public:
64 static PassOwnPtr<Shape> createShape(const BasicShape*, const LayoutSize& lo gicalBoxSize, WritingMode, Length margin, Length padding); 64 static PassOwnPtr<Shape> createShape(const BasicShape*, const LayoutSize& lo gicalBoxSize, WritingMode, Length margin, Length padding);
65 static PassOwnPtr<Shape> createRasterShape(Image*, float threshold, const La youtRect& drawRect, const LayoutRect& clipRect, WritingMode, Length margin, Leng th padding); 65 static PassOwnPtr<Shape> createRasterShape(Image*, float threshold, const La youtRect& imageRect, const LayoutRect& marginRect, WritingMode, Length margin, L ength padding);
66 static PassOwnPtr<Shape> createLayoutBoxShape(const RoundedRect&, WritingMod e, const Length& margin, const Length& padding); 66 static PassOwnPtr<Shape> createLayoutBoxShape(const RoundedRect&, WritingMod e, const Length& margin, const Length& padding);
67 67
68 virtual ~Shape() { } 68 virtual ~Shape() { }
69 69
70 virtual LayoutRect shapeMarginLogicalBoundingBox() const = 0; 70 virtual LayoutRect shapeMarginLogicalBoundingBox() const = 0;
71 virtual LayoutRect shapePaddingLogicalBoundingBox() const = 0; 71 virtual LayoutRect shapePaddingLogicalBoundingBox() const = 0;
72 virtual bool isEmpty() const = 0; 72 virtual bool isEmpty() const = 0;
73 virtual void getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalH eight, SegmentList&) const = 0; 73 virtual void getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalH eight, SegmentList&) const = 0;
74 virtual void getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalH eight, SegmentList&) const = 0; 74 virtual void getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalH eight, SegmentList&) const = 0;
75 virtual bool firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTo p, const FloatSize& minLogicalIntervalSize, LayoutUnit& result) const = 0; 75 virtual bool firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTo p, const FloatSize& minLogicalIntervalSize, LayoutUnit& result) const = 0;
(...skipping 13 matching lines...) Expand all
89 } 89 }
90 90
91 WritingMode m_writingMode; 91 WritingMode m_writingMode;
92 float m_margin; 92 float m_margin;
93 float m_padding; 93 float m_padding;
94 }; 94 };
95 95
96 } // namespace WebCore 96 } // namespace WebCore
97 97
98 #endif // Shape_h 98 #endif // Shape_h
OLDNEW
« no previous file with comments | « Source/core/rendering/shapes/RasterShape.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698