Changeset 123990 in webkit


Ignore:
Timestamp:
Jul 29, 2012 5:44:08 PM (12 years ago)
Author:
mitz@apple.com
Message:

Hit testing in the gap between pages returns incorrect results in flipped blocks writing modes
https://bugs.webkit.org/show_bug.cgi?id=92600

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/multicol/hit-test-gap-between-pages-flipped.html

  • rendering/RenderBlock.h:

(WebCore::RenderBlock): Promoted offsetForContents() from private to protected, and demoted
adjustPointToColumnContents() back to private.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::hitTest): Changed to flip the point passed to updateHitTestResults().

  • rendering/RenderView.cpp:

(WebCore::RenderView::updateHitTestResult): Changed to call offsetForContents(), which, as
of r123977, correctly accounts for flippedness.

LayoutTests:

  • fast/multicol/hit-test-gap-between-pages-flipped-expected.txt: Added.
  • fast/multicol/hit-test-gap-between-pages-flipped.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r123988 r123990  
     12012-07-29  Dan Bernstein  <mitz@apple.com>
     2
     3        Hit testing in the gap between pages returns incorrect results in flipped blocks writing modes
     4        https://bugs.webkit.org/show_bug.cgi?id=92600
     5
     6        Reviewed by Simon Fraser.
     7
     8        * fast/multicol/hit-test-gap-between-pages-flipped-expected.txt: Added.
     9        * fast/multicol/hit-test-gap-between-pages-flipped.html: Added.
     10
    1112012-07-29  Dan Bernstein  <mitz@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r123988 r123990  
     12012-07-29  Dan Bernstein  <mitz@apple.com>
     2
     3        Hit testing in the gap between pages returns incorrect results in flipped blocks writing modes
     4        https://bugs.webkit.org/show_bug.cgi?id=92600
     5
     6        Reviewed by Simon Fraser.
     7
     8        Test: fast/multicol/hit-test-gap-between-pages-flipped.html
     9
     10        * rendering/RenderBlock.h:
     11        (WebCore::RenderBlock): Promoted offsetForContents() from private to protected, and demoted
     12        adjustPointToColumnContents() back to private.
     13        * rendering/RenderLayer.cpp:
     14        (WebCore::RenderLayer::hitTest): Changed to flip the point passed to updateHitTestResults().
     15        * rendering/RenderView.cpp:
     16        (WebCore::RenderView::updateHitTestResult): Changed to call offsetForContents(), which, as
     17        of r123977, correctly accounts for flippedness.
     18
    1192012-07-29  Dan Bernstein  <mitz@apple.com>
    220
  • trunk/Source/WebCore/rendering/RenderBlock.h

    r123524 r123990  
    474474    void computeInitialRegionRangeForBlock();
    475475    void computeRegionRangeForBlock();
    476    
     476
    477477    virtual void checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHeight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight);
    478    
     478
    479479private:
    480480    virtual RenderObjectChildList* virtualChildren() { return children(); }
     
    808808    virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidthToEndOfLine = 0);
    809809
     810    void adjustPointToColumnContents(LayoutPoint&) const;
    810811    void adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutUnit& right) const; // Helper function for borderFitAdjust
    811812
     
    816817    Position positionForBox(InlineBox*, bool start = true) const;
    817818    VisiblePosition positionForPointWithInlineChildren(const LayoutPoint&);
    818 
    819     // Adjust from painting offsets to the local coords of this renderer
    820     void offsetForContents(LayoutPoint&) const;
    821819
    822820    virtual void calcColumnWidth();
     
    965963    LayoutUnit adjustBlockChildForPagination(LayoutUnit logicalTopAfterClear, LayoutUnit estimateWithoutPagination, RenderBox* child, bool atBeforeSideOfBlock);
    966964
    967     void adjustPointToColumnContents(LayoutPoint&) const;
     965    // Adjust from painting offsets to the local coords of this renderer
     966    void offsetForContents(LayoutPoint&) const;
    968967
    969968    // This function is called to test a line box that has moved in the block direction to see if it has ended up in a new
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r123971 r123990  
    34073407        // exited the WebView, and so hit testing over a scrollbar hits the content document.
    34083408        if ((request.active() || request.release()) && isRootLayer()) {
    3409             renderer()->updateHitTestResult(result, result.point());
     3409            renderer()->updateHitTestResult(result, toRenderView(renderer())->flipForWritingMode(result.point()));
    34103410            insideLayer = this;
    34113411        }
  • trunk/Source/WebCore/rendering/RenderView.cpp

    r123050 r123990  
    855855
    856856        LayoutPoint adjustedPoint = point;
    857         adjustPointToColumnContents(adjustedPoint);
     857        offsetForContents(adjustedPoint);
    858858
    859859        result.setLocalPoint(adjustedPoint);
Note: See TracChangeset for help on using the changeset viewer.