Changeset 202962 in webkit
- Timestamp:
- Jul 7, 2016, 11:16:32 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 16 added
- 12 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/mathml/presentation/inferred-mrow-baseline-expected.txt (modified) (2 diffs)
-
LayoutTests/mathml/presentation/inferred-mrow-baseline.html (modified) (2 diffs)
-
LayoutTests/mathml/presentation/inferred-mrow-stretchy-expected.txt (modified) (2 diffs)
-
LayoutTests/mathml/presentation/inferred-mrow-stretchy.html (modified) (2 diffs)
-
LayoutTests/mathml/presentation/mpadded-1-2-expected.html (added)
-
LayoutTests/mathml/presentation/mpadded-1-2.html (added)
-
LayoutTests/mathml/presentation/mpadded-1-expected.html (added)
-
LayoutTests/mathml/presentation/mpadded-1.html (added)
-
LayoutTests/mathml/presentation/mpadded-2-expected.html (added)
-
LayoutTests/mathml/presentation/mpadded-2.html (added)
-
LayoutTests/mathml/presentation/mpadded-3-expected.html (added)
-
LayoutTests/mathml/presentation/mpadded-3.html (added)
-
LayoutTests/mathml/presentation/mpadded-4-expected.html (added)
-
LayoutTests/mathml/presentation/mpadded-4.html (added)
-
LayoutTests/mathml/presentation/mpadded-dynamic-expected.html (added)
-
LayoutTests/mathml/presentation/mpadded-dynamic.html (added)
-
LayoutTests/mathml/presentation/mpadded-unsupported-values-expected.html (added)
-
LayoutTests/mathml/presentation/mpadded-unsupported-values.html (added)
-
Source/WebCore/CMakeLists.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/WebCore.xcodeproj/project.pbxproj (modified) (5 diffs)
-
Source/WebCore/mathml/MathMLInlineContainerElement.cpp (modified) (2 diffs)
-
Source/WebCore/mathml/mathattrs.in (modified) (1 diff)
-
Source/WebCore/mathml/mathtags.in (modified) (2 diffs)
-
Source/WebCore/rendering/RenderObject.h (modified) (1 diff)
-
Source/WebCore/rendering/mathml/RenderMathMLPadded.cpp (added)
-
Source/WebCore/rendering/mathml/RenderMathMLPadded.h (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202960 r202962 1 2016-07-07 Frederic Wang <fwang@igalia.com> 2 3 Bug 155792 - Basic implementation of mpadded 4 https://bugs.webkit.org/show_bug.cgi?id=155792 5 6 Reviewed by Brent Fulgham. 7 8 We import mpadded tests from Mozilla test suite. 9 We also add some tests for dynamic changes of mpadded attributes and to verify 10 that the mpadded element behaves as if it had an inferred <mrow>. 11 Finally, we check that fallback properly for negative and pseudo-unit values that 12 we do not support yet. 13 14 * mathml/presentation/inferred-mrow-baseline.html: Check baseline for mpadded. 15 * mathml/presentation/inferred-mrow-baseline-expected.txt: Ditto. 16 * mathml/presentation/inferred-mrow-stretchy.html: Check stretching of operators for mpadded. 17 * mathml/presentation/inferred-mrow-stretchy-expected.txt: Ditto. 18 * mathml/presentation/mpadded-dynamic.html: Added. Verify dynamic change of mpadded attributes. 19 * mathml/presentation/mpadded-dynamic-expected.html: Added. Ditto. 20 * mathml/presentation/mpadded-unsupported-values.html: Added. Check negative and pseudo-unit values. 21 * mathml/presentation/mpadded-unsupported-values-expected.html: Added. 22 * mathml/presentation/mpadded-1-2-expected.html: Added. 23 * mathml/presentation/mpadded-1-2.html: Added. 24 * mathml/presentation/mpadded-1-expected.html: Added. 25 * mathml/presentation/mpadded-1.html: Added. 26 * mathml/presentation/mpadded-2-expected.html: Added. 27 * mathml/presentation/mpadded-2.html: Added. 28 * mathml/presentation/mpadded-3-expected.html: Added. 29 * mathml/presentation/mpadded-3.html: Added. 30 1 31 2016-07-07 Frederic Wang <fwang@igalia.com> 2 32 -
trunk/LayoutTests/mathml/presentation/inferred-mrow-baseline-expected.txt
r196417 r202962 1 1 This test passes if rectangles are correctly aligned with respect to the baseline. 2 2 3 3 4 4 5 … … 16 17 PASS baseline alignment inside Math 17 18 PASS baseline alignment inside Menclose 19 PASS baseline alignment inside Mpadded 18 20 -
trunk/LayoutTests/mathml/presentation/inferred-mrow-baseline.html
r196417 r202962 9 9 function run() 10 10 { 11 var tags = ["Mrow", "Sqrt", "Style", "Error", "Phantom", "Math", "Menclose" ];11 var tags = ["Mrow", "Sqrt", "Style", "Error", "Phantom", "Math", "Menclose", "Mpadded"]; 12 12 for (var i in tags) { 13 13 var tag = tags[i]; … … 40 40 41 41 <math><menclose notation="box"><mspace id="aboveMenclose" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowMenclose" width="10px" depth="30px" mathbackground="blue"></mspace></menclose></math> 42 43 <math><mpadded notation="box"><mspace id="aboveMpadded" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowMpadded" width="10px" depth="30px" mathbackground="blue"></mspace></mpadded></math> 42 44 </p> 43 45 -
trunk/LayoutTests/mathml/presentation/inferred-mrow-stretchy-expected.txt
r202420 r202962 13 13 14 14 | 15 16 | 15 17 16 18 … … 22 24 PASS operator stretching inside Math 23 25 PASS operator stretching inside Menclose 26 PASS operator stretching inside Mpadded 24 27 -
trunk/LayoutTests/mathml/presentation/inferred-mrow-stretchy.html
r196417 r202962 9 9 function run() 10 10 { 11 var tags = ["Mrow", "Sqrt", "Style", "Error", "Phantom", "Math", "Menclose" ];11 var tags = ["Mrow", "Sqrt", "Style", "Error", "Phantom", "Math", "Menclose", "Mpadded"]; 12 12 for (var i in tags) { 13 13 var tag = tags[i]; … … 33 33 <math><mo id="moMath">|</mo><mspace width="1px" height="30px" depth="30px" mathbackground="red"></mspace></math> 34 34 <math><menclose notation="box"><mo id="moMenclose">|</mo><mspace width="1px" height="30px" depth="30px" mathbackground="red"></mspace></menclose></math> 35 <math><mpadded notation="box"><mo id="moMpadded">|</mo><mspace width="1px" height="30px" depth="30px" mathbackground="red"></mspace></mpadded></math> 35 36 </p> 36 37 -
trunk/Source/WebCore/CMakeLists.txt
r202961 r202962 2533 2533 rendering/mathml/RenderMathMLMenclose.cpp 2534 2534 rendering/mathml/RenderMathMLOperator.cpp 2535 rendering/mathml/RenderMathMLPadded.cpp 2535 2536 rendering/mathml/RenderMathMLRoot.cpp 2536 2537 rendering/mathml/RenderMathMLRow.cpp -
trunk/Source/WebCore/ChangeLog
r202961 r202962 1 2016-07-07 Frederic Wang <fwang@igalia.com> 2 3 Bug 155792 - Basic implementation of mpadded 4 https://bugs.webkit.org/show_bug.cgi?id=155792 5 6 Reviewed by Brent Fulgham. 7 8 We implement a basic support for the mpadded element. 9 We support most of the attribute values except pseudo-units or negative values. 10 11 Tests: mathml/presentation/mpadded-1-2.html 12 mathml/presentation/mpadded-1.html 13 mathml/presentation/mpadded-2.html 14 mathml/presentation/mpadded-3.html 15 mathml/presentation/mpadded-unsupported-values.html 16 mathml/presentation/mpadded-dynamic.html 17 18 * CMakeLists.txt: Add RenderMathMLPadded to the build system. 19 * WebCore.xcodeproj/project.pbxproj: Ditto. 20 * mathml/MathMLInlineContainerElement.cpp: 21 (WebCore::MathMLInlineContainerElement::createElementRenderer): Create the renderer 22 for mpadded. 23 * mathml/mathattrs.in: Add voffset attribute. 24 * mathml/mathtags.in: Make mpadded use MathMLInlineContainerElement. 25 * rendering/RenderObject.h: 26 (WebCore::RenderObject::isRenderMathMLPadded): Define isRenderMathMLPadded. 27 * rendering/mathml/RenderMathMLPadded.cpp: Added. 28 We do a simple implementation by overriding the behavior of RenderMathMLRow and forcing 29 relayout after attribute or style change. 30 (WebCore::RenderMathMLPadded::RenderMathMLPadded): 31 (WebCore::RenderMathMLPadded::computePreferredLogicalWidths): 32 (WebCore::RenderMathMLPadded::layoutBlock): 33 (WebCore::RenderMathMLPadded::updateFromElement): 34 (WebCore::RenderMathMLPadded::styleDidChange): 35 (WebCore::RenderMathMLPadded::firstLineBaseline): 36 * rendering/mathml/RenderMathMLPadded.h: Added. 37 1 38 2016-07-07 Frederic Wang <fwang@igalia.com> 2 39 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r202961 r202962 2390 2390 5B30695E18B3D3450099D5E8 /* WebGLDrawBuffers.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B30695B18B3D3450099D5E8 /* WebGLDrawBuffers.h */; }; 2391 2391 5B7A208D2E12979B4AE19DE6 /* RenderMathMLSpace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DBFCB0EBFF5CD77EBEB35395 /* RenderMathMLSpace.cpp */; }; 2392 5B7A208D2E12979B4AE19E6F /* RenderMathMLPadded.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DBFCB0EBFF5CD77EBEB3595F /* RenderMathMLPadded.cpp */; }; 2392 2393 5C4304B0191AC908000E2BC0 /* EXTShaderTextureLOD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C4304AD191AC908000E2BC0 /* EXTShaderTextureLOD.cpp */; }; 2393 2394 5C4304B1191AC908000E2BC0 /* EXTShaderTextureLOD.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C4304AE191AC908000E2BC0 /* EXTShaderTextureLOD.h */; }; … … 9037 9038 3314ACEA10892086000F0E56 /* JSExceptionBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSExceptionBase.h; sourceTree = "<group>"; }; 9038 9039 331FF67DE197B57393C46AA7 /* RenderMathMLSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMathMLSpace.h; sourceTree = "<group>"; }; 9040 331FF67DE197B57393C46A7F /* RenderMathMLPadded.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMathMLPadded.h; sourceTree = "<group>"; }; 9039 9041 333F704E0FB49CA2008E12A6 /* Notification.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Notification.idl; sourceTree = "<group>"; }; 9040 9042 333F704F0FB49CA2008E12A6 /* Notification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Notification.h; sourceTree = "<group>"; }; … … 14523 14525 DB23C2CA0A508D29002489EB /* IndentOutdentCommand.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IndentOutdentCommand.h; sourceTree = "<group>"; }; 14524 14526 DBFCB0EBFF5CD77EBEB35395 /* RenderMathMLSpace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMathMLSpace.cpp; sourceTree = "<group>"; }; 14527 DBFCB0EBFF5CD77EBEB3595F /* RenderMathMLPadded.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMathMLPadded.cpp; sourceTree = "<group>"; }; 14525 14528 DD05FE0B0B8BA3C6009ACDFE /* WebCoreObjCExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebCoreObjCExtras.h; sourceTree = "<group>"; }; 14526 14529 DD763BB10992C2C900740B8E /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = /usr/lib/libxml2.dylib; sourceTree = "<absolute>"; }; … … 17147 17150 DBFCB0EBFF5CD77EBEB35395 /* RenderMathMLSpace.cpp */, 17148 17151 331FF67DE197B57393C46AA7 /* RenderMathMLSpace.h */, 17152 DBFCB0EBFF5CD77EBEB3595F /* RenderMathMLPadded.cpp */, 17153 331FF67DE197B57393C46A7F /* RenderMathMLPadded.h */, 17149 17154 439046D712DA25E800AF80A9 /* RenderMathMLToken.cpp */, 17150 17155 439046D812DA25E800AF80A9 /* RenderMathMLToken.h */, … … 31626 31631 439046E712DA25E800AF80A2 /* RenderMathMLScripts.cpp in Sources */, 31627 31632 5B7A208D2E12979B4AE19DE6 /* RenderMathMLSpace.cpp in Sources */, 31633 5B7A208D2E12979B4AE19E6F /* RenderMathMLPadded.cpp in Sources */, 31628 31634 439046EB12DA25E800AF80A9 /* RenderMathMLToken.cpp in Sources */, 31629 31635 439046E912DA25E800AF80A2 /* RenderMathMLUnderOver.cpp in Sources */, -
trunk/Source/WebCore/mathml/MathMLInlineContainerElement.cpp
r202960 r202962 36 36 #include "RenderMathMLFraction.h" 37 37 #include "RenderMathMLMenclose.h" 38 #include "RenderMathMLPadded.h" 38 39 #include "RenderMathMLRoot.h" 39 40 #include "RenderMathMLRow.h" … … 80 81 if (hasTagName(mtableTag)) 81 82 return createRenderer<RenderMathMLTable>(*this, WTFMove(style)); 83 if (hasTagName(mpaddedTag)) 84 return createRenderer<RenderMathMLPadded>(*this, WTFMove(style)); 82 85 83 86 return createRenderer<RenderMathMLBlock>(*this, WTFMove(style)); -
trunk/Source/WebCore/mathml/mathattrs.in
r202960 r202962 48 48 subscriptshift 49 49 superscriptshift 50 voffset 50 51 width -
trunk/Source/WebCore/mathml/mathtags.in
r177025 r202962 12 12 msubsup interfaceName=MathMLInlineContainerElement 13 13 merror interfaceName=MathMLInlineContainerElement 14 mpadded interfaceName=MathMLInlineContainerElement 14 15 mphantom interfaceName=MathMLInlineContainerElement 15 16 mrow interfaceName=MathMLInlineContainerElement … … 42 43 mlabeledtr interfaceName=MathMLElement 43 44 mlongdiv interfaceName=MathMLElement 44 mpadded interfaceName=MathMLElement45 45 mscarries interfaceName=MathMLElement 46 46 mscarry interfaceName=MathMLElement -
trunk/Source/WebCore/rendering/RenderObject.h
r202726 r202962 343 343 virtual bool isRenderMathMLFenced() const { return false; } 344 344 virtual bool isRenderMathMLFraction() const { return false; } 345 virtual bool isRenderMathMLPadded() const { return false; } 345 346 virtual bool isRenderMathMLRoot() const { return false; } 346 347 virtual bool isRenderMathMLSpace() const { return false; }
Note:
See TracChangeset
for help on using the changeset viewer.