[Webkit-unassigned] [Bug 17921] Extra white space at the end of right-aligned or justified text with -webkit-line-break: after-white-space
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Apr 18 13:38:39 PDT 2008
http://bugs.webkit.org/show_bug.cgi?id=17921
darin at apple.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #20675|review? |review+
Flag| |
------- Comment #5 from darin at apple.com 2008-04-18 13:38 PDT -------
(From update of attachment 20675)
This code is pretty hard for me to follow, but probably necessarily so.
I'd assert that run->m_previous is 0 in prependRun.
668 trailingSpaceWidth =
(min(trailingSpaceRun->m_box->width(), (availableWidth - totWidth + 1) / 2));
This has an extra space and unneeded parentheses.
949 if (current != ' ' && current != '\t' &&
current != softHyphen && (current != '\n' ||
lastText->style()->preserveNewline()) && (current != noBreakSpace ||
lastText->style()->nbspMode() == NBNORMAL))
It seems like this line would read better if there was a helper function for
it.
957 bool shouldSeparateSpaces =
style()->direction() == RTL || trailingSpaceRun != start.lastRun() ||
trailingSpaceRun->m_level % 2 || textAlign != LEFT && textAlign != WEBKIT_LEFT
&& textAlign != TAAUTO;
This is such a long condition that it might need some comments or be moved into
an inline function or something. It also might be nice to make the common case
faster -- I can't tell if this is so in the current version.
r=me
--
Configure bugmail: http://bugs.webkit.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