From 10d9ead2c3b82f37fd49efab56c960bc4b6c9b8e Mon Sep 17 00:00:00 2001 From: Mohit Sinha Date: Mon, 10 Feb 2014 08:58:33 -0500 Subject: [PATCH] Bug 969867 - Treat U+2063 and U+2064 as invisible operators. r=karlt --- layout/mathml/nsMathMLmoFrame.cpp | 4 ++++ .../mathml/mo-invisibleoperators-ref.html | 12 ++++++++++++ .../reftests/mathml/mo-invisibleoperators.html | 17 +++++++++++++++++ layout/reftests/mathml/reftest.list | 1 + 4 files changed, 34 insertions(+) create mode 100644 layout/reftests/mathml/mo-invisibleoperators-ref.html create mode 100644 layout/reftests/mathml/mo-invisibleoperators.html diff --git a/layout/mathml/nsMathMLmoFrame.cpp b/layout/mathml/nsMathMLmoFrame.cpp index 2064ea9ff57..bf64b6b4b30 100644 --- a/layout/mathml/nsMathMLmoFrame.cpp +++ b/layout/mathml/nsMathMLmoFrame.cpp @@ -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; } diff --git a/layout/reftests/mathml/mo-invisibleoperators-ref.html b/layout/reftests/mathml/mo-invisibleoperators-ref.html new file mode 100644 index 00000000000..f82a096c004 --- /dev/null +++ b/layout/reftests/mathml/mo-invisibleoperators-ref.html @@ -0,0 +1,12 @@ + + + + 1 + 2 + 3 + 4 + 5 + 6 + + + diff --git a/layout/reftests/mathml/mo-invisibleoperators.html b/layout/reftests/mathml/mo-invisibleoperators.html new file mode 100644 index 00000000000..072dfd34eeb --- /dev/null +++ b/layout/reftests/mathml/mo-invisibleoperators.html @@ -0,0 +1,17 @@ + + + + 1 + + 2 + + 3 + + 4 + + 5 + + 6 + + + diff --git a/layout/reftests/mathml/reftest.list b/layout/reftests/mathml/reftest.list index b2354afae4f..3aad5a88a9b 100644 --- a/layout/reftests/mathml/reftest.list +++ b/layout/reftests/mathml/reftest.list @@ -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