summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/counters
diff options
context:
space:
mode:
authorcdn@chromium.org <cdn@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2011-10-04 19:47:32 +0000
committercdn@chromium.org <cdn@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2011-10-04 19:47:32 +0000
commit3fe933c8aca41583afbcb2c4315106d2ea62e40f (patch)
treeb83e9c332dd7485b1300046cd9ee7bcadadd1576 /third_party/WebKit/LayoutTests/fast/css/counters
parentbf078270056756dd38d1fc83fafca498f5fda3c9 (diff)
downloadchromium_src-3fe933c8aca41583afbcb2c4315106d2ea62e40f.zip
chromium_src-3fe933c8aca41583afbcb2c4315106d2ea62e40f.tar.gz
chromium_src-3fe933c8aca41583afbcb2c4315106d2ea62e40f.tar.bz2
Source/WebCore: Hold refptr to identified previous sibling within findPlaceForCounter.
https://bugs.webkit.org/show_bug.cgi?id=68563 Reviewed by Adam Barth. Test: fast/css/counters/counter-after-style-crash.html * rendering/RenderCounter.cpp: (WebCore::findPlaceForCounter): LayoutTests: Add test for crash when performing rich text mutations with counter nodes. https://bugs.webkit.org/show_bug.cgi?id=68563 Reviewed by Adam Barth. * fast/css/counters/counter-after-style-crash-expected.txt: Added. * fast/css/counters/counter-after-style-crash.html: Added. git-svn-id: svn://svn.chromium.org/blink/trunk@96632 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/css/counters')
-rw-r--r--third_party/WebKit/LayoutTests/fast/css/counters/counter-after-style-crash-expected.txt1
-rw-r--r--third_party/WebKit/LayoutTests/fast/css/counters/counter-after-style-crash.html32
2 files changed, 33 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/css/counters/counter-after-style-crash-expected.txt b/third_party/WebKit/LayoutTests/fast/css/counters/counter-after-style-crash-expected.txt
new file mode 100644
index 0000000..5b6af73
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/counters/counter-after-style-crash-expected.txt
@@ -0,0 +1 @@
+PASS: Counters updated successfully without crashing
diff --git a/third_party/WebKit/LayoutTests/fast/css/counters/counter-after-style-crash.html b/third_party/WebKit/LayoutTests/fast/css/counters/counter-after-style-crash.html
new file mode 100644
index 0000000..8a0af67
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/counters/counter-after-style-crash.html
@@ -0,0 +1,32 @@
+<html>
+ <script>
+ if (window.layoutTestController) {
+ layoutTestController.waitUntilDone();
+ layoutTestController.dumpAsText();
+ }
+ </script>
+ <style>
+ div {
+ counter-reset:ctr
+ }
+
+ :after {
+ content:counter(x);
+ counter-increment:ctr;
+ }
+ </style>
+ <junk>TESTING..</div><div><div></div>
+ <span></span>
+ <table>
+ </script>
+ <script>
+ document.designMode='on';
+ document.execCommand('selectall');
+ document.execCommand('italic');
+ document.execCommand('removeformat');
+
+ document.body.innerHTML = "PASS: Counters updated successfully without crashing";
+ layoutTestController.notifyDone();
+ </script>
+ </table>
+</html> \ No newline at end of file