Changeset 160005 in webkit
- Timestamp:
- Dec 3, 2013 9:12:38 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 14 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r159980 r160005 1 2013-12-03 Frédéric Wang <fred.wang@free.fr> 2 3 Add an MathMLSelectElement class to implement <maction> and <semantics>. 4 <https://webkit.org/b/120058> 5 6 Reviewed by Chris Fleizach. 7 8 New tests for the selection of the visible child in the <maction> and <semantics> elements. 9 10 * mathml/presentation/maction-dynamic-expected.html: Added. 11 * mathml/presentation/maction-dynamic.html: Added. 12 * mathml/presentation/maction-expected.html: Added. 13 * mathml/presentation/maction.html: Added. 14 * mathml/presentation/semantics-expected.html: Added. 15 * mathml/presentation/semantics.html: Added. 16 1 17 2013-12-02 Samuel White <samuel_white@apple.com> 2 18 -
trunk/LayoutTests/TestExpectations
r159938 r160005 21 21 webkit.org/b/57700 mathml/presentation/row.xhtml [ Failure ] 22 22 webkit.org/b/57700 mathml/presentation/mo.xhtml [ Failure ] 23 24 # MathML regression with foreign objects 25 webkit.org/b/124128 mathml/presentation/semantics.html [ Skip ] 23 26 24 27 # These conformace tests are no longer in sync with the latest specification -
trunk/Source/WebCore/CMakeLists.txt
r159856 r160005 1705 1705 mathml/MathMLInlineContainerElement.cpp 1706 1706 mathml/MathMLMathElement.cpp 1707 mathml/MathMLSelectElement.cpp 1707 1708 mathml/MathMLTextElement.cpp 1708 1709 -
trunk/Source/WebCore/ChangeLog
r160001 r160005 1 2013-12-03 Frédéric Wang <fred.wang@free.fr> 2 3 Add an MathMLSelectElement class to implement <maction> and <semantics>. 4 <https://webkit.org/b/120058> 5 6 Reviewed by Chris Fleizach. 7 8 Tests: mathml/presentation/maction-dynamic.html 9 mathml/presentation/maction.html 10 mathml/presentation/semantics.html 11 12 This adds a new MathMLSelectElement class to prepare the implementation 13 of the <maction> and <semantics> elements, for which only one "selected" 14 child is visible. We now simply display the first child of the 15 <semantics> element instead of hiding the annotations and this allows to 16 handle the use case of SVG-in-MathML as generated by Instiki when 17 bug 124128 is fixed ; Gecko's selection algorithm will be implemented 18 later (bug 100626). We now also rely on the @actiontype and @selection 19 attributes to select the visible <maction> child ; It remains to deal 20 with the user interaction (bug 85734). 21 22 * CMakeLists.txt: add the new files. 23 * GNUmakefile.list.am: ditto 24 * Target.pri: ditto 25 * WebCore.vcxproj/WebCore.vcxproj: ditto 26 * WebCore.vcxproj/WebCore.vcxproj.filters: ditto 27 * WebCore.xcodeproj/project.pbxproj: ditto 28 * css/mathml.css: remove the CSS rule for annotation/annotation-xml. 29 * mathml/MathMLAllInOne.cpp: add the new cpp file. 30 * mathml/MathMLSelectElement.cpp: Added. 31 (WebCore::MathMLSelectElement::MathMLSelectElement): 32 (WebCore::MathMLSelectElement::create): 33 (WebCore::MathMLSelectElement::createRenderer): 34 (WebCore::MathMLSelectElement::childShouldCreateRenderer): 35 (WebCore::MathMLSelectElement::finishParsingChildren): 36 (WebCore::MathMLSelectElement::childrenChanged): 37 (WebCore::MathMLSelectElement::attributeChanged): 38 (WebCore::MathMLSelectElement::updateSelectedChild): basic implementation for maction, semantics, maction@actiontype and maction@selection. 39 * mathml/MathMLSelectElement.h: Added. 40 * mathml/mathattrs.in: add actiontype and selection attributes. 41 * mathml/mathtags.in: set element classes for maction, semantics, annotation and annotation-xml. 42 1 43 2013-12-03 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> 2 44 -
trunk/Source/WebCore/GNUmakefile.list.am
r159856 r160005 4051 4051 Source/WebCore/mathml/MathMLMathElement.cpp \ 4052 4052 Source/WebCore/mathml/MathMLMathElement.h \ 4053 Source/WebCore/mathml/MathMLSelectElement.cpp \ 4054 Source/WebCore/mathml/MathMLSelectElement.h \ 4053 4055 Source/WebCore/mathml/MathMLTextElement.cpp \ 4054 4056 Source/WebCore/mathml/MathMLTextElement.h \ -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r159856 r160005 18034 18034 </ClCompile> 18035 18035 <ClCompile Include="..\mathml\MathMLMathElement.cpp"> 18036 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> 18037 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> 18038 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild> 18039 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild> 18040 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild> 18041 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild> 18042 </ClCompile> 18043 <ClCompile Include="..\mathml\MathMLSelectElement.cpp"> 18036 18044 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> 18037 18045 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> … … 20977 20985 <ClInclude Include="..\mathml\MathMLInlineContainerElement.h" /> 20978 20986 <ClInclude Include="..\mathml\MathMLMathElement.h" /> 20987 <ClInclude Include="..\mathml\MathMLSelectElement.h" /> 20979 20988 <ClInclude Include="..\mathml\MathMLTextElement.h" /> 20980 20989 <ClInclude Include="..\editing\AlternativeTextController.h" /> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
r159849 r160005 4978 4978 <Filter>rendering\mathml</Filter> 4979 4979 </ClCompile> 4980 <ClCompile Include="..\mathml\MathMLSelectElement.cpp"> 4981 <Filter>rendering\mathml</Filter> 4982 </ClCompile> 4980 4983 <ClCompile Include="..\mathml\MathMLTextElement.cpp"> 4981 4984 <Filter>rendering\mathml</Filter> … … 12548 12551 </ClInclude> 12549 12552 <ClInclude Include="..\mathml\MathMLMathElement.h"> 12553 <Filter>rendering\mathml</Filter> 12554 </ClInclude> 12555 <ClInclude Include="..\mathml\MathMLSelectElement.h"> 12550 12556 <Filter>rendering\mathml</Filter> 12551 12557 </ClInclude> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r159966 r160005 6311 6311 FEBC5F3216BD0CC300659BD3 /* DatabaseBase.h in Headers */ = {isa = PBXBuildFile; fileRef = FEBC5F3016BD0CC300659BD3 /* DatabaseBase.h */; settings = {ATTRIBUTES = (Private, ); }; }; 6312 6312 FED13D3A0CEA934600D89466 /* EditorIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = FED13D390CEA934600D89466 /* EditorIOS.mm */; }; 6313 FED48390CED66C3255F72C59 /* MathMLSelectElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F75A059AF170D8FAA5B8CABE /* MathMLSelectElement.cpp */; }; 6313 6314 FEDBFF16182B7A8D0017FA64 /* BreakpointID.h in Headers */ = {isa = PBXBuildFile; fileRef = FEDBFF14182B7A8D0017FA64 /* BreakpointID.h */; settings = {ATTRIBUTES = (Private, ); }; }; 6314 6315 FEDEF84116797108000E444A /* DatabaseStrategy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEDEF83F16797108000E444A /* DatabaseStrategy.cpp */; }; … … 8655 8656 5958F1CB1343917C0080B31F /* XMLViewer.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = XMLViewer.css; sourceTree = "<group>"; }; 8656 8657 5958F1CC1343917C0080B31F /* XMLViewer.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = XMLViewer.js; sourceTree = "<group>"; }; 8658 59780849D41E6F65D81198BC /* MathMLSelectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLSelectElement.h; sourceTree = "<group>"; }; 8657 8659 598365DC1355F53C001B185D /* JSPositionCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPositionCallback.h; sourceTree = "<group>"; }; 8658 8660 598365DE1355F562001B185D /* JSPositionErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPositionErrorCallback.h; sourceTree = "<group>"; }; … … 13143 13145 F5E0C6591643C42C00D6CB69 /* BaseChooserOnlyDateAndTimeInputType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BaseChooserOnlyDateAndTimeInputType.cpp; sourceTree = "<group>"; }; 13144 13146 F5E0C65A1643C42C00D6CB69 /* BaseChooserOnlyDateAndTimeInputType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseChooserOnlyDateAndTimeInputType.h; sourceTree = "<group>"; }; 13147 F75A059AF170D8FAA5B8CABE /* MathMLSelectElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLSelectElement.cpp; sourceTree = "<group>"; }; 13145 13148 F7A034C3126BF6BE007DC19E /* FontOrientation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontOrientation.h; sourceTree = "<group>"; }; 13146 13149 F8216299029F4FB501000131 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; … … 21644 21647 FABE72F11059C1EB00D999DD /* MathMLMathElement.cpp */, 21645 21648 FABE72F21059C1EB00D999DD /* MathMLMathElement.h */, 21649 F75A059AF170D8FAA5B8CABE /* MathMLSelectElement.cpp */, 21650 59780849D41E6F65D81198BC /* MathMLSelectElement.h */, 21646 21651 FA654A691108ABED002615E0 /* MathMLTextElement.cpp */, 21647 21652 FA654A6A1108ABED002615E0 /* MathMLTextElement.h */, … … 25676 25681 FD31608712B026F700C1A359 /* AudioResamplerKernel.cpp in Sources */, 25677 25682 FD8C46EB154608E700A5910C /* AudioScheduledSourceNode.cpp in Sources */, 25683 FED48390CED66C3255F72C59 /* MathMLSelectElement.cpp in Sources */, 25678 25684 078E090317D14CEE00420AA1 /* MediaStreamTrackEvent.cpp in Sources */, 25679 25685 CDA79824170A258300D45C55 /* AudioSession.cpp in Sources */, -
trunk/Source/WebCore/css/mathml.css
r159035 r160005 154 154 } 155 155 156 annotation, annotation-xml {157 display: none;158 }159 160 156 mphantom { 161 157 visibility: hidden; -
trunk/Source/WebCore/mathml/MathMLAllInOne.cpp
r139015 r160005 29 29 #include "MathMLInlineContainerElement.cpp" 30 30 #include "MathMLMathElement.cpp" 31 #include "MathMLSelectElement.cpp" 31 32 #include "MathMLTextElement.cpp" 32 33 -
trunk/Source/WebCore/mathml/MathMLElement.h
r159856 r160005 46 46 47 47 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 48 virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE; 48 49 49 50 private: 50 51 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 51 52 virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) OVERRIDE; 52 53 virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;54 53 55 54 inline bool isMathMLToken() const; -
trunk/Source/WebCore/mathml/MathMLInlineContainerElement.cpp
r158097 r160005 57 57 RenderElement* MathMLInlineContainerElement::createRenderer(PassRef<RenderStyle> style) 58 58 { 59 if (hasLocalName(annotation_xmlTag)) 60 return new RenderMathMLRow(*this, std::move(style)); 59 61 if (hasLocalName(mrowTag)) 60 62 return new RenderMathMLRow(*this, std::move(style)); -
trunk/Source/WebCore/mathml/MathMLSelectElement.h
r160004 r160005 1 1 /* 2 * Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved. 3 * Copyright (C) 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2010 François Sausset (sausset@gmail.com). All rights reserved. 2 * Copyright (C) 2013 The MathJax Consortium. All rights reserved. 5 3 * 6 4 * Redistribution and use in source and binary forms, with or without … … 26 24 */ 27 25 28 #ifndef MathML Element_h29 #define MathML Element_h26 #ifndef MathMLSelectElement_h 27 #define MathMLSelectElement_h 30 28 31 29 #if ENABLE(MATHML) 32 33 #include "StyledElement.h" 30 #include "MathMLInlineContainerElement.h" 34 31 35 32 namespace WebCore { 36 33 37 class MathML Element : public StyledElement {34 class MathMLSelectElement FINAL : public MathMLInlineContainerElement { 38 35 public: 39 static PassRefPtr<MathML Element> create(const QualifiedName& tagName, Document&);36 static PassRefPtr<MathMLSelectElement> create(const QualifiedName& tagName, Document&); 40 37 41 int colSpan() const; 42 int rowSpan() const; 43 44 protected: 45 MathMLElement(const QualifiedName& tagName, Document&); 46 47 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 48 49 private: 50 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 51 virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) OVERRIDE; 38 private: 39 MathMLSelectElement(const QualifiedName& tagName, Document&); 40 virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE; 52 41 53 42 virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE; 54 43 55 inline bool isMathMLToken() const; 44 virtual void finishParsingChildren() OVERRIDE; 45 virtual void childrenChanged(const ChildChange&) OVERRIDE; 46 virtual void attributeChanged(const QualifiedName&, const AtomicString&, AttributeModificationReason = ModifiedDirectly) OVERRIDE; 47 48 void updateSelectedChild(); 49 Element* m_selectedChild; 56 50 }; 57 58 void isMathMLElement(const MathMLElement&); // Catch unnecessary runtime check of type known at compile time.59 inline bool isMathMLElement(const Node& node) { return node.isMathMLElement(); }60 NODE_TYPE_CASTS(MathMLElement)61 51 62 52 } 63 53 64 54 #endif // ENABLE(MATHML) 65 66 #endif // MathMLElement_h 55 #endif // MathMLSelectElement_h -
trunk/Source/WebCore/mathml/mathattrs.in
r159504 r160005 4 4 attrsNullNamespace 5 5 6 actiontype 6 7 alttext 7 8 background … … 27 28 open 28 29 rowspan 30 selection 29 31 separators 30 32 stretchy -
trunk/Source/WebCore/mathml/mathtags.in
r159504 r160005 4 4 fallbackInterfaceName="MathMLElement" 5 5 6 annotation interfaceName=MathMLTextElement 7 annotation-xml interfaceName=MathMLInlineContainerElement 8 maction interfaceName=MathMLSelectElement 6 9 math 7 10 mfrac interfaceName=MathMLInlineContainerElement … … 28 31 mprescripts interfaceName=MathMLInlineContainerElement 29 32 none interfaceName=MathMLInlineContainerElement 33 semantics interfaceName=MathMLSelectElement 30 34 31 35 #if 0 // Curently only for MathMLNames used by HTMLTreeBuilder. … … 33 37 mglyph 34 38 malignmark 35 annotation-xml36 39 #endif
Note: See TracChangeset
for help on using the changeset viewer.