Changeset 274532 in webkit


Ignore:
Timestamp:
Mar 16, 2021 4:39:32 PM (16 months ago)
Author:
mmaxfield@apple.com
Message:

<img> isn't able to render RTL text correctly in ALT text
https://bugs.webkit.org/show_bug.cgi?id=221833
<rdar://problem/74530491>

Reviewed by Zalan Bujtas.

Source/WebCore:

Simply use the text drawing routine that handles bidi.

Test: fast/text/image-alt-text-bidi.html

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintReplaced):

LayoutTests:

  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
  • fast/text/image-alt-text-bidi-2-expected.html: Added.
  • fast/text/image-alt-text-bidi-2.html: Added.
  • fast/text/image-alt-text-bidi-expected.html: Added.
  • fast/text/image-alt-text-bidi.html: Added.
Location:
trunk
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r274528 r274532  
     12021-03-15  Ebrahim Byagowi <ebrahim@gnu.org> and Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        <img> isn't able to render RTL text correctly in ALT text
     4        https://bugs.webkit.org/show_bug.cgi?id=221833
     5        <rdar://problem/74530491>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        * platform/ios/TestExpectations:
     10        * platform/mac/TestExpectations:
     11        * fast/text/image-alt-text-bidi-2-expected.html: Added.
     12        * fast/text/image-alt-text-bidi-2.html: Added.
     13        * fast/text/image-alt-text-bidi-expected.html: Added.
     14        * fast/text/image-alt-text-bidi.html: Added.
     15
    1162021-03-16  Alexey Shvayka  <shvaikalesh@gmail.com>
    217
  • trunk/LayoutTests/platform/ios/TestExpectations

    r274521 r274532  
    35073507# Not all OSes support the same set of emoji.
    35083508fast/text/mending-heart.html [ Failure ]
     3509
     3510webkit.org/b/221833 fast/text/image-alt-text-bidi.html [ ImageOnlyFailure ]
  • trunk/LayoutTests/platform/mac/TestExpectations

    r274524 r274532  
    23222322
    23232323webkit.org/b/223144 [ Debug arm64 ] fast/multicol/crash-when-spanner-candidate-is-out-of-flow.html [ Crash ]
     2324
     2325webkit.org/b/221833 fast/text/image-alt-text-bidi-2.html [ ImageOnlyFailure ]
  • trunk/Source/WebCore/ChangeLog

    r274531 r274532  
     12021-03-15  Ebrahim Byagowi <ebrahim@gnu.org> and Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        <img> isn't able to render RTL text correctly in ALT text
     4        https://bugs.webkit.org/show_bug.cgi?id=221833
     5        <rdar://problem/74530491>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        Simply use the text drawing routine that handles bidi.
     10
     11        Test: fast/text/image-alt-text-bidi.html
     12
     13        * rendering/RenderImage.cpp:
     14        (WebCore::RenderImage::paintReplaced):
     15
    1162021-03-15  Myles C. Maxfield  <mmaxfield@apple.com>
    217
  • trunk/Source/WebCore/rendering/RenderImage.cpp

    r272805 r274532  
    55 *           (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com)
    66 *           (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
    7  * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
     7 * Copyright (C) 2003-2021 Apple Inc. All rights reserved.
    88 * Copyright (C) 2010 Google Inc. All rights reserved.
    99 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved.
     
    538538                if (errorPictureDrawn) {
    539539                    if (usableSize.width() >= textWidth && fontMetrics.height() <= imageOffset.height())
    540                         context.drawText(font, textRun, altTextOffset);
     540                        context.drawBidiText(font, textRun, altTextOffset);
    541541                } else if (usableSize.width() >= textWidth && usableSize.height() >= fontMetrics.height())
    542                     context.drawText(font, textRun, altTextOffset);
     542                    context.drawBidiText(font, textRun, altTextOffset);
    543543            }
    544544        }
Note: See TracChangeset for help on using the changeset viewer.