Changeset 61971 in webkit


Ignore:
Timestamp:
Jun 27, 2010 3:09:17 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-06-27 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Actually insert Doctype elements
https://bugs.webkit.org/show_bug.cgi?id=41262

This code is pretty much the same as in the old tree builder.

  • html/HTMLToken.h: (WebCore::AtomicHTMLToken::publicIdentifier): (WebCore::AtomicHTMLToken::systemIdentifier):
  • html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::insertDoctype):
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r61970 r61971  
     12010-06-27  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Actually insert Doctype elements
     6        https://bugs.webkit.org/show_bug.cgi?id=41262
     7
     8        This code is pretty much the same as in the old tree builder.
     9
     10        * html/HTMLToken.h:
     11        (WebCore::AtomicHTMLToken::publicIdentifier):
     12        (WebCore::AtomicHTMLToken::systemIdentifier):
     13        * html/HTMLTreeBuilder.cpp:
     14        (WebCore::HTMLTreeBuilder::insertDoctype):
     15
    1162010-06-27  Andreas Kling  <andreas.kling@nokia.com>
    217
  • trunk/WebCore/html/HTMLToken.h

    r61822 r61971  
    362362
    363363    // FIXME: Distinguish between a missing public identifer and an empty one.
    364     const WTF::Vector<UChar>& publicIdentifier() const
     364    WTF::Vector<UChar>& publicIdentifier() const
    365365    {
    366366        ASSERT(m_type == HTMLToken::DOCTYPE);
     
    369369
    370370    // FIXME: Distinguish between a missing system identifer and an empty one.
    371     const WTF::Vector<UChar>& systemIdentifier() const
     371    WTF::Vector<UChar>& systemIdentifier() const
    372372    {
    373373        ASSERT(m_type == HTMLToken::DOCTYPE);
  • trunk/WebCore/html/HTMLTreeBuilder.cpp

    r61966 r61971  
    2929#include "Comment.h"
    3030#include "DocumentFragment.h"
     31#include "DocumentType.h"
    3132#include "Element.h"
    3233#include "Frame.h"
     
    593594void HTMLTreeBuilder::insertDoctype(AtomicHTMLToken& token)
    594595{
    595     ASSERT_UNUSED(token, token.type() == HTMLToken::DOCTYPE);
     596    ASSERT(token.type() == HTMLToken::DOCTYPE);
     597    m_document->addChild(DocumentType::create(m_document, token.name(), String::adopt(token.publicIdentifier()), String::adopt(token.systemIdentifier())));
     598    // FIXME: Move quirks mode detection from DocumentType element to here.
     599    notImplemented();
     600    if (token.forceQuirks())
     601        m_document->setParseMode(Document::Compat);
    596602}
    597603
Note: See TracChangeset for help on using the changeset viewer.