Changeset 192296 in webkit


Ignore:
Timestamp:
Nov 11, 2015 12:10:06 AM (8 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r192120 - REGRESSION(r182286): Tatechuyoko following ruby is drawn too far to the right
https://bugs.webkit.org/show_bug.cgi?id=150923

Reviewed by Zalan Bujtas.

Source/WebCore:

Ever since r182286, expansion opportunities in justified ruby were moved to their neighboring
elements (thereby forbidding trailing nor leading expansions inside ruby). However, when the
neighboring element is tatechuyoko, we will erroneously honor the expansion opportunity inside
the tatechuyoko, thereby moving it horizontally.

Tatechuyoko should never have expansion opportunities inside it.

Test: fast/text/ruby-justify-tatechuyoko.html

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::expansionBehaviorForInlineTextBox):

LayoutTests:

  • fast/text/ruby-justify-tatechuyoko-expected.html: Added.
  • fast/text/ruby-justify-tatechuyoko.html: Added.
Location:
releases/WebKitGTK/webkit-2.10
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog

    r192244 r192296  
     12015-11-06  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        REGRESSION(r182286): Tatechuyoko following ruby is drawn too far to the right
     4        https://bugs.webkit.org/show_bug.cgi?id=150923
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        * fast/text/ruby-justify-tatechuyoko-expected.html: Added.
     9        * fast/text/ruby-justify-tatechuyoko.html: Added.
     10
    1112015-11-06  Mario Sanchez Prada  <mario@endlessm.com>
    212
  • releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog

    r192244 r192296  
     12015-11-06  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        REGRESSION(r182286): Tatechuyoko following ruby is drawn too far to the right
     4        https://bugs.webkit.org/show_bug.cgi?id=150923
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        Ever since r182286, expansion opportunities in justified ruby were moved to their neighboring
     9        elements (thereby forbidding trailing nor leading expansions inside ruby). However, when the
     10        neighboring element is tatechuyoko, we will erroneously honor the expansion opportunity inside
     11        the tatechuyoko, thereby moving it horizontally.
     12
     13        Tatechuyoko should never have expansion opportunities inside it.
     14
     15        Test: fast/text/ruby-justify-tatechuyoko.html
     16
     17        * rendering/RenderBlockLineLayout.cpp:
     18        (WebCore::expansionBehaviorForInlineTextBox):
     19
    1202015-11-06  Mario Sanchez Prada  <mario@endlessm.com>
    221
  • releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r191557 r192296  
    720720static inline ExpansionBehavior expansionBehaviorForInlineTextBox(RenderBlockFlow& block, InlineTextBox& textBox, BidiRun* previousRun, BidiRun* nextRun, ETextAlign textAlign, bool isAfterExpansion)
    721721{
     722    // Tatechuyoko is modeled as the Object Replacement Character (U+FFFC), which can never have expansion opportunities inside nor intrinsically adjacent to it.
     723    if (textBox.renderer().style().textCombine() == TextCombineHorizontal)
     724        return ForbidLeadingExpansion | ForbidTrailingExpansion;
     725
    722726    ExpansionBehavior result = 0;
    723727    bool setLeadingExpansion = false;
    724728    bool setTrailingExpansion = false;
    725729    if (textAlign == JUSTIFY) {
    726         // If the next box is ruby, and we're justifying, and the first box in the ruby base has a leading expansion, and we are a text box, then
    727         // force a trailing expansion.
     730        // If the next box is ruby, and we're justifying, and the first box in the ruby base has a leading expansion, and we are a text box, then force a trailing expansion.
    728731        if (nextRun && is<RenderRubyRun>(nextRun->renderer()) && downcast<RenderRubyRun>(nextRun->renderer()).rubyBase() && nextRun->renderer().style().collapseWhiteSpace()) {
    729732            auto& rubyBase = *downcast<RenderRubyRun>(nextRun->renderer()).rubyBase();
Note: See TracChangeset for help on using the changeset viewer.