RESOLVED FIXED 51267
Text emphasis marks should not appear over characters that have ruby annotations
https://bugs.webkit.org/show_bug.cgi?id=51267
Summary Text emphasis marks should not appear over characters that have ruby annotations
mitz
Reported 2010-12-17 11:35:14 PST
Text emphasis marks should not appear over characters that have ruby annotations.
Attachments
Suppress emphasis marks over text that has ruby annotations (32.07 KB, patch)
2011-01-05 17:24 PST, mitz
darin: review+
mitz
Comment 1 2010-12-17 11:36:01 PST
mitz
Comment 2 2011-01-05 17:24:42 PST
Created attachment 78078 [details] Suppress emphasis marks over text that has ruby annotations
Darin Adler
Comment 3 2011-01-07 09:30:08 PST
Comment on attachment 78078 [details] Suppress emphasis marks over text that has ruby annotations View in context: https://bugs.webkit.org/attachment.cgi?id=78078&action=review > WebCore/rendering/InlineTextBox.cpp:405 > +bool InlineTextBox::getEmphasisMarkPosition(RenderStyle* style, TextEmphasisPosition& emphasisPosition) const This function could use a tiny bit of “why” comments. Otherwise, you can see those return true and false and it’s hard to judge if they are right or wrong. Some brief statement of what significance the presence or absence of a line box has, and what significance the ruby has, and also why we needn’t even check for a ruby run if the container is not a ruby base. > WebCore/rendering/InlineTextBox.cpp:409 > + TextEmphasisMark emphasisMark = style->textEmphasisMark(); > + if (emphasisMark == TextEmphasisMarkNone) > + return false; I don’t think the local variable is needed here. > WebCore/rendering/InlineTextBox.cpp:423 > + RenderRubyRun* rubyRun = static_cast<RenderRubyRun*>(containingBlock->parent()); > + RenderRubyText* rubyText = rubyRun->rubyText(); No need for the local variable rubyRun here. The expression containingBlock->parent() is used twice, but you chose to repeat it. If you did make a local variable, I suggest it be before the typecast, but none is OK with me.
mitz
Comment 4 2011-01-07 11:27:57 PST
WebKit Review Bot
Comment 5 2011-01-07 13:35:42 PST
http://trac.webkit.org/changeset/75257 might have broken GTK Linux 64-bit Debug and Qt Linux Release The following tests are not passing: fast/text/emphasis-avoid-ruby.html
mitz
Comment 7 2011-01-07 15:49:10 PST
FontQt doesn’t implement Font::emphasisMark{Ascent,Descent,Height} nor emphasis mark drawing.
Csaba Osztrogonác
Comment 8 2011-01-10 10:57:33 PST
(In reply to comment #7) > FontQt doesn’t implement Font::emphasisMark{Ascent,Descent,Height} nor emphasis mark drawing. new bug on Qt fail: https://bugs.webkit.org/show_bug.cgi?id=52155
Note You need to log in before you can comment on or make changes to this bug.