Changeset 147635 in webkit


Ignore:
Timestamp:
Apr 4, 2013 9:01:49 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

REGRESSION (r145870): Can't get insertion point to appear in some input and textareas on wordpress
https://bugs.webkit.org/show_bug.cgi?id=113591

Patch by Xidorn Quan <quanxunzhen@gmail.com> on 2013-04-04
Reviewed by Simon Fraser.

Source/WebCore:

Since a child node could overflow its ancestor, it is not wise to check
one's radii boundary before checking whether the given point intersects
its children. This patch moves the related code down to fix the bug.

Test: fast/borders/border-radius-child.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::nodeAtPoint):

LayoutTests:

  • fast/borders/border-radius-child-expected.txt: Added.
  • fast/borders/border-radius-child.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r147622 r147635  
     12013-04-04  Xidorn Quan  <quanxunzhen@gmail.com>
     2
     3        REGRESSION (r145870): Can't get insertion point to appear in some input and textareas on wordpress
     4        https://bugs.webkit.org/show_bug.cgi?id=113591
     5
     6        Reviewed by Simon Fraser.
     7
     8        * fast/borders/border-radius-child-expected.txt: Added.
     9        * fast/borders/border-radius-child.html: Added.
     10
    1112013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r147628 r147635  
     12013-04-04  Xidorn Quan  <quanxunzhen@gmail.com>
     2
     3        REGRESSION (r145870): Can't get insertion point to appear in some input and textareas on wordpress
     4        https://bugs.webkit.org/show_bug.cgi?id=113591
     5
     6        Reviewed by Simon Fraser.
     7
     8        Since a child node could overflow its ancestor, it is not wise to check
     9        one's radii boundary before checking whether the given point intersects
     10        its children. This patch moves the related code down to fix the bug.
     11
     12        Test: fast/borders/border-radius-child.html
     13
     14        * rendering/RenderBlock.cpp:
     15        (WebCore::RenderBlock::nodeAtPoint):
     16
    1172013-04-04  Xabier Rodriguez Calvar  <calvaris@igalia.com>
    218
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r147426 r147635  
    49064906        flipForWritingMode(overflowBox);
    49074907        overflowBox.moveBy(adjustedLocation);
    4908         if (style()->hasBorderRadius()) {
    4909             LayoutRect borderRect = borderBoxRect();
    4910             borderRect.moveBy(adjustedLocation);
    4911             RoundedRect border = style()->getRoundedBorderFor(borderRect, view());
    4912             if (!locationInContainer.intersects(border))
    4913                 return false;
    4914         }
    49154908        if (!locationInContainer.intersects(overflowBox))
    49164909            return false;
     
    49464939            return true;
    49474940        }
     4941    }
     4942
     4943    // Check if the point is outside radii.
     4944    if (!isRenderView() && style()->hasBorderRadius()) {
     4945        LayoutRect borderRect = borderBoxRect();
     4946        borderRect.moveBy(adjustedLocation);
     4947        RoundedRect border = style()->getRoundedBorderFor(borderRect, view());
     4948        if (!locationInContainer.intersects(border))
     4949            return false;
    49484950    }
    49494951
Note: See TracChangeset for help on using the changeset viewer.