Changeset 62968 in webkit


Ignore:
Timestamp:
Jul 9, 2010 11:22:58 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-07-09 François Sausset <François Sausset>

Reviewed by Kenneth Rohde Christiansen.

Test for the newly implemented MathML mathcolor & mathbackground attributes
https://bugs.webkit.org/show_bug.cgi?id=41895

  • mathml/presentation/attributes.xhtml: Added.
  • platform/mac/mathml/presentation/attributes-expected.checksum: Added.
  • platform/mac/mathml/presentation/attributes-expected.png: Added.
  • platform/mac/mathml/presentation/attributes-expected.txt: Added.

2010-07-09 François Sausset <François Sausset>

Reviewed by Kenneth Rohde Christiansen.

Implement MathML mathcolor & mathbackground attributes
https://bugs.webkit.org/show_bug.cgi?id=41895

Test: mathml/presentation/attributes.xhtml

  • dom/MappedAttributeEntry.h: (WebCore::):
  • mathml/MathMLElement.cpp: (WebCore::MathMLElement::MathMLElement): (WebCore::MathMLElement::mapToEntry): (WebCore::MathMLElement::parseMappedAttribute):
  • mathml/MathMLElement.h:
  • mathml/mathattrs.in:
Location:
trunk
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r62966 r62968  
     12010-07-09  François Sausset  <sausset@gmail.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Test for the newly implemented MathML mathcolor & mathbackground attributes
     6        https://bugs.webkit.org/show_bug.cgi?id=41895
     7
     8        * mathml/presentation/attributes.xhtml: Added.
     9        * platform/mac/mathml/presentation/attributes-expected.checksum: Added.
     10        * platform/mac/mathml/presentation/attributes-expected.png: Added.
     11        * platform/mac/mathml/presentation/attributes-expected.txt: Added.
     12
    1132010-07-09  Vitaly Repeshko  <vitalyr@chromium.org>
    214
  • trunk/WebCore/ChangeLog

    r62965 r62968  
     12010-07-09  François Sausset  <sausset@gmail.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Implement MathML mathcolor & mathbackground attributes
     6        https://bugs.webkit.org/show_bug.cgi?id=41895
     7
     8        Test: mathml/presentation/attributes.xhtml
     9
     10        * dom/MappedAttributeEntry.h:
     11        (WebCore::):
     12        * mathml/MathMLElement.cpp:
     13        (WebCore::MathMLElement::MathMLElement):
     14        (WebCore::MathMLElement::mapToEntry):
     15        (WebCore::MathMLElement::parseMappedAttribute):
     16        * mathml/MathMLElement.h:
     17        * mathml/mathattrs.in:
     18
    1192010-07-09  Xiaomei Ji  <xji@chromium.org>
    220
  • trunk/WebCore/dom/MappedAttributeEntry.h

    r61637 r62968  
    55 *           (C) 2001 Dirk Mueller (mueller@kde.org)
    66 * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
     7 * Copyright (C) 2010 Franois Sausset (sausset@gmail.com). All rights reserved.
    78 *
    89 * This library is free software; you can redistribute it and/or
     
    4546    , eSVG
    4647#endif
     48#if ENABLE(MATHML)
     49    , eMathML
     50#endif
    4751// When adding new entries, make sure to keep eLastEntry at the end of the list.
    4852    , eLastEntry
  • trunk/WebCore/mathml/MathMLElement.cpp

    r61493 r62968  
    22 * Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.
    33 * Copyright (C) 2010 Apple Inc. All rights reserved.
     4 * Copyright (C) 2010 François Sausset (sausset@gmail.com). All rights reserved.
    45 *
    56 * Redistribution and use in source and binary forms, with or without
     
    4748    return adoptRef(new MathMLElement(tagName, document));
    4849}
     50
     51bool MathMLElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
     52{
     53    if (attrName == MathMLNames::mathcolorAttr || attrName == MathMLNames::mathbackgroundAttr) {
     54        result = eMathML;
     55        return false;
     56    }
     57    return StyledElement::mapToEntry(attrName, result);
     58}
     59
     60void MathMLElement::parseMappedAttribute(Attribute* attr)
     61{
     62    if (attr->name() == MathMLNames::mathcolorAttr)
     63        addCSSProperty(attr, CSSPropertyColor, attr->value());
     64    else if (attr->name() == MathMLNames::mathbackgroundAttr)
     65        addCSSProperty(attr, CSSPropertyBackgroundColor, attr->value());
     66    else
     67        StyledElement::parseMappedAttribute(attr);
     68}
    4969   
    5070}
  • trunk/WebCore/mathml/MathMLElement.h

    r61293 r62968  
    22 * Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.
    33 * Copyright (C) 2010 Apple Inc. All rights reserved.
     4 * Copyright (C) 2010 François Sausset (sausset@gmail.com). All rights reserved.
    45 *
    56 * Redistribution and use in source and binary forms, with or without
     
    4243private:   
    4344    virtual bool isMathMLElement() const { return true; }
     45    virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     46    virtual void parseMappedAttribute(Attribute*);
    4447};
    4548   
  • trunk/WebCore/mathml/mathattrs.in

    r53879 r62968  
    77denomalign
    88linethickness
     9mathbackground
     10mathcolor
    911mathsize
    1012numalign
Note: See TracChangeset for help on using the changeset viewer.