Changeset 55310 in webkit


Ignore:
Timestamp:
Feb 26, 2010 2:07:37 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-02-26 Alex Milowski <alex@milowski.com>

Reviewed by Kenneth Rohde Christiansen.

Basic tests for munder, munderover, and mover elements.

  • mathml/presentation/over.xhtml: Added.
  • mathml/presentation/under.xhtml: Added.
  • mathml/presentation/underover.xhtml: Added.
  • platform/mac/mathml/presentation/over-expected.checksum: Added.
  • platform/mac/mathml/presentation/over-expected.png: Added.
  • platform/mac/mathml/presentation/over-expected.txt: Added.
  • platform/mac/mathml/presentation/under-expected.checksum: Added.
  • platform/mac/mathml/presentation/under-expected.png: Added.
  • platform/mac/mathml/presentation/under-expected.txt: Added.
  • platform/mac/mathml/presentation/underover-expected.checksum: Added.
  • platform/mac/mathml/presentation/underover-expected.png: Added.
  • platform/mac/mathml/presentation/underover-expected.txt: Added.

2010-02-26 Alex Milowski <alex@milowski.com>

Reviewed by Kenneth Rohde Christiansen.

Added basic support for the munder, munderover, and mover elements.

Tests: mathml/presentation/over.xhtml

mathml/presentation/under.xhtml
mathml/presentation/underover.xhtml

  • WebCore.xcodeproj/project.pbxproj:
  • mathml/MathMLInlineContainerElement.cpp: (WebCore::MathMLInlineContainerElement::createRenderer):
  • mathml/RenderMathMLUnderOver.cpp: Added. (WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver): (WebCore::RenderMathMLUnderOver::addChild): (WebCore::getOffsetHeight): (WebCore::RenderMathMLUnderOver::stretchToHeight): (WebCore::RenderMathMLUnderOver::layout): (WebCore::RenderMathMLUnderOver::baselinePosition): (WebCore::RenderMathMLUnderOver::nonOperatorHeight):
  • mathml/RenderMathMLUnderOver.h: Added. (WebCore::RenderMathMLUnderOver::hasBase): (WebCore::RenderMathMLUnderOver::):
Location:
trunk
Files:
13 added
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r55301 r55310  
     12010-02-26  Alex Milowski  <alex@milowski.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Basic tests for munder, munderover, and mover elements.
     6
     7        * mathml/presentation/over.xhtml: Added.
     8        * mathml/presentation/under.xhtml: Added.
     9        * mathml/presentation/underover.xhtml: Added.
     10        * platform/mac/mathml/presentation/over-expected.checksum: Added.
     11        * platform/mac/mathml/presentation/over-expected.png: Added.
     12        * platform/mac/mathml/presentation/over-expected.txt: Added.
     13        * platform/mac/mathml/presentation/under-expected.checksum: Added.
     14        * platform/mac/mathml/presentation/under-expected.png: Added.
     15        * platform/mac/mathml/presentation/under-expected.txt: Added.
     16        * platform/mac/mathml/presentation/underover-expected.checksum: Added.
     17        * platform/mac/mathml/presentation/underover-expected.png: Added.
     18        * platform/mac/mathml/presentation/underover-expected.txt: Added.
     19
    1202010-02-26  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
    221
  • trunk/WebCore/ChangeLog

    r55308 r55310  
     12010-02-26  Alex Milowski  <alex@milowski.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Added basic support for the munder, munderover, and mover elements.
     6
     7        Tests: mathml/presentation/over.xhtml
     8               mathml/presentation/under.xhtml
     9               mathml/presentation/underover.xhtml
     10
     11        * WebCore.xcodeproj/project.pbxproj:
     12        * mathml/MathMLInlineContainerElement.cpp:
     13        (WebCore::MathMLInlineContainerElement::createRenderer):
     14        * mathml/RenderMathMLUnderOver.cpp: Added.
     15        (WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver):
     16        (WebCore::RenderMathMLUnderOver::addChild):
     17        (WebCore::getOffsetHeight):
     18        (WebCore::RenderMathMLUnderOver::stretchToHeight):
     19        (WebCore::RenderMathMLUnderOver::layout):
     20        (WebCore::RenderMathMLUnderOver::baselinePosition):
     21        (WebCore::RenderMathMLUnderOver::nonOperatorHeight):
     22        * mathml/RenderMathMLUnderOver.h: Added.
     23        (WebCore::RenderMathMLUnderOver::hasBase):
     24        (WebCore::RenderMathMLUnderOver::):
     25
    1262010-02-24  Stephen White  <senorblanco@chromium.org>
    227
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r55289 r55310  
    48574857                FA654A6F1108ABFF002615E0 /* RenderMathMLBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA654A6D1108ABFF002615E0 /* RenderMathMLBlock.cpp */; };
    48584858                FA654A701108ABFF002615E0 /* RenderMathMLBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = FA654A6E1108ABFF002615E0 /* RenderMathMLBlock.h */; };
     4859                FA7EFB051120D25400CF79C7 /* RenderMathMLUnderOver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA7EFB031120D25400CF79C7 /* RenderMathMLUnderOver.cpp */; };
     4860                FA7EFB061120D25400CF79C7 /* RenderMathMLUnderOver.h in Headers */ = {isa = PBXBuildFile; fileRef = FA7EFB041120D25400CF79C7 /* RenderMathMLUnderOver.h */; };
    48594861                FABE72F41059C1EB00D999DD /* MathMLElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABE72ED1059C1EB00D999DD /* MathMLElement.cpp */; };
    48604862                FABE72F51059C1EB00D999DD /* MathMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FABE72EE1059C1EB00D999DD /* MathMLElement.h */; };
     
    1019010192                FA654A6D1108ABFF002615E0 /* RenderMathMLBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMathMLBlock.cpp; sourceTree = "<group>"; };
    1019110193                FA654A6E1108ABFF002615E0 /* RenderMathMLBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMathMLBlock.h; sourceTree = "<group>"; };
     10194                FA7EFB031120D25400CF79C7 /* RenderMathMLUnderOver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMathMLUnderOver.cpp; sourceTree = "<group>"; };
     10195                FA7EFB041120D25400CF79C7 /* RenderMathMLUnderOver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMathMLUnderOver.h; sourceTree = "<group>"; };
    1019210196                FABE72ED1059C1EB00D999DD /* MathMLElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLElement.cpp; sourceTree = "<group>"; };
    1019310197                FABE72EE1059C1EB00D999DD /* MathMLElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLElement.h; sourceTree = "<group>"; };
     
    1609316097                                FA654A6D1108ABFF002615E0 /* RenderMathMLBlock.cpp */,
    1609416098                                FA654A6E1108ABFF002615E0 /* RenderMathMLBlock.h */,
     16099                                FA7EFB031120D25400CF79C7 /* RenderMathMLUnderOver.cpp */,
     16100                                FA7EFB041120D25400CF79C7 /* RenderMathMLUnderOver.h */,
    1609516101                        );
    1609616102                        path = mathml;
     
    1856318569                                9F72304F11184B4100AD0126 /* ScriptProfile.h in Headers */,
    1856418570                                9F72305111184B4100AD0126 /* ScriptProfiler.h in Headers */,
     18571                                FA7EFB061120D25400CF79C7 /* RenderMathMLUnderOver.h in Headers */,
    1856518572                                BCE789161120D6080060ECE5 /* InlineIterator.h in Headers */,
    1856618573                                BCE789861120E7A60060ECE5 /* BidiRun.h in Headers */,
     
    2075220759                                B776D43D1104527500BEB0EC /* PrintContext.cpp in Sources */,
    2075320760                                9F72305011184B4100AD0126 /* ScriptProfiler.cpp in Sources */,
     20761                                FA7EFB051120D25400CF79C7 /* RenderMathMLUnderOver.cpp in Sources */,
    2075420762                                BCE7898B1120E8020060ECE5 /* BidiRun.cpp in Sources */,
    2075520763                                9F6FC1961122E82A00E80196 /* ScriptDebugServer.cpp in Sources */,
  • trunk/WebCore/mathml/MathMLInlineContainerElement.cpp

    r53764 r55310  
    3232#include "MathMLNames.h"
    3333#include "RenderMathMLBlock.h"
     34#include "RenderMathMLUnderOver.h"
    3435
    3536namespace WebCore {
     
    4950RenderObject* MathMLInlineContainerElement::createRenderer(RenderArena *arena, RenderStyle* style)
    5051{
    51     // FIXME: This method will contain the specialized renderers based on element name
    52     RenderObject* object = new (arena) RenderMathMLBlock(this);
     52
     53    RenderObject* object = 0;
     54    if (hasLocalName(MathMLNames::moverTag))
     55        object = new (arena) RenderMathMLUnderOver(this);
     56    else if (hasLocalName(MathMLNames::munderTag))
     57        object = new (arena) RenderMathMLUnderOver(this);
     58    else if (hasLocalName(MathMLNames::munderoverTag))
     59        object = new (arena) RenderMathMLUnderOver(this);
     60    else
     61        object = new (arena) RenderMathMLBlock(this);
    5362    object->setStyle(style);
    5463    return object;
  • trunk/WebCore/mathml/RenderMathMLUnderOver.h

    r55309 r55310  
    2424 */
    2525
    26 #include "config.h"
     26
     27#ifndef RenderMathMLUnderOver_h
     28#define RenderMathMLUnderOver_h
    2729
    2830#if ENABLE(MATHML)
    2931
    30 #include "MathMLInlineContainerElement.h"
    31 
    32 #include "MathMLNames.h"
    3332#include "RenderMathMLBlock.h"
    3433
    3534namespace WebCore {
    3635   
    37 using namespace MathMLNames;
    38 
    39 MathMLInlineContainerElement::MathMLInlineContainerElement(const QualifiedName& tagName, Document* document)
    40     : MathMLElement(tagName, document)
    41 {
    42 }
    43 
    44 PassRefPtr<MathMLInlineContainerElement> MathMLInlineContainerElement::create(const QualifiedName& tagName, Document* document)
    45 {
    46     return new MathMLInlineContainerElement(tagName, document);
    47 }
    48 
    49 RenderObject* MathMLInlineContainerElement::createRenderer(RenderArena *arena, RenderStyle* style)
    50 {
    51     // FIXME: This method will contain the specialized renderers based on element name
    52     RenderObject* object = new (arena) RenderMathMLBlock(this);
    53     object->setStyle(style);
    54     return object;
    55 }
    56    
     36class RenderMathMLUnderOver : public RenderMathMLBlock {
     37public:
     38    RenderMathMLUnderOver(Node* expression);
     39    virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0);
     40    virtual void layout();
     41    virtual bool hasBase() const { return true; }
     42    virtual int nonOperatorHeight() const;
     43    virtual int baselinePosition(bool , bool) const;   
     44    virtual void stretchToHeight(int pixelHeight);
     45private:
     46    enum UnderOverType { Under, Over, UnderOver };
     47    UnderOverType m_kind;
     48};
    5749   
    5850}
     
    6052#endif // ENABLE(MATHML)
    6153
     54#endif // RenderMathMLUnderOver_h
Note: See TracChangeset for help on using the changeset viewer.