OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) |
3 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
5 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 5 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
7 * Copyright (C) 2008 Holger Hans Peter Freyther | 7 * Copyright (C) 2008 Holger Hans Peter Freyther |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 #include <wtf/Vector.h> | 60 #include <wtf/Vector.h> |
61 #include <wtf/text/CString.h> | 61 #include <wtf/text/CString.h> |
62 | 62 |
63 using namespace std; | 63 using namespace std; |
64 | 64 |
65 namespace WebCore { | 65 namespace WebCore { |
66 | 66 |
67 static inline void setAttributes(Element* element, Vector<Attribute>& attributeV
ector, ParserContentPolicy parserContentPolicy) | 67 static inline void setAttributes(Element* element, Vector<Attribute>& attributeV
ector, ParserContentPolicy parserContentPolicy) |
68 { | 68 { |
69 if (!scriptingContentIsAllowed(parserContentPolicy)) | 69 if (!scriptingContentIsAllowed(parserContentPolicy)) |
70 element->stripJavaScriptAttributes(attributeVector); | 70 element->stripScriptingAttributes(attributeVector); |
71 element->parserSetAttributes(attributeVector); | 71 element->parserSetAttributes(attributeVector); |
72 } | 72 } |
73 | 73 |
74 class EntityResolver : public QXmlStreamEntityResolver { | 74 class EntityResolver : public QXmlStreamEntityResolver { |
75 virtual QString resolveUndeclaredEntity(const QString &name); | 75 virtual QString resolveUndeclaredEntity(const QString &name); |
76 }; | 76 }; |
77 | 77 |
78 static QString decodeNamedEntity(const QString& entityName) | 78 static QString decodeNamedEntity(const QString& entityName) |
79 { | 79 { |
80 UChar utf16DecodedEntity[4]; | 80 UChar utf16DecodedEntity[4]; |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 || (publicId == QLatin1String("-//WAPFORUM//DTD XHTML Mobile 1.0//EN")) | 648 || (publicId == QLatin1String("-//WAPFORUM//DTD XHTML Mobile 1.0//EN")) |
649 || (publicId == QLatin1String("-//WAPFORUM//DTD XHTML Mobile 1.1//EN")) | 649 || (publicId == QLatin1String("-//WAPFORUM//DTD XHTML Mobile 1.1//EN")) |
650 || (publicId == QLatin1String("-//WAPFORUM//DTD XHTML Mobile 1.2//EN")) | 650 || (publicId == QLatin1String("-//WAPFORUM//DTD XHTML Mobile 1.2//EN")) |
651 ) | 651 ) |
652 setIsXHTMLDocument(true); // controls if we replace entities or not. | 652 setIsXHTMLDocument(true); // controls if we replace entities or not. |
653 if (!m_parsingFragment) | 653 if (!m_parsingFragment) |
654 document()->parserAppendChild(DocumentType::create(document(), name, pub
licId, systemId)); | 654 document()->parserAppendChild(DocumentType::create(document(), name, pub
licId, systemId)); |
655 | 655 |
656 } | 656 } |
657 } | 657 } |
OLD | NEW |