From: commit-queue@webkit.org Date: Mon, 4 Mar 2013 23:45:05 +0000 (+0000) Subject: CSS3 calc: identify divide by zero cases at parse time X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=b41cfbca105b5e5b68f831b18377080c1e043d70 CSS3 calc: identify divide by zero cases at parse time https://bugs.webkit.org/show_bug.cgi?id=80411 Patch by Alan Cutter on 2013-03-04 Reviewed by Tony Chang. Added tests to check whether divide by 0 cases are caught. * css3/calc/catch-divide-by-0-expected.txt: Added. * css3/calc/catch-divide-by-0.html: Added. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144689 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 5080ad6..5d1b707 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,15 @@ +2013-03-04 Alan Cutter + + CSS3 calc: identify divide by zero cases at parse time + https://bugs.webkit.org/show_bug.cgi?id=80411 + + Reviewed by Tony Chang. + + Added tests to check whether divide by 0 cases are caught. + + * css3/calc/catch-divide-by-0-expected.txt: Added. + * css3/calc/catch-divide-by-0.html: Added. + 2013-03-04 Julien Chaffraix [CSS Grid Layout] Add parsing for grid-{start|before} diff --git a/LayoutTests/css3/calc/catch-divide-by-0-expected.txt b/LayoutTests/css3/calc/catch-divide-by-0-expected.txt new file mode 100644 index 0000000..af87d1d --- /dev/null +++ b/LayoutTests/css3/calc/catch-divide-by-0-expected.txt @@ -0,0 +1,11 @@ +This tests catching of divide by 0 in calc() at parse time + +100px / 0 => +100px / (0) => +100px / (2 - 2) => +100px / (2 - (-62 + 64)) => +100px * (1 / 0) => +100px * (1 / (0)) => +100px * (1 / (2 - 2)) => +100px * (1 / (2 - (-62 + 64))) => + diff --git a/LayoutTests/css3/calc/catch-divide-by-0.html b/LayoutTests/css3/calc/catch-divide-by-0.html new file mode 100644 index 0000000..7a1a21b --- /dev/null +++ b/LayoutTests/css3/calc/catch-divide-by-0.html @@ -0,0 +1,26 @@ + +
+
This tests catching of divide by 0 in calc() at parse time

+ \ No newline at end of file