Changeset 74319 in webkit


Ignore:
Timestamp:
Dec 18, 2010 3:32:32 PM (13 years ago)
Author:
mitz@apple.com
Message:

Text emphasis marks are not always included in the selection highlight
https://bugs.webkit.org/show_bug.cgi?id=51299

Reviewed by Cameron Zwarich.

WebCore:

Affects pixel results of fast/text/emphasis.html

Account for annotations in selectionTop() and selectionBottom().

  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::selectionTop):
(WebCore::RootInlineBox::selectionBottom):

LayoutTests:

  • platform/mac/fast/text/emphasis-expected.checksum:
  • platform/mac/fast/text/emphasis-expected.png:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r74318 r74319  
     12010-12-18  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Cameron Zwarich.
     4
     5        Text emphasis marks are not always included in the selection highlight
     6        https://bugs.webkit.org/show_bug.cgi?id=51299
     7
     8        * platform/mac/fast/text/emphasis-expected.checksum:
     9        * platform/mac/fast/text/emphasis-expected.png:
     10
    1112010-12-18  Dan Bernstein  <mitz@apple.com>
    212
  • trunk/LayoutTests/platform/mac/fast/text/emphasis-expected.checksum

    r74281 r74319  
    1 ac0ea7816c98391f044f711d99596b0f
     15fe239e2c7c5c28f40a42a0071c8fa86
  • trunk/WebCore/ChangeLog

    r74318 r74319  
     12010-12-18  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Cameron Zwarich.
     4
     5        Text emphasis marks are not always included in the selection highlight
     6        https://bugs.webkit.org/show_bug.cgi?id=51299
     7
     8        Affects pixel results of fast/text/emphasis.html
     9
     10        Account for annotations in selectionTop() and selectionBottom().
     11
     12        * rendering/RootInlineBox.cpp:
     13        (WebCore::RootInlineBox::selectionTop):
     14        (WebCore::RootInlineBox::selectionBottom):
     15
    1162010-12-18  Dan Bernstein  <mitz@apple.com>
    217
  • trunk/WebCore/rendering/RootInlineBox.cpp

    r74318 r74319  
    406406{
    407407    int selectionTop = m_lineTop;
     408
     409    if (m_hasAnnotationsBefore)
     410        selectionTop -= !renderer()->style()->isFlippedLinesWritingMode() ? computeOverAnnotationAdjustment(m_lineTop) : computeUnderAnnotationAdjustment(m_lineTop);
     411
    408412    if (renderer()->style()->isFlippedLinesWritingMode())
    409413        return selectionTop;
     
    428432{
    429433    int selectionBottom = m_lineBottom;
     434
     435    if (m_hasAnnotationsAfter)
     436        selectionBottom += !renderer()->style()->isFlippedLinesWritingMode() ? computeUnderAnnotationAdjustment(m_lineBottom) : computeOverAnnotationAdjustment(m_lineBottom);
     437
    430438    if (!renderer()->style()->isFlippedLinesWritingMode() || !nextRootBox())
    431439        return selectionBottom;
Note: See TracChangeset for help on using the changeset viewer.