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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 class LayoutScope { | 69 class LayoutScope { |
70 public: | 70 public: |
71 explicit LayoutScope(RenderBlock*); | 71 explicit LayoutScope(RenderBlock*); |
72 ~LayoutScope(); | 72 ~LayoutScope(); |
73 private: | 73 private: |
74 FastTextAutosizer* m_textAutosizer; | 74 FastTextAutosizer* m_textAutosizer; |
75 RenderBlock* m_block; | 75 RenderBlock* m_block; |
76 }; | 76 }; |
77 | 77 |
| 78 class DeferUpdatePageInfo { |
| 79 public: |
| 80 explicit DeferUpdatePageInfo(Page*); |
| 81 ~DeferUpdatePageInfo(); |
| 82 private: |
| 83 RefPtr<LocalFrame> m_mainFrame; |
| 84 }; |
| 85 |
78 private: | 86 private: |
79 typedef HashSet<const RenderBlock*> BlockSet; | 87 typedef HashSet<const RenderBlock*> BlockSet; |
80 | 88 |
81 enum HasEnoughTextToAutosize { | 89 enum HasEnoughTextToAutosize { |
82 UnknownAmountOfText, | 90 UnknownAmountOfText, |
83 HasEnoughText, | 91 HasEnoughText, |
84 NotEnoughText | 92 NotEnoughText |
85 }; | 93 }; |
86 | 94 |
87 enum RelayoutBehavior { | 95 enum RelayoutBehavior { |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 // from descendant clusters but because descendant clusters may not exist, t
his is only an approximation. | 235 // from descendant clusters but because descendant clusters may not exist, t
his is only an approximation. |
228 // The TraversalDirection controls whether we return the first or the last t
ext leaf. | 236 // The TraversalDirection controls whether we return the first or the last t
ext leaf. |
229 const RenderObject* findTextLeaf(const RenderObject*, size_t&, TextLeafSearc
h); | 237 const RenderObject* findTextLeaf(const RenderObject*, size_t&, TextLeafSearc
h); |
230 | 238 |
231 const Document* m_document; | 239 const Document* m_document; |
232 int m_frameWidth; // LocalFrame width in density-independent pixels (DIPs). | 240 int m_frameWidth; // LocalFrame width in density-independent pixels (DIPs). |
233 int m_layoutWidth; // Layout width in CSS pixels. | 241 int m_layoutWidth; // Layout width in CSS pixels. |
234 float m_baseMultiplier; // Includes accessibility font scale factor and devi
ce scale adjustment. | 242 float m_baseMultiplier; // Includes accessibility font scale factor and devi
ce scale adjustment. |
235 bool m_pageNeedsAutosizing; | 243 bool m_pageNeedsAutosizing; |
236 bool m_previouslyAutosized; | 244 bool m_previouslyAutosized; |
| 245 bool m_updatePageInfoDeferred; |
237 const RenderBlock* m_firstBlock; // First block to receive beginLayout. | 246 const RenderBlock* m_firstBlock; // First block to receive beginLayout. |
238 #ifndef NDEBUG | 247 #ifndef NDEBUG |
239 BlockSet m_blocksThatHaveBegunLayout; // Used to ensure we don't compute pro
perties of a block before beginLayout() is called on it. | 248 BlockSet m_blocksThatHaveBegunLayout; // Used to ensure we don't compute pro
perties of a block before beginLayout() is called on it. |
240 #endif | 249 #endif |
241 | 250 |
242 // Clusters are created and destroyed during layout. The map key is the | 251 // Clusters are created and destroyed during layout. The map key is the |
243 // cluster root. Clusters whose roots share the same fingerprint use the | 252 // cluster root. Clusters whose roots share the same fingerprint use the |
244 // same multiplier. | 253 // same multiplier. |
245 SuperclusterMap m_superclusters; | 254 SuperclusterMap m_superclusters; |
246 ClusterStack m_clusterStack; | 255 ClusterStack m_clusterStack; |
247 FingerprintMapper m_fingerprintMapper; | 256 FingerprintMapper m_fingerprintMapper; |
248 }; | 257 }; |
249 | 258 |
250 } // namespace WebCore | 259 } // namespace WebCore |
251 | 260 |
252 #endif // FastTextAutosizer_h | 261 #endif // FastTextAutosizer_h |
OLD | NEW |