Changeset 39073 in webkit


Ignore:
Timestamp:
Dec 6, 2008 5:03:55 PM (15 years ago)
Author:
Simon Fraser
Message:

2008-12-06 Simon Fraser <Simon Fraser>

Reviewed by Dan Bernstein

https://bugs.webkit.org/show_bug.cgi?id=15739

When painting the selection on a replaced element, paint
using local coordinates so that the selection is correctly
painted for transformed elements.

Test: fast/replaced/selection-rect-transform.html

  • rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::paint):
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r39069 r39073  
     12008-12-06  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Reviewed by Dan Bernstein
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=15739
     6       
     7        Testcase for selection painting on a transformed, replaced element.
     8       
     9        * fast/replaced/selection-rect-transform.html: Added.
     10        * platform/mac/fast/replaced/selection-rect-transform-expected.checksum: Added.
     11        * platform/mac/fast/replaced/selection-rect-transform-expected.png: Added.
     12        * platform/mac/fast/replaced/selection-rect-transform-expected.txt: Added.
     13
    1142008-12-06  Simon Fraser  <simon.fraser@apple.com>
    215
  • trunk/WebCore/ChangeLog

    r39069 r39073  
     12008-12-06  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Reviewed by Dan Bernstein
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=15739
     6
     7        When painting the selection on a replaced element, paint
     8        using local coordinates so that the selection is correctly
     9        painted for transformed elements.
     10
     11        Test: fast/replaced/selection-rect-transform.html
     12
     13        * rendering/RenderReplaced.cpp:
     14        (WebCore::RenderReplaced::paint):
     15
    1162008-12-06  Simon Fraser  <simon.fraser@apple.com>
    217
  • trunk/WebCore/rendering/RenderReplaced.cpp

    r38922 r39073  
    140140    paintReplaced(paintInfo, tx, ty);
    141141   
    142     if (drawSelectionTint)
    143         paintInfo.context->fillRect(selectionRect(), selectionBackgroundColor());
     142    if (drawSelectionTint) {
     143        IntRect selectionPaintingRect = localSelectionRect();
     144        selectionPaintingRect.move(tx, ty);
     145        paintInfo.context->fillRect(selectionPaintingRect, selectionBackgroundColor());
     146    }
    144147}
    145148
Note: See TracChangeset for help on using the changeset viewer.