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

Unified Diff: third_party/WebKit/Source/core/layout/line/LineBoxList.cpp

Issue 2871983002: blink: Remove CHECK_CONSISTENCY. (Closed)
Patch Set: . Created 3 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/LineBoxList.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/line/LineBoxList.cpp
diff --git a/third_party/WebKit/Source/core/layout/line/LineBoxList.cpp b/third_party/WebKit/Source/core/layout/line/LineBoxList.cpp
index fedc8b7bee869fad758de752a0d02e1e2655754d..de5ef615d4cf4f18f3103aa6ad626d930dbb90c3 100644
--- a/third_party/WebKit/Source/core/layout/line/LineBoxList.cpp
+++ b/third_party/WebKit/Source/core/layout/line/LineBoxList.cpp
@@ -48,8 +48,6 @@ LineBoxList::~LineBoxList() {
#endif
void LineBoxList::AppendLineBox(InlineFlowBox* box) {
- CheckConsistency();
-
if (!first_line_box_) {
first_line_box_ = last_line_box_ = box;
} else {
@@ -57,8 +55,6 @@ void LineBoxList::AppendLineBox(InlineFlowBox* box) {
box->SetPreviousLineBox(last_line_box_);
last_line_box_ = box;
}
-
- CheckConsistency();
}
void LineBoxList::DeleteLineBoxTree() {
@@ -73,8 +69,6 @@ void LineBoxList::DeleteLineBoxTree() {
}
void LineBoxList::ExtractLineBox(InlineFlowBox* box) {
- CheckConsistency();
-
last_line_box_ = box->PrevLineBox();
if (box == first_line_box_)
first_line_box_ = nullptr;
@@ -83,13 +77,9 @@ void LineBoxList::ExtractLineBox(InlineFlowBox* box) {
box->SetPreviousLineBox(nullptr);
for (InlineFlowBox* curr = box; curr; curr = curr->NextLineBox())
curr->SetExtracted();
-
- CheckConsistency();
}
void LineBoxList::AttachLineBox(InlineFlowBox* box) {
- CheckConsistency();
-
if (last_line_box_) {
last_line_box_->SetNextLineBox(box);
box->SetPreviousLineBox(last_line_box_);
@@ -102,13 +92,9 @@ void LineBoxList::AttachLineBox(InlineFlowBox* box) {
last = curr;
}
last_line_box_ = last;
-
- CheckConsistency();
}
void LineBoxList::RemoveLineBox(InlineFlowBox* box) {
- CheckConsistency();
-
if (box == first_line_box_)
first_line_box_ = box->NextLineBox();
if (box == last_line_box_)
@@ -117,8 +103,6 @@ void LineBoxList::RemoveLineBox(InlineFlowBox* box) {
box->NextLineBox()->SetPreviousLineBox(box->PrevLineBox());
if (box->PrevLineBox())
box->PrevLineBox()->SetNextLineBox(box->NextLineBox());
-
- CheckConsistency();
}
void LineBoxList::DeleteLineBoxes() {
@@ -369,19 +353,4 @@ void LineBoxList::DirtyLinesFromChangedChild(LineLayoutItem container,
}
}
-#if DCHECK_IS_ON()
-void LineBoxList::CheckConsistency() const {
-#ifdef CHECK_CONSISTENCY
- const InlineFlowBox* prev = nullptr;
- for (const InlineFlowBox* child = m_firstLineBox; child;
- child = child->nextLineBox()) {
- DCHECK_EQ(child->prevLineBox(), prev);
- prev = child;
- }
- DCHECK_EQ(prev, m_lastLineBox);
-#endif
-}
-
-#endif
-
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/LineBoxList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698