Changeset 72788 in webkit
- Timestamp:
- Nov 29, 2010 4:05:56 AM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r72786 r72788 1 2010-11-29 Jan Erik Hanssen <jhanssen@sencha.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 QtWebKit asserts when selecting elided text. 6 https://bugs.webkit.org/show_bug.cgi?id=45391 7 8 Ensure that the length passed to fromRawDataWithoutRef() does 9 not exceed the length of the string. 10 11 * platform/graphics/qt/FontQt.cpp: 12 (WebCore::Font::selectionRectForSimpleText): 13 1 14 2010-11-26 Alexander Pavlov <apavlov@chromium.org> 2 15 -
trunk/WebCore/platform/graphics/qt/FontQt.cpp
r72660 r72788 345 345 String sanitized = Font::normalizeSpaces(String(run.characters(), run.length())); 346 346 QString wholeText = fromRawDataWithoutRef(sanitized); 347 QString selectedText = fromRawDataWithoutRef(sanitized, from, to - from);347 QString selectedText = fromRawDataWithoutRef(sanitized, from, qMin(to - from, wholeText.length() - from)); 348 348 349 349 int startX = QFontMetrics(font()).width(wholeText, from, Qt::TextBypassShaping);
Note: See TracChangeset
for help on using the changeset viewer.