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

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

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/core/rendering/FastTextAutosizer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // Returns true if any BlockSet was modified or freed by the removal. 213 // Returns true if any BlockSet was modified or freed by the removal.
214 bool remove(const RenderObject*); 214 bool remove(const RenderObject*);
215 Fingerprint get(const RenderObject*); 215 Fingerprint get(const RenderObject*);
216 BlockSet& getTentativeClusterRoots(Fingerprint); 216 BlockSet& getTentativeClusterRoots(Fingerprint);
217 private: 217 private:
218 typedef HashMap<const RenderObject*, Fingerprint> FingerprintMap; 218 typedef HashMap<const RenderObject*, Fingerprint> FingerprintMap;
219 typedef HashMap<Fingerprint, OwnPtr<BlockSet> > ReverseFingerprintMap; 219 typedef HashMap<Fingerprint, OwnPtr<BlockSet> > ReverseFingerprintMap;
220 220
221 FingerprintMap m_fingerprints; 221 FingerprintMap m_fingerprints;
222 ReverseFingerprintMap m_blocksForFingerprint; 222 ReverseFingerprintMap m_blocksForFingerprint;
223 #ifndef NDEBUG 223 #if ENABLE(ASSERT)
224 void assertMapsAreConsistent(); 224 void assertMapsAreConsistent();
225 #endif 225 #endif
226 }; 226 };
227 227
228 struct PageInfo { 228 struct PageInfo {
229 PageInfo() 229 PageInfo()
230 : m_frameWidth(0) 230 : m_frameWidth(0)
231 , m_layoutWidth(0) 231 , m_layoutWidth(0)
232 , m_baseMultiplier(0) 232 , m_baseMultiplier(0)
233 , m_pageNeedsAutosizing(false) 233 , m_pageNeedsAutosizing(false)
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 // from descendant clusters but because descendant clusters may not exist, t his is only an approximation. 282 // from descendant clusters but because descendant clusters may not exist, t his is only an approximation.
283 // The TraversalDirection controls whether we return the first or the last t ext leaf. 283 // The TraversalDirection controls whether we return the first or the last t ext leaf.
284 const RenderObject* findTextLeaf(const RenderObject*, size_t&, TextLeafSearc h); 284 const RenderObject* findTextLeaf(const RenderObject*, size_t&, TextLeafSearc h);
285 BlockFlags classifyBlock(const RenderObject*, BlockFlags mask = UINT_MAX); 285 BlockFlags classifyBlock(const RenderObject*, BlockFlags mask = UINT_MAX);
286 #ifdef AUTOSIZING_DOM_DEBUG_INFO 286 #ifdef AUTOSIZING_DOM_DEBUG_INFO
287 void writeClusterDebugInfo(Cluster*); 287 void writeClusterDebugInfo(Cluster*);
288 #endif 288 #endif
289 289
290 const Document* m_document; 290 const Document* m_document;
291 const RenderBlock* m_firstBlockToBeginLayout; 291 const RenderBlock* m_firstBlockToBeginLayout;
292 #ifndef NDEBUG 292 #if ENABLE(ASSERT)
293 BlockSet m_blocksThatHaveBegunLayout; // Used to ensure we don't compute pro perties of a block before beginLayout() is called on it. 293 BlockSet m_blocksThatHaveBegunLayout; // Used to ensure we don't compute pro perties of a block before beginLayout() is called on it.
294 #endif 294 #endif
295 295
296 // Clusters are created and destroyed during layout. The map key is the 296 // Clusters are created and destroyed during layout. The map key is the
297 // cluster root. Clusters whose roots share the same fingerprint use the 297 // cluster root. Clusters whose roots share the same fingerprint use the
298 // same multiplier. 298 // same multiplier.
299 SuperclusterMap m_superclusters; 299 SuperclusterMap m_superclusters;
300 ClusterStack m_clusterStack; 300 ClusterStack m_clusterStack;
301 FingerprintMapper m_fingerprintMapper; 301 FingerprintMapper m_fingerprintMapper;
302 Vector<RefPtr<RenderStyle> > m_stylesRetainedDuringLayout; 302 Vector<RefPtr<RenderStyle> > m_stylesRetainedDuringLayout;
303 // FIXME: All frames should share the same m_pageInfo instance. 303 // FIXME: All frames should share the same m_pageInfo instance.
304 PageInfo m_pageInfo; 304 PageInfo m_pageInfo;
305 bool m_updatePageInfoDeferred; 305 bool m_updatePageInfoDeferred;
306 }; 306 };
307 307
308 } // namespace WebCore 308 } // namespace WebCore
309 309
310 #endif // FastTextAutosizer_h 310 #endif // FastTextAutosizer_h
OLDNEW
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/core/rendering/FastTextAutosizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698