[Webkit-unassigned] [Bug 9670] New: REGRESSION: RTL white-space:pre-wrap text is offset to the right
bugzilla-daemon at opendarwin.org
bugzilla-daemon at opendarwin.org
Fri Jun 30 16:02:05 PDT 2006
http://bugzilla.opendarwin.org/show_bug.cgi?id=9670
Summary: REGRESSION: RTL white-space:pre-wrap text is offset to
the right
Product: WebKit
Version: 420+ (nightly)
Platform: Macintosh
OS/Version: Mac OS X 10.4
Status: NEW
Severity: critical
Priority: P1
Component: Layout and Rendering
AssignedTo: webkit-unassigned at opendarwin.org
ReportedBy: opendarwin.org at mitzpettel.com
Summary:
When a line of RTL text with white-space: pre-wrap is broken such that its
width including the trailing space is greater than the available width, the
line is rendered offset to the right.
To Reproduce:
Open the attached test case in Safari.
Expected result:
First line of text to be aligned with the right edge of the yellow rect.
Actual result:
The first line overflows the yellow rect. It is offset to the right by (almost)
the width of its trailing space.
Regression:
Searching through the nightly builds, it looks like the problem appeared
in r11042.
Additional information:
Pre-wrap text breaks after the space, but the width including the space is
allowed to exceed the available
width. RenderBlock::computeHorizontalPositionsForLine() then shrinks the text
box to the available width. With LTR text, the trailing space actually
overflows the "shrunk" box, but being a space, it goes unnoticed. In the RTL
case, the text, including the trailing space (now on the left) is aligned with
the left edge of the "shrunk" box, and the excess overflows on the right.
This is bug is critical, since it affects virtually all editable HTML,
including Mail and native text fields.
The only solution that I have come up with so far is, under those circumstances
(RTL && autoWrap && breakOnlyAfterWhiteSpace) to align text with the right edge
of the InlineTextBox. This involves checking for those conditions in a few
places in InlineTextBox, and if they hold, measuring the text and subtracting
the difference between the box's width and the text width from the x offset
passed to drawText and other drawing/hit testing functions.
--
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list