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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h

Issue 2770203002: Replace DCHECK with DCHECK_op and split some DCHECKs wherever necessary (Closed)
Patch Set: Add few more Created 3 years, 8 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 * Copyright (C) 2013 Adobe Systems Incorporated. 6 * Copyright (C) 2013 Adobe Systems Incorporated.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 true, false) 1112 true, false)
1113 .toFloat()); 1113 .toFloat());
1114 m_appliedStartWidth = true; 1114 m_appliedStartWidth = true;
1115 } 1115 }
1116 1116
1117 midWordBreak = false; 1117 midWordBreak = false;
1118 if (!m_width.fitsOnLine()) { 1118 if (!m_width.fitsOnLine()) {
1119 if (hyphenation && (m_nextObject || isLineEmpty || 1119 if (hyphenation && (m_nextObject || isLineEmpty ||
1120 hasVisibleText(layoutText, m_current.offset()))) { 1120 hasVisibleText(layoutText, m_current.offset()))) {
1121 m_width.addUncommittedWidth(-wordMeasurement.width); 1121 m_width.addUncommittedWidth(-wordMeasurement.width);
1122 DCHECK(lastSpace == static_cast<unsigned>(wordMeasurement.startOffset)); 1122 DCHECK_EQ(lastSpace,
1123 DCHECK(m_current.offset() == 1123 static_cast<unsigned>(wordMeasurement.startOffset));
1124 static_cast<unsigned>(wordMeasurement.endOffset)); 1124 DCHECK_EQ(m_current.offset(),
1125 static_cast<unsigned>(wordMeasurement.endOffset));
1125 if (hyphenate(layoutText, style, font, *hyphenation, 1126 if (hyphenate(layoutText, style, font, *hyphenation,
1126 lastSpaceWordSpacing, wordMeasurement)) { 1127 lastSpaceWordSpacing, wordMeasurement)) {
1127 m_width.addUncommittedWidth(wordMeasurement.width); 1128 m_width.addUncommittedWidth(wordMeasurement.width);
1128 hyphenated = true; 1129 hyphenated = true;
1129 m_atEnd = true; 1130 m_atEnd = true;
1130 return false; 1131 return false;
1131 } 1132 }
1132 m_width.addUncommittedWidth(wordMeasurement.width); 1133 m_width.addUncommittedWidth(wordMeasurement.width);
1133 } 1134 }
1134 if (canBreakMidWord) { 1135 if (canBreakMidWord) {
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 1552
1552 if (style.getTextIndentType() == TextIndentHanging) 1553 if (style.getTextIndentType() == TextIndentHanging)
1553 indentText = indentText == IndentText ? DoNotIndentText : IndentText; 1554 indentText = indentText == IndentText ? DoNotIndentText : IndentText;
1554 1555
1555 return indentText; 1556 return indentText;
1556 } 1557 }
1557 1558
1558 } // namespace blink 1559 } // namespace blink
1559 1560
1560 #endif // BreakingContextInlineHeaders_h 1561 #endif // BreakingContextInlineHeaders_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698