- Source/WebCore/ChangeLog +16 lines
Lines 1-3 Source/WebCore/ChangeLog_sec1
1
2012-07-23  Stephen Chenney  <schenney@chromium.org>
2
3
        Crash when setting empty class name on a new element
4
        https://bugs.webkit.org/show_bug.cgi?id=92024
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Add a check for null attributeData() when setting the className to an
9
        empty string on a newly created element. New SVG elements have null
10
        attributeData() on baseVal upon creation.
11
12
        Test: svg/custom/empty-className-baseVal-crash.html
13
14
        * dom/StyledElement.cpp:
15
        (WebCore::StyledElement::classAttributeChanged): Add check for null attributeData()
16
1
2012-07-23  Shawn Singh  <shawnsingh@chromium.org>
17
2012-07-23  Shawn Singh  <shawnsingh@chromium.org>
2
18
3
        [chromium] Refactor CCLayerTreeHostCommon: clean up clipRect and drawableContentRect design
19
        [chromium] Refactor CCLayerTreeHostCommon: clean up clipRect and drawableContentRect design
- Source/WebCore/dom/StyledElement.cpp -1 / +1 lines
Lines 172-178 void StyledElement::classAttributeChange Source/WebCore/dom/StyledElement.cpp_sec1
172
        ensureAttributeData()->setClass(newClassString, shouldFoldCase);
172
        ensureAttributeData()->setClass(newClassString, shouldFoldCase);
173
        if (DOMTokenList* classList = optionalClassList())
173
        if (DOMTokenList* classList = optionalClassList())
174
            static_cast<ClassList*>(classList)->reset(newClassString);
174
            static_cast<ClassList*>(classList)->reset(newClassString);
175
    } else
175
    } else if (attributeData())
176
        attributeData()->clearClass();
176
        attributeData()->clearClass();
177
    setNeedsStyleRecalc();
177
    setNeedsStyleRecalc();
178
}
178
}
- LayoutTests/ChangeLog +13 lines
Lines 1-3 LayoutTests/ChangeLog_sec1
1
2012-07-23  Stephen Chenney  <schenney@chromium.org>
2
3
        Crash when setting empty class name on a new element
4
        https://bugs.webkit.org/show_bug.cgi?id=92024
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Add a check for null attributeData() when setting the className to an
9
        empty string on a newly created element.
10
11
        * svg/custom/empty-className-baseVal-crash-expected.txt: Added.
12
        * svg/custom/empty-className-baseVal-crash.html: Added.
13
1
2012-07-23  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
14
2012-07-23  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2
15
3
        [Qt] tables/mozilla_expected_failures rebaseline after new test fonts
16
        [Qt] tables/mozilla_expected_failures rebaseline after new test fonts
- LayoutTests/svg/custom/empty-className-baseVal-crash-expected.txt +1 lines
Line 0 LayoutTests/svg/custom/empty-className-baseVal-crash-expected.txt_sec1
1
PASS if no crash.
- LayoutTests/svg/custom/empty-className-baseVal-crash.html +9 lines
Line 0 LayoutTests/svg/custom/empty-className-baseVal-crash.html_sec1
1
<!DOCTYPE html>
2
<script>
3
  if (window.layoutTestController)
4
    layoutTestController.dumpAsText();
5
  document.createElementNS("http://www.w3.org/2000/svg", "svg").className.baseVal = "";
6
</script>
7
<body>
8
  PASS if no crash.
9
</body>

Return to Bug 92024