| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 typedef WTF::HashMap<RenderBlock*, AtomicString> FingerprintMap; | 92 typedef WTF::HashMap<RenderBlock*, AtomicString> FingerprintMap; |
| 93 typedef WTF::HashMap<AtomicString, OwnPtr<BlockSet> > ReverseFingerprint
Map; | 93 typedef WTF::HashMap<AtomicString, OwnPtr<BlockSet> > ReverseFingerprint
Map; |
| 94 | 94 |
| 95 FingerprintMap m_fingerprints; | 95 FingerprintMap m_fingerprints; |
| 96 ReverseFingerprintMap m_blocksForFingerprint; | 96 ReverseFingerprintMap m_blocksForFingerprint; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 explicit FastTextAutosizer(Document*); | 99 explicit FastTextAutosizer(Document*); |
| 100 | 100 |
| 101 bool enabled(); | 101 bool enabled(); |
| 102 void prepareWindowInfo(RenderView*); | 102 void prepareRenderViewInfo(RenderView*); |
| 103 bool shouldBeClusterRoot(RenderBlock*); | 103 bool shouldBeClusterRoot(RenderBlock*); |
| 104 bool clusterWantsAutosizing(RenderBlock*); | 104 bool clusterWantsAutosizing(RenderBlock*); |
| 105 AtomicString computeFingerprint(RenderBlock*); | 105 AtomicString computeFingerprint(RenderBlock*); |
| 106 Cluster* getOrCreateCluster(RenderBlock*); | 106 Cluster* getOrCreateCluster(RenderBlock*); |
| 107 Cluster* createCluster(RenderBlock*); | 107 Cluster* createCluster(RenderBlock*); |
| 108 Cluster* addSupercluster(AtomicString, RenderBlock*); | 108 Cluster* addSupercluster(AtomicString, RenderBlock*); |
| 109 RenderBlock* deepestCommonAncestor(BlockSet&); | 109 RenderBlock* deepestCommonAncestor(BlockSet&); |
| 110 float computeMultiplier(RenderBlock*); | 110 float computeMultiplier(RenderBlock*); |
| 111 void applyMultiplier(RenderObject*, float); | 111 void applyMultiplier(RenderObject*, float); |
| 112 | 112 |
| 113 Document* m_document; | 113 Document* m_document; |
| 114 int m_windowWidth; // Frame width in density-independent pixels (DIPs). | 114 int m_windowWidth; // Frame width in density-independent pixels (DIPs). |
| 115 int m_layoutWidth; // Layout width in CSS pixels. | 115 int m_layoutWidth; // Layout width in CSS pixels. |
| 116 float m_baseMultiplier; // Includes accessibility font scale factor and devi
ce scale adjustment. |
| 117 #ifndef NDEBUG |
| 118 bool m_renderViewInfoPrepared; // Used for assertions. |
| 119 #endif |
| 116 | 120 |
| 117 // Clusters are created and destroyed during layout. The map key is the | 121 // Clusters are created and destroyed during layout. The map key is the |
| 118 // cluster root. Clusters whose roots share the same fingerprint use the | 122 // cluster root. Clusters whose roots share the same fingerprint use the |
| 119 // same multiplier. | 123 // same multiplier. |
| 120 ClusterMap m_clusters; | 124 ClusterMap m_clusters; |
| 121 ClusterStack m_clusterStack; | 125 ClusterStack m_clusterStack; |
| 122 FingerprintMapper m_fingerprintMapper; | 126 FingerprintMapper m_fingerprintMapper; |
| 123 }; | 127 }; |
| 124 | 128 |
| 125 } // namespace WebCore | 129 } // namespace WebCore |
| 126 | 130 |
| 127 #endif // FastTextAutosizer_h | 131 #endif // FastTextAutosizer_h |
| OLD | NEW |