Changeset 290734 in webkit


Ignore:
Timestamp:
Mar 2, 2022 9:09:34 AM (5 months ago)
Author:
Alan Bujtas
Message:

[RTL] Image alt text has incorrect bidi reordering
https://bugs.webkit.org/show_bug.cgi?id=237366
<rdar://problem/89687229>

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/images/alt-text-with-right-to-left-inline-direction-reordering.html

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintReplaced): Enable bidi reordering.

LayoutTests:

  • fast/images/alt-text-with-right-to-left-inline-direction-reordering-expected-mismatch.html: Added.
  • fast/images/alt-text-with-right-to-left-inline-direction-reordering.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r290729 r290734  
     12022-03-02  Alan Bujtas  <zalan@apple.com>
     2
     3        [RTL] Image alt text has incorrect bidi reordering
     4        https://bugs.webkit.org/show_bug.cgi?id=237366
     5        <rdar://problem/89687229>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        * fast/images/alt-text-with-right-to-left-inline-direction-reordering-expected-mismatch.html: Added.
     10        * fast/images/alt-text-with-right-to-left-inline-direction-reordering.html: Added.
     11
    1122022-03-02  Oriol Brufau  <obrufau@igalia.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r290733 r290734  
     12022-03-02  Alan Bujtas  <zalan@apple.com>
     2
     3        [RTL] Image alt text has incorrect bidi reordering
     4        https://bugs.webkit.org/show_bug.cgi?id=237366
     5        <rdar://problem/89687229>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        Test: fast/images/alt-text-with-right-to-left-inline-direction-reordering.html
     10
     11        * rendering/RenderImage.cpp:
     12        (WebCore::RenderImage::paintReplaced): Enable bidi reordering.
     13
    1142022-03-02  Youenn Fablet  <youenn@apple.com>
    215
  • trunk/Source/WebCore/rendering/RenderImage.cpp

    r290726 r290734  
    532532                auto& font = style().fontCascade();
    533533                auto& fontMetrics = font.metricsOfPrimaryFont();
    534                 auto textRun = RenderBlock::constructTextRun(document().displayStringModifiedByEncoding(m_altText), style());
     534                auto textRun = RenderBlock::constructTextRun(document().displayStringModifiedByEncoding(m_altText), style(), DefaultExpansion, RespectDirection | RespectDirectionOverride);
    535535                auto textWidth = LayoutUnit { font.width(textRun) };
    536536
Note: See TracChangeset for help on using the changeset viewer.