Changeset 82222 in webkit


Ignore:
Timestamp:
Mar 29, 2011 3:31:46 AM (13 years ago)
Author:
eae@chromium.org
Message:

2011-03-29 Emil A Eklund <eae@chromium.org>

Reviewed by Darin Adler.

getComputedStyle counterIncrement crash @ WebCore::counterToCSSValue
https://bugs.webkit.org/show_bug.cgi?id=57266

Add test for getComputedStyle(...).counterIncrement without a counter.

  • fast/css/getComputedStyle/counterIncrement-without-counter-expected.txt: Added.
  • fast/css/getComputedStyle/counterIncrement-without-counter.html: Added.

2011-03-29 Emil A Eklund <eae@chromium.org>

Reviewed by Darin Adler.

getComputedStyle counterIncrement crash @ WebCore::counterToCSSValue
https://bugs.webkit.org/show_bug.cgi?id=57266

Add null check to counterToCSSValue.

Test: fast/css/getComputedStyle/counterIncrement-without-counter.html

  • css/CSSComputedStyleDeclaration.cpp: (WebCore::counterToCSSValue):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r82217 r82222  
     12011-03-29  Emil A Eklund  <eae@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        getComputedStyle counterIncrement crash @ WebCore::counterToCSSValue
     6        https://bugs.webkit.org/show_bug.cgi?id=57266
     7
     8        Add test for getComputedStyle(...).counterIncrement without a counter.
     9
     10        * fast/css/getComputedStyle/counterIncrement-without-counter-expected.txt: Added.
     11        * fast/css/getComputedStyle/counterIncrement-without-counter.html: Added.
     12
    1132011-03-29  Gavin Peters  <gavinp@chromium.org>
    214
  • trunk/Source/WebCore/ChangeLog

    r82217 r82222  
     12011-03-29  Emil A Eklund  <eae@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        getComputedStyle counterIncrement crash @ WebCore::counterToCSSValue
     6        https://bugs.webkit.org/show_bug.cgi?id=57266
     7
     8        Add null check to counterToCSSValue.
     9
     10        Test: fast/css/getComputedStyle/counterIncrement-without-counter.html
     11
     12        * css/CSSComputedStyleDeclaration.cpp:
     13        (WebCore::counterToCSSValue):
     14
    1152011-03-29  Gavin Peters  <gavinp@chromium.org>
    216
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r81869 r82222  
    771771static PassRefPtr<CSSValue> counterToCSSValue(const RenderStyle* style, int propertyID, CSSPrimitiveValueCache* primitiveValueCache)
    772772{
     773    const CounterDirectiveMap* map = style->counterDirectives();
     774    if (!map)
     775        return 0;
     776
    773777    RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
    774     const CounterDirectiveMap* map = style->counterDirectives();
    775778    for (CounterDirectiveMap::const_iterator it = map->begin(); it != map->end(); ++it) {
    776779        list->append(primitiveValueCache->createValue(it->first.get(), CSSPrimitiveValue::CSS_STRING));
Note: See TracChangeset for help on using the changeset viewer.