Changeset 105031 in webkit


Ignore:
Timestamp:
Jan 15, 2012 11:42:47 AM (12 years ago)
Author:
kling@webkit.org
Message:

CSSParser: Fix failing assertion below BorderImageQuadParseContext.
<http://webkit.org/b/76343> and <rdar://problem/10584969>

Reviewed by Antti Koivisto.

No longer asserts: fast/borders/inline-mask-overlay-image-outset-vertical-rl.html

  • css/CSSParser.cpp:

(WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
(WebCore::BorderImageQuadParseContext::commitBorderImageQuad):

Clone CSSValues by copying the RefPtrs instead of going through
the CSSValuePool's create-from-double factory. This prevents an
assertion when the incoming value is CSSValueAuto.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r105030 r105031  
     12012-01-15  Andreas Kling  <awesomekling@apple.com>
     2
     3        CSSParser: Fix failing assertion below BorderImageQuadParseContext.
     4        <http://webkit.org/b/76343> and <rdar://problem/10584969>
     5
     6        Reviewed by Antti Koivisto.
     7
     8        No longer asserts: fast/borders/inline-mask-overlay-image-outset-vertical-rl.html
     9
     10        * css/CSSParser.cpp:
     11        (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
     12        (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
     13
     14            Clone CSSValues by copying the RefPtrs instead of going through
     15            the CSSValuePool's create-from-double factory. This prevents an
     16            assertion when the incoming value is CSSValueAuto.
     17
    1182011-08-30  Robert Hogan  <robert@webkit.org>
    219
  • trunk/Source/WebCore/css/CSSParser.cpp

    r105015 r105031  
    55505550        ASSERT(m_top);
    55515551        if (!m_right) {
    5552             m_right = m_cssValuePool->createValue(m_top->getDoubleValue(), static_cast<CSSPrimitiveValue::UnitTypes>(m_top->primitiveType()));
    5553             m_bottom = m_cssValuePool->createValue(m_top->getDoubleValue(), static_cast<CSSPrimitiveValue::UnitTypes>(m_top->primitiveType()));
    5554             m_left = m_cssValuePool->createValue(m_top->getDoubleValue(), static_cast<CSSPrimitiveValue::UnitTypes>(m_top->primitiveType()));
     5552            m_right = m_top;
     5553            m_bottom = m_top;
     5554            m_left = m_top;
    55555555        }
    55565556        if (!m_bottom) {
    5557             m_bottom = m_cssValuePool->createValue(m_top->getDoubleValue(), static_cast<CSSPrimitiveValue::UnitTypes>(m_top->primitiveType()));
    5558             m_left = m_cssValuePool->createValue(m_right->getDoubleValue(), static_cast<CSSPrimitiveValue::UnitTypes>(m_right->primitiveType()));
     5557            m_bottom = m_top;
     5558            m_left = m_right;
    55595559        }
    55605560        if (!m_left)
    5561             m_left = m_cssValuePool->createValue(m_right->getDoubleValue(), static_cast<CSSPrimitiveValue::UnitTypes>(m_right->primitiveType()));
     5561            m_left = m_right;
    55625562
    55635563        // Now build a rect value to hold all four of our primitive values.
     
    56665666        ASSERT(m_top);
    56675667        if (!m_right) {
    5668             m_right = m_cssValuePool->createValue(m_top->getDoubleValue(), static_cast<CSSPrimitiveValue::UnitTypes>(m_top->primitiveType()));
    5669             m_bottom = m_cssValuePool->createValue(m_top->getDoubleValue(), static_cast<CSSPrimitiveValue::UnitTypes>(m_top->primitiveType()));
    5670             m_left = m_cssValuePool->createValue(m_top->getDoubleValue(), static_cast<CSSPrimitiveValue::UnitTypes>(m_top->primitiveType()));
     5668            m_right = m_top;
     5669            m_bottom = m_top;
     5670            m_left = m_top;
    56715671        }
    56725672        if (!m_bottom) {
    5673             m_bottom = m_cssValuePool->createValue(m_top->getDoubleValue(), static_cast<CSSPrimitiveValue::UnitTypes>(m_top->primitiveType()));
    5674             m_left = m_cssValuePool->createValue(m_right->getDoubleValue(), static_cast<CSSPrimitiveValue::UnitTypes>(m_right->primitiveType()));
     5673            m_bottom = m_top;
     5674            m_left = m_right;
    56755675        }
    56765676        if (!m_left)
    5677             m_left = m_cssValuePool->createValue(m_right->getDoubleValue(), static_cast<CSSPrimitiveValue::UnitTypes>(m_right->primitiveType()));
     5677            m_left = m_right;
    56785678
    56795679        // Now build a quad value to hold all four of our primitive values.
Note: See TracChangeset for help on using the changeset viewer.