Changeset 196052 in webkit


Ignore:
Timestamp:
Feb 2, 2016 11:01:28 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

ASSERTION FAILED: roundedIntPoint(rendererMappedResult) == roundedIntPoint(result)
https://bugs.webkit.org/show_bug.cgi?id=153576

Patch by Fujii Hironori <Hironori.Fujii@jp.sony.com> on 2016-02-02
Reviewed by Darin Adler.

Source/WebCore:

Tests: fast/block/geometry-map-assertion-with-rounding-negative-half.html

The results of roundedIntPoint of FloatPoint and LayoutPoint may be different
because of the uniqueness of LayoutUnit::round introduced by this bug
<https://bugs.webkit.org/show_bug.cgi?id=107208>.
Should convert a FloatPoint to a LayoutPoint before rounding.

  • rendering/RenderGeometryMap.cpp:

(WebCore::RenderGeometryMap::mapToContainer):

LayoutTests:

  • fast/block/geometry-map-assertion-with-rounding-negative-half-expected.txt: Added.
  • fast/block/geometry-map-assertion-with-rounding-negative-half.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r196047 r196052  
     12016-02-02  Fujii Hironori  <Hironori.Fujii@jp.sony.com>
     2
     3        ASSERTION FAILED: roundedIntPoint(rendererMappedResult) == roundedIntPoint(result)
     4        https://bugs.webkit.org/show_bug.cgi?id=153576
     5
     6        Reviewed by Darin Adler.
     7
     8        * fast/block/geometry-map-assertion-with-rounding-negative-half-expected.txt: Added.
     9        * fast/block/geometry-map-assertion-with-rounding-negative-half.html: Added.
     10
    1112016-02-02  Darin Adler  <darin@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r196041 r196052  
     12016-02-02  Fujii Hironori  <Hironori.Fujii@jp.sony.com>
     2
     3        ASSERTION FAILED: roundedIntPoint(rendererMappedResult) == roundedIntPoint(result)
     4        https://bugs.webkit.org/show_bug.cgi?id=153576
     5
     6        Reviewed by Darin Adler.
     7
     8        Tests: fast/block/geometry-map-assertion-with-rounding-negative-half.html
     9
     10        The results of roundedIntPoint of FloatPoint and LayoutPoint may be different
     11        because of the uniqueness of LayoutUnit::round introduced by this bug
     12        <https://bugs.webkit.org/show_bug.cgi?id=107208>.
     13        Should convert a FloatPoint to a LayoutPoint before rounding.
     14
     15        * rendering/RenderGeometryMap.cpp:
     16        (WebCore::RenderGeometryMap::mapToContainer):
     17
    1182016-02-02  Aakash Jain  <aakash_jain@apple.com>
    219
  • trunk/Source/WebCore/rendering/RenderGeometryMap.cpp

    r181515 r196052  
    105105{
    106106    FloatPoint result;
    107    
    108     if (!hasFixedPositionStep() && !hasTransformStep() && !hasNonUniformStep() && (!container || (m_mapping.size() && container == m_mapping[0].m_renderer)))
     107#if !ASSERT_DISABLED
     108    FloatPoint rendererMappedResult = m_mapping.last().m_renderer->localToAbsolute(p, m_mapCoordinatesFlags);
     109#endif
     110   
     111    if (!hasFixedPositionStep() && !hasTransformStep() && !hasNonUniformStep() && (!container || (m_mapping.size() && container == m_mapping[0].m_renderer))) {
    109112        result = p + roundedIntSize(m_accumulatedOffset);
    110     else {
     113        // Should convert to a LayoutPoint because of the uniqueness of LayoutUnit::round
     114        ASSERT(roundedIntPoint(LayoutPoint(rendererMappedResult)) == result);
     115    } else {
    111116        TransformState transformState(TransformState::ApplyTransformDirection, p);
    112117        mapToContainer(transformState, container);
    113118        result = transformState.lastPlanarPoint();
    114     }
    115 
    116 #if !ASSERT_DISABLED
    117     FloatPoint rendererMappedResult = m_mapping.last().m_renderer->localToAbsolute(p, m_mapCoordinatesFlags);
    118     ASSERT(roundedIntPoint(rendererMappedResult) == roundedIntPoint(result));
    119 #endif
     119        ASSERT(rendererMappedResult == result);
     120    }
    120121
    121122    return result;
Note: See TracChangeset for help on using the changeset viewer.