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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 void addTentativeClusterRoot(const RenderBlock*, Fingerprint); | 170 void addTentativeClusterRoot(const RenderBlock*, Fingerprint); |
171 void remove(const RenderObject*); | 171 void remove(const RenderObject*); |
172 Fingerprint get(const RenderObject*); | 172 Fingerprint get(const RenderObject*); |
173 BlockSet& getTentativeClusterRoots(Fingerprint); | 173 BlockSet& getTentativeClusterRoots(Fingerprint); |
174 private: | 174 private: |
175 typedef HashMap<const RenderObject*, Fingerprint> FingerprintMap; | 175 typedef HashMap<const RenderObject*, Fingerprint> FingerprintMap; |
176 typedef HashMap<Fingerprint, OwnPtr<BlockSet> > ReverseFingerprintMap; | 176 typedef HashMap<Fingerprint, OwnPtr<BlockSet> > ReverseFingerprintMap; |
177 | 177 |
178 FingerprintMap m_fingerprints; | 178 FingerprintMap m_fingerprints; |
179 ReverseFingerprintMap m_blocksForFingerprint; | 179 ReverseFingerprintMap m_blocksForFingerprint; |
| 180 #ifndef NDEBUG |
| 181 bool mapsAreConsistent(); |
| 182 #endif |
180 }; | 183 }; |
181 | 184 |
182 explicit FastTextAutosizer(const Document*); | 185 explicit FastTextAutosizer(const Document*); |
183 | 186 |
184 void beginLayout(RenderBlock*); | 187 void beginLayout(RenderBlock*); |
185 void endLayout(RenderBlock*); | 188 void endLayout(RenderBlock*); |
186 void inflateTable(RenderTable*); | 189 void inflateTable(RenderTable*); |
187 void inflate(RenderBlock*); | 190 void inflate(RenderBlock*); |
188 bool enabled(); | 191 bool enabled(); |
189 void updateRenderViewInfo(); | 192 void updateRenderViewInfo(); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 // cluster root. Clusters whose roots share the same fingerprint use the | 240 // cluster root. Clusters whose roots share the same fingerprint use the |
238 // same multiplier. | 241 // same multiplier. |
239 SuperclusterMap m_superclusters; | 242 SuperclusterMap m_superclusters; |
240 ClusterStack m_clusterStack; | 243 ClusterStack m_clusterStack; |
241 FingerprintMapper m_fingerprintMapper; | 244 FingerprintMapper m_fingerprintMapper; |
242 }; | 245 }; |
243 | 246 |
244 } // namespace WebCore | 247 } // namespace WebCore |
245 | 248 |
246 #endif // FastTextAutosizer_h | 249 #endif // FastTextAutosizer_h |
OLD | NEW |