Changeset 53603 in webkit


Ignore:
Timestamp:
Jan 20, 2010 9:36:41 PM (14 years ago)
Author:
oliver@apple.com
Message:

2010-01-20 Oliver Hunt <oliver@apple.com>

Reviewed by Dan Bernstein.

Insufficient repaint issues with html embedded in foreignObject
https://bugs.webkit.org/show_bug.cgi?id=16318

Final part of fix -- now we render the selection rect of list
markers in a transformed context.

  • rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::localSelectionRect): (WebCore::RenderListMarker::paint):
  • rendering/RenderListMarker.h:
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53601 r53603  
     12010-01-20  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Insufficient repaint issues with html embedded in foreignObject
     6        https://bugs.webkit.org/show_bug.cgi?id=16318
     7
     8        Final part of fix -- now we render the selection rect of list
     9        markers in a transformed context.
     10
     11        * rendering/RenderListMarker.cpp:
     12        (WebCore::RenderListMarker::localSelectionRect):
     13        (WebCore::RenderListMarker::paint):
     14        * rendering/RenderListMarker.h:
     15
    1162010-01-20  Daniel Bates  <dbates@webkit.org>
    217
  • trunk/WebCore/rendering/RenderListMarker.cpp

    r53452 r53603  
    773773}
    774774
     775IntRect RenderListMarker::localSelectionRect()
     776{
     777    InlineBox* box = inlineBoxWrapper();
     778    if (!box)
     779        return IntRect();
     780    RootInlineBox* root = box->root();
     781    return IntRect(x(), root->selectionTop() - y(), width(), root->selectionHeight());
     782}
     783
    775784void RenderListMarker::paint(PaintInfo& paintInfo, int tx, int ty)
    776785{
     
    801810        context->drawImage(m_image->image(this, marker.size()), style()->colorSpace(), marker.location());
    802811        if (selectionState() != SelectionNone) {
    803             // FIXME: selectionRect() is in absolute, not painting coordinates.
    804             context->fillRect(selectionRect(), selectionBackgroundColor(), style()->colorSpace());
     812            IntRect selRect = localSelectionRect();
     813            selRect.move(tx, ty);
     814            context->fillRect(selRect, selectionBackgroundColor(), style()->colorSpace());
    805815        }
    806816        return;
     
    814824
    815825    if (selectionState() != SelectionNone) {
    816         // FIXME: selectionRect() is in absolute, not painting coordinates.
    817         context->fillRect(selectionRect(), selectionBackgroundColor(), style()->colorSpace());
     826        IntRect selRect = localSelectionRect();
     827        selRect.move(tx, ty);
     828        context->fillRect(selRect, selectionBackgroundColor(), style()->colorSpace());
    818829    }
    819830
  • trunk/WebCore/rendering/RenderListMarker.h

    r46815 r53603  
    7474
    7575    IntRect getRelativeMarkerRect();
     76    IntRect localSelectionRect();
    7677
    7778    String m_text;
Note: See TracChangeset for help on using the changeset viewer.