Title: [205018] trunk
Revision
205018
Author
[email protected]
Date
2016-08-26 09:41:48 -0700 (Fri, 26 Aug 2016)

Log Message

The annotation-xml element does not need to be behave as an mrow
https://bugs.webkit.org/show_bug.cgi?id=161230

Patch by Frederic Wang <[email protected]> on 2016-08-26
Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

In r204779, MathMLAnnotationElement was made a MathMLRowElement just because the
annotation-xml element is generating a RenderMathMLRow. This later point is actually not
needed since annotation-xml is just a wrapper for foreign elements and so does not need to
handle special MathML features like operator spacing or stretching. We can thus move back
MathMLAnnotationElement to a generic MathMLPresentationElement and instead make the
annotation-xml element generate a generic RenderMathMLBlock renderer.

No new tests, semantics annotations already covered by existing tests.

* mathml/MathMLAnnotationElement.cpp: Replace RenderMathMLRow.h with RenderMathMLBlock.h
(WebCore::MathMLAnnotationElement::MathMLAnnotationElement): Inherit from
MathMLPresentationElement instead of MathMLRowElement.
(WebCore::MathMLAnnotationElement::createElementRenderer): Make annotation-xml create a
RenderMathMLBlock instead of a RenderMathMLRow.
(WebCore::MathMLAnnotationElement::attributeChanged): Inherit from MathMLPresentationElement
instead of MathMLRowElement.
* mathml/MathMLAnnotationElement.h: Ditto.

LayoutTests:

* platform/efl/accessibility/math-foreign-content-expected.txt: Remove the AXGroup from the
test expectation, which that was used for annotation-xml.
* platform/gtk/accessibility/math-foreign-content-expected.txt: Ditto.
* platform/mac/accessibility/math-foreign-content-expected.txt: Ditto.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (205017 => 205018)


--- trunk/LayoutTests/ChangeLog	2016-08-26 16:36:29 UTC (rev 205017)
+++ trunk/LayoutTests/ChangeLog	2016-08-26 16:41:48 UTC (rev 205018)
@@ -1,3 +1,15 @@
+2016-08-26  Frederic Wang  <[email protected]>
+
+        The annotation-xml element does not need to be behave as an mrow
+        https://bugs.webkit.org/show_bug.cgi?id=161230
+
+        Reviewed by Manuel Rego Casasnovas.
+
+        * platform/efl/accessibility/math-foreign-content-expected.txt: Remove the AXGroup from the
+        test expectation, which that was used for annotation-xml.
+        * platform/gtk/accessibility/math-foreign-content-expected.txt: Ditto.
+        * platform/mac/accessibility/math-foreign-content-expected.txt: Ditto.
+
 2016-08-26  Alexey Proskuryakov  <[email protected]>
 
         Reinstate flakiness expectations for viewport tests, as they are still flaky.

Modified: trunk/LayoutTests/platform/efl/accessibility/math-foreign-content-expected.txt (205017 => 205018)


--- trunk/LayoutTests/platform/efl/accessibility/math-foreign-content-expected.txt	2016-08-26 16:36:29 UTC (rev 205017)
+++ trunk/LayoutTests/platform/efl/accessibility/math-foreign-content-expected.txt	2016-08-26 16:41:48 UTC (rev 205018)
@@ -5,8 +5,7 @@
 
 AXRole: AXMath 
     AXRole: AXGroup 
-        AXRole: AXGroup 
-            AXRole: AXSection AXValue: SVG
+        AXRole: AXSection AXValue: SVG
     AXRole: AXStatic AXValue: HTML
 PASS successfullyParsed is true
 

Modified: trunk/LayoutTests/platform/gtk/accessibility/math-foreign-content-expected.txt (205017 => 205018)


--- trunk/LayoutTests/platform/gtk/accessibility/math-foreign-content-expected.txt	2016-08-26 16:36:29 UTC (rev 205017)
+++ trunk/LayoutTests/platform/gtk/accessibility/math-foreign-content-expected.txt	2016-08-26 16:41:48 UTC (rev 205018)
@@ -5,8 +5,7 @@
 
 AXRole: AXMath 
     AXRole: AXGroup 
-        AXRole: AXGroup 
-            AXRole: AXSection AXValue: SVG
+        AXRole: AXSection AXValue: SVG
     AXRole: AXStatic AXValue: HTML
 PASS successfullyParsed is true
 

Modified: trunk/LayoutTests/platform/mac/accessibility/math-foreign-content-expected.txt (205017 => 205018)


--- trunk/LayoutTests/platform/mac/accessibility/math-foreign-content-expected.txt	2016-08-26 16:36:29 UTC (rev 205017)
+++ trunk/LayoutTests/platform/mac/accessibility/math-foreign-content-expected.txt	2016-08-26 16:41:48 UTC (rev 205018)
@@ -5,9 +5,8 @@
 
 AXRole: AXGroup AXSubrole: AXDocumentMath AXValue: 
     AXRole: AXGroup AXSubrole: AXMathRow AXValue: 
-        AXRole: AXGroup AXSubrole: AXMathRow AXValue: 
-            AXRole: AXGroup AXSubrole:  AXValue: 
-                AXRole: AXStaticText AXSubrole:  AXValue: SVG
+        AXRole: AXGroup AXSubrole:  AXValue: 
+            AXRole: AXStaticText AXSubrole:  AXValue: SVG
     AXRole: AXGroup AXSubrole: AXMathText AXValue: 
         AXRole: AXStaticText AXSubrole:  AXValue: HTML
 PASS successfullyParsed is true

Modified: trunk/Source/WebCore/ChangeLog (205017 => 205018)


--- trunk/Source/WebCore/ChangeLog	2016-08-26 16:36:29 UTC (rev 205017)
+++ trunk/Source/WebCore/ChangeLog	2016-08-26 16:41:48 UTC (rev 205018)
@@ -1,3 +1,28 @@
+2016-08-26  Frederic Wang  <[email protected]>
+
+        The annotation-xml element does not need to be behave as an mrow
+        https://bugs.webkit.org/show_bug.cgi?id=161230
+
+        Reviewed by Manuel Rego Casasnovas.
+
+        In r204779, MathMLAnnotationElement was made a MathMLRowElement just because the
+        annotation-xml element is generating a RenderMathMLRow. This later point is actually not
+        needed since annotation-xml is just a wrapper for foreign elements and so does not need to
+        handle special MathML features like operator spacing or stretching. We can thus move back
+        MathMLAnnotationElement to a generic MathMLPresentationElement and instead make the
+        annotation-xml element generate a generic RenderMathMLBlock renderer.
+
+        No new tests, semantics annotations already covered by existing tests.
+
+        * mathml/MathMLAnnotationElement.cpp: Replace RenderMathMLRow.h with RenderMathMLBlock.h
+        (WebCore::MathMLAnnotationElement::MathMLAnnotationElement): Inherit from
+        MathMLPresentationElement instead of MathMLRowElement.
+        (WebCore::MathMLAnnotationElement::createElementRenderer): Make annotation-xml create a
+        RenderMathMLBlock instead of a RenderMathMLRow.
+        (WebCore::MathMLAnnotationElement::attributeChanged): Inherit from MathMLPresentationElement
+        instead of MathMLRowElement.
+        * mathml/MathMLAnnotationElement.h: Ditto.
+
 2016-08-26  Csaba Osztrogonác  <[email protected]>
 
         Typo fix after r56209

Modified: trunk/Source/WebCore/mathml/MathMLAnnotationElement.cpp (205017 => 205018)


--- trunk/Source/WebCore/mathml/MathMLAnnotationElement.cpp	2016-08-26 16:36:29 UTC (rev 205017)
+++ trunk/Source/WebCore/mathml/MathMLAnnotationElement.cpp	2016-08-26 16:41:48 UTC (rev 205018)
@@ -33,7 +33,7 @@
 #include "MathMLMathElement.h"
 #include "MathMLNames.h"
 #include "MathMLSelectElement.h"
-#include "RenderMathMLRow.h"
+#include "RenderMathMLBlock.h"
 #include "SVGSVGElement.h"
 
 namespace WebCore {
@@ -41,7 +41,7 @@
 using namespace MathMLNames;
 
 MathMLAnnotationElement::MathMLAnnotationElement(const QualifiedName& tagName, Document& document)
-    : MathMLRowElement(tagName, document)
+    : MathMLPresentationElement(tagName, document)
 {
     ASSERT(hasTagName(annotationTag) || hasTagName(annotation_xmlTag));
 }
@@ -56,9 +56,8 @@
     if (hasTagName(MathMLNames::annotationTag))
         return MathMLElement::createElementRenderer(WTFMove(style), insertionPosition);
 
-    // FIXME: Do we really need to create a RenderMathMLRow?
     ASSERT(hasTagName(annotation_xmlTag));
-    return createRenderer<RenderMathMLRow>(*this, WTFMove(style));
+    return createRenderer<RenderMathMLBlock>(*this, WTFMove(style));
 }
 
 bool MathMLAnnotationElement::childShouldCreateRenderer(const Node& child) const
@@ -100,7 +99,7 @@
         if (is<MathMLElement>(parent) && parent->hasTagName(semanticsTag))
             downcast<MathMLElement>(*parent).updateSelectedChild();
     }
-    MathMLRowElement::attributeChanged(name, oldValue, newValue, reason);
+    MathMLPresentationElement::attributeChanged(name, oldValue, newValue, reason);
 }
 
 }

Modified: trunk/Source/WebCore/mathml/MathMLAnnotationElement.h (205017 => 205018)


--- trunk/Source/WebCore/mathml/MathMLAnnotationElement.h	2016-08-26 16:36:29 UTC (rev 205017)
+++ trunk/Source/WebCore/mathml/MathMLAnnotationElement.h	2016-08-26 16:41:48 UTC (rev 205018)
@@ -27,11 +27,11 @@
 
 #if ENABLE(MATHML)
 
-#include "MathMLRowElement.h"
+#include "MathMLPresentationElement.h"
 
 namespace WebCore {
 
-class MathMLAnnotationElement final : public MathMLRowElement {
+class MathMLAnnotationElement final : public MathMLPresentationElement {
 public:
     static Ref<MathMLAnnotationElement> create(const QualifiedName& tagName, Document&);
 private:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to