blob: 71b3ef9e0f8ee226870c490338abe69374d51b9d [file] [log] [blame]
anderscaba588c82006-05-09 19:03:20 +00001/*
weinig@apple.com3feb4c32008-06-15 21:53:29 +00002 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
anderscaba588c82006-05-09 19:03:20 +00003 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
mjs@apple.com92047332014-03-15 04:08:27 +000013 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
anderscaba588c82006-05-09 19:03:20 +000014 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
mjs@apple.com92047332014-03-15 04:08:27 +000016 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
anderscaba588c82006-05-09 19:03:20 +000017 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
20 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
abarth@webkit.orgca990ec2010-09-08 08:52:17 +000022 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
anderscaba588c82006-05-09 19:03:20 +000023 */
24
25#include "config.h"
anderscaba588c82006-05-09 19:03:20 +000026#include "TextDocument.h"
27
abarth@webkit.orgca990ec2010-09-08 08:52:17 +000028#include "TextDocumentParser.h"
anderscadd79f192006-06-20 19:44:08 +000029
anderscaba588c82006-05-09 19:03:20 +000030namespace WebCore {
31
darin@apple.com5ffbb5c2013-09-27 16:39:41 +000032TextDocument::TextDocument(Frame* frame, const URL& url)
benjamin@webkit.orgd8003202014-02-07 23:03:03 +000033 : HTMLDocument(frame, url, TextDocumentClass)
anderscaba588c82006-05-09 19:03:20 +000034{
benjamin@webkit.org6d7ab062014-05-30 00:15:18 +000035 setCompatibilityMode(DocumentCompatibilityMode::QuirksMode);
hyatt@apple.comce8ee2a2010-08-27 20:29:34 +000036 lockCompatibilityMode();
anderscaba588c82006-05-09 19:03:20 +000037}
38
akling@apple.comcf2486a2014-12-19 03:11:36 +000039Ref<DocumentParser> TextDocument::createParser()
anderscaba588c82006-05-09 19:03:20 +000040{
weinig@apple.com97a6cb52013-10-06 01:08:17 +000041 return TextDocumentParser::create(*this);
anderscaba588c82006-05-09 19:03:20 +000042}
43
anderscaba588c82006-05-09 19:03:20 +000044}