RESOLVED FIXED 39014
[chromium] Improve spacing support for complex text on Linux
https://bugs.webkit.org/show_bug.cgi?id=39014
Summary [chromium] Improve spacing support for complex text on Linux
Adam Langley
Reported 2010-05-12 12:26:28 PDT
Previously, our complex text support ignored word-spacing, justification and letter-spacing. This fixes the first two issues and allows us to render Scribd's HTML5 documents much better.
Attachments
patch (10.32 KB, patch)
2010-05-12 12:28 PDT, Adam Langley
no flags
patch (13.12 KB, patch)
2010-05-17 13:08 PDT, Adam Langley
no flags
Patch (38.72 KB, patch)
2010-08-11 12:11 PDT, Adam Langley
no flags
Patch (119.01 KB, patch)
2010-08-11 13:06 PDT, Adam Langley
no flags
Patch (118.58 KB, patch)
2010-08-11 13:24 PDT, Adam Langley
tony: review+
Adam Langley
Comment 1 2010-05-12 12:28:56 PDT
Created attachment 55885 [details] patch I get differing opinions on what the current policy on adding layout tests is, but I'm doing what I /think/ is correct here.
Tony Chang
Comment 2 2010-05-12 17:13:47 PDT
I think you're adding a layout test correctly. There should probably be at least the Chromium Linux results in LayoutTests/platform/chromium-linux. I assume you're planning on getting the other platform results from the bots after you commit.
Adam Langley
Comment 3 2010-05-17 13:08:42 PDT
Gustavo Noronha (kov)
Comment 4 2010-05-21 13:53:31 PDT
Out of curiosity, what are the first two issues?
Adam Langley
Comment 5 2010-05-21 14:00:01 PDT
(In reply to comment #4) > Out of curiosity, what are the first two issues? word-spacing and justification. See the comments in the patch about why we still don't handle letter spacing. (Note that Scribd is still a little broken on Windows, although I think I know what the issue is and will hopefully get it fixed after this patch.)
Kent Tamura
Comment 6 2010-06-12 19:40:57 PDT
Comment on attachment 56259 [details] patch I'm not familiar with this part of code, but - Update your WebKit revision and remake the patch - The patch lacks complex-text-word-spacing-expected.png content - The test should have an RTL case.
Xiaomei Ji
Comment 7 2010-07-27 15:34:06 PDT
*** Bug 42111 has been marked as a duplicate of this bug. ***
Adam Langley
Comment 8 2010-08-11 12:11:17 PDT
mitz
Comment 9 2010-08-11 12:14:36 PDT
Comment on attachment 64142 [details] Patch > + if (numWordBreaks) > + m_padPerWordBreak = ceilf(static_cast<float>(m_padding) / numWordBreaks); […] > + if (m_padding) { > + unsigned toPad = m_padPerWordBreak; > + if (m_padding < toPad) > + toPad = m_padding; > + m_padding -= toPad; Looks like you’re introducing the kind of behavior described in bug 36105.
Adam Langley
Comment 10 2010-08-11 12:17:46 PDT
Comment on attachment 64142 [details] Patch (In reply to comment #9) > Looks like you’re introducing the kind of behavior described in bug 36105. Very good point. Thank you, sir. I'll fix that now.
Adam Langley
Comment 11 2010-08-11 13:06:54 PDT
Adam Langley
Comment 12 2010-08-11 13:24:26 PDT
Evan Martin
Comment 13 2010-08-11 13:43:37 PDT
Looks fine to me.
Tony Chang
Comment 14 2010-08-11 13:48:58 PDT
Comment on attachment 64155 [details] Patch > diff --git a/WebCore/platform/graphics/chromium/FontLinux.cpp b/WebCore/platform/graphics/chromium/FontLinux.cpp > , m_run(getTextRun(run)) > , m_iterateBackwards(m_run.rtl()) > + , m_wordSpacingAdjustment(0) > + , m_padding(0) > + , m_padError(0) Do you need to initialize m_padPerWordBreak and m_letterSpacing (well, I guess this isn't used yet so it doesn't matter) here?
WebKit Review Bot
Comment 15 2010-08-16 08:58:51 PDT
http://trac.webkit.org/changeset/65428 might have broken SnowLeopard Intel Release (Tests)
Adam Langley
Comment 16 2010-08-16 09:01:52 PDT
r65428 (SnowLeopard Intel Release (Tests) was red long before this commit.)
Note You need to log in before you can comment on or make changes to this bug.