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

Side by Side Diff: third_party/WebKit/Source/core/layout/TextAutosizer.h

Issue 2817443003: Fix font-size shaking issue in some pages (Closed)
Patch Set: rebaseline layout-after-append.html Created 3 years, 8 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 bool skip_layouted_nodes = false); 302 bool skip_layouted_nodes = false);
303 bool ClusterWouldHaveEnoughTextToAutosize( 303 bool ClusterWouldHaveEnoughTextToAutosize(
304 const LayoutBlock* root, 304 const LayoutBlock* root,
305 const LayoutBlock* width_provider = nullptr); 305 const LayoutBlock* width_provider = nullptr);
306 Fingerprint GetFingerprint(LayoutObject*); 306 Fingerprint GetFingerprint(LayoutObject*);
307 Fingerprint ComputeFingerprint(const LayoutObject*); 307 Fingerprint ComputeFingerprint(const LayoutObject*);
308 Cluster* MaybeCreateCluster(LayoutBlock*); 308 Cluster* MaybeCreateCluster(LayoutBlock*);
309 float ClusterMultiplier(Cluster*); 309 float ClusterMultiplier(Cluster*);
310 float SuperclusterMultiplier(Cluster*); 310 float SuperclusterMultiplier(Cluster*);
311 // A cluster's width provider is typically the deepest block containing all 311 // A cluster's width provider is typically the deepest block containing all
312 // text. There are exceptions, such as tables and table cells which use the 312 // text. There are exceptions:
313 // table itself for width. 313 // 1. Tables and table cells which use the table itself for width.
314 // 2. LayoutView which use itself for keeping its clusterMultiplier steady.
314 const LayoutBlock* ClusterWidthProvider(const LayoutBlock*) const; 315 const LayoutBlock* ClusterWidthProvider(const LayoutBlock*) const;
315 const LayoutBlock* MaxClusterWidthProvider( 316 const LayoutBlock* MaxClusterWidthProvider(
316 Supercluster*, 317 Supercluster*,
317 const LayoutBlock* current_root) const; 318 const LayoutBlock* current_root) const;
318 // Typically this returns a block's computed width. In the case of tables 319 // Typically this returns a block's computed width. In the case of tables
319 // layout, this width is not yet known so the fixed width is used if it's 320 // layout, this width is not yet known so the fixed width is used if it's
320 // available, or the containing block's width otherwise. 321 // available, or the containing block's width otherwise.
321 float WidthFromBlock(const LayoutBlock*) const; 322 float WidthFromBlock(const LayoutBlock*) const;
322 float MultiplierFromBlock(const LayoutBlock*); 323 float MultiplierFromBlock(const LayoutBlock*);
323 void ApplyMultiplier(LayoutObject*, 324 void ApplyMultiplier(LayoutObject*,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 FingerprintMapper fingerprint_mapper_; 356 FingerprintMapper fingerprint_mapper_;
356 Vector<RefPtr<ComputedStyle>> styles_retained_during_layout_; 357 Vector<RefPtr<ComputedStyle>> styles_retained_during_layout_;
357 // FIXME: All frames should share the same m_pageInfo instance. 358 // FIXME: All frames should share the same m_pageInfo instance.
358 PageInfo page_info_; 359 PageInfo page_info_;
359 bool update_page_info_deferred_; 360 bool update_page_info_deferred_;
360 }; 361 };
361 362
362 } // namespace blink 363 } // namespace blink
363 364
364 #endif // TextAutosizer_h 365 #endif // TextAutosizer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698