WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 17427
63894
Incorrect text wrap
https://bugs.webkit.org/show_bug.cgi?id=63894
Summary
Incorrect text wrap
Cameron Wong
Reported
2011-07-04 02:07:56 PDT
Hello, Here is the test code to reproduce the problem: <html><body><div style='width:2px;border:solid 1px red'><span>0</span><span>汉1</span></div></body></html> In theory, the text should be wrapped before "汉". But Webkit wrap it after "汉". I think the problem lies in function nextBreakablePosition in webcore/rendering/break_lines.cpp. nextBreakablePosition will never return index of 0, which it will break at least after the first character. However, it will not break at the end of an inline element, which may be because it is not certain that whether next character is In function nextBreakablePosition, the initial value of lastCh is 0 if it's at the beginning of a RenderText. UChar lastCh = pos > 0 ? str[pos - 1] : 0; I think passing the last character as an argument of this function will solve this problem. We can update the last character in RenderBlock::findNextLineBreak What do you think?
Attachments
Add attachment
proposed patch, testcase, etc.
fantasai
Comment 1
2024-05-06 13:20:22 PDT
Looks like this was fixed in 2013 in
https://github.com/WebKit/WebKit/commit/bd6cb5784c8a55d332dd37d9ff6cdc4107c9bc29
https://bugs.webkit.org/show_bug.cgi?id=17427
Alexey Proskuryakov
Comment 2
2024-05-06 14:43:37 PDT
*** This bug has been marked as a duplicate of
bug 17427
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug