[Webkit-unassigned] [Bug 17427] Line breaking opportunities at the end of a text node are missed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 22 21:58:18 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=17427


Lu jing <dujid0 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dujid0 at gmail.com




--- Comment #41 from Lu jing <dujid0 at gmail.com>  2013-02-22 22:00:40 PST ---
In RenderBlockLineLayout.cpp,

Change the following code:

==== from ====

// If the next item on the line is text, and if we did not end with
// a space, then the next text run continues our word (and so it needs to
// keep adding to the uncommitted width. Just update and continue.
checkForBreak = !currentCharacterIsSpace && (c == ' ' || c == '\t' || (c == '\n' && !next->preservesNewline()));

==== to ====

checkForBreak = !currentCharacterIsSpace &&
    (c == ' ' || c == '\t' || (c == '\n' && !next->preservesNewline())
    || isBreakable(renderTextInfo.m_lineBreakIterator, current.m_pos, current.m_nextBreakablePosition, true));

then I can get the expected result.
As the comment above, breaking opportunities are missed here.
How about this solution? I am going to check the side effects.

-- 
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