Bug 969867 - Treat U+2063 and U+2064 as invisible operators. r=karlt

This commit is contained in:
Mohit Sinha 2014-02-10 08:58:33 -05:00
parent 20d779c73f
commit 10d9ead2c3
4 changed files with 34 additions and 0 deletions

View File

@ -33,6 +33,8 @@ nsMathMLmoFrame::~nsMathMLmoFrame()
static const char16_t kInvisibleComma = char16_t(0x200B); // a.k.a. ZERO WIDTH SPACE
static const char16_t kApplyFunction = char16_t(0x2061);
static const char16_t kInvisibleTimes = char16_t(0x2062);
static const char16_t kInvisibleSeparator = char16_t(0x2063);
static const char16_t kInvisiblePlus = char16_t(0x2064);
eMathMLFrameType
nsMathMLmoFrame::GetMathMLFrameType()
@ -123,6 +125,8 @@ nsMathMLmoFrame::ProcessTextData()
if ((length == 1) &&
(ch == kInvisibleComma ||
ch == kApplyFunction ||
ch == kInvisibleSeparator ||
ch == kInvisiblePlus ||
ch == kInvisibleTimes)) {
mFlags |= NS_MATHML_OPERATOR_INVISIBLE;
}

View File

@ -0,0 +1,12 @@
<html>
<math>
<mrow>
<mn>1</mn>
<mn>2</mn>
<mn>3</mn>
<mn>4</mn>
<mn>5</mn>
<mn>6</mn>
</mrow>
</math>
</html>

View File

@ -0,0 +1,17 @@
<html>
<math>
<mrow>
<mn>1</mn>
<mo>&#x200B;<!-- INVISIBLE COMMA --></mo>
<mn>2</mn>
<mo>&#x2061;<!-- FUNCTION APPLICATION --></mo>
<mn>3</mn>
<mo>&#x2062;<!-- INVISIBLE TIMES --></mo>
<mn>4</mn>
<mo>&#x2063;<!-- INVISIBLE SEPARATOR --></mo>
<mn>5</mn>
<mo>&#x2064;<!-- INVISIBLE PLUS --></mo>
<mn>6</mn>
</mrow>
</math>
</html>

View File

@ -141,6 +141,7 @@ skip-if(B2G) == quotes-1.xhtml quotes-1-ref.xhtml
skip-if(B2G) == maction-dynamic-1.html maction-dynamic-1-ref.html # bug 773482
== maction-dynamic-2.html maction-dynamic-2-ref.html
== mo-lspace-rspace.html mo-lspace-rspace-ref.html
== mo-invisibleoperators.html mo-invisibleoperators-ref.html
skip-if(B2G) == maction-dynamic-3.html maction-dynamic-3-ref.html # bug 773482
== whitespace-trim-1.html whitespace-trim-1-ref.html
== whitespace-trim-2.html whitespace-trim-2-ref.html