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

Unified Diff: Source/core/paint/ListMarkerPainter.cpp

Issue 873453002: Fix ASSERT in ListMarkerPainter::paint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « LayoutTests/fast/lists/list-marker-text-reverse-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/ListMarkerPainter.cpp
diff --git a/Source/core/paint/ListMarkerPainter.cpp b/Source/core/paint/ListMarkerPainter.cpp
index 79b342e3878db22d1f302325a20366fb339e4103..a1eb738d414d526599664690c22297784f946539 100644
--- a/Source/core/paint/ListMarkerPainter.cpp
+++ b/Source/core/paint/ListMarkerPainter.cpp
@@ -190,11 +190,11 @@ void ListMarkerPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& pai
bool textNeedsReversing = WTF::Unicode::direction(m_renderListMarker.text()[0]) == WTF::Unicode::RightToLeft;
StringBuilder reversedText;
if (textNeedsReversing) {
- int length = m_renderListMarker.text().length();
+ unsigned length = m_renderListMarker.text().length();
reversedText.reserveCapacity(length);
for (int i = length - 1; i >= 0; --i)
reversedText.append(m_renderListMarker.text()[i]);
- ASSERT(reversedText.length() == reversedText.capacity());
+ ASSERT(reversedText.length() == length);
textRun.setText(reversedText.toString());
}
« no previous file with comments | « LayoutTests/fast/lists/list-marker-text-reverse-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698