OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // factor needs to be reset to its initial value. | 100 // factor needs to be reset to its initial value. |
101 void setNeedsReset(bool); | 101 void setNeedsReset(bool); |
102 bool needsReset() const { return m_needsReset; } | 102 bool needsReset() const { return m_needsReset; } |
103 | 103 |
104 // This is set when one of the inputs to finalConstraints changes. | 104 // This is set when one of the inputs to finalConstraints changes. |
105 bool constraintsDirty() const { return m_constraintsDirty; } | 105 bool constraintsDirty() const { return m_constraintsDirty; } |
106 | 106 |
107 void didChangeInitialContainingBlockSize(const IntSize&); | 107 void didChangeInitialContainingBlockSize(const IntSize&); |
108 | 108 |
109 IntSize layoutSize() const; | 109 IntSize layoutSize() const; |
| 110 IntSize initialViewportSize() const { return m_icbSize; } |
110 | 111 |
111 private: | 112 private: |
112 PageScaleConstraintsSet(); | 113 PageScaleConstraintsSet(); |
113 | 114 |
114 PageScaleConstraints computeConstraintsStack() const; | 115 PageScaleConstraints computeConstraintsStack() const; |
115 | 116 |
116 PageScaleConstraints m_defaultConstraints; | 117 PageScaleConstraints m_defaultConstraints; |
117 PageScaleConstraints m_pageDefinedConstraints; | 118 PageScaleConstraints m_pageDefinedConstraints; |
118 PageScaleConstraints m_userAgentConstraints; | 119 PageScaleConstraints m_userAgentConstraints; |
119 PageScaleConstraints m_fullscreenConstraints; | 120 PageScaleConstraints m_fullscreenConstraints; |
120 PageScaleConstraints m_finalConstraints; | 121 PageScaleConstraints m_finalConstraints; |
121 | 122 |
122 int m_lastContentsWidth; | 123 int m_lastContentsWidth; |
123 IntSize m_icbSize; | 124 IntSize m_icbSize; |
124 | 125 |
125 bool m_needsReset; | 126 bool m_needsReset; |
126 bool m_constraintsDirty; | 127 bool m_constraintsDirty; |
127 }; | 128 }; |
128 | 129 |
129 } // namespace blink | 130 } // namespace blink |
130 | 131 |
131 #endif // PageScaleConstraintsSet_h | 132 #endif // PageScaleConstraintsSet_h |
OLD | NEW |