Bug 1162823 - Do not treat non-Latin words as misspelled; r=ekanan
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 08 May 2015 10:16:37 -0400
changeset 272923 a9a4f21d0daf6fb2f956cdc9caf0f8382b696d7b
parent 272922 5a277f82ff59abfbc05e4a92da72f5e3233661ee
child 272924 f7a79386ab63a58fc4791a526cd238bcefee2f15
push id4830
push userjlund@mozilla.com
push dateMon, 29 Jun 2015 20:18:48 +0000
treeherdermozilla-beta@4c2175bb0420 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersekanan
bugs1162823
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1162823 - Do not treat non-Latin words as misspelled; r=ekanan
editor/reftests/reftest.list
editor/reftests/spellcheck-non-latin-arabic-ref.html
editor/reftests/spellcheck-non-latin-arabic.html
editor/reftests/spellcheck-non-latin-chinese-simplified-ref.html
editor/reftests/spellcheck-non-latin-chinese-simplified.html
editor/reftests/spellcheck-non-latin-chinese-traditional-ref.html
editor/reftests/spellcheck-non-latin-chinese-traditional.html
editor/reftests/spellcheck-non-latin-hebrew-ref.html
editor/reftests/spellcheck-non-latin-hebrew.html
editor/reftests/spellcheck-non-latin-japanese-ref.html
editor/reftests/spellcheck-non-latin-japanese.html
editor/reftests/spellcheck-non-latin-korean-ref.html
editor/reftests/spellcheck-non-latin-korean.html
extensions/spellcheck/locales/en-US/hunspell/README_en_US.txt
extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/install-new-dict
extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/README_en_US.txt
extensions/spellcheck/locales/en-US/hunspell/en-US.aff
layout/base/tests/bug646382-1-ref.html
layout/base/tests/bug646382-1.html
--- a/editor/reftests/reftest.list
+++ b/editor/reftests/reftest.list
@@ -69,16 +69,22 @@ skip-if(B2G||Mulet) fails-if(Android) ne
 == spellcheck-slash-valid.html spellcheck-slash-valid-ref.html
 == spellcheck-period-valid.html spellcheck-period-valid-ref.html
 == spellcheck-space-valid.html spellcheck-space-valid-ref.html
 == spellcheck-comma-valid.html spellcheck-comma-valid-ref.html
 == spellcheck-hyphen-multiple-valid.html spellcheck-hyphen-multiple-valid-ref.html
 skip-if(B2G||Mulet) fails-if(Android) needs-focus != spellcheck-hyphen-multiple-invalid.html spellcheck-hyphen-multiple-invalid-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
 == spellcheck-dotafterquote-valid.html spellcheck-dotafterquote-valid-ref.html
 == spellcheck-url-valid.html spellcheck-url-valid-ref.html
+needs-focus == spellcheck-non-latin-arabic.html spellcheck-non-latin-arabic-ref.html
+needs-focus == spellcheck-non-latin-chinese-simplified.html spellcheck-non-latin-chinese-simplified-ref.html
+needs-focus == spellcheck-non-latin-chinese-traditional.html spellcheck-non-latin-chinese-traditional-ref.html
+needs-focus == spellcheck-non-latin-hebrew.html spellcheck-non-latin-hebrew-ref.html
+needs-focus == spellcheck-non-latin-japanese.html spellcheck-non-latin-japanese-ref.html
+needs-focus == spellcheck-non-latin-korean.html spellcheck-non-latin-korean-ref.html
 == unneeded_scroll.html unneeded_scroll-ref.html
 skip-if(B2G||Mulet) == caret_on_presshell_reinit.html caret_on_presshell_reinit-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
 skip-if(B2G||Mulet) == caret_on_presshell_reinit-2.html caret_on_presshell_reinit-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
 skip-if(B2G||Mulet) fuzzy-if(asyncPanZoom&&!layersGPUAccelerated,102,2824) == 642800.html 642800-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
 == selection_visibility_after_reframe.html selection_visibility_after_reframe-ref.html
 != selection_visibility_after_reframe-2.html selection_visibility_after_reframe-ref.html
 != selection_visibility_after_reframe-3.html selection_visibility_after_reframe-ref.html
 == 672709.html 672709-ref.html
copy from layout/base/tests/bug646382-1.html
copy to editor/reftests/spellcheck-non-latin-arabic-ref.html
--- a/layout/base/tests/bug646382-1.html
+++ b/editor/reftests/spellcheck-non-latin-arabic-ref.html
@@ -1,22 +1,9 @@
-<html class="reftest-wait">
+<!DOCTYPE html>
+<html>
   <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-    <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
+    <meta charset="utf-8">
   </head>
-  <body onload="start()">
-    <textarea onfocus="typeIntoMe()" style="-moz-appearance: none" spellcheck="false"></textarea>
-    <script>
-      function start() {
-        document.querySelector("textarea").focus();
-      }
-      function typeIntoMe() {
-        setTimeout(function() {
-          synthesizeKey("س", {});
-          synthesizeKey("VK_DOWN", {});
-          synthesizeKey("VK_DOWN", {});
-          document.documentElement.removeAttribute("class");
-        }, 0);
-      }
-    </script>
+  <body>
+    <textarea autofocus spellcheck="false">سلام</textarea>
   </body>
 </html>
new file mode 100644
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-arabic.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+  </head>
+  <body>
+    <textarea autofocus>سلام</textarea>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-chinese-simplified-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+  </head>
+  <body>
+    <textarea autofocus spellcheck="false">你好</textarea>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-chinese-simplified.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+  </head>
+  <body>
+    <textarea autofocus>你好</textarea>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-chinese-traditional-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+  </head>
+  <body>
+    <textarea autofocus spellcheck="false">你好</textarea>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-chinese-traditional.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+  </head>
+  <body>
+    <textarea autofocus>你好</textarea>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-hebrew-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+  </head>
+  <body>
+    <textarea autofocus spellcheck="false">שלום</textarea>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-hebrew.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+  </head>
+  <body>
+    <textarea autofocus>שלום</textarea>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-japanese-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+  </head>
+  <body>
+    <textarea autofocus spellcheck="false">こんにちは</textarea>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-japanese.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+  </head>
+  <body>
+    <textarea autofocus>こんにちは</textarea>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-korean-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+  </head>
+  <body>
+    <textarea autofocus spellcheck="false">안녕하세요</textarea>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-korean.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+  </head>
+  <body>
+    <textarea autofocus>안녕하세요</textarea>
+  </body>
+</html>
--- a/extensions/spellcheck/locales/en-US/hunspell/README_en_US.txt
+++ b/extensions/spellcheck/locales/en-US/hunspell/README_en_US.txt
@@ -1,11 +1,11 @@
 en_US-mozilla Hunspell Dictionary
 Generated from SCOWL Version 2015.04.24
-Wed Apr 29 20:51:35 EDT 2015
+Fri May  8 09:52:28 EDT 2015
 
 http://wordlist.sourceforge.net
 
 README file for English Hunspell dictionaries derived from SCOWL.
 
 These dictionaries are created using the speller/make-hunspell-dict
 script in SCOWL.
 
@@ -306,9 +306,9 @@ from the Ispell distribution they are un
   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
   BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
   ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   POSSIBILITY OF SUCH DAMAGE.
 
-Build Date: Wed Apr 29 20:51:35 EDT 2015
+Build Date: Fri May  8 09:52:28 EDT 2015
--- a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/install-new-dict
+++ b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/install-new-dict
@@ -16,16 +16,19 @@ set -x
 if [ -e orig-bk ]; then echo "$0: directory 'orig-bk' exists." 1>&2 ; exit 0; fi
 mv orig orig-bk
 mkdir orig
 cp $SPELLER/en_US.dic $SPELLER/en_US.aff $SPELLER/README_en_US.txt orig
 
 mkdir mozilla-bk
 mv ../en-US.dic ../en-US.aff ../README_en_US.txt mozilla-bk
 
+# Convert the affix file to ISO8859-1
+sed -i=bak -e '/^ICONV/d' -e 's/^SET UTF8$/SET ISO8859-1/' en_US-mozilla.aff
+
 cp en_US-mozilla.aff ../en-US.aff
 cp en_US-mozilla.dic ../en-US.dic
 cp README_en_US-mozilla.txt ../README_en_US.txt
 
 set +x
 
 echo "New dictionary copied into place.  Please commit the changes."
 
--- a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/README_en_US.txt
+++ b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/README_en_US.txt
@@ -1,11 +1,11 @@
 en_US Hunspell Dictionary
 Generated from SCOWL Version 2015.04.24
-Wed Apr 29 20:51:21 EDT 2015
+Fri May  8 09:52:07 EDT 2015
 
 http://wordlist.sourceforge.net
 
 README file for English Hunspell dictionaries derived from SCOWL.
 
 These dictionaries are created using the speller/make-hunspell-dict
 script in SCOWL.
 
@@ -306,10 +306,10 @@ from the Ispell distribution they are un
   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
   BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
   ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   POSSIBILITY OF SUCH DAMAGE.
 
-Build Date: Wed Apr 29 20:51:21 EDT 2015
+Build Date: Fri May  8 09:52:07 EDT 2015
 Wordlist Command: mk-list --accents=strip en_US 60
--- a/extensions/spellcheck/locales/en-US/hunspell/en-US.aff
+++ b/extensions/spellcheck/locales/en-US/hunspell/en-US.aff
@@ -1,12 +1,10 @@
-SET UTF8
+SET ISO8859-1
 TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ'
-ICONV 1
-ICONV ’ '
 NOSUGGEST !
 
 # ordinal numbers
 COMPOUNDMIN 1
 # only in compounds: 1th, 2th, 3th
 ONLYINCOMPOUND c
 # compound rules:
 # 1. [0-9]*1[0-9]th (10th, 11th, 12th, 56714th, etc.)
--- a/layout/base/tests/bug646382-1-ref.html
+++ b/layout/base/tests/bug646382-1-ref.html
@@ -1,14 +1,14 @@
 <html class="reftest-wait">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   </head>
   <body onload="start()">
-    <textarea onfocus="done()" style="-moz-appearance: none" spellcheck="false">س</textarea>
+    <textarea onfocus="done()" style="-moz-appearance: none">س</textarea>
     <script>
       var textarea = document.querySelector("textarea");
       function start() {
         textarea.focus();
       }
       function done() {
         document.documentElement.removeAttribute("class");
       }
--- a/layout/base/tests/bug646382-1.html
+++ b/layout/base/tests/bug646382-1.html
@@ -1,15 +1,15 @@
 <html class="reftest-wait">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
   </head>
   <body onload="start()">
-    <textarea onfocus="typeIntoMe()" style="-moz-appearance: none" spellcheck="false"></textarea>
+    <textarea onfocus="typeIntoMe()" style="-moz-appearance: none"></textarea>
     <script>
       function start() {
         document.querySelector("textarea").focus();
       }
       function typeIntoMe() {
         setTimeout(function() {
           synthesizeKey("س", {});
           synthesizeKey("VK_DOWN", {});