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

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

Issue 1278983003: Adding allocator annotations to blink classes and structs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 float logicalRight; 61 float logicalRight;
62 bool isValid; 62 bool isValid;
63 }; 63 };
64 64
65 // A representation of a BasicShape that enables layout code to determine how to break a line up into segments 65 // A representation of a BasicShape that enables layout code to determine how to break a line up into segments
66 // that will fit within or around a shape. The line is defined by a pair of logi cal Y coordinates and the 66 // that will fit within or around a shape. The line is defined by a pair of logi cal Y coordinates and the
67 // computed segments are returned as pairs of logical X coordinates. The BasicSh ape itself is defined in 67 // computed segments are returned as pairs of logical X coordinates. The BasicSh ape itself is defined in
68 // physical coordinates. 68 // physical coordinates.
69 69
70 class CORE_EXPORT Shape { 70 class CORE_EXPORT Shape {
71 WTF_MAKE_FAST_ALLOCATED(Shape);
71 public: 72 public:
72 struct DisplayPaths { 73 struct DisplayPaths {
73 Path shape; 74 Path shape;
74 Path marginShape; 75 Path marginShape;
76 STACK_ALLOCATED();
75 }; 77 };
76 static PassOwnPtr<Shape> createShape(const BasicShape*, const LayoutSize& lo gicalBoxSize, WritingMode, float margin); 78 static PassOwnPtr<Shape> createShape(const BasicShape*, const LayoutSize& lo gicalBoxSize, WritingMode, float margin);
77 static PassOwnPtr<Shape> createRasterShape(Image*, float threshold, const La youtRect& imageRect, const LayoutRect& marginRect, WritingMode, float margin); 79 static PassOwnPtr<Shape> createRasterShape(Image*, float threshold, const La youtRect& imageRect, const LayoutRect& marginRect, WritingMode, float margin);
78 static PassOwnPtr<Shape> createEmptyRasterShape(WritingMode, float margin); 80 static PassOwnPtr<Shape> createEmptyRasterShape(WritingMode, float margin);
79 static PassOwnPtr<Shape> createLayoutBoxShape(const FloatRoundedRect&, Writi ngMode, float margin); 81 static PassOwnPtr<Shape> createLayoutBoxShape(const FloatRoundedRect&, Writi ngMode, float margin);
80 82
81 virtual ~Shape() { } 83 virtual ~Shape() { }
82 84
83 virtual LayoutRect shapeMarginLogicalBoundingBox() const = 0; 85 virtual LayoutRect shapeMarginLogicalBoundingBox() const = 0;
84 virtual bool isEmpty() const = 0; 86 virtual bool isEmpty() const = 0;
(...skipping 13 matching lines...) Expand all
98 return (lineTop < rect.maxY() && lineTop + lineHeight > rect.y()) || (!l ineHeight && lineTop == rect.y()); 100 return (lineTop < rect.maxY() && lineTop + lineHeight > rect.y()) || (!l ineHeight && lineTop == rect.y());
99 } 101 }
100 102
101 WritingMode m_writingMode; 103 WritingMode m_writingMode;
102 float m_margin; 104 float m_margin;
103 }; 105 };
104 106
105 } // namespace blink 107 } // namespace blink
106 108
107 #endif // Shape_h 109 #endif // Shape_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698