OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 #include "core/html/parser/TextDocumentParser.h" | 27 #include "core/html/parser/TextDocumentParser.h" |
28 | 28 |
29 namespace blink { | 29 namespace blink { |
30 | 30 |
31 TextDocument::TextDocument(const DocumentInit& initializer) | 31 TextDocument::TextDocument(const DocumentInit& initializer) |
32 : HTMLDocument(initializer) | 32 : HTMLDocument(initializer) |
33 { | 33 { |
34 setCompatibilityMode(QuirksMode); | 34 setCompatibilityMode(QuirksMode); |
35 lockCompatibilityMode(); | 35 lockCompatibilityMode(); |
| 36 UseCounter::count(*this, UseCounter::TextDocument); |
| 37 if (ownerElement()) |
| 38 UseCounter::count(*this, UseCounter::TextDocumentInFrame); |
36 } | 39 } |
37 | 40 |
38 DocumentParser* TextDocument::createParser() | 41 DocumentParser* TextDocument::createParser() |
39 { | 42 { |
40 return TextDocumentParser::create(*this, getParserSynchronizationPolicy()); | 43 return TextDocumentParser::create(*this, getParserSynchronizationPolicy()); |
41 } | 44 } |
42 | 45 |
43 } // namespace blink | 46 } // namespace blink |
OLD | NEW |