Title: [145639] branches/safari-536.30-branch

Diff

Modified: branches/safari-536.30-branch/LayoutTests/ChangeLog (145638 => 145639)


--- branches/safari-536.30-branch/LayoutTests/ChangeLog	2013-03-13 00:43:48 UTC (rev 145638)
+++ branches/safari-536.30-branch/LayoutTests/ChangeLog	2013-03-13 00:45:52 UTC (rev 145639)
@@ -1,5 +1,19 @@
 2013-03-12  Lucas Forschler  <[email protected]>
 
+        Merge r137464
+
+    2012-12-12  Alexander Pavlov  <[email protected]>
+
+            Web Inspector: [Crash] Clear cached stylesheet rules in InspectorStyleSheet::deleteRule()
+            https://bugs.webkit.org/show_bug.cgi?id=104806
+
+            Reviewed by Vsevolod Vlasov.
+
+            * inspector/styles/undo-add-rule-crash-expected.txt: Added.
+            * inspector/styles/undo-add-rule-crash.html: Added.
+
+2013-03-12  Lucas Forschler  <[email protected]>
+
         Merge r136560
 
     2012-12-04  Abhishek Arya  <[email protected]>

Copied: branches/safari-536.30-branch/LayoutTests/inspector/styles/undo-add-rule-crash-expected.txt (from rev 137464, trunk/LayoutTests/inspector/styles/undo-add-rule-crash-expected.txt) (0 => 145639)


--- branches/safari-536.30-branch/LayoutTests/inspector/styles/undo-add-rule-crash-expected.txt	                        (rev 0)
+++ branches/safari-536.30-branch/LayoutTests/inspector/styles/undo-add-rule-crash-expected.txt	2013-03-13 00:45:52 UTC (rev 145639)
@@ -0,0 +1,4 @@
+Tests that the inspected page does not crash after undoing a new rule addition. Bug 104806
+The test has passed (no crash).
+
+

Copied: branches/safari-536.30-branch/LayoutTests/inspector/styles/undo-add-rule-crash.html (from rev 137464, trunk/LayoutTests/inspector/styles/undo-add-rule-crash.html) (0 => 145639)


--- branches/safari-536.30-branch/LayoutTests/inspector/styles/undo-add-rule-crash.html	                        (rev 0)
+++ branches/safari-536.30-branch/LayoutTests/inspector/styles/undo-add-rule-crash.html	2013-03-13 00:45:52 UTC (rev 145639)
@@ -0,0 +1,47 @@
+<html>
+<head>
+<script src=""
+<script src=""
+<script>
+
+function test()
+{
+    InspectorTest.selectNodeAndWaitForStyles("inspected", step1);
+
+    function step1()
+    {
+        addNewRuleAndSelectNode("other", step2);
+    }
+
+    function step2()
+    {
+        WebInspector.domAgent.undo();
+        InspectorTest.waitForStyles("other", step3);
+    }
+
+    function step3()
+    {
+        InspectorTest.completeTest();
+    }
+
+    function addNewRuleAndSelectNode(nodeId, next)
+    {
+        document.getElementById("add-style-button-test-id").click();
+        var section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2];
+        InspectorTest.selectNodeAndWaitForStyles(nodeId, next);
+    }
+}
+
+</script>
+</head>
+
+<body _onload_="runTest()">
+Tests that the inspected page does not crash after undoing a new rule addition. <a href="" 104806</a>
+
+<p>The test has passed (no crash).</p>
+<div id="inspected"><div id="other" /></div>
+<style>
+@-webkit-keyframes cfpulse1 { 0% { opacity: 0.1;  } }
+.c1 { -webkit-animation-name: cfpulse1;  }
+</style>
+</html>

Modified: branches/safari-536.30-branch/Source/WebCore/ChangeLog (145638 => 145639)


--- branches/safari-536.30-branch/Source/WebCore/ChangeLog	2013-03-13 00:43:48 UTC (rev 145638)
+++ branches/safari-536.30-branch/Source/WebCore/ChangeLog	2013-03-13 00:45:52 UTC (rev 145639)
@@ -1,5 +1,23 @@
 2013-03-12  Lucas Forschler  <[email protected]>
 
+        Merge r137464
+
+    2012-12-12  Alexander Pavlov  <[email protected]>
+
+            Web Inspector: [Crash] Clear cached stylesheet rules in InspectorStyleSheet::deleteRule()
+            https://bugs.webkit.org/show_bug.cgi?id=104806
+
+            Reviewed by Vsevolod Vlasov.
+
+            Cached rules (m_flatRules) should get cleared whenever a rule is deleted.
+
+            Test: inspector/styles/undo-add-rule-crash.html
+
+            * inspector/InspectorStyleSheet.cpp:
+            (WebCore::InspectorStyleSheet::deleteRule):
+
+2013-03-12  Lucas Forschler  <[email protected]>
+
         Merge r136560
 
     2012-12-04  Abhishek Arya  <[email protected]>

Modified: branches/safari-536.30-branch/Source/WebCore/inspector/InspectorStyleSheet.cpp (145638 => 145639)


--- branches/safari-536.30-branch/Source/WebCore/inspector/InspectorStyleSheet.cpp	2013-03-13 00:43:48 UTC (rev 145638)
+++ branches/safari-536.30-branch/Source/WebCore/inspector/InspectorStyleSheet.cpp	2013-03-13 00:45:52 UTC (rev 145639)
@@ -836,7 +836,7 @@
 
     String sheetText = m_parsedStyleSheet->text();
     sheetText.remove(sourceData->selectorListRange.start, sourceData->styleSourceData->styleBodyRange.end - sourceData->selectorListRange.start + 1);
-    m_parsedStyleSheet->setText(sheetText);
+    setText(sheetText);
     fireStyleSheetChanged();
     return true;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to