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

Unified Diff: Source/core/rendering/FastTextAutosizer.h

Issue 212163006: Revert of Preserve autosizing multiplier on style recalc. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reverting auto-sizing three patches 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/core/rendering/FastTextAutosizer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/FastTextAutosizer.h
diff --git a/Source/core/rendering/FastTextAutosizer.h b/Source/core/rendering/FastTextAutosizer.h
index 8228c11efe97d8e443d58f8d37c56fd7c3d7dca9..df7b04cdec9ba3c0aefc5588a46b39c5c676c798 100644
--- a/Source/core/rendering/FastTextAutosizer.h
+++ b/Source/core/rendering/FastTextAutosizer.h
@@ -60,8 +60,6 @@ public:
return adoptPtr(new FastTextAutosizer(document));
}
- void updatePageInfoInAllFrames();
- void updatePageInfo();
void record(const RenderBlock*);
void destroy(const RenderBlock*);
void inflateListItem(RenderListItem*, RenderListMarker*);
@@ -84,9 +82,10 @@ private:
NotEnoughText
};
- enum RelayoutBehavior {
- AlreadyInLayout, // The default; appropriate if we are already in layout.
- LayoutNeeded // Use this if changing a multiplier outside of layout.
+ enum PageAutosizingStatus {
+ PageAutosizingStatusUnknown,
+ PageNeedsAutosizing,
+ PageDoesNotNeedAutosizing
};
// A supercluster represents autosizing information about a set of two or
@@ -191,8 +190,7 @@ private:
void inflateTable(RenderTable*);
void inflate(RenderBlock*);
bool enabled();
- void setAllTextNeedsLayout();
- void resetMultipliers();
+ void updateRenderViewInfo();
void prepareClusterStack(const RenderObject*);
bool isFingerprintingCandidate(const RenderBlock*);
bool clusterHasEnoughTextToAutosize(Cluster*, const RenderBlock* widthProvider = 0);
@@ -213,7 +211,7 @@ private:
// block's width otherwise.
float widthFromBlock(const RenderBlock*);
float multiplierFromBlock(const RenderBlock*);
- void applyMultiplier(RenderObject*, float, RelayoutBehavior = AlreadyInLayout);
+ void applyMultiplier(RenderObject*, float);
bool isWiderOrNarrowerDescendant(Cluster*);
bool isLayoutRoot(const RenderBlock*) const;
@@ -232,10 +230,10 @@ private:
int m_frameWidth; // LocalFrame width in density-independent pixels (DIPs).
int m_layoutWidth; // Layout width in CSS pixels.
float m_baseMultiplier; // Includes accessibility font scale factor and device scale adjustment.
- bool m_pageNeedsAutosizing;
- bool m_previouslyAutosized;
+ PageAutosizingStatus m_pageAutosizingStatus;
const RenderBlock* m_firstBlock; // First block to receive beginLayout.
#ifndef NDEBUG
+ bool m_renderViewInfoPrepared;
BlockSet m_blocksThatHaveBegunLayout; // Used to ensure we don't compute properties of a block before beginLayout() is called on it.
#endif
« 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