mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 777529 - Don't spellcheck Unicode numbers; r=ehsan
This commit is contained in:
parent
c838798089
commit
5f2eb8fa49
@ -96,3 +96,5 @@ skip-if(Android) == 462758-grabbers-resizers.html 462758-grabbers-resizers-ref.h
|
||||
== 694880-2.html 694880-ref.html
|
||||
== 694880-3.html 694880-ref.html
|
||||
== 388980-1.html 388980-1-ref.html
|
||||
needs-focus == spellcheck-superscript-1.html spellcheck-superscript-1-ref.html
|
||||
needs-focus != spellcheck-superscript-2.html spellcheck-superscript-2-ref.html
|
||||
|
3
editor/reftests/spellcheck-superscript-1-ref.html
Normal file
3
editor/reftests/spellcheck-superscript-1-ref.html
Normal file
@ -0,0 +1,3 @@
|
||||
<!doctype html>
|
||||
<textarea spellcheck=false>¹ ² ³</textarea>
|
||||
<script>document.body.firstChild.focus()</script>
|
3
editor/reftests/spellcheck-superscript-1.html
Normal file
3
editor/reftests/spellcheck-superscript-1.html
Normal file
@ -0,0 +1,3 @@
|
||||
<!doctype html>
|
||||
<textarea>¹ ² ³</textarea>
|
||||
<script>document.body.firstChild.focus()</script>
|
3
editor/reftests/spellcheck-superscript-2-ref.html
Normal file
3
editor/reftests/spellcheck-superscript-2-ref.html
Normal file
@ -0,0 +1,3 @@
|
||||
<!doctype html>
|
||||
<textarea>¹ ² ³ mispeled</textarea>
|
||||
<script>document.body.firstChild.focus()</script>
|
3
editor/reftests/spellcheck-superscript-2.html
Normal file
3
editor/reftests/spellcheck-superscript-2.html
Normal file
@ -0,0 +1,3 @@
|
||||
<!doctype html>
|
||||
<textarea spellcheck=false>¹ ² ³ mispeled</textarea>
|
||||
<script>document.body.firstChild.focus()</script>
|
@ -948,11 +948,10 @@ WordSplitState::ShouldSkipWord(PRInt32 aStart, PRInt32 aLength)
|
||||
|
||||
// check to see if the word contains a digit
|
||||
for (PRInt32 i = aStart; i < last; i ++) {
|
||||
PRUnichar ch = mDOMWordText[i];
|
||||
// XXX Shouldn't this be something a lot more complex, Unicode-based?
|
||||
if (ch >= '0' && ch <= '9')
|
||||
if (unicode::GetGenCategory(mDOMWordText[i]) == nsIUGenCategory::kNumber) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// not special
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user