Changeset 178009 in webkit


Ignore:
Timestamp:
Jan 6, 2015 5:22:09 PM (9 years ago)
Author:
Alan Bujtas
Message:

Assertion in RenderGeometryMap::mapToContainer with LayoutUnit overflow.
https://bugs.webkit.org/show_bug.cgi?id=108619
rdar://problem/19391214

Use only FloatQuad in RenderGeometryMap::mapToContainer.

Due to the difference in the internal representation of FloatRect and FloatQuad,
with certain float values, converting FloatRect to FloatQuad and back
to FloatRect could produce a slightly different rect.

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/block/geometry-map-assertion-with-tall-content.html

  • rendering/RenderGeometryMap.cpp:

(WebCore::RenderGeometryMap::mapToContainer):

LayoutTests:

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

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r178006 r178009  
     12015-01-06  Zalan Bujtas  <zalan@apple.com>
     2
     3        Assertion in RenderGeometryMap::mapToContainer with LayoutUnit overflow.
     4        https://bugs.webkit.org/show_bug.cgi?id=108619
     5        rdar://problem/19391214
     6
     7        Use only FloatQuad in RenderGeometryMap::mapToContainer.
     8
     9        Due to the difference in the internal representation of FloatRect and FloatQuad,
     10        with certain float values, converting FloatRect to FloatQuad and back
     11        to FloatRect could produce a slightly different rect.
     12
     13        Reviewed by Simon Fraser.
     14
     15        * fast/block/geometry-map-assertion-with-tall-content-expected.txt: Added.
     16        * fast/block/geometry-map-assertion-with-tall-content.html: Added.
     17
    1182015-01-06  Sam Weinig  <sam@webkit.org>
    219
  • trunk/Source/WebCore/ChangeLog

    r178006 r178009  
     12015-01-06  Zalan Bujtas  <zalan@apple.com>
     2
     3        Assertion in RenderGeometryMap::mapToContainer with LayoutUnit overflow.
     4        https://bugs.webkit.org/show_bug.cgi?id=108619
     5        rdar://problem/19391214
     6
     7        Use only FloatQuad in RenderGeometryMap::mapToContainer.
     8
     9        Due to the difference in the internal representation of FloatRect and FloatQuad,
     10        with certain float values, converting FloatRect to FloatQuad and back
     11        to FloatRect could produce a slightly different rect.
     12
     13        Reviewed by Simon Fraser.
     14
     15        Test: fast/block/geometry-map-assertion-with-tall-content.html
     16
     17        * rendering/RenderGeometryMap.cpp:
     18        (WebCore::RenderGeometryMap::mapToContainer):
     19
    1202015-01-06  Sam Weinig  <sam@webkit.org>
    221
  • trunk/Source/WebCore/rendering/RenderGeometryMap.cpp

    r177200 r178009  
    124124FloatQuad RenderGeometryMap::mapToContainer(const FloatRect& rect, const RenderLayerModelObject* container) const
    125125{
    126     FloatRect result;
     126    FloatQuad result;
    127127   
    128128    if (!hasFixedPositionStep() && !hasTransformStep() && !hasNonUniformStep() && (!container || (m_mapping.size() && container == m_mapping[0].m_renderer))) {
     
    132132        TransformState transformState(TransformState::ApplyTransformDirection, rect.center(), rect);
    133133        mapToContainer(transformState, container);
    134         result = transformState.lastPlanarQuad().boundingBox();
     134        result = transformState.lastPlanarQuad();
    135135    }
    136136
     
    139139    // Inspector creates renderers with negative width <https://bugs.webkit.org/show_bug.cgi?id=87194>.
    140140    // Taking FloatQuad bounds avoids spurious assertions because of that.
    141     ASSERT(enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()));
     141    ASSERT(enclosingIntRect(rendererMappedResult) == enclosingIntRect(result.boundingBox()));
    142142#endif
    143143
Note: See TracChangeset for help on using the changeset viewer.