2010-07-12 Eric Seidel <eric@webkit.org>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Jul 2010 21:09:17 +0000 (21:09 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Jul 2010 21:09:17 +0000 (21:09 +0000)
        Reviewed by Adam Barth.

        Update HTMLTreeBuilder now that MathMLNames is always generated
        https://bugs.webkit.org/show_bug.cgi?id=42059

        We pass a bunch more tests now that our MathML code path is enabled.

        * html5lib/runner-expected-html5.txt:
2010-07-12  Eric Seidel  <eric@webkit.org>

        Reviewed by Adam Barth.

        Update HTMLTreeBuilder now that MathMLNames is always generated
        https://bugs.webkit.org/show_bug.cgi?id=42059

        Fix the HTMLTreeBuilder MathML code path to compile and remove
        the MathML and SVG guards now that SVGNames and MathMLNames are
        always compiled into ever port after:
        https://bugs.webkit.org/show_bug.cgi?id=42050

        This fixed a whole bunch of libhtml5 tests now that we have the
        mathml code paths enabled.

        * html/HTMLTreeBuilder.cpp:
        (WebCore::HTMLTreeBuilder::processStartTagForInBody):
        (WebCore::HTMLTreeBuilder::processStartTag):
        (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
        (WebCore::HTMLTreeBuilder::processEndTag):
        * page/Frame.cpp:
        (WebCore::Frame::Frame):
         - Always init SVGNames and MathML names.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63115 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/html5lib/runner-expected-html5.txt
WebCore/ChangeLog
WebCore/html/HTMLTreeBuilder.cpp
WebCore/page/Frame.cpp

index 0488f91..56629e7 100644 (file)
@@ -1,3 +1,14 @@
+2010-07-12  Eric Seidel  <eric@webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Update HTMLTreeBuilder now that MathMLNames is always generated
+        https://bugs.webkit.org/show_bug.cgi?id=42059
+
+        We pass a bunch more tests now that our MathML code path is enabled.
+
+        * html5lib/runner-expected-html5.txt:
+
 2010-07-12  Simon Fraser  <simon.fraser@apple.com>
 
         Reviewed by Dan Bernstein.
index 03dc42b..6d86342 100644 (file)
@@ -386,243 +386,14 @@ Expected:
 resources/tests8.dat: PASS
 
 resources/tests9.dat:
-1
-2
-5
-6
-7
-8
-9
-10
-11
-12
 13
 14
 15
 18
 19
-22
-23
-24
-25
-
-Test 1 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><math></math>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math math>
-
-Test 2 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body><math></math>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math math>
-
-Test 5 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body><table><math></math></table>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math>
-|     <table>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math math>
-|     <table>
-
-Test 6 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body><table><math><mi>foo</mi></math></table>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math>
-|       <mi>
-|         "foo"
-|     <table>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math math>
-|       <math mi>
-|         "foo"
-|     <table>
-
-Test 7 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body><table><math><mi>foo</mi><mi>bar</mi></math></table>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math>
-|       <mi>
-|         "foo"
-|       <mi>
-|         "bar"
-|     <table>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math math>
-|       <math mi>
-|         "foo"
-|       <math mi>
-|         "bar"
-|     <table>
-
-Test 8 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body><table><tbody><math><mi>foo</mi><mi>bar</mi></math></tbody></table>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math>
-|       <mi>
-|         "foo"
-|       <mi>
-|         "bar"
-|     <table>
-|       <tbody>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math math>
-|       <math mi>
-|         "foo"
-|       <math mi>
-|         "bar"
-|     <table>
-|       <tbody>
-
-Test 9 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body><table><tbody><tr><math><mi>foo</mi><mi>bar</mi></math></tr></tbody></table>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math>
-|       <mi>
-|         "foo"
-|       <mi>
-|         "bar"
-|     <table>
-|       <tbody>
-|         <tr>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math math>
-|       <math mi>
-|         "foo"
-|       <math mi>
-|         "bar"
-|     <table>
-|       <tbody>
-|         <tr>
-
-Test 10 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body><table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math></td></tr></tbody></table>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <table>
-|       <tbody>
-|         <tr>
-|           <td>
-|             <math>
-|               <mi>
-|                 "foo"
-|               <mi>
-|                 "bar"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <table>
-|       <tbody>
-|         <tr>
-|           <td>
-|             <math math>
-|               <math mi>
-|                 "foo"
-|               <math mi>
-|                 "bar"
-
-Test 11 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body><table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math><p>baz</td></tr></tbody></table>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <table>
-|       <tbody>
-|         <tr>
-|           <td>
-|             <math>
-|               <mi>
-|                 "foo"
-|               <mi>
-|                 "bar"
-|             <p>
-|               "baz"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <table>
-|       <tbody>
-|         <tr>
-|           <td>
-|             <math math>
-|               <math mi>
-|                 "foo"
-|               <math mi>
-|                 "bar"
-|             <p>
-|               "baz"
 
-Test 12 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi></math><p>baz</caption></table>
+Test 13 of 25 in resources/tests9.dat failed. Input:
+<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
 Got:
 | <!DOCTYPE html>
 | <html>
@@ -630,46 +401,15 @@ Got:
 |   <body>
 |     <table>
 |       <caption>
-|         <math>
-|           <mi>
-|             "foo"
-|           <mi>
-|             "bar"
-|         <p>
-|           "baz"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <table>
-|       <caption>
 |         <math math>
 |           <math mi>
 |             "foo"
 |           <math mi>
 |             "bar"
-|         <p>
-|           "baz"
-
-Test 13 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <table>
-|       <caption>
-|         <math>
-|           <mi>
-|             "foo"
-|           <mi>
-|             "bar"
-|           <p>
+|           <math p>
 |             "baz"
-|     <p>
-|       "quux"
+|             <math p>
+|               "quux"
 Expected:
 | <!DOCTYPE html>
 | <html>
@@ -696,14 +436,14 @@ Got:
 |   <body>
 |     <table>
 |       <caption>
-|         <math>
-|           <mi>
+|         <math math>
+|           <math mi>
 |             "foo"
-|           <mi>
+|           <math mi>
 |             "bar"
 |           "baz"
-|     <p>
-|       "quux"
+|           <math p>
+|             "quux"
 Expected:
 | <!DOCTYPE html>
 | <html>
@@ -727,17 +467,17 @@ Got:
 | <html>
 |   <head>
 |   <body>
-|     <math>
-|       <mi>
+|     <math math>
+|       <math mi>
 |         "foo"
-|       <mi>
+|       <math mi>
 |         "bar"
-|       <p>
+|       <math p>
 |         "baz"
+|         <math p>
+|           "quux"
 |     <table>
 |       <colgroup>
-|     <p>
-|       "quux"
 Expected:
 | <!DOCTYPE html>
 | <html>
@@ -762,12 +502,12 @@ Got:
 | <html>
 |   <head>
 |   <body>
-|     <math>
-|       <mi>
+|     <math math>
+|       <math mi>
 |         "foo"
-|       <mi>
+|       <math mi>
 |         "bar"
-|       <p>
+|       <math p>
 |         "baz"
 Expected:
 | <!DOCTYPE html>
@@ -789,12 +529,12 @@ Got:
 | <html>
 |   <head>
 |   <body>
-|     <math>
-|       <mi>
+|     <math math>
+|       <math mi>
 |         "foo"
-|       <mi>
+|       <math mi>
 |         "bar"
-|       <p>
+|       <math p>
 |         "baz"
 Expected:
 | <!DOCTYPE html>
@@ -808,102 +548,6 @@ Expected:
 |         "bar"
 |     <p>
 |       "baz"
-
-Test 22 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body xlink:href=foo><math xlink:href=foo></math>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     xlink:href="foo"
-|     <math>
-|       xlink:href="foo"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     xlink:href="foo"
-|     <math math>
-|       xlink href="foo"
-
-Test 23 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo></mi></math>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     xlink:href="foo"
-|     xml:lang="en"
-|     <math>
-|       <mi>
-|         xlink:href="foo"
-|         xml:lang="en"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     xlink:href="foo"
-|     xml:lang="en"
-|     <math math>
-|       <math mi>
-|         xlink href="foo"
-|         xml lang="en"
-
-Test 24 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo /></math>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     xlink:href="foo"
-|     xml:lang="en"
-|     <math>
-|       <mi>
-|         xlink:href="foo"
-|         xml:lang="en"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     xlink:href="foo"
-|     xml:lang="en"
-|     <math math>
-|       <math mi>
-|         xlink href="foo"
-|         xml lang="en"
-
-Test 25 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo />bar</math>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     xlink:href="foo"
-|     xml:lang="en"
-|     <math>
-|       <mi>
-|         xlink:href="foo"
-|         xml:lang="en"
-|         "bar"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     xlink:href="foo"
-|     xml:lang="en"
-|     <math math>
-|       <math mi>
-|         xlink href="foo"
-|         xml lang="en"
-|       "bar"
 resources/tests10.dat:
 13
 14
@@ -1067,235 +711,8 @@ Expected:
 |         "bar"
 |     <p>
 |       "baz"
-resources/tests11.dat:
-4
-8
+resources/tests11.dat: PASS
 
-Test 4 of 9 in resources/tests11.dat failed. Input:
-<!DOCTYPE html><body><math attributeName='' attributeType='' baseFrequency='' baseProfile='' calcMode='' clipPathUnits='' contentScriptType='' contentStyleType='' diffuseConstant='' edgeMode='' externalResourcesRequired='' filterRes='' filterUnits='' glyphRef='' gradientTransform='' gradientUnits='' kernelMatrix='' kernelUnitLength='' keyPoints='' keySplines='' keyTimes='' lengthAdjust='' limitingConeAngle='' markerHeight='' markerUnits='' markerWidth='' maskContentUnits='' maskUnits='' numOctaves='' pathLength='' patternContentUnits='' patternTransform='' patternUnits='' pointsAtX='' pointsAtY='' pointsAtZ='' preserveAlpha='' preserveAspectRatio='' primitiveUnits='' refX='' refY='' repeatCount='' repeatDur='' requiredExtensions='' requiredFeatures='' specularConstant='' specularExponent='' spreadMethod='' startOffset='' stdDeviation='' stitchTiles='' surfaceScale='' systemLanguage='' tableValues='' targetX='' targetY='' textLength='' viewBox='' viewTarget='' xChannelSelector='' yChannelSelector='' zoomAndPan=''></math>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math>
-|       attributename=""
-|       attributetype=""
-|       basefrequency=""
-|       baseprofile=""
-|       calcmode=""
-|       clippathunits=""
-|       contentscripttype=""
-|       contentstyletype=""
-|       diffuseconstant=""
-|       edgemode=""
-|       externalresourcesrequired=""
-|       filterres=""
-|       filterunits=""
-|       glyphref=""
-|       gradienttransform=""
-|       gradientunits=""
-|       kernelmatrix=""
-|       kernelunitlength=""
-|       keypoints=""
-|       keysplines=""
-|       keytimes=""
-|       lengthadjust=""
-|       limitingconeangle=""
-|       markerheight=""
-|       markerunits=""
-|       markerwidth=""
-|       maskcontentunits=""
-|       maskunits=""
-|       numoctaves=""
-|       pathlength=""
-|       patterncontentunits=""
-|       patterntransform=""
-|       patternunits=""
-|       pointsatx=""
-|       pointsaty=""
-|       pointsatz=""
-|       preservealpha=""
-|       preserveaspectratio=""
-|       primitiveunits=""
-|       refx=""
-|       refy=""
-|       repeatcount=""
-|       repeatdur=""
-|       requiredextensions=""
-|       requiredfeatures=""
-|       specularconstant=""
-|       specularexponent=""
-|       spreadmethod=""
-|       startoffset=""
-|       stddeviation=""
-|       stitchtiles=""
-|       surfacescale=""
-|       systemlanguage=""
-|       tablevalues=""
-|       targetx=""
-|       targety=""
-|       textlength=""
-|       viewbox=""
-|       viewtarget=""
-|       xchannelselector=""
-|       ychannelselector=""
-|       zoomandpan=""
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math math>
-|       attributename=""
-|       attributetype=""
-|       basefrequency=""
-|       baseprofile=""
-|       calcmode=""
-|       clippathunits=""
-|       contentscripttype=""
-|       contentstyletype=""
-|       diffuseconstant=""
-|       edgemode=""
-|       externalresourcesrequired=""
-|       filterres=""
-|       filterunits=""
-|       glyphref=""
-|       gradienttransform=""
-|       gradientunits=""
-|       kernelmatrix=""
-|       kernelunitlength=""
-|       keypoints=""
-|       keysplines=""
-|       keytimes=""
-|       lengthadjust=""
-|       limitingconeangle=""
-|       markerheight=""
-|       markerunits=""
-|       markerwidth=""
-|       maskcontentunits=""
-|       maskunits=""
-|       numoctaves=""
-|       pathlength=""
-|       patterncontentunits=""
-|       patterntransform=""
-|       patternunits=""
-|       pointsatx=""
-|       pointsaty=""
-|       pointsatz=""
-|       preservealpha=""
-|       preserveaspectratio=""
-|       primitiveunits=""
-|       refx=""
-|       refy=""
-|       repeatcount=""
-|       repeatdur=""
-|       requiredextensions=""
-|       requiredfeatures=""
-|       specularconstant=""
-|       specularexponent=""
-|       spreadmethod=""
-|       startoffset=""
-|       stddeviation=""
-|       stitchtiles=""
-|       surfacescale=""
-|       systemlanguage=""
-|       tablevalues=""
-|       targetx=""
-|       targety=""
-|       textlength=""
-|       viewbox=""
-|       viewtarget=""
-|       xchannelselector=""
-|       ychannelselector=""
-|       zoomandpan=""
-
-Test 8 of 9 in resources/tests11.dat failed. Input:
-<!DOCTYPE html><body><math><altGlyph /><altGlyphDef /><altGlyphItem /><animateColor /><animateMotion /><animateTransform /><clipPath /><feBlend /><feColorMatrix /><feComponentTransfer /><feComposite /><feConvolveMatrix /><feDiffuseLighting /><feDisplacementMap /><feDistantLight /><feFlood /><feFuncA /><feFuncB /><feFuncG /><feFuncR /><feGaussianBlur /><feImage /><feMerge /><feMergeNode /><feMorphology /><feOffset /><fePointLight /><feSpecularLighting /><feSpotLight /><feTile /><feTurbulence /><foreignObject /><glyphRef /><linearGradient /><radialGradient /><textPath /></math>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math>
-|       <altglyph>
-|         <altglyphdef>
-|           <altglyphitem>
-|             <animatecolor>
-|               <animatemotion>
-|                 <animatetransform>
-|                   <clippath>
-|                     <feblend>
-|                       <fecolormatrix>
-|                         <fecomponenttransfer>
-|                           <fecomposite>
-|                             <feconvolvematrix>
-|                               <fediffuselighting>
-|                                 <fedisplacementmap>
-|                                   <fedistantlight>
-|                                     <feflood>
-|                                       <fefunca>
-|                                         <fefuncb>
-|                                           <fefuncg>
-|                                             <fefuncr>
-|                                               <fegaussianblur>
-|                                                 <feimage>
-|                                                   <femerge>
-|                                                     <femergenode>
-|                                                       <femorphology>
-|                                                         <feoffset>
-|                                                           <fepointlight>
-|                                                             <fespecularlighting>
-|                                                               <fespotlight>
-|                                                                 <fetile>
-|                                                                   <feturbulence>
-|                                                                     <foreignobject>
-|                                                                       <glyphref>
-|                                                                         <lineargradient>
-|                                                                           <radialgradient>
-|                                                                             <textpath>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math math>
-|       <math altglyph>
-|       <math altglyphdef>
-|       <math altglyphitem>
-|       <math animatecolor>
-|       <math animatemotion>
-|       <math animatetransform>
-|       <math clippath>
-|       <math feblend>
-|       <math fecolormatrix>
-|       <math fecomponenttransfer>
-|       <math fecomposite>
-|       <math feconvolvematrix>
-|       <math fediffuselighting>
-|       <math fedisplacementmap>
-|       <math fedistantlight>
-|       <math feflood>
-|       <math fefunca>
-|       <math fefuncb>
-|       <math fefuncg>
-|       <math fefuncr>
-|       <math fegaussianblur>
-|       <math feimage>
-|       <math femerge>
-|       <math femergenode>
-|       <math femorphology>
-|       <math feoffset>
-|       <math fepointlight>
-|       <math fespecularlighting>
-|       <math fespotlight>
-|       <math fetile>
-|       <math feturbulence>
-|       <math foreignobject>
-|       <math glyphref>
-|       <math lineargradient>
-|       <math radialgradient>
-|       <math textpath>
 resources/tests12.dat:
 1
 2
@@ -1309,24 +726,24 @@ Got:
 |   <body>
 |     <p>
 |       "foo"
-|       <math>
-|         <mtext>
-|           <i>
+|       <math math>
+|         <math mtext>
+|           <math i>
 |             "baz"
-|         <annotation-xml>
-|           <svg svg>
-|             <svg desc>
-|               <svg b>
+|         <math annotation-xml>
+|           <math svg>
+|             <math desc>
+|               <math b>
 |                 "eggs"
-|             <svg g>
-|               <svg foreignObject>
-|                 <svg p>
+|             <math g>
+|               <math foreignobject>
+|                 <math p>
 |                   "spam"
-|                   <svg table>
-|                     <svg tr>
-|                       <svg td>
-|                         <svg img>
-|                           <svg g>
+|                   <math table>
+|                     <math tr>
+|                       <math td>
+|                         <math img>
+|                           <math g>
 |                             "quux"
 |                           "bar"
 Expected:
@@ -1366,24 +783,24 @@ Got:
 |   <head>
 |   <body>
 |     "foo"
-|     <math>
-|       <mtext>
-|         <i>
+|     <math math>
+|       <math mtext>
+|         <math i>
 |           "baz"
-|       <annotation-xml>
-|         <svg svg>
-|           <svg desc>
-|             <svg b>
+|       <math annotation-xml>
+|         <math svg>
+|           <math desc>
+|             <math b>
 |               "eggs"
-|           <svg g>
-|             <svg foreignObject>
-|               <svg p>
+|           <math g>
+|             <math foreignobject>
+|               <math p>
 |                 "spam"
-|                 <svg table>
-|                   <svg tr>
-|                     <svg td>
-|                       <svg img>
-|                         <svg g>
+|                 <math table>
+|                   <math tr>
+|                     <math td>
+|                       <math img>
+|                         <math g>
 |                           "quux"
 |                         "bar"
 Expected:
index 9465713..ebd9816 100644 (file)
@@ -1,3 +1,27 @@
+2010-07-12  Eric Seidel  <eric@webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Update HTMLTreeBuilder now that MathMLNames is always generated
+        https://bugs.webkit.org/show_bug.cgi?id=42059
+
+        Fix the HTMLTreeBuilder MathML code path to compile and remove
+        the MathML and SVG guards now that SVGNames and MathMLNames are
+        always compiled into ever port after:
+        https://bugs.webkit.org/show_bug.cgi?id=42050
+
+        This fixed a whole bunch of libhtml5 tests now that we have the
+        mathml code paths enabled.
+
+        * html/HTMLTreeBuilder.cpp:
+        (WebCore::HTMLTreeBuilder::processStartTagForInBody):
+        (WebCore::HTMLTreeBuilder::processStartTag):
+        (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
+        (WebCore::HTMLTreeBuilder::processEndTag):
+        * page/Frame.cpp:
+        (WebCore::Frame::Frame):
+         - Always init SVGNames and MathML names.
+
 2010-07-12  Simon Fraser  <simon.fraser@apple.com>
 
         Reviewed by Dan Bernstein.
index 20fd331..00f94c8 100644 (file)
 #include "LegacyHTMLDocumentParser.h"
 #include "LegacyHTMLTreeBuilder.h"
 #include "LocalizedStrings.h"
-#if ENABLE(MATHML)
 #include "MathMLNames.h"
-#endif
 #include "NotImplemented.h"
-#if ENABLE(SVG)
 #include "SVGNames.h"
-#endif
 #include "ScriptController.h"
 #include "Settings.h"
 #include "Text.h"
@@ -259,9 +255,7 @@ bool isScopingTag(const AtomicString& tagName)
     return tagName == appletTag
         || tagName == buttonTag
         || tagName == captionTag
-#if ENABLE(SVG_FOREIGN_OBJECT)
         || tagName == SVGNames::foreignObjectTag
-#endif
         || tagName == htmlTag
         || tagName == marqueeTag
         || tagName == objectTag
@@ -676,14 +670,6 @@ void mapLoweredLocalNameToName(PrefixedNameToQualifiedNameMap* map, QualifiedNam
     }
 }
 
-#if ENABLE(SVG)
-
-// FIXME: This is a hack until we can fix SVGNames to always generate all names.
-QualifiedName svgTagNameFor(const AtomicString& localName)
-{
-    return QualifiedName(nullAtom, localName, SVGNames::svgNamespaceURI);
-}
-
 void addName(PrefixedNameToQualifiedNameMap* map, const QualifiedName& name)
 {
     map->add(name.localName().lower(), name);
@@ -697,11 +683,6 @@ void adjustSVGTagNameCase(AtomicHTMLToken& token)
         size_t length = 0;
         QualifiedName** svgTags = SVGNames::getSVGTags(&length);
         mapLoweredLocalNameToName(caseMap, svgTags, length);
-        // FIXME: This is a hack around the fact that SVGNames does not
-        // currently include all values HTML5 expects it to.
-        addName(caseMap, svgTagNameFor("altGlyphDef"));
-        addName(caseMap, svgTagNameFor("altGlyphItem"));
-        addName(caseMap, svgTagNameFor("glyphRef"));
     }
 
     const QualifiedName& casedName = caseMap->get(token.name());
@@ -732,14 +713,10 @@ void adjustSVGAttributes(AtomicHTMLToken& token)
     }
 }
 
-#endif
-
-#if ENABLE(MATHML)
 void adjustMathMLAttributes(AtomicHTMLToken&)
 {
     notImplemented();
 }
-#endif
 
 void addNamesWithPrefix(PrefixedNameToQualifiedNameMap* map, const AtomicString& prefix, QualifiedName** names, size_t length)
 {
@@ -1041,8 +1018,6 @@ void HTMLTreeBuilder::processStartTagForInBody(AtomicHTMLToken& token)
         m_tree.insertHTMLElement(token);
         return;
     }
-    // FIXME: These should not need #if guards.
-#if ENABLE(MATHML)
     if (token.name() == MathMLNames::mathTag.localName()) {
         m_tree.reconstructTheActiveFormattingElements();
         adjustMathMLAttributes(token);
@@ -1054,8 +1029,6 @@ void HTMLTreeBuilder::processStartTagForInBody(AtomicHTMLToken& token)
         }
         return;
     }
-#endif
-#if ENABLE(SVG)
     if (token.name() == SVGNames::svgTag.localName()) {
         m_tree.reconstructTheActiveFormattingElements();
         adjustSVGAttributes(token);
@@ -1067,7 +1040,6 @@ void HTMLTreeBuilder::processStartTagForInBody(AtomicHTMLToken& token)
         }
         return;
     }
-#endif
     if (isCaptionColOrColgroupTag(token.name())
         || token.name() == frameTag
         || token.name() == headTag
@@ -1493,16 +1465,12 @@ void HTMLTreeBuilder::processStartTag(AtomicHTMLToken& token)
         // FIXME: We're missing a bunch of if branches here.
         notImplemented();
         const AtomicString& currentNamespace = m_tree.currentElement()->namespaceURI();
-#if ENABLE(MATHML)
         if (currentNamespace == MathMLNames::mathmlNamespaceURI)
             adjustMathMLAttributes(token);
-#endif
-#if ENABLE(SVG)
          if (currentNamespace == SVGNames::svgNamespaceURI) {
             adjustSVGTagNameCase(token);
             adjustSVGAttributes(token);
         }
-#endif
         adjustForeignAttributes(token);
         m_tree.insertForeignElement(token, currentNamespace);
         break;
@@ -1744,14 +1712,8 @@ void HTMLTreeBuilder::resetInsertionModeAppropriately()
             ASSERT(m_isParsingFragment);
             return setInsertionModeAndEnd(BeforeHeadMode, foreign);
         }
-        if (false
-#if ENABLE(SVG)
-        || node->namespaceURI() == SVGNames::svgNamespaceURI
-#endif
-#if ENABLE(MATHML)
-        || node->namespaceURI() == MathMLNames::mathmlNamespaceURI
-#endif
-            )
+        if (node->namespaceURI() == SVGNames::svgNamespaceURI
+            || node->namespaceURI() == MathMLNames::mathmlNamespaceURI)
             foreign = true;
         if (last) {
             ASSERT(m_isParsingFragment);
@@ -2296,12 +2258,10 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token)
         processEndTag(token);
         break;
     case InForeignContentMode:
-#if ENABLE(SVG)
         if (token.name() == SVGNames::scriptTag && m_tree.currentElement()->hasTagName(SVGNames::scriptTag)) {
             notImplemented();
             return;
         }
-#endif
         if (m_tree.currentElement()->namespaceURI() != xhtmlNamespaceURI) {
             // FIXME: This code just wants an Element* iterator, instead of an ElementRecord*
             HTMLElementStack::ElementRecord* nodeRecord = m_tree.openElements()->topRecord();
index 5c878b2..39740b8 100644 (file)
 #include "runtime_root.h"
 #endif
 
-#if ENABLE(MATHML)
 #include "MathMLNames.h"
-#endif
+#include "SVGNames.h"
+#include "XLinkNames.h"
 
 #if ENABLE(SVG)
 #include "SVGDocument.h"
 #include "SVGDocumentExtensions.h"
-#include "SVGNames.h"
-#include "XLinkNames.h"
 #endif
 
 #if ENABLE(TILED_BACKING_STORE)
@@ -157,23 +155,16 @@ inline Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoader
     HTMLNames::init();
     QualifiedName::init();
     MediaFeatureNames::init();
-
-#if ENABLE(SVG)
     SVGNames::init();
     XLinkNames::init();
-#endif
+    MathMLNames::init();
+    XMLNSNames::init();
+    XMLNames::init();
 
 #if ENABLE(WML)
     WMLNames::init();
 #endif
 
-#if ENABLE(MATHML)
-    MathMLNames::init();
-#endif
-
-    XMLNSNames::init();
-    XMLNames::init();
-
     if (!ownerElement) {
 #if ENABLE(TILED_BACKING_STORE)
         // Top level frame only for now.