Chromium Code Reviews

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

Issue 1952613002: Move LayoutDeprecatedFlexibleBox-specific line handling. (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.
Jump to:
View side-by-side diff with in-line comments
Index: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
index 078c1b08de5eb473135d85436c0c0f17c311ee5e..7dde9c1484c8e78f50d9e5ed96a57e73344e64d0 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
@@ -1934,6 +1934,23 @@ void LayoutBlockFlow::deleteLineBoxTree()
m_lineBoxes.deleteLineBoxTree();
}
+int LayoutBlockFlow::lineCount(const RootInlineBox* stopRootInlineBox) const
+{
+#ifndef NDEBUG
+ ASSERT(!stopRootInlineBox || stopRootInlineBox->block().debugPointer() == this);
+#endif
+ if (!childrenInline())
+ return 0;
+ int count = 0;
+
+ for (RootInlineBox* box = firstRootBox(); box; box = box->nextRootBox()) {
eae 2016/05/04 12:07:27 const RootInlineBox*?
mstensho (USE GERRIT) 2016/05/04 12:14:00 Done.
+ count++;
+ if (box == stopRootInlineBox)
+ break;
+ }
+ return count;
+}
+
void LayoutBlockFlow::removeFloatingObjectsFromDescendants()
{
if (!containsFloats())

Powered by Google App Engine