Title: [95386] trunk
- Revision
- 95386
- Author
- [email protected]
- Date
- 2011-09-17 16:12:16 -0700 (Sat, 17 Sep 2011)
Log Message
https://bugs.webkit.org/show_bug.cgi?id=68307
Crash in border image cssText. Make sure to null check all the components, since they're all
optional now.
Reviewed by Sam Weinig.
Source/WebCore:
Added fast/borders/border-image-slice-omission.html
* css/CSSBorderImageValue.cpp:
(WebCore::CSSBorderImageValue::cssText):
LayoutTests:
* fast/borders/border-image-slice-omission.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (95385 => 95386)
--- trunk/LayoutTests/ChangeLog 2011-09-17 22:47:09 UTC (rev 95385)
+++ trunk/LayoutTests/ChangeLog 2011-09-17 23:12:16 UTC (rev 95386)
@@ -1,3 +1,14 @@
+2011-09-17 David Hyatt <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=68307
+
+ Crash in border image cssText. Make sure to null check all the components, since they're all
+ optional now.
+
+ Reviewed by Sam Weinig.
+
+ * fast/borders/border-image-slice-omission.html: Added.
+
2011-09-17 Csaba Osztrogonác <[email protected]>
[Qt][WK2] fast/events/media-element-focus-tab.html fails
Added: trunk/LayoutTests/fast/borders/border-image-slice-omission-expected.txt (0 => 95386)
--- trunk/LayoutTests/fast/borders/border-image-slice-omission-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/borders/border-image-slice-omission-expected.txt 2011-09-17 23:12:16 UTC (rev 95386)
@@ -0,0 +1 @@
+This test passes if it does not crash.
Added: trunk/LayoutTests/fast/borders/border-image-slice-omission.html (0 => 95386)
--- trunk/LayoutTests/fast/borders/border-image-slice-omission.html (rev 0)
+++ trunk/LayoutTests/fast/borders/border-image-slice-omission.html 2011-09-17 23:12:16 UTC (rev 95386)
@@ -0,0 +1,17 @@
+<html>
+<head>
+<script>
+if (window.layoutTestController)
+ window.layoutTestController.dumpAsText()
+
+function runTest()
+{
+ document.body.style.borderImage = 'none'
+ document.body.style.cssText
+}
+</script>
+</head>
+<body _onload_="runTest()">
+This test passes if it does not crash.
+</body>
+
Modified: trunk/Source/WebCore/ChangeLog (95385 => 95386)
--- trunk/Source/WebCore/ChangeLog 2011-09-17 22:47:09 UTC (rev 95385)
+++ trunk/Source/WebCore/ChangeLog 2011-09-17 23:12:16 UTC (rev 95386)
@@ -1,3 +1,17 @@
+2011-09-17 David Hyatt <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=68307
+
+ Crash in border image cssText. Make sure to null check all the components, since they're all
+ optional now.
+
+ Reviewed by Sam Weinig.
+
+ Added fast/borders/border-image-slice-omission.html
+
+ * css/CSSBorderImageValue.cpp:
+ (WebCore::CSSBorderImageValue::cssText):
+
2011-09-17 Aaron Boodman <[email protected]>
Rework script context creation/release notifications
Modified: trunk/Source/WebCore/css/CSSBorderImageValue.cpp (95385 => 95386)
--- trunk/Source/WebCore/css/CSSBorderImageValue.cpp 2011-09-17 22:47:09 UTC (rev 95385)
+++ trunk/Source/WebCore/css/CSSBorderImageValue.cpp 2011-09-17 23:12:16 UTC (rev 95386)
@@ -43,11 +43,17 @@
String CSSBorderImageValue::cssText() const
{
// Image first.
- String text(m_image->cssText());
- text += " ";
+ String text;
+
+ if (m_image)
+ text += m_image->cssText();
// Now the slices.
- text += m_imageSlice->cssText();
+ if (m_imageSlice) {
+ if (!text.isEmpty())
+ text += " ";
+ text += m_imageSlice->cssText();
+ }
// Now the border widths.
if (m_borderSlice) {
@@ -62,7 +68,8 @@
if (m_repeat) {
// Now the keywords.
- text += " ";
+ if (!text.isEmpty())
+ text += " ";
text += m_repeat->cssText();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes