Reviewed by Oliver.
* editing/pasteboard/
5245519-expected.checksum: Added.
* editing/pasteboard/
5245519-expected.png: Added.
* editing/pasteboard/
5245519-expected.txt: Added.
* editing/pasteboard/
5245519.html: Added.
WebCore:
Reviewed by Oliver.
<rdar://problem/
5245519> CrashTracer: [USER] 457 crashes in Mail at WebCore::CSSComputedStyleDeclaration::copyInheritableProperties()
If the user pastes something into a region that ends up being
invisible, or if the pasted content contains style spans
that are render-less, we'll crash when we try to remove
redundant styles from style spans.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::copyInheritableProperties):
Add null checks.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@22038
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-06-06 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by Oliver.
+
+ * editing/pasteboard/5245519-expected.checksum: Added.
+ * editing/pasteboard/5245519-expected.png: Added.
+ * editing/pasteboard/5245519-expected.txt: Added.
+ * editing/pasteboard/5245519.html: Added.
+
2007-06-06 Justin Garcia <justin.garcia@apple.com>
Reviewed by Harrison.
--- /dev/null
+37cc348638ebafbdca4889bdfb9746e4
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {P} at (0,0) size 784x36
+ RenderText {#text} at (0,0) size 776x36
+ text run at (0,0) width 776: "This tests for a crash when pasting content that contains Apple-style-spans that don't have renderers.' You should see 'Hello"
+ text run at (0,18) width 48: "World!'"
+ RenderBlock {DIV} at (0,52) size 784x18
+ RenderText {#text} at (0,0) size 39x18
+ text run at (0,0) width 39: "Hello "
+ RenderText {#text} at (39,0) size 45x18
+ text run at (39,0) width 45: "World!"
+caret: position 6 of child 1 {#text} of child 2 {DIV} of child 0 {BODY} of child 0 {HTML} of document
--- /dev/null
+<p>This tests for a crash when pasting content that contains Apple-style-spans that don't have renderers.' You should see 'Hello World!'</p>
+<div id="div" contenteditable="true"><br></div>
+
+<script>
+var div = document.getElementById("div");
+div.focus();
+document.execCommand("InsertHTML", false, "Hello <span style='display:none;' class='Apple-style-span'></span>World!")
+</script>
+2007-06-06 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by Oliver.
+
+ <rdar://problem/5245519> CrashTracer: [USER] 457 crashes in Mail at WebCore::CSSComputedStyleDeclaration::copyInheritableProperties()
+
+ If the user pastes something into a region that ends up being
+ invisible, or if the pasted content contains style spans
+ that are render-less, we'll crash when we try to remove
+ redundant styles from style spans.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::copyInheritableProperties):
+ Add null checks.
+
2007-06-06 Justin Garcia <justin.garcia@apple.com>
Reviewed by Harrison.
PassRefPtr<CSSMutableStyleDeclaration> CSSComputedStyleDeclaration::copyInheritableProperties() const
{
RefPtr<CSSMutableStyleDeclaration> style = copyPropertiesInSet(inheritableProperties, numInheritableProperties);
- if (style) {
+ if (style && m_node && m_node->renderer()) {
// If a node's text fill color is invalid, then its children use
// their font-color as their text fill color (they don't
// inherit it). Likewise for stroke color.