| Index: third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
|
| diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
|
| index 5cbce4bbc90ae62283d70a76e775488a7cce5651..8dcdf9e8d94b10af9da19c975125642d21028ddf 100644
|
| --- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
|
| +++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
|
| @@ -43,7 +43,7 @@ namespace blink {
|
| float ShapeResult::RunInfo::xPositionForVisualOffset(
|
| unsigned offset,
|
| AdjustMidCluster adjustMidCluster) const {
|
| - ASSERT(offset < m_numCharacters);
|
| + DCHECK_LT(offset, m_numCharacters);
|
| if (rtl())
|
| offset = m_numCharacters - offset - 1;
|
| return xPositionForOffset(offset, adjustMidCluster);
|
| @@ -52,7 +52,7 @@ float ShapeResult::RunInfo::xPositionForVisualOffset(
|
| float ShapeResult::RunInfo::xPositionForOffset(
|
| unsigned offset,
|
| AdjustMidCluster adjustMidCluster) const {
|
| - ASSERT(offset <= m_numCharacters);
|
| + DCHECK_LE(offset, m_numCharacters);
|
| const unsigned numGlyphs = m_glyphData.size();
|
| unsigned glyphIndex = 0;
|
| float position = 0;
|
| @@ -266,8 +266,8 @@ float ShapeResult::positionForOffset(unsigned absoluteOffset) const {
|
|
|
| void ShapeResult::fallbackFonts(
|
| HashSet<const SimpleFontData*>* fallback) const {
|
| - ASSERT(fallback);
|
| - ASSERT(m_primaryFont);
|
| + DCHECK(fallback);
|
| + DCHECK(m_primaryFont);
|
| for (unsigned i = 0; i < m_runs.size(); ++i) {
|
| if (m_runs[i] && m_runs[i]->m_fontData &&
|
| m_runs[i]->m_fontData != m_primaryFont &&
|
| @@ -339,9 +339,9 @@ void ShapeResult::insertRun(std::unique_ptr<ShapeResult::RunInfo> runToInsert,
|
| unsigned startGlyph,
|
| unsigned numGlyphs,
|
| hb_buffer_t* harfBuzzBuffer) {
|
| - ASSERT(numGlyphs > 0);
|
| + DCHECK_GT(numGlyphs, 0u);
|
| std::unique_ptr<ShapeResult::RunInfo> run(std::move(runToInsert));
|
| - ASSERT(numGlyphs == run->m_glyphData.size());
|
| + DCHECK_EQ(numGlyphs, run->m_glyphData.size());
|
|
|
| const SimpleFontData* currentFontData = run->m_fontData.get();
|
| const hb_glyph_info_t* glyphInfos =
|
| @@ -390,7 +390,7 @@ void ShapeResult::insertRun(std::unique_ptr<ShapeResult::RunInfo> runToInsert,
|
| run->m_width = std::max(0.0f, totalAdvance);
|
| m_width += run->m_width;
|
| m_numGlyphs += numGlyphs;
|
| - ASSERT(m_numGlyphs >= numGlyphs);
|
| + DCHECK_GE(m_numGlyphs, numGlyphs);
|
| m_hasVerticalOffsets |= hasVerticalOffsets;
|
|
|
| // The runs are stored in result->m_runs in visual order. For LTR, we place
|
|
|