Changeset 55386 in webkit
- Timestamp:
- Mar 1, 2010 4:22:13 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 9 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r55381 r55386 1 2010-03-01 Alex Milowski <alex@milowski.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 Added test for basic msubsup support. 6 7 * mathml/presentation/subsup.xhtml: Added. 8 * platform/mac/mathml/presentation/subsup-expected.checksum: Added. 9 * platform/mac/mathml/presentation/subsup-expected.png: Added. 10 * platform/mac/mathml/presentation/subsup-expected.txt: Added. 11 1 12 2010-03-01 Thatcher Ulrich <tulrich@google.com> 2 13 -
trunk/LayoutTests/platform/mac/mathml/presentation/sub-expected.checksum
r53764 r55386 1 86ca442a628788281b851fcf581c6abe 1 e43f7c2c817b3102010bfa84e4bbb771 -
trunk/LayoutTests/platform/mac/mathml/presentation/sup-expected.checksum
r53764 r55386 1 702e3992b12242981f2a6ecd54df28b3 1 3cb060a09cc106603e87617b82aa4e27 -
trunk/WebCore/ChangeLog
r55383 r55386 1 2010-03-01 Alex Milowski <alex@milowski.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 Added support for the msubsup element that also handles the msup and msub elements. 6 7 Test: mathml/presentation/subsup.xhtml 8 9 * WebCore.xcodeproj/project.pbxproj: 10 * mathml/MathMLInlineContainerElement.cpp: 11 (WebCore::MathMLInlineContainerElement::createRenderer): 12 * mathml/RenderMathMLSubSup.cpp: Added. 13 (WebCore::RenderMathMLSubSup::RenderMathMLSubSup): 14 (WebCore::RenderMathMLSubSup::addChild): 15 (WebCore::RenderMathMLSubSup::stretchToHeight): 16 (WebCore::RenderMathMLSubSup::nonOperatorHeight): 17 (WebCore::RenderMathMLSubSup::layout): 18 (WebCore::RenderMathMLSubSup::baselinePosition): 19 * mathml/RenderMathMLSubSup.h: Added. 20 (WebCore::RenderMathMLSubSup::hasBase): 21 (WebCore::RenderMathMLSubSup::): 22 1 23 2010-03-01 Pavel Feldman <pfeldman@chromium.org> 2 24 -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r55312 r55386 4867 4867 FABE72FD1059C21100D999DD /* MathMLElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABE72FB1059C21100D999DD /* MathMLElementFactory.cpp */; }; 4868 4868 FABE72FE1059C21100D999DD /* MathMLNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABE72FC1059C21100D999DD /* MathMLNames.cpp */; }; 4869 FAC12CC41120DA6900DACC36 /* RenderMathMLSubSup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC12CC21120DA6900DACC36 /* RenderMathMLSubSup.cpp */; }; 4870 FAC12CC51120DA6900DACC36 /* RenderMathMLSubSup.h in Headers */ = {isa = PBXBuildFile; fileRef = FAC12CC31120DA6900DACC36 /* RenderMathMLSubSup.h */; }; 4869 4871 FE6FD4880F676E5700092873 /* Coordinates.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6FD4850F676E5700092873 /* Coordinates.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4870 4872 FE6FD48D0F676E9300092873 /* JSCoordinates.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */; }; … … 10203 10205 FABE72FB1059C21100D999DD /* MathMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLElementFactory.cpp; sourceTree = "<group>"; }; 10204 10206 FABE72FC1059C21100D999DD /* MathMLNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLNames.cpp; sourceTree = "<group>"; }; 10207 FAC12CC21120DA6900DACC36 /* RenderMathMLSubSup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMathMLSubSup.cpp; sourceTree = "<group>"; }; 10208 FAC12CC31120DA6900DACC36 /* RenderMathMLSubSup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMathMLSubSup.h; sourceTree = "<group>"; }; 10205 10209 FE136AE710643BE50078CF6D /* WebCore.OrientationEvents.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = WebCore.OrientationEvents.exp; sourceTree = "<group>"; }; 10206 10210 FE49BD301061719100D0E1AE /* WebCore.Inspector.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = WebCore.Inspector.exp; sourceTree = "<group>"; }; … … 16097 16101 FA654A6D1108ABFF002615E0 /* RenderMathMLBlock.cpp */, 16098 16102 FA654A6E1108ABFF002615E0 /* RenderMathMLBlock.h */, 16103 FAC12CC21120DA6900DACC36 /* RenderMathMLSubSup.cpp */, 16104 FAC12CC31120DA6900DACC36 /* RenderMathMLSubSup.h */, 16099 16105 FA7EFB031120D25400CF79C7 /* RenderMathMLUnderOver.cpp */, 16100 16106 FA7EFB041120D25400CF79C7 /* RenderMathMLUnderOver.h */, … … 18569 18575 9F72304F11184B4100AD0126 /* ScriptProfile.h in Headers */, 18570 18576 9F72305111184B4100AD0126 /* ScriptProfiler.h in Headers */, 18577 FAC12CC51120DA6900DACC36 /* RenderMathMLSubSup.h in Headers */, 18571 18578 FA7EFB061120D25400CF79C7 /* RenderMathMLUnderOver.h in Headers */, 18572 18579 BCE789161120D6080060ECE5 /* InlineIterator.h in Headers */, … … 20759 20766 B776D43D1104527500BEB0EC /* PrintContext.cpp in Sources */, 20760 20767 9F72305011184B4100AD0126 /* ScriptProfiler.cpp in Sources */, 20768 FAC12CC41120DA6900DACC36 /* RenderMathMLSubSup.cpp in Sources */, 20761 20769 FA7EFB051120D25400CF79C7 /* RenderMathMLUnderOver.cpp in Sources */, 20762 20770 BCE7898B1120E8020060ECE5 /* BidiRun.cpp in Sources */, -
trunk/WebCore/mathml/MathMLInlineContainerElement.cpp
r55310 r55386 32 32 #include "MathMLNames.h" 33 33 #include "RenderMathMLBlock.h" 34 #include "RenderMathMLSubSup.h" 34 35 #include "RenderMathMLUnderOver.h" 35 36 … … 50 51 RenderObject* MathMLInlineContainerElement::createRenderer(RenderArena *arena, RenderStyle* style) 51 52 { 52 53 53 RenderObject* object = 0; 54 if (hasLocalName(MathMLNames::moverTag)) 54 if (hasLocalName(MathMLNames::msubTag)) 55 object = new (arena) RenderMathMLSubSup(this); 56 else if (hasLocalName(MathMLNames::msupTag)) 57 object = new (arena) RenderMathMLSubSup(this); 58 else if (hasLocalName(MathMLNames::msubsupTag)) 59 object = new (arena) RenderMathMLSubSup(this); 60 else if (hasLocalName(MathMLNames::moverTag)) 55 61 object = new (arena) RenderMathMLUnderOver(this); 56 62 else if (hasLocalName(MathMLNames::munderTag)) -
trunk/WebCore/mathml/RenderMathMLBlock.h
r54128 r55386 53 53 54 54 protected: 55 int getBoxModelObjectHeight(RenderObject* object) 56 { 57 if (object && object->isBoxModelObject()) { 58 RenderBoxModelObject* box = toRenderBoxModelObject(object); 59 return box->offsetHeight(); 60 } 61 62 return 0; 63 } 64 int getBoxModelObjectHeight(const RenderObject* object) 65 { 66 if (object && object->isBoxModelObject()) { 67 const RenderBoxModelObject* box = toRenderBoxModelObject(object); 68 return box->offsetHeight(); 69 } 70 71 return 0; 72 } 73 int getBoxModelObjectWidth(RenderObject* object) 74 { 75 if (object && object->isBoxModelObject()) { 76 RenderBoxModelObject* box = toRenderBoxModelObject(object); 77 return box->offsetWidth(); 78 } 79 80 return 0; 81 } 82 int getBoxModelObjectWidth(const RenderObject* object) 83 { 84 if (object && object->isBoxModelObject()) { 85 const RenderBoxModelObject* box = toRenderBoxModelObject(object); 86 return box->offsetWidth(); 87 } 88 89 return 0; 90 } 55 91 virtual PassRefPtr<RenderStyle> makeBlockStyle(); 56 92 … … 68 104 return static_cast<const RenderMathMLBlock*>(object); 69 105 } 70 106 71 107 } 72 108 -
trunk/WebCore/mathml/RenderMathMLSubSup.h
r55384 r55386 24 24 */ 25 25 26 #ifndef RenderMathMLBlock_h 27 #define RenderMathMLBlock_h 26 27 #ifndef RenderMathMLSubSup_h 28 #define RenderMathMLSubSup_h 28 29 29 30 #if ENABLE(MATHML) 30 31 31 #include "RenderBlock.h" 32 33 #define ENABLE_DEBUG_MATH_LAYOUT 0 32 #include "RenderMathMLBlock.h" 33 #include "RenderTable.h" 34 34 35 35 namespace WebCore { 36 36 37 class RenderMathML Block : public RenderBlock {37 class RenderMathMLSubSup : public RenderMathMLBlock { 38 38 public: 39 RenderMathMLBlock(Node* container); 40 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const; 39 RenderMathMLSubSup(Element* fraction); 40 virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0); 41 virtual bool hasBase() const { return true; } 42 virtual int nonOperatorHeight() const; 43 virtual void stretchToHeight(int pixelHeight); 44 virtual int baselinePosition(bool, bool) const; 45 46 protected: 47 virtual void layout(); 41 48 42 virtual bool isRenderMathMLBlock() const { return true; } 43 virtual bool isRenderMathMLOperator() const { return false; } 44 virtual bool isRenderMathMLRow() const { return false; } 45 virtual bool isRenderMathMLMath() const { return false; } 46 virtual bool hasBase() const { return false; } 47 virtual int nonOperatorHeight() const; 48 virtual void stretchToHeight(int height); 49 50 #if ENABLE(DEBUG_MATH_LAYOUT) 51 virtual void paint(PaintInfo&, int tx, int ty); 52 #endif 53 54 protected: 55 virtual PassRefPtr<RenderStyle> makeBlockStyle(); 56 49 private: 50 enum SubSupType { Sub, Sup, SubSup }; 51 SubSupType m_kind; 52 RenderBlock* m_scripts; 57 53 }; 58 59 inline RenderMathMLBlock* toRenderMathMLBlock(RenderObject* object)60 {61 ASSERT(!object || object->isRenderMathMLBlock());62 return static_cast<RenderMathMLBlock*>(object);63 }64 65 inline const RenderMathMLBlock* toRenderMathMLBlock(const RenderObject* object)66 {67 ASSERT(!object || object->isRenderMathMLBlock());68 return static_cast<const RenderMathMLBlock*>(object);69 }70 54 71 55 } 72 56 57 #endif // ENABLE(MATHML) 73 58 74 #endif // ENABLE(MATHML)75 #endif // RenderMathMLBlock_h 59 #endif // RenderMathMLSubSup_h 60
Note: See TracChangeset
for help on using the changeset viewer.