mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 969867 - Treat U+2063 and U+2064 as invisible operators. r=karlt
This commit is contained in:
parent
0471b003b2
commit
242e55ecdc
@ -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;
|
||||
}
|
||||
|
12
layout/reftests/mathml/mo-invisibleoperators-ref.html
Normal file
12
layout/reftests/mathml/mo-invisibleoperators-ref.html
Normal 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>
|
17
layout/reftests/mathml/mo-invisibleoperators.html
Normal file
17
layout/reftests/mathml/mo-invisibleoperators.html
Normal file
@ -0,0 +1,17 @@
|
||||
<html>
|
||||
<math>
|
||||
<mrow>
|
||||
<mn>1</mn>
|
||||
<mo>​<!-- INVISIBLE COMMA --></mo>
|
||||
<mn>2</mn>
|
||||
<mo>⁡<!-- FUNCTION APPLICATION --></mo>
|
||||
<mn>3</mn>
|
||||
<mo>⁢<!-- INVISIBLE TIMES --></mo>
|
||||
<mn>4</mn>
|
||||
<mo>⁣<!-- INVISIBLE SEPARATOR --></mo>
|
||||
<mn>5</mn>
|
||||
<mo>⁤<!-- INVISIBLE PLUS --></mo>
|
||||
<mn>6</mn>
|
||||
</mrow>
|
||||
</math>
|
||||
</html>
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user