OLD | NEW |
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 LineSegment() : logicalLeft(0), logicalRight(0), isValid(false) {} | 47 LineSegment() : logicalLeft(0), logicalRight(0), isValid(false) {} |
48 | 48 |
49 LineSegment(float logicalLeft, float logicalRight) | 49 LineSegment(float logicalLeft, float logicalRight) |
50 : logicalLeft(logicalLeft), logicalRight(logicalRight), isValid(true) {} | 50 : logicalLeft(logicalLeft), logicalRight(logicalRight), isValid(true) {} |
51 | 51 |
52 float logicalLeft; | 52 float logicalLeft; |
53 float logicalRight; | 53 float logicalRight; |
54 bool isValid; | 54 bool isValid; |
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 |
58 // that will fit within or around a shape. The line is defined by a pair of logi
cal Y coordinates and the | 58 // break a line up into segments that will fit within or around a shape. The |
59 // computed segments are returned as pairs of logical X coordinates. The BasicSh
ape itself is defined in | 59 // line is defined by a pair of logical Y coordinates and the computed segments |
60 // physical coordinates. | 60 // are returned as pairs of logical X coordinates. The BasicShape itself is |
| 61 // defined in physical coordinates. |
61 | 62 |
62 class CORE_EXPORT Shape { | 63 class CORE_EXPORT Shape { |
63 USING_FAST_MALLOC(Shape); | 64 USING_FAST_MALLOC(Shape); |
64 | 65 |
65 public: | 66 public: |
66 struct DisplayPaths { | 67 struct DisplayPaths { |
67 STACK_ALLOCATED(); | 68 STACK_ALLOCATED(); |
68 Path shape; | 69 Path shape; |
69 Path marginShape; | 70 Path marginShape; |
70 }; | 71 }; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 (!lineHeight && lineTop == rect.y()); | 112 (!lineHeight && lineTop == rect.y()); |
112 } | 113 } |
113 | 114 |
114 WritingMode m_writingMode; | 115 WritingMode m_writingMode; |
115 float m_margin; | 116 float m_margin; |
116 }; | 117 }; |
117 | 118 |
118 } // namespace blink | 119 } // namespace blink |
119 | 120 |
120 #endif // Shape_h | 121 #endif // Shape_h |
OLD | NEW |