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

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

Issue 209353003: Clean up handling of autosizing state changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@crap_base
Patch Set: 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
Index: Source/core/rendering/FastTextAutosizer.h
diff --git a/Source/core/rendering/FastTextAutosizer.h b/Source/core/rendering/FastTextAutosizer.h
index df7b04cdec9ba3c0aefc5588a46b39c5c676c798..b3e04fc32fddeec74fc22feff015cbcd483b0bfe 100644
--- a/Source/core/rendering/FastTextAutosizer.h
+++ b/Source/core/rendering/FastTextAutosizer.h
@@ -60,6 +60,8 @@ public:
return adoptPtr(new FastTextAutosizer(document));
}
+ void updatePageInfoInAllFrames();
+ void updatePageInfo();
void record(const RenderBlock*);
void destroy(const RenderBlock*);
void inflateListItem(RenderListItem*, RenderListMarker*);
@@ -82,12 +84,6 @@ private:
NotEnoughText
};
- enum PageAutosizingStatus {
- PageAutosizingStatusUnknown,
- PageNeedsAutosizing,
- PageDoesNotNeedAutosizing
- };
-
// A supercluster represents autosizing information about a set of two or
// more blocks that all have the same fingerprint. Clusters whose roots
// belong to a supercluster will share a common multiplier and
@@ -190,7 +186,8 @@ private:
void inflateTable(RenderTable*);
void inflate(RenderBlock*);
bool enabled();
- void updateRenderViewInfo();
+ void invalidateMultipliers();
+ void resetMultipliers();
void prepareClusterStack(const RenderObject*);
bool isFingerprintingCandidate(const RenderBlock*);
bool clusterHasEnoughTextToAutosize(Cluster*, const RenderBlock* widthProvider = 0);
@@ -230,10 +227,11 @@ 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.
- PageAutosizingStatus m_pageAutosizingStatus;
+ bool m_pageNeedsAutosizing;
+ bool m_previouslyAutosized;
+ bool m_updatePageInfoDeferred;
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

Powered by Google App Engine
This is Rietveld 408576698