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

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

Issue 197883013: [FastTextAutosizer] Refactor for understandability (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address reviewer comments + minor cleanups. Created 6 years, 9 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 float superclusterMultiplier(Cluster*); 205 float superclusterMultiplier(Cluster*);
206 // A cluster's width provider is typically the deepest block containing all text. 206 // A cluster's width provider is typically the deepest block containing all text.
207 // There are exceptions, such as tables and table cells which use the table itself for width. 207 // There are exceptions, such as tables and table cells which use the table itself for width.
208 const RenderBlock* clusterWidthProvider(const RenderBlock*); 208 const RenderBlock* clusterWidthProvider(const RenderBlock*);
209 // Typically this returns a block's computed width. In the case of tables la yout, this 209 // Typically this returns a block's computed width. In the case of tables la yout, this
210 // width is not yet known so the fixed width is used if it's available, or t he containing 210 // width is not yet known so the fixed width is used if it's available, or t he containing
211 // block's width otherwise. 211 // block's width otherwise.
212 float widthFromBlock(const RenderBlock*); 212 float widthFromBlock(const RenderBlock*);
213 float multiplierFromBlock(const RenderBlock*); 213 float multiplierFromBlock(const RenderBlock*);
214 void applyMultiplier(RenderObject*, float); 214 void applyMultiplier(RenderObject*, float);
215 bool mightBeWiderOrNarrowerDescendant(const RenderBlock*);
216 bool isWiderOrNarrowerDescendant(Cluster*); 215 bool isWiderOrNarrowerDescendant(Cluster*);
217 bool isLayoutRoot(const RenderBlock*) const; 216 bool isLayoutRoot(const RenderBlock*) const;
218 217
219 Cluster* currentCluster() const; 218 Cluster* currentCluster() const;
220 219
221 RenderObject* nextChildSkippingChildrenOfBlocks(const RenderObject*, const R enderObject*); 220 RenderObject* nextChildSkippingChildrenOfBlocks(const RenderObject*, const R enderObject*);
222 221
223 const RenderBlock* deepestBlockContainingAllText(Cluster*); 222 const RenderBlock* deepestBlockContainingAllText(Cluster*);
224 const RenderBlock* deepestBlockContainingAllText(const RenderBlock*); 223 const RenderBlock* deepestBlockContainingAllText(const RenderBlock*);
225 // Returns the first text leaf that is in the current cluster. We attempt to not include text 224 // Returns the first text leaf that is in the current cluster. We attempt to not include text
(...skipping 16 matching lines...) Expand all
242 // cluster root. Clusters whose roots share the same fingerprint use the 241 // cluster root. Clusters whose roots share the same fingerprint use the
243 // same multiplier. 242 // same multiplier.
244 SuperclusterMap m_superclusters; 243 SuperclusterMap m_superclusters;
245 ClusterStack m_clusterStack; 244 ClusterStack m_clusterStack;
246 FingerprintMapper m_fingerprintMapper; 245 FingerprintMapper m_fingerprintMapper;
247 }; 246 };
248 247
249 } // namespace WebCore 248 } // namespace WebCore
250 249
251 #endif // FastTextAutosizer_h 250 #endif // FastTextAutosizer_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/FastTextAutosizer.cpp » ('j') | Source/core/rendering/FastTextAutosizer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698