⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 150065 in webkit


Ignore:
Timestamp:
May 14, 2013, 5:27:03 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Ellipsis text is placed to wrong position, when the truncated text is fully cut off in RTL direction.
​https://bugs.webkit.org/show_bug.cgi?id=115858

Patch by Zalan Bujtas <Alan Bujtas> on 2013-05-14
Reviewed by Darin Adler.

Source/WebCore:

Take text direction into account to calculate ellipsis position in case of
full truncation.

Test: fast/css/text-overflow-ellipsis-full-truncate-rtl.html

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::placeEllipsisBox):

LayoutTests:

  • fast/css/text-overflow-ellipsis-full-truncate-rtl-expected.html: Added.
  • fast/css/text-overflow-ellipsis-full-truncate-rtl.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r150061 r150065  
     12013-05-14  Zalan Bujtas  <zalan@apple.com>
     2
     3        Ellipsis text is placed to wrong position, when the truncated text is fully cut off in RTL direction.
     4        https://bugs.webkit.org/show_bug.cgi?id=115858
     5
     6        Reviewed by Darin Adler.
     7
     8        * fast/css/text-overflow-ellipsis-full-truncate-rtl-expected.html: Added.
     9        * fast/css/text-overflow-ellipsis-full-truncate-rtl.html: Added.
     10
    1112013-05-14  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
    212
  • trunk/Source/WebCore/ChangeLog

    r150062 r150065  
     12013-05-14  Zalan Bujtas  <zalan@apple.com>
     2
     3        Ellipsis text is placed to wrong position, when the truncated text is fully cut off in RTL direction.
     4        https://bugs.webkit.org/show_bug.cgi?id=115858
     5
     6        Reviewed by Darin Adler.
     7
     8        Take text direction into account to calculate ellipsis position in case of
     9        full truncation.
     10
     11        Test: fast/css/text-overflow-ellipsis-full-truncate-rtl.html
     12
     13        * rendering/InlineTextBox.cpp:
     14        (WebCore::InlineTextBox::placeEllipsisBox):
     15
    1162013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
    217
  • trunk/Source/WebCore/rendering/InlineTextBox.cpp

    r149673 r150065  
    290290            m_truncation = cFullTruncation;
    291291            truncatedWidth += ellipsisWidth;
    292             return min(ellipsisX, x());
     292            return flowIsLTR ? min(ellipsisX, x()) : max(ellipsisX, right() - ellipsisWidth);
    293293        }
    294294
Note: See TracChangeset for help on using the changeset viewer.