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

Side by Side Diff: Source/core/xml/parser/XMLDocumentParser.cpp

Issue 33353003: Have Frame::tree() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 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/core/testing/Internals.cpp ('k') | Source/web/EditorClientImpl.cpp » ('j') | 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 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 static inline bool hasNoStyleInformation(Document* document) 105 static inline bool hasNoStyleInformation(Document* document)
106 { 106 {
107 if (document->sawElementsInKnownNamespaces() || document->transformSourceDoc ument()) 107 if (document->sawElementsInKnownNamespaces() || document->transformSourceDoc ument())
108 return false; 108 return false;
109 109
110 if (!document->frame() || !document->frame()->page()) 110 if (!document->frame() || !document->frame()->page())
111 return false; 111 return false;
112 112
113 if (document->frame()->tree()->parent()) 113 if (document->frame()->tree().parent())
114 return false; // This document is not in a top frame 114 return false; // This document is not in a top frame
115 115
116 return true; 116 return true;
117 } 117 }
118 118
119 class PendingStartElementNSCallback FINAL : public XMLDocumentParser::PendingCal lback { 119 class PendingStartElementNSCallback FINAL : public XMLDocumentParser::PendingCal lback {
120 public: 120 public:
121 PendingStartElementNSCallback(const AtomicString& localName, const AtomicStr ing& prefix, const AtomicString& uri, 121 PendingStartElementNSCallback(const AtomicString& localName, const AtomicStr ing& prefix, const AtomicString& uri,
122 int namespaceCount, const xmlChar** namespaces, int attributeCount, int defaultedCount, const xmlChar** attributes) 122 int namespaceCount, const xmlChar** namespaces, int attributeCount, int defaultedCount, const xmlChar** attributes)
123 : m_localName(localName) 123 : m_localName(localName)
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1635 sax.initialized = XML_SAX2_MAGIC; 1635 sax.initialized = XML_SAX2_MAGIC;
1636 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax, &state); 1636 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax, &state);
1637 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; 1637 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />";
1638 parseChunk(parser->context(), parseString); 1638 parseChunk(parser->context(), parseString);
1639 finishParsing(parser->context()); 1639 finishParsing(parser->context());
1640 attrsOK = state.gotAttributes; 1640 attrsOK = state.gotAttributes;
1641 return state.attributes; 1641 return state.attributes;
1642 } 1642 }
1643 1643
1644 } // namespace WebCore 1644 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | Source/web/EditorClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698