Changeset 205018 in webkit


Ignore:
Timestamp:
Aug 26, 2016 9:41:48 AM (8 years ago)
Author:
commit-queue@webkit.org
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 <fwang@igalia.com> 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.
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r205013 r205018  
     12016-08-26  Frederic Wang  <fwang@igalia.com>
     2
     3        The annotation-xml element does not need to be behave as an mrow
     4        https://bugs.webkit.org/show_bug.cgi?id=161230
     5
     6        Reviewed by Manuel Rego Casasnovas.
     7
     8        * platform/efl/accessibility/math-foreign-content-expected.txt: Remove the AXGroup from the
     9        test expectation, which that was used for annotation-xml.
     10        * platform/gtk/accessibility/math-foreign-content-expected.txt: Ditto.
     11        * platform/mac/accessibility/math-foreign-content-expected.txt: Ditto.
     12
    1132016-08-26  Alexey Proskuryakov  <ap@apple.com>
    214
  • trunk/LayoutTests/platform/efl/accessibility/math-foreign-content-expected.txt

    r202552 r205018  
    66AXRole: AXMath
    77    AXRole: AXGroup
    8         AXRole: AXGroup
    9             AXRole: AXSection AXValue: SVG
     8        AXRole: AXSection AXValue: SVG
    109    AXRole: AXStatic AXValue: HTML
    1110PASS successfullyParsed is true
  • trunk/LayoutTests/platform/gtk/accessibility/math-foreign-content-expected.txt

    r202497 r205018  
    66AXRole: AXMath
    77    AXRole: AXGroup
    8         AXRole: AXGroup
    9             AXRole: AXSection AXValue: SVG
     8        AXRole: AXSection AXValue: SVG
    109    AXRole: AXStatic AXValue: HTML
    1110PASS successfullyParsed is true
  • trunk/LayoutTests/platform/mac/accessibility/math-foreign-content-expected.txt

    r202497 r205018  
    66AXRole: AXGroup AXSubrole: AXDocumentMath AXValue:
    77    AXRole: AXGroup AXSubrole: AXMathRow AXValue:
    8         AXRole: AXGroup AXSubrole: AXMathRow AXValue:
    9             AXRole: AXGroup AXSubrole:  AXValue:
    10                 AXRole: AXStaticText AXSubrole:  AXValue: SVG
     8        AXRole: AXGroup AXSubrole:  AXValue:
     9            AXRole: AXStaticText AXSubrole:  AXValue: SVG
    1110    AXRole: AXGroup AXSubrole: AXMathText AXValue:
    1211        AXRole: AXStaticText AXSubrole:  AXValue: HTML
  • trunk/Source/WebCore/ChangeLog

    r205015 r205018  
     12016-08-26  Frederic Wang  <fwang@igalia.com>
     2
     3        The annotation-xml element does not need to be behave as an mrow
     4        https://bugs.webkit.org/show_bug.cgi?id=161230
     5
     6        Reviewed by Manuel Rego Casasnovas.
     7
     8        In r204779, MathMLAnnotationElement was made a MathMLRowElement just because the
     9        annotation-xml element is generating a RenderMathMLRow. This later point is actually not
     10        needed since annotation-xml is just a wrapper for foreign elements and so does not need to
     11        handle special MathML features like operator spacing or stretching. We can thus move back
     12        MathMLAnnotationElement to a generic MathMLPresentationElement and instead make the
     13        annotation-xml element generate a generic RenderMathMLBlock renderer.
     14
     15        No new tests, semantics annotations already covered by existing tests.
     16
     17        * mathml/MathMLAnnotationElement.cpp: Replace RenderMathMLRow.h with RenderMathMLBlock.h
     18        (WebCore::MathMLAnnotationElement::MathMLAnnotationElement): Inherit from
     19        MathMLPresentationElement instead of MathMLRowElement.
     20        (WebCore::MathMLAnnotationElement::createElementRenderer): Make annotation-xml create a
     21        RenderMathMLBlock instead of a RenderMathMLRow.
     22        (WebCore::MathMLAnnotationElement::attributeChanged): Inherit from MathMLPresentationElement
     23        instead of MathMLRowElement.
     24        * mathml/MathMLAnnotationElement.h: Ditto.
     25
    1262016-08-26  Csaba Osztrogonác  <ossy@webkit.org>
    227
  • trunk/Source/WebCore/mathml/MathMLAnnotationElement.cpp

    r204885 r205018  
    3434#include "MathMLNames.h"
    3535#include "MathMLSelectElement.h"
    36 #include "RenderMathMLRow.h"
     36#include "RenderMathMLBlock.h"
    3737#include "SVGSVGElement.h"
    3838
     
    4242
    4343MathMLAnnotationElement::MathMLAnnotationElement(const QualifiedName& tagName, Document& document)
    44     : MathMLRowElement(tagName, document)
     44    : MathMLPresentationElement(tagName, document)
    4545{
    4646    ASSERT(hasTagName(annotationTag) || hasTagName(annotation_xmlTag));
     
    5757        return MathMLElement::createElementRenderer(WTFMove(style), insertionPosition);
    5858
    59     // FIXME: Do we really need to create a RenderMathMLRow?
    6059    ASSERT(hasTagName(annotation_xmlTag));
    61     return createRenderer<RenderMathMLRow>(*this, WTFMove(style));
     60    return createRenderer<RenderMathMLBlock>(*this, WTFMove(style));
    6261}
    6362
     
    101100            downcast<MathMLElement>(*parent).updateSelectedChild();
    102101    }
    103     MathMLRowElement::attributeChanged(name, oldValue, newValue, reason);
     102    MathMLPresentationElement::attributeChanged(name, oldValue, newValue, reason);
    104103}
    105104
  • trunk/Source/WebCore/mathml/MathMLAnnotationElement.h

    r204885 r205018  
    2828#if ENABLE(MATHML)
    2929
    30 #include "MathMLRowElement.h"
     30#include "MathMLPresentationElement.h"
    3131
    3232namespace WebCore {
    3333
    34 class MathMLAnnotationElement final : public MathMLRowElement {
     34class MathMLAnnotationElement final : public MathMLPresentationElement {
    3535public:
    3636    static Ref<MathMLAnnotationElement> create(const QualifiedName& tagName, Document&);
Note: See TracChangeset for help on using the changeset viewer.