OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 m_type = ExplicitPosition; | 60 m_type = ExplicitPosition; |
61 m_integerPosition = position; | 61 m_integerPosition = position; |
62 m_namedGridLine = namedGridLine; | 62 m_namedGridLine = namedGridLine; |
63 } | 63 } |
64 | 64 |
65 void setAutoPosition() { | 65 void setAutoPosition() { |
66 m_type = AutoPosition; | 66 m_type = AutoPosition; |
67 m_integerPosition = 0; | 67 m_integerPosition = 0; |
68 } | 68 } |
69 | 69 |
70 // 'span' values cannot be negative, yet we reuse the <integer> position which
can | 70 // 'span' values cannot be negative, yet we reuse the <integer> position which |
71 // be. This means that we have to convert the span position to an integer, los
ing | 71 // can be. This means that we have to convert the span position to an integer, |
72 // some precision here. It shouldn't be an issue in practice though. | 72 // losing some precision here. It shouldn't be an issue in practice though. |
73 void setSpanPosition(int position, const AtomicString& namedGridLine) { | 73 void setSpanPosition(int position, const AtomicString& namedGridLine) { |
74 m_type = SpanPosition; | 74 m_type = SpanPosition; |
75 m_integerPosition = position; | 75 m_integerPosition = position; |
76 m_namedGridLine = namedGridLine; | 76 m_namedGridLine = namedGridLine; |
77 } | 77 } |
78 | 78 |
79 void setNamedGridArea(const AtomicString& namedGridArea) { | 79 void setNamedGridArea(const AtomicString& namedGridArea) { |
80 m_type = NamedGridAreaPosition; | 80 m_type = NamedGridAreaPosition; |
81 m_namedGridLine = namedGridArea; | 81 m_namedGridLine = namedGridArea; |
82 } | 82 } |
(...skipping 26 matching lines...) Expand all Loading... |
109 | 109 |
110 private: | 110 private: |
111 GridPositionType m_type; | 111 GridPositionType m_type; |
112 int m_integerPosition; | 112 int m_integerPosition; |
113 AtomicString m_namedGridLine; | 113 AtomicString m_namedGridLine; |
114 }; | 114 }; |
115 | 115 |
116 } // namespace blink | 116 } // namespace blink |
117 | 117 |
118 #endif // GridPosition_h | 118 #endif // GridPosition_h |
OLD | NEW |