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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.h

Issue 1993943002: Move m_lineBoxes and its getters down to LayoutBlockFlow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: third_party/WebKit/Source/core/layout/LayoutBlockFlow.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h
index 4b47f1029ee7b7c2dbfc3ce0731aa865f4b87887..a48293b0596907d4e26954a69398f048d0e28d39 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h
@@ -39,6 +39,9 @@
#include "core/CoreExport.h"
#include "core/layout/FloatingObjects.h"
#include "core/layout/LayoutBlock.h"
+#include "core/layout/api/LineLayoutItem.h"
+#include "core/layout/line/LineBoxList.h"
+#include "core/layout/line/RootInlineBox.h"
#include "core/layout/line/TrailingObjects.h"
#include "core/style/ComputedStyleConstants.h"
@@ -124,13 +127,12 @@ public:
: logicalWidth() - logicalRightOffsetForLine(position, indentText, logicalHeight);
}
- // FIXME-BLOCKFLOW: Move this into LayoutBlockFlow once there are no calls
- // in LayoutBlock. http://crbug.com/393945, http://crbug.com/302024
- using LayoutBlock::lineBoxes;
- using LayoutBlock::firstLineBox;
- using LayoutBlock::lastLineBox;
- using LayoutBlock::firstRootBox;
- using LayoutBlock::lastRootBox;
+ const LineBoxList& lineBoxes() const { return m_lineBoxes; }
+ LineBoxList* lineBoxes() { return &m_lineBoxes; }
+ InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); }
+ InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); }
+ RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(firstLineBox()); }
+ RootInlineBox* lastRootBox() const { return static_cast<RootInlineBox*>(lastLineBox()); }
LayoutUnit logicalLeftSelectionOffset(const LayoutBlock* rootBlock, LayoutUnit position) const override;
LayoutUnit logicalRightSelectionOffset(const LayoutBlock* rootBlock, LayoutUnit position) const override;
@@ -608,6 +610,8 @@ private:
// Used to store state between styleWillChange and styleDidChange
static bool s_canPropagateFloatIntoSibling;
+ LineBoxList m_lineBoxes; // All of the root line boxes created for this block flow. For example, <div>Hello<br>world.</div> will have two total lines for the <div>.
+
LayoutBlockFlowRareData& ensureRareData();
LayoutUnit m_paintInvalidationLogicalTop;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698