Changeset 21436 in webkit


Ignore:
Timestamp:
May 12, 2007 7:31:03 PM (17 years ago)
Author:
weinig
Message:

LayoutTests:

Reviewed by Hyatt.

  • fast/replaced/selection-rect-expected.checksum: Added.
  • fast/replaced/selection-rect-expected.png: Added.
  • fast/replaced/selection-rect-expected.txt: Added.
  • fast/replaced/selection-rect.html: Added.

WebCore:

Reviewed by Hyatt.

Test: fast/replaced/selection-rect.html

Also fixes the same problem with list markers, covered by existing test
fast/lists/markers-in-selection.html.

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

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r21435 r21436  
     12007-05-12  Mitz Pettel  <mitz@webkit.org>
     2
     3        Reviewed by Hyatt.
     4
     5        - pixel test for http://bugs.webkit.org/show_bug.cgi?id=13695
     6          REGRESSION (r21387): Replaced elements' highlight rects are wrongly positioned
     7
     8        * fast/replaced/selection-rect-expected.checksum: Added.
     9        * fast/replaced/selection-rect-expected.png: Added.
     10        * fast/replaced/selection-rect-expected.txt: Added.
     11        * fast/replaced/selection-rect.html: Added.
     12
    1132007-05-12  Mitz Pettel  <mitz@webkit.org>
    214
  • trunk/WebCore/ChangeLog

    r21435 r21436  
     12007-05-12  Mitz Pettel  <mitz@webkit.org>
     2
     3        Reviewed by Hyatt.
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=13695
     6          REGRESSION (r21387): Replaced elements' highlight rects are wrongly positioned
     7
     8        Test: fast/replaced/selection-rect.html
     9
     10        Also fixes the same problem with list markers, covered by existing test
     11        fast/lists/markers-in-selection.html.
     12
     13        * rendering/RenderListMarker.cpp:
     14        (WebCore::RenderListMarker::selectionRect):
     15        * rendering/RenderReplaced.cpp:
     16        (WebCore::RenderReplaced::selectionRect):
     17
    1182007-05-12  Mitz Pettel  <mitz@webkit.org>
    219
  • trunk/WebCore/rendering/RenderListMarker.cpp

    r21387 r21436  
    887887
    888888    RootInlineBox* root = inlineBoxWrapper()->root();
    889     IntRect rect(xPos(), root->selectionTop(), width(), root->selectionHeight());
     889    IntRect rect(0, root->selectionTop() - yPos(), width(), root->selectionHeight());
    890890           
    891891    if (clipToVisibleContent)
     
    893893    else {
    894894        int absx, absy;
    895         RenderBlock* cb = containingBlock();
    896         cb->absolutePosition(absx, absy);
    897         if (cb->hasOverflowClip())
    898             cb->layer()->subtractScrollOffset(absx, absy);
     895        absolutePosition(absx, absy);
    899896        rect.move(absx, absy);
    900897    }
  • trunk/WebCore/rendering/RenderReplaced.cpp

    r21387 r21436  
    168168   
    169169    RootInlineBox* root = m_inlineBoxWrapper->root();
    170     int selectionTop = root->selectionTop();
    171     int selectionHeight = root->selectionHeight();
    172     int selectionLeft = xPos();
    173     int selectionRight = xPos() + width();
    174    
    175     IntRect rect(selectionLeft, selectionTop, selectionRight - selectionLeft, selectionHeight);
     170    IntRect rect(0, root->selectionTop() - yPos(), width(), root->selectionHeight());
    176171   
    177172    if (clipToVisibleContent)
     
    179174    else {
    180175        int absx, absy;
    181         cb->absolutePositionForContent(absx, absy);
    182         if (cb->hasOverflowClip())
    183             cb->layer()->subtractScrollOffset(absx, absy);
     176        absolutePositionForContent(absx, absy);
    184177        rect.move(absx, absy);
    185178    }
Note: See TracChangeset for help on using the changeset viewer.