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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutText.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
Index: third_party/WebKit/Source/core/layout/LayoutText.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutText.cpp b/third_party/WebKit/Source/core/layout/LayoutText.cpp
index bedd7fc158115e0e90668e7a728ae8ca0d1b6888..6d0f1d2d18e18ad9e9e894197a3a07c7756fea03 100644
--- a/third_party/WebKit/Source/core/layout/LayoutText.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutText.cpp
@@ -249,8 +249,6 @@ void LayoutText::WillBeDestroyed() {
}
void LayoutText::ExtractTextBox(InlineTextBox* box) {
- CheckConsistency();
-
last_text_box_ = box->PrevTextBox();
if (box == first_text_box_)
first_text_box_ = nullptr;
@@ -259,13 +257,9 @@ void LayoutText::ExtractTextBox(InlineTextBox* box) {
box->SetPreviousTextBox(nullptr);
for (InlineTextBox* curr = box; curr; curr = curr->NextTextBox())
curr->SetExtracted();
-
- CheckConsistency();
}
void LayoutText::AttachTextBox(InlineTextBox* box) {
- CheckConsistency();
-
if (last_text_box_) {
last_text_box_->SetNextTextBox(box);
box->SetPreviousTextBox(last_text_box_);
@@ -278,13 +272,9 @@ void LayoutText::AttachTextBox(InlineTextBox* box) {
last = curr;
}
last_text_box_ = last;
-
- CheckConsistency();
}
void LayoutText::RemoveTextBox(InlineTextBox* box) {
- CheckConsistency();
-
if (box == first_text_box_)
first_text_box_ = box->NextTextBox();
if (box == last_text_box_)
@@ -293,8 +283,6 @@ void LayoutText::RemoveTextBox(InlineTextBox* box) {
box->NextTextBox()->SetPreviousTextBox(box->PrevTextBox());
if (box->PrevTextBox())
box->PrevTextBox()->SetNextTextBox(box->NextTextBox());
-
- CheckConsistency();
}
void LayoutText::DeleteTextBoxes() {
@@ -2027,23 +2015,6 @@ unsigned LayoutText::ResolvedTextLength() const {
return len;
}
-#if DCHECK_IS_ON()
-
-void LayoutText::CheckConsistency() const {
-#ifdef CHECK_CONSISTENCY
- const InlineTextBox* prev = nullptr;
- for (const InlineTextBox* child = m_firstTextBox; child;
- child = child->nextTextBox()) {
- DCHECK(child->getLineLayoutItem().isEqual(this));
- DCHECK_EQ(child->prevTextBox(), prev);
- prev = child;
- }
- DCHECK_EQ(prev, m_lastTextBox);
-#endif
-}
-
-#endif
-
void LayoutText::MomentarilyRevealLastTypedCharacter(
unsigned last_typed_character_offset) {
if (!g_secure_text_timers)
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutText.h ('k') | third_party/WebKit/Source/core/layout/line/InlineFlowBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698