RESOLVED FIXED 115931
REGRESSION: Lines jump up and down while typing Chinese or Japanese
https://bugs.webkit.org/show_bug.cgi?id=115931
Summary REGRESSION: Lines jump up and down while typing Chinese or Japanese
Ryosuke Niwa
Reported 2013-05-10 13:32:08 PDT
Fallback fonts are not used when computing line heights in some cases.
Attachments
Fix (without change log) (3.18 KB, patch)
2013-05-10 13:35 PDT, Ryosuke Niwa
no flags
Fixes one bug (4.33 KB, patch)
2013-05-10 17:09 PDT, Ryosuke Niwa
no flags
Reverted erroneous test change (3.20 KB, patch)
2013-05-10 17:10 PDT, Ryosuke Niwa
darin: review+
More comprehensive WIP fix (15.49 KB, patch)
2013-06-05 17:17 PDT, Ryosuke Niwa
no flags
Fixes the bug (17.80 KB, patch)
2013-06-06 19:12 PDT, Ryosuke Niwa
darin: review+
A/B test results (39.33 KB, text/html)
2013-06-06 21:31 PDT, Ryosuke Niwa
no flags
Ryosuke Niwa
Comment 1 2013-05-10 13:35:22 PDT
Created attachment 201416 [details] Fix (without change log)
Ryosuke Niwa
Comment 2 2013-05-10 13:35:32 PDT
Ryosuke Niwa
Comment 3 2013-05-10 17:09:46 PDT
Created attachment 201441 [details] Fixes one bug
Ryosuke Niwa
Comment 4 2013-05-10 17:10:39 PDT
Created attachment 201442 [details] Reverted erroneous test change
Darin Adler
Comment 5 2013-05-10 17:55:38 PDT
Comment on attachment 201442 [details] Reverted erroneous test change View in context: https://bugs.webkit.org/attachment.cgi?id=201442&action=review > Source/WebCore/rendering/RenderBlockLineLayout.cpp:3094 > + if (wordMeasurement.fallbackFonts.isEmpty() && !fallbackFonts.isEmpty()) > + wordMeasurement.fallbackFonts.swap(fallbackFonts); Sure could use a why comment.
Ryosuke Niwa
Comment 6 2013-06-05 17:17:24 PDT
Created attachment 203893 [details] More comprehensive WIP fix There was more fundamental flaw in our code.
Ryosuke Niwa
Comment 7 2013-06-06 19:12:16 PDT
Created attachment 203991 [details] Fixes the bug
mitz
Comment 8 2013-06-06 19:18:56 PDT
I thought passing a NULL fallbackFonts pointer into floatWidthFor{Simple,Complex}Text was a significant optimization. Have you checked whether this patch has any impact performance?
Ryosuke Niwa
Comment 9 2013-06-06 19:41:41 PDT
(In reply to comment #8) > I thought passing a NULL fallbackFonts pointer into floatWidthFor{Simple,Complex}Text was a significant optimization. Have you checked whether this patch has any impact performance? Yeah, I'm getting the numbers now.
Ryosuke Niwa
Comment 10 2013-06-06 21:31:52 PDT
Created attachment 203994 [details] A/B test results Thankfully I don't see any regression from running some perf. tests but please let me know if there is some other benchmark or page where this patch may cause a regression.
Darin Adler
Comment 11 2013-06-07 07:15:05 PDT
Comment on attachment 203991 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=203991&action=review I hope creating and destroying these empty hash sets is inexpensive enough. > Source/WebCore/platform/graphics/Font.cpp:325 > + ASSERT(fallbackFonts); This assertion is really unnecessary. The code that guarantees this is non-zero is just a couple lines up from here.
Ryosuke Niwa
Comment 12 2013-06-07 10:58:36 PDT
(In reply to comment #11) > (From update of attachment 203991 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=203991&action=review > > I hope creating and destroying these empty hash sets is inexpensive enough. I think andersca optimized empty hash maps recently to reduce the memory usage, etc... so HashTable only initializes various member variables to 0 now. > > Source/WebCore/platform/graphics/Font.cpp:325 > > + ASSERT(fallbackFonts); > > This assertion is really unnecessary. The code that guarantees this is non-zero is just a couple lines up from here. Removed.
Ryosuke Niwa
Comment 13 2013-06-07 10:58:59 PDT
Note You need to log in before you can comment on or make changes to this bug.