Changeset 123571 in webkit


Ignore:
Timestamp:
Jul 24, 2012, 9:42:44 PM (13 years ago)
Author:
mitz@apple.com
Message:

RenderBlock::positionForPoint can fail when the block or its children have a vertical writing mode
https://bugs.webkit.org/show_bug.cgi?id=92202

Reviewed by Beth Dakin.

Source/WebCore:

Test: fast/writing-mode/positionForPoint.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::positionForPoint): Fixed two issues, each of which are covered by
one of the sub-tests in the new regression test: (1) changed to compare children’s logical
bounds against pointInLogicalContents, i.e. compare childern’s horizontal bounds to the
point’s horizontal component; and (2) changed to use logicalTopForChild and
logicalHeightForChild, which account for this block’s writing mode, instead of logicalTop
and logicalBottom, which are based on the child’s writing mode.

LayoutTests:

  • fast/writing-mode/positionForPoint-expected.txt: Added.
  • fast/writing-mode/positionForPoint.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/LayoutTests/ChangeLog

    r123570 r123571  
     12012-07-24  Dan Bernstein  <mitz@apple.com>
     2
     3        RenderBlock::positionForPoint can fail when the block or its children have a vertical writing mode
     4        https://bugs.webkit.org/show_bug.cgi?id=92202
     5
     6        Reviewed by Beth Dakin.
     7
     8        * fast/writing-mode/positionForPoint-expected.txt: Added.
     9        * fast/writing-mode/positionForPoint.html: Added.
     10
    1112012-07-24  MORITA Hajime  <morrita@google.com>
    212
  • TabularUnified trunk/Source/WebCore/ChangeLog

    r123570 r123571  
     12012-07-24  Dan Bernstein  <mitz@apple.com>
     2
     3        RenderBlock::positionForPoint can fail when the block or its children have a vertical writing mode
     4        https://bugs.webkit.org/show_bug.cgi?id=92202
     5
     6        Reviewed by Beth Dakin.
     7
     8        Test: fast/writing-mode/positionForPoint.html
     9
     10        * rendering/RenderBlock.cpp:
     11        (WebCore::RenderBlock::positionForPoint): Fixed two issues, each of which are covered by
     12        one of the sub-tests in the new regression test: (1) changed to compare children’s logical
     13        bounds against pointInLogicalContents, i.e. compare childern’s horizontal bounds to the
     14        point’s horizontal component; and (2) changed to use logicalTopForChild and
     15        logicalHeightForChild, which account for this block’s writing mode, instead of logicalTop
     16        and logicalBottom, which are based on the child’s writing mode.
     17
    1182012-07-24  MORITA Hajime  <morrita@google.com>
    219
  • TabularUnified trunk/Source/WebCore/rendering/RenderBlock.cpp

    r123524 r123571  
    50195019
    50205020    if (lastCandidateBox) {
    5021         if (pointInContents.y() > lastCandidateBox->logicalTop())
     5021        if (pointInLogicalContents.y() > logicalTopForChild(lastCandidateBox))
    50225022            return positionForPointRespectingEditingBoundaries(this, lastCandidateBox, pointInContents);
    50235023
    50245024        for (RenderBox* childBox = firstChildBox(); childBox; childBox = childBox->nextSiblingBox()) {
    50255025            // We hit child if our click is above the bottom of its padding box (like IE6/7 and FF3).
    5026             if (isChildHitTestCandidate(childBox) && pointInContents.y() < childBox->logicalBottom())
     5026            if (isChildHitTestCandidate(childBox) && pointInLogicalContents.y() < logicalTopForChild(childBox) + logicalHeightForChild(childBox))
    50275027                return positionForPointRespectingEditingBoundaries(this, childBox, pointInContents);
    50285028        }
Note: See TracChangeset for help on using the changeset viewer.