Changeset 168263 in webkit


Ignore:
Timestamp:
May 5, 2014 1:01:13 AM (10 years ago)
Author:
abucur@adobe.com
Message:

[CSS Regions] ASSERT when hovering over region
https://bugs.webkit.org/show_bug.cgi?id=128809

Reviewed by Mihnea Ovidenie.

Source/WebCore:
There's no point in hit-testing a box for a region if it's not contained inside
that region.

Test: fast/regions/hit-test-box-non-containing-region.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::nodeAtPoint):

LayoutTests:
Add a test verifying we're not trying to hit-test a box inside a region
where it's not contained.

  • fast/regions/hit-test-box-non-containing-region-expected.txt: Added.
  • fast/regions/hit-test-box-non-containing-region.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r168255 r168263  
     12014-05-05  Andrei Bucur  <abucur@adobe.com>
     2
     3        [CSS Regions] ASSERT when hovering over region
     4        https://bugs.webkit.org/show_bug.cgi?id=128809
     5
     6        Reviewed by Mihnea Ovidenie.
     7
     8        Add a test verifying we're not trying to hit-test a box inside a region
     9        where it's not contained.
     10
     11        * fast/regions/hit-test-box-non-containing-region-expected.txt: Added.
     12        * fast/regions/hit-test-box-non-containing-region.html: Added.
     13
    1142014-05-04  Andreas Kling  <akling@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r168256 r168263  
     12014-05-05  Andrei Bucur  <abucur@adobe.com>
     2
     3        [CSS Regions] ASSERT when hovering over region
     4        https://bugs.webkit.org/show_bug.cgi?id=128809
     5
     6        Reviewed by Mihnea Ovidenie.
     7
     8        There's no point in hit-testing a box for a region if it's not contained inside
     9        that region.
     10
     11        Test: fast/regions/hit-test-box-non-containing-region.html
     12
     13        * rendering/RenderBox.cpp:
     14        (WebCore::RenderBox::nodeAtPoint):
     15
    1162014-05-04  Andreas Kling  <akling@apple.com>
    217
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r168190 r168263  
    11281128    }
    11291129
     1130    RenderRegion* regionToUse = locationInContainer.region();
     1131    if (regionToUse) {
     1132        RenderFlowThread* flowThread = regionToUse->flowThread();
     1133
     1134        // If the box is not contained by this region there's no point in going further.
     1135        if (!flowThread->objectShouldFragmentInFlowRegion(this, regionToUse))
     1136            return false;
     1137    }
     1138
    11301139    // Check our bounds next. For this purpose always assume that we can only be hit in the
    11311140    // foreground phase (which is true for replaced elements like images).
    1132     LayoutRect boundsRect = borderBoxRectInRegion(locationInContainer.region());
     1141    LayoutRect boundsRect = borderBoxRectInRegion(regionToUse);
    11331142    boundsRect.moveBy(adjustedLocation);
    11341143    if (visibleToHitTesting() && action == HitTestForeground && locationInContainer.intersects(boundsRect)) {
Note: See TracChangeset for help on using the changeset viewer.