Title: [154439] trunk
- Revision
- 154439
- Author
- [email protected]
- Date
- 2013-08-22 03:14:02 -0700 (Thu, 22 Aug 2013)
Log Message
ASSERTION FAILED: extractedStyle in WebCore::ApplyStyleCommand::removeInlineStyleFromElement
https://bugs.webkit.org/show_bug.cgi?id=119672
Reviewed by Darin Adler.
Source/WebCore:
The last extractedStyle parameter of removeInlineStyleFromElement() is not mandatory and it's set
to default 0. This way we have to check its existence before the usage.
Test: editing/execCommand/extracted_style_assert.html
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
LayoutTests:
Test with NULL extractedStyle.
* editing/execCommand/extracted_style_assert-expected.txt: Added.
* editing/execCommand/extracted_style_assert.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (154438 => 154439)
--- trunk/LayoutTests/ChangeLog 2013-08-22 09:28:18 UTC (rev 154438)
+++ trunk/LayoutTests/ChangeLog 2013-08-22 10:14:02 UTC (rev 154439)
@@ -1,3 +1,15 @@
+2013-08-22 Renata Hodovan <[email protected]>
+
+ ASSERTION FAILED: extractedStyle in WebCore::ApplyStyleCommand::removeInlineStyleFromElement
+ https://bugs.webkit.org/show_bug.cgi?id=119672
+
+ Reviewed by Darin Adler.
+
+ Test with NULL extractedStyle.
+
+ * editing/execCommand/extracted_style_assert-expected.txt: Added.
+ * editing/execCommand/extracted_style_assert.html: Added.
+
2013-08-08 Sergio Villar Senin <[email protected]>
[CSS Grid Layout] Refactor testing code
Added: trunk/LayoutTests/editing/execCommand/extracted_style_assert-expected.txt (0 => 154439)
--- trunk/LayoutTests/editing/execCommand/extracted_style_assert-expected.txt (rev 0)
+++ trunk/LayoutTests/editing/execCommand/extracted_style_assert-expected.txt 2013-08-22 10:14:02 UTC (rev 154439)
@@ -0,0 +1 @@
+PASS. WebKit didn't crash.
Added: trunk/LayoutTests/editing/execCommand/extracted_style_assert.html (0 => 154439)
--- trunk/LayoutTests/editing/execCommand/extracted_style_assert.html (rev 0)
+++ trunk/LayoutTests/editing/execCommand/extracted_style_assert.html 2013-08-22 10:14:02 UTC (rev 154439)
@@ -0,0 +1,19 @@
+<html>
+ <body>
+ <table>
+ <td>
+ <a></a>
+ </td>
+ </table>
+ <script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ document.designMode = "on";
+ document.execCommand("SelectAll");
+ document.execCommand("CreateLink", 0, 'foo');
+
+ document.body.innerHTML = "PASS. WebKit didn't crash.";
+ </script>
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (154438 => 154439)
--- trunk/Source/WebCore/ChangeLog 2013-08-22 09:28:18 UTC (rev 154438)
+++ trunk/Source/WebCore/ChangeLog 2013-08-22 10:14:02 UTC (rev 154439)
@@ -1,3 +1,18 @@
+2013-08-22 Renata Hodovan <[email protected]>
+
+ ASSERTION FAILED: extractedStyle in WebCore::ApplyStyleCommand::removeInlineStyleFromElement
+ https://bugs.webkit.org/show_bug.cgi?id=119672
+
+ Reviewed by Darin Adler.
+
+ The last extractedStyle parameter of removeInlineStyleFromElement() is not mandatory and it's set
+ to default 0. This way we have to check its existence before the usage.
+
+ Test: editing/execCommand/extracted_style_assert.html
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
+
2013-08-21 Commit Queue <[email protected]>
Unreviewed, rolling out r154416.
Modified: trunk/Source/WebCore/editing/ApplyStyleCommand.cpp (154438 => 154439)
--- trunk/Source/WebCore/editing/ApplyStyleCommand.cpp 2013-08-22 09:28:18 UTC (rev 154438)
+++ trunk/Source/WebCore/editing/ApplyStyleCommand.cpp 2013-08-22 10:14:02 UTC (rev 154439)
@@ -887,8 +887,8 @@
if (isStyledInlineElementToRemove(element.get())) {
if (mode == RemoveNone)
return true;
- ASSERT(extractedStyle);
- extractedStyle->mergeInlineStyleOfElement(element.get(), EditingStyle::OverrideValues);
+ if (extractedStyle)
+ extractedStyle->mergeInlineStyleOfElement(element.get(), EditingStyle::OverrideValues);
removeNodePreservingChildren(element);
return true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes