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

Unified Diff: Source/core/rendering/line/LineLayoutState.h

Issue 145083009: Remove unnecessary repaint from line layout and cleanup logic (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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/line/LineLayoutState.h
diff --git a/Source/core/rendering/line/LineLayoutState.h b/Source/core/rendering/line/LineLayoutState.h
index 963c515d4936dcdc1fc479d5666236504a9bd579..bc7480fcd61228277905942f3be1fe594bcbe756 100644
--- a/Source/core/rendering/line/LineLayoutState.h
+++ b/Source/core/rendering/line/LineLayoutState.h
@@ -42,6 +42,7 @@ public:
, m_endLineLogicalTop(0)
, m_endLineMatched(false)
, m_checkForFloatsFromLastLine(false)
+ , m_hasInlineChild(false)
, m_isFullLayout(fullLayout)
, m_repaintLogicalTop(repaintLogicalTop)
, m_repaintLogicalBottom(repaintLogicalBottom)
@@ -74,6 +75,9 @@ public:
bool checkForFloatsFromLastLine() const { return m_checkForFloatsFromLastLine; }
void setCheckForFloatsFromLastLine(bool check) { m_checkForFloatsFromLastLine = check; }
+ bool hasInlineChild() const { return m_hasInlineChild; }
+ void setHasInlineChild(bool hasInlineChild) { m_hasInlineChild = hasInlineChild; }
+
LineInfo& lineInfo() { return m_lineInfo; }
const LineInfo& lineInfo() const { return m_lineInfo; }
@@ -106,6 +110,9 @@ private:
LayoutUnit m_endLineLogicalTop;
bool m_endLineMatched;
bool m_checkForFloatsFromLastLine;
+ // Used as a performance optimization to avoid doing a full repaint when our floats
+ // change but we don't have any inline children.
+ bool m_hasInlineChild;
bool m_isFullLayout;

Powered by Google App Engine
This is Rietveld 408576698