Skip to content
  • mitz@apple.com's avatar
    <rdar://problem/8783318> Text emphasis marks should not appear over characters... · 151c8374
    mitz@apple.com authored
    <rdar://problem/8783318> Text emphasis marks should not appear over characters that have ruby annotations
    https://bugs.webkit.org/show_bug.cgi?id=51267
    
    Reviewed by Darin Adler.
    
    WebCore: 
    
    Test: fast/text/emphasis-avoid-ruby.html
    
    * rendering/InlineFlowBox.cpp:
    (WebCore::InlineFlowBox::placeBoxesInBlockDirection): Use getEmphasisMarkPosition() to check if
    there are text emphasis marks.
    (WebCore::InlineFlowBox::addTextBoxVisualOverflow): Ditto.
    (WebCore::InlineFlowBox::computeOverAnnotationAdjustment): Ditto.
    * rendering/InlineTextBox.cpp:
    (WebCore::InlineTextBox::getEmphasisMarkPosition): Added. Returns true and sets the emphasis mark
    position if the text is style with emphasis marks and there isn’t a ruby annotation that should
    suppress them. Otherwise returns false.
    (WebCore::InlineTextBox::paint): Use getEmphasisMarkPosition() to check if emphasis marks should
    be painted.
    * rendering/InlineTextBox.h:
    
    LayoutTests: 
    
    * fast/text/emphasis-avoid-ruby-expected.checksum: Added.
    * fast/text/emphasis-avoid-ruby-expected.png: Added.
    * fast/text/emphasis-avoid-ruby-expected.txt: Added.
    * fast/text/emphasis-avoid-ruby.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    151c8374