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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp

Issue 2754723004: Replace RELEASE_ASSERT with CHECK in core/layout/ (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All right reserved. 4 * All right reserved.
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 return; 89 return;
90 90
91 size_t i = 0; 91 size_t i = 0;
92 for (BidiRun* r = firstRun; r; r = r->next()) { 92 for (BidiRun* r = firstRun; r; r = r->next()) {
93 if (!r->m_box || r == trailingSpaceRun) 93 if (!r->m_box || r == trailingSpaceRun)
94 continue; 94 continue;
95 95
96 if (r->m_lineLayoutItem.isText()) { 96 if (r->m_lineLayoutItem.isText()) {
97 unsigned opportunitiesInRun = m_runsWithExpansions[i++]; 97 unsigned opportunitiesInRun = m_runsWithExpansions[i++];
98 98
99 RELEASE_ASSERT(opportunitiesInRun <= m_totalOpportunities); 99 CHECK_LE(opportunitiesInRun, m_totalOpportunities);
100 100
101 // Don't justify for white-space: pre. 101 // Don't justify for white-space: pre.
102 if (r->m_lineLayoutItem.style()->whiteSpace() != EWhiteSpace::kPre) { 102 if (r->m_lineLayoutItem.style()->whiteSpace() != EWhiteSpace::kPre) {
103 InlineTextBox* textBox = toInlineTextBox(r->m_box); 103 InlineTextBox* textBox = toInlineTextBox(r->m_box);
104 RELEASE_ASSERT(m_totalOpportunities); 104 CHECK(m_totalOpportunities);
105 int expansion = ((availableLogicalWidth - totalLogicalWidth) * 105 int expansion = ((availableLogicalWidth - totalLogicalWidth) *
106 opportunitiesInRun / m_totalOpportunities) 106 opportunitiesInRun / m_totalOpportunities)
107 .toInt(); 107 .toInt();
108 textBox->setExpansion(expansion); 108 textBox->setExpansion(expansion);
109 totalLogicalWidth += expansion; 109 totalLogicalWidth += expansion;
110 } 110 }
111 m_totalOpportunities -= opportunitiesInRun; 111 m_totalOpportunities -= opportunitiesInRun;
112 if (!m_totalOpportunities) 112 if (!m_totalOpportunities)
113 break; 113 break;
114 } 114 }
(...skipping 2472 matching lines...) Expand 10 before | Expand all | Expand 10 after
2587 2587
2588 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { 2588 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const {
2589 // LayoutBlockFlow is in charge of paint invalidation of the first line. 2589 // LayoutBlockFlow is in charge of paint invalidation of the first line.
2590 if (firstLineBox()) 2590 if (firstLineBox())
2591 return false; 2591 return false;
2592 2592
2593 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); 2593 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize();
2594 } 2594 }
2595 2595
2596 } // namespace blink 2596 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698