Changeset 24146 in webkit


Ignore:
Timestamp:
Jul 10, 2007 2:21:47 AM (17 years ago)
Author:
rwlbuis
Message:

Reviewed by Maciej.

http://bugs.webkit.org/show_bug.cgi?id=8007
createElement() and XHTML (A dynamically created table not rendered as such)

Follow the HTML5 rules of making the name lowercase and then
creating the element in the xhtml namespace.

Location:
trunk
Files:
6 added
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r24129 r24146  
     12007-07-10  Rob Buis  <buis@kde.org>
     2
     3        Reviewed by Maciej.
     4
     5        Testcase for:
     6        http://bugs.webkit.org/show_bug.cgi?id=8007
     7        createElement() and XHTML (A dynamically created table not rendered as such)
     8
     9        SVG tests are changed to use createElementNS instead of createElement.
     10        Other test results match FF2 results, except replace-child.html and
     11        nodeisdefaultnamespace09.xhtml.
     12
     13        * dom/xhtml/level1/core/hc_documentcreateelementcasesensitive-expected.txt:
     14        * dom/xhtml/level2/html/HTMLSelectElement18-expected.txt:
     15        * dom/xhtml/level2/html/HTMLSelectElement19-expected.txt:
     16        * dom/xhtml/level2/html/HTMLSelectElement20-expected.txt:
     17        * dom/xhtml/level2/html/HTMLTableElement31-expected.txt:
     18        * dom/xhtml/level3/core/nodeisdefaultnamespace09-expected.txt:
     19        * dom/xhtml/level3/core/nodelookupprefix10-expected.txt:
     20        * fast/css/create_element_align-expected.checksum: Added.
     21        * fast/css/create_element_align-expected.png: Added.
     22        * fast/css/create_element_align-expected.txt: Added.
     23        * fast/css/create_element_align.xhtml: Added.
     24        * fast/dom/Document/replace-child-expected.txt:
     25        * fast/dom/createElement-expected.txt: Added.
     26        * fast/dom/createElement.html: Added.
     27        * svg/custom/createelement-expected.txt:
     28        * svg/custom/createelement.svg:
     29        * svg/custom/js-late-clipPath-and-object-creation.svg:
     30        * svg/custom/js-late-clipPath-creation.svg:
     31        * svg/custom/js-late-gradient-and-object-creation.svg:
     32        * svg/custom/js-late-gradient-creation.svg:
     33        * svg/custom/js-late-marker-and-object-creation.svg:
     34        * svg/custom/js-late-marker-creation.svg:
     35        * svg/custom/js-late-mask-and-object-creation.svg:
     36        * svg/custom/js-late-mask-creation.svg:
     37        * svg/custom/js-late-pattern-and-object-creation.svg:
     38        * svg/custom/js-late-pattern-creation.svg:
     39        * svg/custom/multiple-title-elements.svg:
     40        * svg/custom/path-textPath-simulation.svg:
     41
    1422007-07-09  Alice Liu  <alice.liu@apple.com>
    243
  • trunk/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelementcasesensitive-expected.txt

    r11962 r24146  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentcreateelementcasesensitive
    2 Status  Success
     2Status  failure
     3Message nodeName1: assertEquals failed, actual acronym, expected ACRONYM.
  • trunk/LayoutTests/dom/xhtml/level2/html/HTMLSelectElement18-expected.txt

    r21687 r24146  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement18
    2 Status  failure
    3 Message optLength: assertEquals failed, actual 5, expected 6.
     2Status  Success
  • trunk/LayoutTests/dom/xhtml/level2/html/HTMLSelectElement19-expected.txt

    r21687 r24146  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement19
    2 Status  failure
    3 Message optLength: assertEquals failed, actual 5, expected 6.
     2Status  Success
  • trunk/LayoutTests/dom/xhtml/level2/html/HTMLSelectElement20-expected.txt

    r21687 r24146  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement20
    2 Status  failure
    3 Message throw_NOT_FOUND_ERR: assertTrue failed
     2Status  Success
  • trunk/LayoutTests/dom/xhtml/level2/html/HTMLTableElement31-expected.txt

    r21687 r24146  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement31
    2 Status  error
    3 Message TypeError: Undefined value
     2Status  Success
  • trunk/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace09-expected.txt

    r11962 r24146  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace09
    2 Status  Success
     2Status  failure
     3Message nodeisdefaultnamespace09_2: assertTrue failed
  • trunk/LayoutTests/dom/xhtml/level3/core/nodelookupprefix10-expected.txt

    r11962 r24146  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix10
    2 Status  Success
     2Status  failure
     3Message nodelookupprefix10: assertEquals failed, actual null, expected dom3.
  • trunk/LayoutTests/fast/dom/Document/replace-child-expected.txt

    r21687 r24146  
    11This tests that various combinations of replaceChild on the document works as specified. If this test succeeds, there will be a number of "SUCCESS" lines below followed by "SUCCESS - All tests succeeded".
    22replacing element with element
    3 SUCCESS: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><bar/>
     3SUCCESS: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><bar xmlns="http://www.w3.org/1999/xhtml"></bar>
    44replacing element with doctype
    55SUCCESS: <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
  • trunk/LayoutTests/svg/custom/createelement-expected.txt

    r18264 r24146  
     1CONSOLE MESSAGE: line 13: TypeError: Null value
    12layer at (0,0) size 800x600
    23  RenderView at (0,0) size 800x600
    3     RenderSVGContainer {svg} at (0,0) size 363x124
    4       RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
    5       RenderSVGText {text} at (10,120) size 800x18
    6         RenderSVGInlineText {#text} at (0,-14) size 353x18
    7           text run at (0,-14) width 353: "namespace of created rect: http://www.w3.org/2000/svg"
     4    RenderSVGContainer {svg} at (0,0) size 100x100
    85      RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
     6      RenderSVGText {text} at (10,120) size 800x0
  • trunk/LayoutTests/svg/custom/createelement.svg

    r16575 r24146  
    11<?xml version="1.0" encoding="UTF-8"?>
    22<svg xmlns="http://www.w3.org/2000/svg">
    3   <rect id="red" width="100" height="100" fill="red" />
     3  <rect id="red" width="100" height="100" fill="green" />
    44  <text id="text" x="10" y="120"></text>
    55  <script type="text/javascript">
    66  <![CDATA[
    7     var red = document.getElementById('red');
     7    var green = document.getElementById('green');
    88    // Note the use of createElement instead of createElementNS
    9     var green = document.createElement("rect");
    10     // DOM 3 core says the namespaceURI must be null:
    11     // http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/DOM3-Core.html#core-ID-2141741547
    12     // but setting it to http://www.w3.org/2000/svg (like html does) is more in line with what web authors will expect.
     9    var red = document.createElement("rect");
     10    // HTML5 says createElement should lowercase the name and create it in the
     11    // xhtml namespace. This means the created element is not an SVG element
     12    // and therefore can't be appended to a SVG element.
    1313    green.setAttribute("width", "100");
    1414    green.setAttribute("height", "100");
    15     green.setAttribute("fill", "green");
    16     red.ownerDocument.rootElement.appendChild(green);
     15    green.setAttribute("fill", "red");
     16    green.ownerDocument.rootElement.appendChild(red);
    1717    document.getElementById('text').textContent = "namespace of created rect: " + green.namespaceURI;
    1818  ]]>
  • trunk/LayoutTests/svg/custom/js-late-clipPath-and-object-creation.svg

    r19050 r24146  
    88    function createObject()
    99    {
    10         var text = document.createElement("text");
     10        var text = document.createElementNS("http://www.w3.org/2000/svg", "text");
    1111        text.setAttribute("font-size", "60");
    1212        text.setAttribute("fill", "navy");
     
    2323        createObject();
    2424
    25         var clipPath = document.createElement("clipPath");
     25        var clipPath = document.createElementNS("http://www.w3.org/2000/svg", "clipPath");
    2626        clipPath.setAttribute("id", "dynClip");
    2727        clipPath.setAttribute("clipPathUnits", "userSpaceOnUse");
    2828
    29         var path = document.createElement("path");
     29        var path = document.createElementNS("http://www.w3.org/2000/svg", "path");
    3030        path.setAttribute("d", "M 0 0 l 200 0 l 0 200 l -200 0 Z");
    3131
  • trunk/LayoutTests/svg/custom/js-late-clipPath-creation.svg

    r19050 r24146  
    1010    function createClipPath()
    1111    {
    12         var clipPath = document.createElement("clipPath");
     12        var clipPath = document.createElementNS("http://www.w3.org/2000/svg", "clipPath");
    1313        clipPath.setAttribute("id", "dynClip");
    1414        clipPath.setAttribute("clipPathUnits", "userSpaceOnUse");
    1515
    16         var path = document.createElement("path");
     16        var path = document.createElementNS("http://www.w3.org/2000/svg", "path");
    1717        path.setAttribute("d", "M 0 0 l 200 0 l 0 200 l -200 0 Z");
    1818
  • trunk/LayoutTests/svg/custom/js-late-gradient-and-object-creation.svg

    r18421 r24146  
    1010        {
    1111                // Setup "fillLinearGradient"
    12                 var gradient1 = document.createElement("linearGradient");
     12                var gradient1 = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient");
    1313                gradient1.setAttribute("id", "fillLinearGradient");
    1414                gradient1.setAttribute("x1", "0");
    1515                gradient1.setAttribute("x2", "1");
    1616
    17                 var stop11 = document.createElement("stop");
     17                var stop11 = document.createElementNS("http://www.w3.org/2000/svg", "stop");
    1818                stop11.setAttribute("stop-color", "blue");
    1919                stop11.setAttribute("offset", "0");
    2020
    21                 var stop21 = document.createElement("stop");
     21                var stop21 = document.createElementNS("http://www.w3.org/2000/svg", "stop");
    2222                stop21.setAttribute("stop-color", "red");
    2323                stop21.setAttribute("offset", "1");
     
    2929
    3030                // Setup "strokeLinearGradient"
    31                 var gradient2 = document.createElement("linearGradient");
     31                var gradient2 = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient");
    3232                gradient2.setAttribute("id", "strokeLinearGradient");
    3333                gradient2.setAttribute("x1", "0");
    3434                gradient2.setAttribute("x2", "1");
    3535
    36                 var stop22 = document.createElement("stop");
     36                var stop22 = document.createElementNS("http://www.w3.org/2000/svg", "stop");
    3737                stop22.setAttribute("stop-color", "yellow");
    3838                stop22.setAttribute("offset", "0");
    3939
    40                 var stop22 = document.createElement("stop");
     40                var stop22 = document.createElementNS("http://www.w3.org/2000/svg", "stop");
    4141                stop22.setAttribute("stop-color", "green");
    4242                stop22.setAttribute("offset", "1");
     
    5252        function setupGradientUsers()
    5353        {
    54                 var text1 = document.createElement("text");
     54                var text1 = document.createElementNS("http://www.w3.org/2000/svg", "text");
    5555                text1.setAttribute("font-size", "68");
    5656                text1.setAttribute("x", "-150");
     
    6262                content.appendChild(text1);
    6363
    64                 var text2 = document.createElement("text");
     64                var text2 = document.createElementNS("http://www.w3.org/2000/svg", "text");
    6565                text2.setAttribute("font-size", "68");
    6666                text2.setAttribute("x", "-150");
     
    7272                content.appendChild(text2);
    7373
    74                 var text3 = document.createElement("text");
     74                var text3 = document.createElementNS("http://www.w3.org/2000/svg", "text");
    7575                text3.setAttribute("font-size", "68");
    7676                text3.setAttribute("x", "-150");
  • trunk/LayoutTests/svg/custom/js-late-gradient-creation.svg

    r18421 r24146  
    1010        function createGradient()
    1111        {
    12                 var gradient = document.createElement("linearGradient");
     12                var gradient = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient");
    1313                gradient.setAttribute("id", "dynGrad");
    1414                gradient.setAttribute("x1", "0");
    1515                gradient.setAttribute("x2", "1");
    1616
    17                 var stop1 = document.createElement("stop");
     17                var stop1 = document.createElementNS("http://www.w3.org/2000/svg", "stop");
    1818                stop1.setAttribute("stop-color", "blue");
    1919                stop1.setAttribute("offset", "0");
    2020
    21                 var stop2 = document.createElement("stop");
     21                var stop2 = document.createElementNS("http://www.w3.org/2000/svg", "stop");
    2222                stop2.setAttribute("stop-color", "red");
    2323                stop2.setAttribute("offset", "1");
  • trunk/LayoutTests/svg/custom/js-late-marker-and-object-creation.svg

    r19050 r24146  
    1919    function createObject()
    2020    {
    21         var path = document.createElement("path");
     21        var path = document.createElementNS("http://www.w3.org/2000/svg", "path");
    2222        path.setAttribute("fill", "none");
    2323        path.setAttribute("stroke", "black");
     
    3535        createObject();
    3636
    37         var marker = document.createElement("marker");
     37        var marker = document.createElementNS("http://www.w3.org/2000/svg", "marker");
    3838        marker.setAttribute("id", "markerMiddle");
    3939        marker.setAttribute("viewBox", "0 0 10 10");
     
    4444        marker.setAttribute("markerUnits", "strokeWidth");
    4545
    46         var circle = document.createElement("circle");
     46        var circle = document.createElementNS("http://www.w3.org/2000/svg", "circle");
    4747        circle.setAttribute("cx", "5");
    4848        circle.setAttribute("cy", "5");
  • trunk/LayoutTests/svg/custom/js-late-marker-creation.svg

    r19050 r24146  
    1919    function createMarker()
    2020    {
    21         var marker = document.createElement("marker");
     21        var marker = document.createElementNS("http://www.w3.org/2000/svg", "marker");
    2222        marker.setAttribute("id", "markerMiddle");
    2323        marker.setAttribute("viewBox", "0 0 10 10");
     
    2828        marker.setAttribute("markerUnits", "strokeWidth");
    2929
    30         var circle = document.createElement("circle");
     30        var circle = document.createElementNS("http://www.w3.org/2000/svg", "circle");
    3131        circle.setAttribute("cx", "5");
    3232        circle.setAttribute("cy", "5");
  • trunk/LayoutTests/svg/custom/js-late-mask-and-object-creation.svg

    r19050 r24146  
    1010    function createObject()
    1111    {
    12         var rect = document.createElement("rect");
     12        var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
    1313        rect.setAttribute("width", "800");
    1414        rect.setAttribute("height", "100");
     
    2424        createObject();
    2525
    26         var mask = document.createElement("mask");
     26        var mask = document.createElementNS("http://www.w3.org/2000/svg", "mask");
    2727        mask.setAttribute("id", "dynMask");
    2828        mask.setAttribute("maskUnits", "userSpaceOnUse");
     
    3232        mask.setAttribute("height", "300");
    3333
    34         var rect = document.createElement("rect");
     34        var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
    3535        rect.setAttribute("width", "800");
    3636        rect.setAttribute("height", "300");
  • trunk/LayoutTests/svg/custom/js-late-mask-creation.svg

    r19050 r24146  
    1111    function createMask()
    1212    {
    13         var mask = document.createElement("mask");
     13        var mask = document.createElementNS("http://www.w3.org/2000/svg", "mask");
    1414        mask.setAttribute("id", "dynMask");
    1515        mask.setAttribute("maskUnits", "userSpaceOnUse");
     
    1919        mask.setAttribute("height", "300");
    2020
    21         var rect = document.createElement("rect");
     21        var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
    2222        rect.setAttribute("width", "800");
    2323        rect.setAttribute("height", "300");
  • trunk/LayoutTests/svg/custom/js-late-pattern-and-object-creation.svg

    r18521 r24146  
    1010        {
    1111                // Setup "fillPattern" 
    12                 var pattern1 = document.createElement("pattern");
     12                var pattern1 = document.createElementNS("http://www.w3.org/2000/svg", "pattern");
    1313                pattern1.setAttribute("id", "fillPattern");
    1414                pattern1.setAttribute("patternUnits", "userSpaceOnUse");
     
    1818                pattern1.setAttribute("height", "20");
    1919
    20                 var rect11 = document.createElement("rect");
     20                var rect11 = document.createElementNS("http://www.w3.org/2000/svg", "rect");
    2121                rect11.setAttribute("x", "5");
    2222                rect11.setAttribute("y", "5");
     
    2525                rect11.setAttribute("fill", "red");
    2626
    27                 var rect21 = document.createElement("rect");
     27                var rect21 = document.createElementNS("http://www.w3.org/2000/svg", "rect");
    2828                rect21.setAttribute("x", "10");
    2929                rect21.setAttribute("y", "10");
     
    3838
    3939                // Setup "strokePattern"       
    40                 var pattern2 = document.createElement("pattern");
     40                var pattern2 = document.createElementNS("http://www.w3.org/2000/svg", "pattern");
    4141                pattern2.setAttribute("id", "strokePattern");
    4242                pattern2.setAttribute("patternUnits", "userSpaceOnUse");
     
    4646                pattern2.setAttribute("height", "20");
    4747
    48                 var rect12 = document.createElement("rect");
     48                var rect12 = document.createElementNS("http://www.w3.org/2000/svg", "rect");
    4949                rect12.setAttribute("x", "5");
    5050                rect12.setAttribute("y", "5");
     
    5353                rect12.setAttribute("fill", "yellow");
    5454
    55                 var rect22 = document.createElement("rect");
     55                var rect22 = document.createElementNS("http://www.w3.org/2000/svg", "rect");
    5656                rect22.setAttribute("x", "10");
    5757                rect22.setAttribute("y", "10");
     
    7070        function setupPatternUsers()
    7171        {
    72                 var text1 = document.createElement("text");
     72                var text1 = document.createElementNS("http://www.w3.org/2000/svg", "text");
    7373                text1.setAttribute("font-size", "68");
    7474                text1.setAttribute("x", "-150");
     
    8080                content.appendChild(text1);
    8181
    82                 var text2 = document.createElement("text");
     82                var text2 = document.createElementNS("http://www.w3.org/2000/svg", "text");
    8383                text2.setAttribute("font-size", "68");
    8484                text2.setAttribute("x", "-150");
     
    9090                content.appendChild(text2);
    9191
    92                 var text3 = document.createElement("text");
     92                var text3 = document.createElementNS("http://www.w3.org/2000/svg", "text");
    9393                text3.setAttribute("font-size", "68");
    9494                text3.setAttribute("x", "-150");
  • trunk/LayoutTests/svg/custom/js-late-pattern-creation.svg

    r18521 r24146  
    1010        function createPattern()
    1111        {
    12                 var pattern = document.createElement("pattern");
     12                var pattern = document.createElementNS("http://www.w3.org/2000/svg", "pattern");
    1313                pattern.setAttribute("id", "dynPattern");
    1414                pattern.setAttribute("patternUnits", "userSpaceOnUse");
     
    1818                pattern.setAttribute("height", "20");
    1919
    20                 var rect1 = document.createElement("rect");
     20                var rect1 = document.createElementNS("http://www.w3.org/2000/svg", "rect");
    2121                rect1.setAttribute("x", "5");
    2222                rect1.setAttribute("y", "5");
     
    2525                rect1.setAttribute("fill", "red");
    2626
    27                 var rect2 = document.createElement("rect");
     27                var rect2 = document.createElementNS("http://www.w3.org/2000/svg", "rect");
    2828                rect2.setAttribute("x", "10");
    2929                rect2.setAttribute("y", "10");
  • trunk/LayoutTests/svg/custom/multiple-title-elements.svg

    r19070 r24146  
    1010function log(message)
    1111{
    12     var t = document.createElement("text");
     12    var t = document.createElementNS("http://www.w3.org/2000/svg", "text");
    1313    t.appendChild(document.createTextNode(message));
    1414    t.setAttribute('y', logOffset);
     
    2929function createTitleElement(title)
    3030{
    31     var t = document.createElement('title');
     31    var t = document.createElementNS("http://www.w3.org/2000/svg", 'title');
    3232    t.appendChild(document.createTextNode(title));
    3333    return t;
  • trunk/LayoutTests/svg/custom/path-textPath-simulation.svg

    r19970 r24146  
    1818    var lastPoint = path.getPointAtLength(1.0 * totalLength);
    1919
    20     var text1 = document.createElement("text");
     20    var text1 = document.createElementNS("http://www.w3.org/2000/svg", "text");
    2121    text1.appendChild(document.createTextNode("A"));
    2222    text1.setAttribute("x", firstPoint.x);
    2323    text1.setAttribute("y", firstPoint.y);
    2424
    25     var text2 = document.createElement("text");
     25    var text2 = document.createElementNS("http://www.w3.org/2000/svg", "text");
    2626    text2.appendChild(document.createTextNode("B"));
    2727    text2.setAttribute("x", midPoint.x);
    2828    text2.setAttribute("y", midPoint.y);
    2929
    30     var text3 = document.createElement("text");
     30    var text3 = document.createElementNS("http://www.w3.org/2000/svg", "text");
    3131    text3.appendChild(document.createTextNode("C"));
    3232    text3.setAttribute("x", lastPoint.x);
  • trunk/WebCore/ChangeLog

    r24131 r24146  
     12007-07-10  Rob Buis  <buis@kde.org>
     2
     3        Reviewed by Maciej.
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=8007
     6        createElement() and XHTML (A dynamically created table not rendered as such)
     7
     8        Follow the HTML5 rules of making the name lowercase and then
     9        creating the element in the xhtml namespace.
     10
     11        * dom/Document.cpp:
     12        (WebCore::Document::createElement):
     13        * dom/Document.h:
     14        * html/HTMLDocument.cpp:
     15        * html/HTMLDocument.h:
     16
    1172007-07-09  Qing Zhao  <qing@staikos.net>
    218
  • trunk/WebCore/dom/Document.cpp

    r24122 r24146  
    466466PassRefPtr<Element> Document::createElement(const String &name, ExceptionCode& ec)
    467467{
    468     return createElementNS(nullAtom, name, ec);
     468    String lowerName(name.lower());
     469    if (!isValidName(lowerName)) {
     470        ec = INVALID_CHARACTER_ERR;
     471        return 0;
     472    }
     473    return HTMLElementFactory::createHTMLElement(AtomicString(lowerName), this, 0, false);
    469474}
    470475
  • trunk/WebCore/dom/Document.h

    r24055 r24146  
    161161    virtual void childrenChanged();
    162162    Element* documentElement() const;
    163     virtual PassRefPtr<Element> createElement(const String& tagName, ExceptionCode&);
     163    PassRefPtr<Element> createElement(const String& tagName, ExceptionCode&);
    164164    PassRefPtr<DocumentFragment> createDocumentFragment ();
    165165    PassRefPtr<Text> createTextNode(const String& data);
  • trunk/WebCore/html/HTMLDocument.cpp

    r23906 r24146  
    6565#include "HTMLBodyElement.h"
    6666#include "HTMLElement.h"
    67 #include "HTMLElementFactory.h"
    6867#include "HTMLNames.h"
    6968#include "HTMLTokenizer.h"
     
    301300{
    302301    return newChild->hasTagName(htmlTag);
    303 }
    304 
    305 PassRefPtr<Element> HTMLDocument::createElement(const String &name, ExceptionCode& ec)
    306 {
    307     String lowerName(name.lower());
    308     if (!isValidName(lowerName)) {
    309         ec = INVALID_CHARACTER_ERR;
    310         return 0;
    311     }
    312     return HTMLElementFactory::createHTMLElement(AtomicString(lowerName), this, 0, false);
    313302}
    314303
  • trunk/WebCore/html/HTMLDocument.h

    r21681 r24146  
    7272    virtual bool childAllowed(Node*);
    7373
    74     virtual PassRefPtr<Element> createElement(const String& tagName, ExceptionCode&);
    75 
    7674    virtual void determineParseMode(const String&);
    7775
Note: See TracChangeset for help on using the changeset viewer.