andersca | ba588c8 | 2006-05-09 19:03:20 +0000 | [diff] [blame] | 1 | /* |
weinig@apple.com | 3feb4c3 | 2008-06-15 21:53:29 +0000 | [diff] [blame] | 2 | * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
andersca | ba588c8 | 2006-05-09 19:03:20 +0000 | [diff] [blame] | 3 | * |
| 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.com | 9204733 | 2014-03-15 04:08:27 +0000 | [diff] [blame] | 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY |
andersca | ba588c8 | 2006-05-09 19:03:20 +0000 | [diff] [blame] | 14 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
mjs@apple.com | 9204733 | 2014-03-15 04:08:27 +0000 | [diff] [blame] | 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR |
andersca | ba588c8 | 2006-05-09 19:03:20 +0000 | [diff] [blame] | 17 | * 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.org | ca990ec | 2010-09-08 08:52:17 +0000 | [diff] [blame] | 22 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
andersca | ba588c8 | 2006-05-09 19:03:20 +0000 | [diff] [blame] | 23 | */ |
| 24 | |
| 25 | #include "config.h" |
andersca | ba588c8 | 2006-05-09 19:03:20 +0000 | [diff] [blame] | 26 | #include "TextDocument.h" |
| 27 | |
abarth@webkit.org | ca990ec | 2010-09-08 08:52:17 +0000 | [diff] [blame] | 28 | #include "TextDocumentParser.h" |
andersca | dd79f19 | 2006-06-20 19:44:08 +0000 | [diff] [blame] | 29 | |
andersca | ba588c8 | 2006-05-09 19:03:20 +0000 | [diff] [blame] | 30 | namespace WebCore { |
| 31 | |
darin@apple.com | 5ffbb5c | 2013-09-27 16:39:41 +0000 | [diff] [blame] | 32 | TextDocument::TextDocument(Frame* frame, const URL& url) |
benjamin@webkit.org | d800320 | 2014-02-07 23:03:03 +0000 | [diff] [blame] | 33 | : HTMLDocument(frame, url, TextDocumentClass) |
andersca | ba588c8 | 2006-05-09 19:03:20 +0000 | [diff] [blame] | 34 | { |
benjamin@webkit.org | 6d7ab06 | 2014-05-30 00:15:18 +0000 | [diff] [blame] | 35 | setCompatibilityMode(DocumentCompatibilityMode::QuirksMode); |
hyatt@apple.com | ce8ee2a | 2010-08-27 20:29:34 +0000 | [diff] [blame] | 36 | lockCompatibilityMode(); |
andersca | ba588c8 | 2006-05-09 19:03:20 +0000 | [diff] [blame] | 37 | } |
| 38 | |
akling@apple.com | cf2486a | 2014-12-19 03:11:36 +0000 | [diff] [blame] | 39 | Ref<DocumentParser> TextDocument::createParser() |
andersca | ba588c8 | 2006-05-09 19:03:20 +0000 | [diff] [blame] | 40 | { |
weinig@apple.com | 97a6cb5 | 2013-10-06 01:08:17 +0000 | [diff] [blame] | 41 | return TextDocumentParser::create(*this); |
andersca | ba588c8 | 2006-05-09 19:03:20 +0000 | [diff] [blame] | 42 | } |
| 43 | |
andersca | ba588c8 | 2006-05-09 19:03:20 +0000 | [diff] [blame] | 44 | } |