Title: [261017] trunk/Source/WebCore
- Revision
- 261017
- Author
- [email protected]
- Date
- 2020-05-01 13:46:38 -0700 (Fri, 01 May 2020)
Log Message
REGRESSION (r260739): Crash when pasting into Mail
https://bugs.webkit.org/show_bug.cgi?id=211311
Reviewed by Wenson Hsieh.
Speculative fix. Would be much better to create a test case demonstrating it's correct.
* editing/cocoa/HTMLConverter.mm:
(WebCore::editingAttributedString): Use container node when TextIterator::node
returns null.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (261016 => 261017)
--- trunk/Source/WebCore/ChangeLog 2020-05-01 20:30:21 UTC (rev 261016)
+++ trunk/Source/WebCore/ChangeLog 2020-05-01 20:46:38 UTC (rev 261017)
@@ -1,3 +1,16 @@
+2020-05-01 Darin Adler <[email protected]>
+
+ REGRESSION (r260739): Crash when pasting into Mail
+ https://bugs.webkit.org/show_bug.cgi?id=211311
+
+ Reviewed by Wenson Hsieh.
+
+ Speculative fix. Would be much better to create a test case demonstrating it's correct.
+
+ * editing/cocoa/HTMLConverter.mm:
+ (WebCore::editingAttributedString): Use container node when TextIterator::node
+ returns null.
+
2020-05-01 Don Olmstead <[email protected]>
[GTK] Add additional exports to support hidden visibility
Modified: trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm (261016 => 261017)
--- trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm 2020-05-01 20:30:21 UTC (rev 261016)
+++ trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm 2020-05-01 20:46:38 UTC (rev 261017)
@@ -2392,6 +2392,10 @@
if (!currentTextLength)
continue;
+ // In some cases the text iterator emits text that is not associated with a node.
+ // In those cases, base the style on the container.
+ if (!node)
+ node = it.range().start.container.ptr();
auto renderer = node->renderer();
ASSERT(renderer);
if (!renderer)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes