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

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

Issue 319013003: Set multiplier to 1 on blocks with no direct text children. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 bool m_pageNeedsAutosizing; 238 bool m_pageNeedsAutosizing;
239 bool m_hasAutosized; 239 bool m_hasAutosized;
240 bool m_settingEnabled; 240 bool m_settingEnabled;
241 }; 241 };
242 242
243 explicit FastTextAutosizer(const Document*); 243 explicit FastTextAutosizer(const Document*);
244 244
245 void beginLayout(RenderBlock*); 245 void beginLayout(RenderBlock*);
246 void endLayout(RenderBlock*); 246 void endLayout(RenderBlock*);
247 void inflateAutoTable(RenderTable*); 247 void inflateAutoTable(RenderTable*);
248 void inflate(RenderBlock*); 248 float inflate(RenderObject*, float multiplier = 0);
249 bool shouldHandleLayout() const; 249 bool shouldHandleLayout() const;
250 void setAllTextNeedsLayout(); 250 void setAllTextNeedsLayout();
251 void resetMultipliers(); 251 void resetMultipliers();
252 BeginLayoutBehavior prepareForLayout(const RenderBlock*); 252 BeginLayoutBehavior prepareForLayout(const RenderBlock*);
253 void prepareClusterStack(const RenderObject*); 253 void prepareClusterStack(const RenderObject*);
254 bool clusterHasEnoughTextToAutosize(Cluster*, const RenderBlock* widthProvid er = 0); 254 bool clusterHasEnoughTextToAutosize(Cluster*, const RenderBlock* widthProvid er = 0);
255 bool superclusterHasEnoughTextToAutosize(Supercluster*, const RenderBlock* w idthProvider = 0); 255 bool superclusterHasEnoughTextToAutosize(Supercluster*, const RenderBlock* w idthProvider = 0);
256 bool clusterWouldHaveEnoughTextToAutosize(const RenderBlock* root, const Ren derBlock* widthProvider = 0); 256 bool clusterWouldHaveEnoughTextToAutosize(const RenderBlock* root, const Ren derBlock* widthProvider = 0);
257 Fingerprint getFingerprint(const RenderObject*); 257 Fingerprint getFingerprint(const RenderObject*);
258 Fingerprint computeFingerprint(const RenderObject*); 258 Fingerprint computeFingerprint(const RenderObject*);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 FingerprintMapper m_fingerprintMapper; 297 FingerprintMapper m_fingerprintMapper;
298 Vector<RefPtr<RenderStyle> > m_stylesRetainedDuringLayout; 298 Vector<RefPtr<RenderStyle> > m_stylesRetainedDuringLayout;
299 // FIXME: All frames should share the same m_pageInfo instance. 299 // FIXME: All frames should share the same m_pageInfo instance.
300 PageInfo m_pageInfo; 300 PageInfo m_pageInfo;
301 bool m_updatePageInfoDeferred; 301 bool m_updatePageInfoDeferred;
302 }; 302 };
303 303
304 } // namespace WebCore 304 } // namespace WebCore
305 305
306 #endif // FastTextAutosizer_h 306 #endif // FastTextAutosizer_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/text-autosizing/text-removal-expected.txt ('k') | Source/core/rendering/FastTextAutosizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698