Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: Source/core/rendering/FastTextAutosizer.h

Issue 135733002: [FastTextAutosizer] Incorporate accessibility and device scale factors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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_additionalMultiplier; // Includes accessibility font scale factor an d device scale adjustment.
skobes 2014/01/13 19:10:13 Perhaps "m_baseMultiplier"?
pdr. 2014/01/13 19:49:12 I like it. Done.
117 #ifndef NDEBUG
skobes 2014/01/13 19:10:13 Is the compiler not smart enough to strip out an u
pdr. 2014/01/13 19:49:12 Nowhere near smart enough :) There are two reason
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698