Changeset 24935 in webkit


Ignore:
Timestamp:
Aug 8, 2007 10:14:42 AM (17 years ago)
Author:
kmccullo
Message:

LayoutTests:

Reviewed by Maciej and Hyatt.

  • <rdar://problem/4976879> REGRESSION: Safari doesn't work with Zimbra enhanced login.
    • Reverting a previous change, and modifying how documents are created so that we better match other browsers behavior with respect to namespaceURIs.
  • dom/xhtml/level1/core/hc_documentcreateelementcasesensitive-expected.txt:
  • fast/dom/Document/replace-child-expected.txt:
  • http/tests/misc/createElementNamespace1-expected.txt: Added.
  • http/tests/misc/createElementNamespace1.xml: Added.
  • http/tests/misc/createElementNamespace2-expected.txt: Added.
  • http/tests/misc/createElementNamespace2.xhtml: Added.
  • http/tests/misc/createElementNamespace3-expected.txt: Added.
  • http/tests/misc/createElementNamespace3.html: Added.

WebCore:

Reviewed by Maciej and Hyatt.

  • <rdar://problem/4976879> REGRESSION: Safari doesn't work with Zimbra enhanced login.
  • Reverting a previous change, and modifying how documents are created so that we better match other browsers behavior with respect to namespaceURIs.
  • WebCore.xcodeproj/project.pbxproj:
  • dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument):
  • dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::createElement):
  • dom/Document.h:
  • html/HTMLDocument.cpp: (WebCore::HTMLDocument::createElement):
  • html/HTMLDocument.h:
Location:
trunk
Files:
6 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r24934 r24935  
     12007-08-07  Kevin McCullough  <kmccullough@apple.com>
     2
     3        Reviewed by Maciej and Hyatt.
     4
     5       - <rdar://problem/4976879> REGRESSION: Safari doesn't work with Zimbra enhanced login.
     6        - Reverting a previous change, and modifying how documents are created so that we better match other browsers behavior with respect to namespaceURIs.
     7
     8        * dom/xhtml/level1/core/hc_documentcreateelementcasesensitive-expected.txt:
     9        * fast/dom/Document/replace-child-expected.txt:
     10        * http/tests/misc/createElementNamespace1-expected.txt: Added.
     11        * http/tests/misc/createElementNamespace1.xml: Added.
     12        * http/tests/misc/createElementNamespace2-expected.txt: Added.
     13        * http/tests/misc/createElementNamespace2.xhtml: Added.
     14        * http/tests/misc/createElementNamespace3-expected.txt: Added.
     15        * http/tests/misc/createElementNamespace3.html: Added.
     16
    1172007-08-08  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
    218
  • trunk/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelementcasesensitive-expected.txt

    r24146 r24935  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentcreateelementcasesensitive
    2 Status  failure
    3 Message nodeName1: assertEquals failed, actual acronym, expected ACRONYM.
     2Status  Success
  • trunk/LayoutTests/fast/dom/Document/replace-child-expected.txt

    r24146 r24935  
    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 xmlns="http://www.w3.org/1999/xhtml"></bar>
     3SUCCESS: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><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/WebCore/ChangeLog

    r24934 r24935  
     12007-08-07  Kevin McCullough  <kmccullough@apple.com>
     2
     3        Reviewed by Maciej and Hyatt.
     4
     5        - <rdar://problem/4976879> REGRESSION: Safari doesn't work with Zimbra enhanced login.
     6        - Reverting a previous change, and modifying how documents are created so that we better match other browsers behavior with respect to namespaceURIs.
     7
     8        * WebCore.xcodeproj/project.pbxproj:
     9        * dom/DOMImplementation.cpp:
     10        (WebCore::DOMImplementation::createDocument):
     11        * dom/Document.cpp:
     12        (WebCore::Document::Document):
     13        (WebCore::Document::createElement):
     14        * dom/Document.h:
     15        * html/HTMLDocument.cpp:
     16        (WebCore::HTMLDocument::createElement):
     17        * html/HTMLDocument.h:
     18
    1192007-08-08  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
    220
  • trunk/WebCore/dom/DOMImplementation.cpp

    r24869 r24935  
    3434#include "FTPDirectoryDocument.h"
    3535#include "HTMLDocument.h"
     36#include "HTMLNames.h"
    3637#include "HTMLViewSourceDocument.h"
    3738#include "Image.h"
     
    276277    else
    277278#endif
    278         doc = new Document(this, 0);
     279        if (namespaceURI == HTMLNames::xhtmlNamespaceURI)
     280            doc = new Document(this, 0, true);
     281        else
     282            doc = new Document(this, 0);
    279283
    280284    // now get the interesting parts of the doctype
     
    357361        return new HTMLDocument(this, frame);
    358362    if (type == "application/xhtml+xml")
    359         return new Document(this, frame);
     363        return new Document(this, frame, true);
    360364       
    361365#if ENABLE(FTPDIR)
  • trunk/WebCore/dom/Document.cpp

    r24900 r24935  
    246246
    247247// FrameView might be 0
    248 Document::Document(DOMImplementation* impl, Frame* frame)
     248Document::Document(DOMImplementation* impl, Frame* frame, bool isXHTML)
    249249    : ContainerNode(0)
    250250    , m_implementation(impl)
     
    280280    , m_inLowBandwidthDisplay(false)
    281281#endif
     282    , m_isXHTML(isXHTML)
    282283{
    283284    m_document.resetSkippingRef(this);
     
    472473PassRefPtr<Element> Document::createElement(const String &name, ExceptionCode& ec)
    473474{
    474     String lowerName(name.lower());
    475     if (!isValidName(lowerName)) {
    476         ec = INVALID_CHARACTER_ERR;
    477         return 0;
    478     }
    479     return HTMLElementFactory::createHTMLElement(AtomicString(lowerName), this, 0, false);
     475    if (m_isXHTML) {
     476        if (!isValidName(name)) {
     477            ec = INVALID_CHARACTER_ERR;
     478            return 0;
     479        }
     480
     481        return HTMLElementFactory::createHTMLElement(AtomicString(name), this, 0, false);
     482    } else
     483        return createElementNS(nullAtom, name, ec);
    480484}
    481485
  • trunk/WebCore/dom/Document.h

    r24900 r24935  
    137137class Document : public ContainerNode {
    138138public:
    139     Document(DOMImplementation*, Frame*);
     139    Document(DOMImplementation*, Frame*, bool isXHTML = false);
    140140    ~Document();
    141141
     
    163163    virtual void childrenChanged();
    164164    Element* documentElement() const;
    165     PassRefPtr<Element> createElement(const String& tagName, ExceptionCode&);
     165    virtual PassRefPtr<Element> createElement(const String& tagName, ExceptionCode&);
    166166    PassRefPtr<DocumentFragment> createDocumentFragment ();
    167167    PassRefPtr<Text> createTextNode(const String& data);
     
    885885    bool m_useSecureKeyboardEntryWhenActive;
    886886
     887    bool m_isXHTML;
     888
    887889#if USE(LOW_BANDWIDTH_DISPLAY)
    888890    bool m_inLowBandwidthDisplay;
  • trunk/WebCore/html/HTMLDocument.cpp

    r24831 r24935  
    6666#include "HTMLBodyElement.h"
    6767#include "HTMLElement.h"
     68#include "HTMLElementFactory.h"
    6869#include "HTMLNames.h"
    6970#include "HTMLTokenizer.h"
     
    299300{
    300301    return newChild->hasTagName(htmlTag) || newChild->isCommentNode();
     302}
     303
     304PassRefPtr<Element> HTMLDocument::createElement(const String &name, ExceptionCode& ec)
     305{
     306    String lowerName(name.lower());
     307    if (!isValidName(lowerName)) {
     308        ec = INVALID_CHARACTER_ERR;
     309        return 0;
     310    }
     311    return HTMLElementFactory::createHTMLElement(AtomicString(lowerName), this, 0, false);
    301312}
    302313
  • trunk/WebCore/html/HTMLDocument.h

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