Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Side by Side Diff: Source/WebCore/xml/parser/XMLDocumentParserQt.cpp

Issue 14297020: Merge 147281 "Cross-Origin copy&paste / drag&drop allowing XSS v..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1453/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698