[Webkit-unassigned] [Bug 56854] New: computation in InlineTextBox::positionForOffset() might be wrong.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 22 12:02:44 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=56854
Summary: computation in InlineTextBox::positionForOffset()
might be wrong.
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: xji at chromium.org
Following line inside "float InlineTextBox::positionForOffset(int offset) const" might be wrong:
// FIXME: Do we need to add rightBearing here?
return f.selectionRectForText(TextRun(text->text()->characters() + m_start, m_len, textRenderer()->allowTabs(), textPos(), m_expansion, trailingExpansionBehavior(), !isLeftToRightDirection(), m_dirOverride),
IntPoint(logicalLeft(), 0), 0, from, to).maxX();
convert "logicalLeft()" to "int" in "IntPoint(logicalLeft(), 0)" should not be done.
For example,
<textarea id="textarea_rtl_no_wrap" style="padding:0; margin:0; white-space:nowrap; width: 100px; font: 8px" dir="rtl">דגלחכ גדכ לחידגכ יחעדד</textarea>
the width of the text is 120, the logicalLeft() is -19.775, which is round to -19. Then, the positionForOffset(0) will be "120 - 19 = 101" which is greater than the textarea width: 100px.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list