| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 typedef unsigned Fingerprint; | 194 typedef unsigned Fingerprint; |
| 195 typedef HashMap<Fingerprint, OwnPtr<Supercluster> > SuperclusterMap; | 195 typedef HashMap<Fingerprint, OwnPtr<Supercluster> > SuperclusterMap; |
| 196 typedef Vector<OwnPtr<Cluster> > ClusterStack; | 196 typedef Vector<OwnPtr<Cluster> > ClusterStack; |
| 197 | 197 |
| 198 // Fingerprints are computed during style recalc, for (some subset of) | 198 // Fingerprints are computed during style recalc, for (some subset of) |
| 199 // blocks that will become cluster roots. | 199 // blocks that will become cluster roots. |
| 200 class FingerprintMapper { | 200 class FingerprintMapper { |
| 201 public: | 201 public: |
| 202 void add(const RenderObject*, Fingerprint); | 202 void add(const RenderObject*, Fingerprint); |
| 203 void addTentativeClusterRoot(const RenderBlock*, Fingerprint); | 203 void addTentativeClusterRoot(const RenderBlock*, Fingerprint); |
| 204 void remove(const RenderObject*); | 204 // Returns true if any BlockSet was modified or freed by the removal. |
| 205 bool remove(const RenderObject*); |
| 205 Fingerprint get(const RenderObject*); | 206 Fingerprint get(const RenderObject*); |
| 206 BlockSet& getTentativeClusterRoots(Fingerprint); | 207 BlockSet& getTentativeClusterRoots(Fingerprint); |
| 207 private: | 208 private: |
| 208 typedef HashMap<const RenderObject*, Fingerprint> FingerprintMap; | 209 typedef HashMap<const RenderObject*, Fingerprint> FingerprintMap; |
| 209 typedef HashMap<Fingerprint, OwnPtr<BlockSet> > ReverseFingerprintMap; | 210 typedef HashMap<Fingerprint, OwnPtr<BlockSet> > ReverseFingerprintMap; |
| 210 | 211 |
| 211 FingerprintMap m_fingerprints; | 212 FingerprintMap m_fingerprints; |
| 212 ReverseFingerprintMap m_blocksForFingerprint; | 213 ReverseFingerprintMap m_blocksForFingerprint; |
| 213 #ifndef NDEBUG | 214 #ifndef NDEBUG |
| 214 void assertMapsAreConsistent(); | 215 void assertMapsAreConsistent(); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 FingerprintMapper m_fingerprintMapper; | 293 FingerprintMapper m_fingerprintMapper; |
| 293 Vector<RefPtr<RenderStyle> > m_stylesRetainedDuringLayout; | 294 Vector<RefPtr<RenderStyle> > m_stylesRetainedDuringLayout; |
| 294 // FIXME: All frames should share the same m_pageInfo instance. | 295 // FIXME: All frames should share the same m_pageInfo instance. |
| 295 PageInfo m_pageInfo; | 296 PageInfo m_pageInfo; |
| 296 bool m_updatePageInfoDeferred; | 297 bool m_updatePageInfoDeferred; |
| 297 }; | 298 }; |
| 298 | 299 |
| 299 } // namespace WebCore | 300 } // namespace WebCore |
| 300 | 301 |
| 301 #endif // FastTextAutosizer_h | 302 #endif // FastTextAutosizer_h |
| OLD | NEW |