Skip to content
  • leviw@chromium.org's avatar
    Revert to float method of selection rect alignment for line box tree · 607c575c
    leviw@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=86904
    
    Reviewed by Eric Seidel.
    
    In r117491, we introduced a new method of alignment for the selection rect in the sub-pixel case.
    It turns out there is at least one case on Mac where this leaves a gap when painting selection rects
    originating in the line box tree. This patch reverts us to the float method for the line box tree,
    but retains the LayoutRect snapping for gap rects.
    
    No new tests. Covered by existing tests with sub-pixel layout enabled.
    
    * rendering/EllipsisBox.cpp:
    (WebCore::EllipsisBox::paintSelection): Re-enabling the FloatRect flavor of
    alignSelectionRectToDevicePixels for the line box tree.
    * rendering/InlineTextBox.cpp:
    (WebCore::alignSelectionRectToDevicePixels): Moving LayoutRect flavor to RenderBlock.
    (WebCore::InlineTextBox::paintSelection): Happily clearing up the bifurcation of algorithms for
    sub-pixel layout.
    * rendering/InlineTextBox.h: Re-enabling the FloatRect flavor of alignSelectionRectToDevicePixels
    for the line box tree.
    * rendering/RenderBlock.cpp:
    (WebCore::alignSelectionRectToDevicePixels): Re-seating the LayoutRect version of
    alignSelectionRectToDevicePixels for use with GapRects.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    607c575c