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

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

Issue 189113014: TextAutosizer: unlock multipliers on DOMContentLoaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix TestExpectation to ImageOnlyFailure 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
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/rendering/TextAutosizer.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 private: 76 private:
77 friend class FastTextAutosizer; 77 friend class FastTextAutosizer;
78 78
79 enum TraversalDirection { 79 enum TraversalDirection {
80 FirstToLast, 80 FirstToLast,
81 LastToFirst 81 LastToFirst
82 }; 82 };
83 83
84 explicit TextAutosizer(Document*); 84 explicit TextAutosizer(Document*);
85 85
86 bool isApplicable() const;
86 float clusterMultiplier(WritingMode, const TextAutosizingWindowInfo&, float textWidth) const; 87 float clusterMultiplier(WritingMode, const TextAutosizingWindowInfo&, float textWidth) const;
87 88
88 void processClusterInternal(TextAutosizingClusterInfo&, RenderBlock* contain er, RenderObject* subtreeRoot, const TextAutosizingWindowInfo&, float multiplier ); 89 void processClusterInternal(TextAutosizingClusterInfo&, RenderBlock* contain er, RenderObject* subtreeRoot, const TextAutosizingWindowInfo&, float multiplier );
89 void processCluster(TextAutosizingClusterInfo&, RenderBlock* container, Rend erObject* subtreeRoot, const TextAutosizingWindowInfo&); 90 void processCluster(TextAutosizingClusterInfo&, RenderBlock* container, Rend erObject* subtreeRoot, const TextAutosizingWindowInfo&);
90 void processCompositeCluster(Vector<TextAutosizingClusterInfo>&, const TextA utosizingWindowInfo&); 91 void processCompositeCluster(Vector<TextAutosizingClusterInfo>&, const TextA utosizingWindowInfo&);
91 void processContainer(float multiplier, RenderBlock* container, TextAutosizi ngClusterInfo&, RenderObject* subtreeRoot, const TextAutosizingWindowInfo&); 92 void processContainer(float multiplier, RenderBlock* container, TextAutosizi ngClusterInfo&, RenderObject* subtreeRoot, const TextAutosizingWindowInfo&);
92 93
93 void setMultiplier(RenderObject*, float); 94 void setMultiplier(RenderObject*, float);
94 void setMultiplierForList(RenderObject* renderer, float multiplier); 95 void setMultiplierForList(RenderObject* renderer, float multiplier);
95 96
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 HashMap<unsigned, float> m_hashToMultiplier; 137 HashMap<unsigned, float> m_hashToMultiplier;
137 Vector<unsigned> m_hashesToAutosizeSecondPass; 138 Vector<unsigned> m_hashesToAutosizeSecondPass;
138 139
139 // Mapping from a cluster hash to the corresponding cluster infos which have not been autosized yet. 140 // Mapping from a cluster hash to the corresponding cluster infos which have not been autosized yet.
140 HashMap<unsigned, OwnPtr<Vector<TextAutosizingClusterInfo> > > m_nonAutosize dClusters; 141 HashMap<unsigned, OwnPtr<Vector<TextAutosizingClusterInfo> > > m_nonAutosize dClusters;
141 }; 142 };
142 143
143 } // namespace WebCore 144 } // namespace WebCore
144 145
145 #endif // TextAutosizer_h 146 #endif // TextAutosizer_h
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/rendering/TextAutosizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698