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

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

Issue 715973004: Remove FragementationData lazyness (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix moar compiler bugs Created 6 years, 1 month 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/rendering/InlineFlowBox.h ('k') | Source/core/rendering/RootInlineBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RootInlineBox.h
diff --git a/Source/core/rendering/RootInlineBox.h b/Source/core/rendering/RootInlineBox.h
index 6eeca31e16caa524d007b43a7d5a3fcbbb73351e..caf5eb588fb8156f270f66bca95a93822b31882d 100644
--- a/Source/core/rendering/RootInlineBox.h
+++ b/Source/core/rendering/RootInlineBox.h
@@ -54,13 +54,10 @@ public:
LayoutUnit lineTopWithLeading() const { return m_lineTopWithLeading; }
LayoutUnit lineBottomWithLeading() const { return m_lineBottomWithLeading; }
- LayoutUnit paginationStrut() const { return m_fragmentationData ? m_fragmentationData->m_paginationStrut : LayoutUnit(0); }
- void setPaginationStrut(LayoutUnit strut) { ensureLineFragmentationData()->m_paginationStrut = strut; }
+ LayoutUnit paginationStrut() const { return m_paginationStrut; }
+ void setPaginationStrut(LayoutUnit strut) { m_paginationStrut = strut; }
- bool isFirstAfterPageBreak() const { return m_fragmentationData ? m_fragmentationData->m_isFirstAfterPageBreak : false; }
- void setIsFirstAfterPageBreak(bool isFirstAfterPageBreak) { ensureLineFragmentationData()->m_isFirstAfterPageBreak = isFirstAfterPageBreak; }
-
- void setPaginatedLineWidth(LayoutUnit width) { ensureLineFragmentationData()->m_paginatedLineWidth = width; }
+ void setPaginatedLineWidth(LayoutUnit width) { m_paginatedLineWidth = width; }
LayoutUnit selectionTop() const;
LayoutUnit selectionBottom() const;
@@ -186,15 +183,6 @@ public:
private:
LayoutUnit beforeAnnotationsAdjustment() const;
- struct LineFragmentationData;
- LineFragmentationData* ensureLineFragmentationData()
- {
- if (!m_fragmentationData)
- m_fragmentationData = adoptPtr(new LineFragmentationData());
-
- return m_fragmentationData.get();
- }
-
// This folds into the padding at the end of InlineFlowBox on 64-bit.
unsigned m_lineBreakPos;
@@ -203,24 +191,6 @@ private:
RenderObject* m_lineBreakObj;
RefPtr<BidiContext> m_lineBreakContext;
- struct LineFragmentationData {
- WTF_MAKE_NONCOPYABLE(LineFragmentationData); WTF_MAKE_FAST_ALLOCATED;
- public:
- LineFragmentationData()
- : m_paginationStrut(0)
- , m_paginatedLineWidth(0)
- , m_isFirstAfterPageBreak(false)
- {
-
- }
-
- LayoutUnit m_paginationStrut;
- LayoutUnit m_paginatedLineWidth;
- bool m_isFirstAfterPageBreak;
- };
-
- OwnPtr<LineFragmentationData> m_fragmentationData;
-
// Floats hanging off the line are pushed into this vector during layout. It is only
// good for as long as the line has not been marked dirty.
OwnPtr<Vector<RenderBox*> > m_floats;
@@ -230,6 +200,8 @@ private:
LayoutUnit m_lineTopWithLeading;
LayoutUnit m_lineBottomWithLeading;
LayoutUnit m_selectionBottom;
+ LayoutUnit m_paginationStrut;
+ LayoutUnit m_paginatedLineWidth;
};
} // namespace blink
« no previous file with comments | « Source/core/rendering/InlineFlowBox.h ('k') | Source/core/rendering/RootInlineBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698