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

Unified Diff: third_party/WebKit/Source/core/layout/line/InlineIterator.h

Issue 2748103015: Replace ASSERT with DCHECK in core/layout/<sub dirs> (Closed)
Patch Set: Rebase with latest Created 3 years, 9 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/line/InlineIterator.h
diff --git a/third_party/WebKit/Source/core/layout/line/InlineIterator.h b/third_party/WebKit/Source/core/layout/line/InlineIterator.h
index cf2798d84cb0da08de9ba21b0862bf8fa3d5fac8..ac0c54d11a05d2aba220cd75390c4d9e4aa1294d 100644
--- a/third_party/WebKit/Source/core/layout/line/InlineIterator.h
+++ b/third_party/WebKit/Source/core/layout/line/InlineIterator.h
@@ -399,9 +399,9 @@ static inline LineLayoutItem bidiFirstIncludingEmptyInlines(
}
inline void InlineIterator::fastIncrementInTextNode() {
- ASSERT(m_lineLayoutItem);
- ASSERT(m_lineLayoutItem.isText());
- ASSERT(m_pos <= LineLayoutText(m_lineLayoutItem).textLength());
+ DCHECK(m_lineLayoutItem);
+ DCHECK(m_lineLayoutItem.isText());
+ DCHECK_LE(m_pos, LineLayoutText(m_lineLayoutItem).textLength());
if (m_pos < INT_MAX)
m_pos++;
}
@@ -567,7 +567,7 @@ static inline int findFirstTrailingSpace(LineLayoutText lastText,
template <>
inline int InlineBidiResolver::findFirstTrailingSpaceAtRun(BidiRun* run) {
- ASSERT(run);
+ DCHECK(run);
LineLayoutItem lastObject = LineLayoutItem(run->m_lineLayoutItem);
if (!lastObject.isText())
return run->m_stop;
@@ -614,21 +614,21 @@ inline bool InlineBidiResolver::needsToApplyL1Rule(BidiRunList<BidiRun>& runs) {
}
static inline bool isIsolatedInline(LineLayoutItem object) {
- ASSERT(object);
+ DCHECK(object);
return object.isLayoutInline() && treatAsIsolated(object.styleRef());
}
static inline LineLayoutItem highestContainingIsolateWithinRoot(
LineLayoutItem object,
LineLayoutItem root) {
- ASSERT(object);
+ DCHECK(object);
LineLayoutItem containingIsolateObj(nullptr);
while (object && object != root) {
if (isIsolatedInline(object))
containingIsolateObj = LineLayoutItem(object);
object = object.parent();
- ASSERT(object);
+ DCHECK(object);
}
return containingIsolateObj;
}
@@ -653,7 +653,7 @@ static inline BidiRun* addPlaceholderRunForIsolatedInline(
LineLayoutItem obj,
unsigned pos,
LineLayoutItem root) {
- ASSERT(obj);
+ DCHECK(obj);
BidiRun* isolatedRun =
new BidiRun(resolver.context()->override(), resolver.context()->level(),
pos, pos, obj, resolver.dir(), resolver.context()->dir());
@@ -693,7 +693,7 @@ class IsolateTracker {
void enterIsolate() { m_nestedIsolateCount++; }
void exitIsolate() {
- ASSERT(m_nestedIsolateCount >= 1);
+ DCHECK_GE(m_nestedIsolateCount, 1u);
m_nestedIsolateCount--;
if (!inIsolate())
m_haveAddedFakeRunForRootIsolate = false;

Powered by Google App Engine
This is Rietveld 408576698